| 1 |
## Defender Lib Directory |
| 2 |
|
| 3 |
This directory contains prefix namespaces and classmap classes to avoid conflicts with plugins that include the same package. |
| 4 |
The contents of the `packages` and `classes` directories are automatically generated by `composer install` and `composer update`. |
| 5 |
|
| 6 |
All namespaces are prefixed with `WPMU_DEV\Defender\Vendor` and classmap classes prefixed with `WPDEF_Vendor_`. |
| 7 |
|
| 8 |
**_Do not_ make direct changes in the files contained in `packages` or `classes` directories! Any changes to the files will be lost!** |
| 9 |
|
| 10 |
### Add Packages |
| 11 |
|
| 12 |
Add packages to `require-dev` in order to avoid including the original dependencies in the root autoloader. |
| 13 |
`require-dev` dependencies will be ignored in production and won't be added to vendor directory. |
| 14 |
|
| 15 |
1. Add package to `require-dev` section of `lib/composer.json` |
| 16 |
2. Add package slug to `extra/mozart/packages` section of `lib/composer.json` |
| 17 |
3. Run `composer run-script build-lib` from the root directory (After executing this command you should see the package in `packages/VendorName/PackageName` or `classes`) |
| 18 |
|
| 19 |
### Update Packages |
| 20 |
|
| 21 |
1. Change the package version in `lib/composer.json` |
| 22 |
2. Run `composer run-script build-lib` from the root directory. |
| 23 |
|