novactive/ezlegacy-tools-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Novactive eZ Publish Legacy Tools Bundle

2.0.2 2018-02-20 10:30 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.