diff --git a/INSTALL.md b/INSTALL.md index c1287dce..438ae6c6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,107 +1,173 @@ # Installing the eZ Platform legacy bridge Unlike eZ Publish 5.x, eZ Platform does not include the Legacy stack by default. -Even though it is not officially supported, eZ Publish Legacy can easily be installed -on top of Platform using Composer. +eZ Publish Legacy can easily be installed on top of Platform using Composer. -### Missing legacy extensions +### eZ Plaftorm installation -Several ezpublish-legacy extensions are no longer installed by default, such as ezfind or eztags. -They can still be manually added to the root `composer.json`. +We are assuming you have a fresh [eZ Platform installation here](https://www.ezplatform.com/), +that basically you have run: + +```bash +php -d memory_limit=-1 composer create-project ezsystems/ezplatform +php app/console doctrine:database:create +php app/console ezplatform:install clean +``` -### Add the composer `legacy post-*-scripts` +At this point you should be able to reach Platform UI at the URL http://{YOURPROJECTHOST}/ez -Edit `composer.json`, and add those lines to both `post-update-cmd` and `post-install-cmd` blocks at the end: +### Legacy Bridge Installation Steps -``` +#### Adapt your composer.json + +Edit `composer.json`, and add those lines to both `post-update-cmd`, `post-install-cmd` and `extra` blocks at the end: + +```json "scripts": { "post-install-cmd": [ ..., "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::installAssets", "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::installLegacyBundlesExtensions", - "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::generateAutoloads" + "Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::installLegacyBundlesSettings", + "Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::executeLegacyScripts", + "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::generateAutoloads", + "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::generateKernelOverrideAutoloads", ], "post-update-cmd": [ ..., "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::installAssets", "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::installLegacyBundlesExtensions", - "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::generateAutoloads" + "Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::installLegacyBundlesSettings", + "Novactive\\EzLegacyToolsBundle\\Composer\\ScriptHandler::executeLegacyScripts", + "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::generateAutoloads", + "eZ\\Bundle\\EzPublishLegacyBundle\\Composer\\ScriptHandler::generateKernelOverrideAutoloads", ], + ..., + "extra": { + ..., + "ezpublish-legacy-dir": "ezpublish_legacy", + "legacy-settings-install": ["force", "relative"], + "legacy-scripts-execution": [] + } } ``` -### Enable EzPublishLegacyBundle -Edit `app/AppKernel.php` (or `ezpublish/EzPublishKernel` before ezplatform 2015.12), -and add `new eZ\Bundle\EzPublishLegacyBundle\EzPublishLegacyBundle( $this )` at the end of -the `$bundles` array. Pay close attention to the `$this` argument. The LegacyBundle is a bit -of a spoiled brat, and has high expectations from its collaborators. +#### Enable the new bundles -### Add legacy routes -Edit `app/config/routing.yml`, and add the LegacyBundle routes. +Edit `app/AppKernel.php` (or `ezpublish/EzPublishKernel` before ezplatform 2015.12), and add + +```php +new Novactive\EzLegacyToolsBundle\NovactiveEzLegacyToolsBundle(), +new EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle(), +new eZ\Bundle\EzPublishLegacyBundle\EzPublishLegacyBundle( $this ) ``` +at the end of the `$bundles` array. +Pay close attention to the `$this` argument. The LegacyBundle is a bit of a spoiled brat, and has high expectations +from its collaborators. + + +#### Add legacy routes + +Edit `app/config/routing.yml`, and add the LegacyBundle routes. + +```yaml _ezpublishLegacyRoutes: resource: @EzPublishLegacyBundle/Resources/config/routing.yml ``` -### Enable legacy_mode for your backoffice siteaccess +#### Install the bundles -The Legacy Backoffice requires the `legacy_mode` option to be enabled. -This can be done in app/config/config.yml or app/config/ezplatform.yml: +**Make sure you have set the ezpublish legacy folder in composer.json, as instructed above** -``` -ez_publish_legacy: - system: - site_admin: - legacy_mode: true +```bash +composer require "ezsystems/legacy-bridge:1.1.x" "novactive/ezlegacy-tools-bundle:dev-master" "ezsystems/ezplatform-xmltext-fieldtype" netgen/ngsymfonytools netgen/ezplatformsearch --no-scripts ``` -### Optional: add security rules for the Setup Wizard +#### Create you legacy bundle -If you intend to run the legacy setup wizard, you need to allow it in `app/config/security.yml`. - -``` -ezpublish_setup: - pattern: ^/ezsetup - security: false +```bash +php app/console generate:bundle --namespace=Acme/Bundle/LegacyBundle --format=annotation --bundle-name=AcmeLegacyBundle --dir=src -n ``` -### Configure ezpublish legacy's location in `composer.json` +Create 2 folders for legacy -`ezsystems/ezpublish-legacy` needs to be installed in a particular location to work. +```bash +cd src/Acme/Bundle/LegacyBundle +mkdir ezpublish_legacy legacy_settings +cd - +``` -Edit `composer.json`, and add `"ezpublish-legacy-dir": "ezpublish_legacy"` to the `extra` array: +Copy the config.php-RECOMMENDED in legacy_settings +```bash +cp ezpublish_legacy/config.php-RECOMMENDED src/Acme/Bundle/LegacyBundle/legacy_settings/config.php ``` - "extra": { - "ezpublish-legacy-dir": "ezpublish_legacy", +In eZ Publish 5, Symfony app folder was named `ezpublish`. This was changed in eZ Platform, +and now the folder name is `app`, which is Symfony recommended name. +eZ Publish Legacy supports both of these folder names, however, `ezpublish` is still the default +one in latest tagged release (v2015.01.3). This means that you need to make eZ Publish Legacy aware of the +new folder name. You can do this by editing `config.php` and uncommenting: + +```php + Please refer to doc/nginx for more information (complete vhost without these rules you need) + Or if using nginx: ``` @@ -127,7 +194,6 @@ Or if using nginx: #rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/index.php" break; #rewrite "^/var/([^/]+/)?cache/(texttoimage|public)/(.*)" "/index_cluster.php" break; -rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/var/$1storage/images$2/$3" break; rewrite "^/var/([^/]+/)?cache/(texttoimage|public)/(.*)" "/var/$1cache/$2/$3" break; rewrite "^/design/([^/]+)/(stylesheets|images|javascript|fonts)/(.*)" "/design/$1/$2/$3" break; rewrite "^/share/icons/(.*)" "/share/icons/$1" break; @@ -137,8 +203,26 @@ rewrite "^/packages/styles/(.+)/thumbnail/(.*)" "/packages/styles/$1/thumbnail/$ rewrite "^/var/storage/packages/(.*)" "/var/storage/packages/$1" break; ``` +> Please refer to doc/nginx for more information (complete vhost without these rules you need) + +!! Restart your webserver !! + +> Yes, don't forget ;-) + +### Test ! + +*/ez* for Plaftform UI +*/administration* for Legacy Admin + + ### Setup Folder Permissions Last step, if you are on *nix operation system, is to make sure to run the appropriate command for setting correct folder permissions, you can find the information you need in installation guide for eZ Publish 5.x. + + +### Missing legacy extensions + +Several ezpublish-legacy extensions are no longer installed by default, such as ezfind or eztags. +They can still be manually added to the root `composer.json`. diff --git a/settings_template/override/browse.ini.append.php b/settings_template/override/browse.ini.append.php new file mode 100644 index 00000000..07da2bdf --- /dev/null +++ b/settings_template/override/browse.ini.append.php @@ -0,0 +1,15 @@ + diff --git a/settings_template/override/content.ini.append.php b/settings_template/override/content.ini.append.php new file mode 100644 index 00000000..277a5dfd --- /dev/null +++ b/settings_template/override/content.ini.append.php @@ -0,0 +1,94 @@ + diff --git a/settings_template/override/contentstructuremenu.ini.append.php b/settings_template/override/contentstructuremenu.ini.append.php new file mode 100644 index 00000000..5f48b348 --- /dev/null +++ b/settings_template/override/contentstructuremenu.ini.append.php @@ -0,0 +1,15 @@ + diff --git a/settings_template/override/ezjscore.ini.append.php b/settings_template/override/ezjscore.ini.append.php new file mode 100644 index 00000000..f79575d9 --- /dev/null +++ b/settings_template/override/ezjscore.ini.append.php @@ -0,0 +1,6 @@ + diff --git a/settings_template/override/ezmultiupload.ini.append.php b/settings_template/override/ezmultiupload.ini.append.php new file mode 100644 index 00000000..58c3ac89 --- /dev/null +++ b/settings_template/override/ezmultiupload.ini.append.php @@ -0,0 +1,7 @@ + diff --git a/settings_template/override/ezoe.ini.append.php b/settings_template/override/ezoe.ini.append.php new file mode 100644 index 00000000..e75ca676 --- /dev/null +++ b/settings_template/override/ezoe.ini.append.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/settings_template/override/ezoe_attributes.ini.append.php b/settings_template/override/ezoe_attributes.ini.append.php new file mode 100644 index 00000000..09211544 --- /dev/null +++ b/settings_template/override/ezoe_attributes.ini.append.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/settings_template/override/ezxml.ini.append.php b/settings_template/override/ezxml.ini.append.php new file mode 100644 index 00000000..449d3e36 --- /dev/null +++ b/settings_template/override/ezxml.ini.append.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/settings_template/override/forum.ini.append.php b/settings_template/override/forum.ini.append.php new file mode 100644 index 00000000..c9108808 --- /dev/null +++ b/settings_template/override/forum.ini.append.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/settings_template/override/i18n.ini.append.php b/settings_template/override/i18n.ini.append.php new file mode 100644 index 00000000..611aa913 --- /dev/null +++ b/settings_template/override/i18n.ini.append.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/settings_template/override/image.ini.append.php b/settings_template/override/image.ini.append.php new file mode 100644 index 00000000..e414fdfe --- /dev/null +++ b/settings_template/override/image.ini.append.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/settings_template/override/layout.ini.append.php b/settings_template/override/layout.ini.append.php new file mode 100644 index 00000000..030fd6c8 --- /dev/null +++ b/settings_template/override/layout.ini.append.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/settings_template/override/menu.ini.append.php b/settings_template/override/menu.ini.append.php new file mode 100644 index 00000000..89a44815 --- /dev/null +++ b/settings_template/override/menu.ini.append.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/settings_template/override/site.ini.append.php b/settings_template/override/site.ini.append.php new file mode 100644 index 00000000..167253ac --- /dev/null +++ b/settings_template/override/site.ini.append.php @@ -0,0 +1,101 @@ + diff --git a/settings_template/override/viewcache.ini.append.php b/settings_template/override/viewcache.ini.append.php new file mode 100644 index 00000000..4e9185df --- /dev/null +++ b/settings_template/override/viewcache.ini.append.php @@ -0,0 +1,109 @@ + \ No newline at end of file diff --git a/settings_template/siteaccess/administration/content.ini.append.php b/settings_template/siteaccess/administration/content.ini.append.php new file mode 100644 index 00000000..c3bb4c39 --- /dev/null +++ b/settings_template/siteaccess/administration/content.ini.append.php @@ -0,0 +1,9 @@ + diff --git a/settings_template/siteaccess/administration/override.ini.append.php b/settings_template/siteaccess/administration/override.ini.append.php new file mode 100644 index 00000000..0d626ef3 --- /dev/null +++ b/settings_template/siteaccess/administration/override.ini.append.php @@ -0,0 +1,62 @@ + diff --git a/settings_template/siteaccess/administration/site.ini.append.php b/settings_template/siteaccess/administration/site.ini.append.php new file mode 100644 index 00000000..369e9d2c --- /dev/null +++ b/settings_template/siteaccess/administration/site.ini.append.php @@ -0,0 +1,45 @@ + diff --git a/settings_template/siteaccess/administration/toolbar.ini.append.php b/settings_template/siteaccess/administration/toolbar.ini.append.php new file mode 100644 index 00000000..61bbd342 --- /dev/null +++ b/settings_template/siteaccess/administration/toolbar.ini.append.php @@ -0,0 +1,70 @@ + \ No newline at end of file