novactive / ezlegacy-tools-bundle
Novactive eZ Publish Legacy Tools Bundle
Installs: 10 840
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- ezsystems/legacy-bridge: ^2.0
- symfony/symfony: ^3.0
Requires (Dev)
- novactive/phpcs-novastandards: ^1.3
- phpmd/phpmd: ^2.4
- sebastian/phpcpd: ^2.0
This package is auto-updated.
Last update: 2020-11-08 14:36:10 UTC
README
About
This bundle provides post Composer install/update scripts to :
- install legacy settings from a bundle (the same way legacy extensions are managed natively)
- execute legacy scripts
Configuration
You can add the following extra parameters into your project's composer file :
Configuration | Type | Description |
---|---|---|
legacy-settings-install | array of strings | ezpublish:legacybundles:install_settings command options. Possible entries : copy, symlink, force |
legacy-scripts-execution | array of strings | List of legacy scripts (with params) to be executed |
Installation
With composer :
php composer.phar require novactive/ezlegacy-tools-bundle
Enable the bundle :
<?php
// ezpublish/EzPublishKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Novactive\EzLegacyToolsBundle\NovactiveEzLegacyToolsBundle(),
);
}
Legacy settings installation
Add the following line to your composer.json file :
...
"scripts": {
...
"post-install-cmd": [
...,
"Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::installLegacyBundlesSettings"
],
"post-update-cmd": [
...,
"Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::installLegacyBundlesSettings"
]
}
...,
"extra": {
...,
"legacy-settings-install": ["force", "relative"]
},
...
Legacy scripts execution
Add the following line to your composer.json file :
...
"scripts": {
...
"post-install-cmd": [
...,
"Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::executeLegacyScripts"
],
"post-update-cmd": [
...,
"Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::executeLegacyScripts"
]
}
...,
"extra": {
...,
"legacy-scripts-execution": [
"bin/php/ezpgenerateautoloads.php --kernel",
"bin/php/ezpgenerateautoloads.php --extension",
"bin/php/ezpgenerateautoloads.php --kernel-override"
]
},
...
Usage
Legacy settings installation
The command will search for a legacy_settings folder in all project specific bundles. You can only have one bundle containing a legacy_settings directory otherwise an exception will be thrown.
The command will then search for a 'override' and 'siteaccess' directories in the legacy_settings directory.
Contributing
In order to be accepted, your contribution needs to pass a few controls :
- PHP files should be valid
- PHP files should follow the PSR-2 standard
- PHP files should be phpmd and phpcpd warning/error free
To ease the validation process, install the pre-commit framework and install the repository pre-commit hook :
pre-commit install
Finally, in order to homogenize commit messages across contributors (and to ease generation of the CHANGELOG), please apply this git commit message hook onto your local repository.