se7enxweb / ezpublish-legacy-installer
不打算直接由最终用户使用。这是一个针对 eZ Publish 旧版扩展的定制 composer 安装程序。eZ Publish 旧版扩展和旧版内核的安装程序。
Requires
- php: ^5.4 || ^7.0 || ^8.1
- composer-plugin-api: ^1.0 || ^2.0
README
此安装程序允许您使用 Composer 安装 eZ Publish 旧版 (4.x) 的扩展。
它还可以帮助您安装 eZ Publish 旧版 (4.x) 本身,在升级到新版本时不会删除您的设置和自定义代码。
可安装的扩展
要安装旧版扩展,它必须通过具有有效 composer.json 文件的 Composer 正确公开(有关更多信息,请参阅 Composer 文档),声明一个 ezpublish-legacy-extension
类型。
SQLIImport 示例
{ "name": "lolautruche/sqliimport", "type": "ezpublish-legacy-extension", "description": "Import extension for eZ Publish legacy.", "license": "GPL-2.0", "minimum-stability": "dev", "require": { "php": ">=5.3.3", "ezsystems/ezpublish-legacy-installer": "*" } }
扩展名称与包名称
默认情况下,旧版扩展将安装在以您的包漂亮名称命名的目录中。例如,包 lolautruche/sqliimport
将安装在名为 sqliimport
的目录中。如果您需要将 composer 包的名称与扩展名称区分开来(例如,旧版扩展 ezfind 包含在 ezsystems/ezfind-ls
包中),则可以告诉 composer 使用特定的扩展名称而不是包的漂亮名称。只需在您的 composer.json 文件中添加一个 ezpublish-legacy-extension-name
扩展选项即可。
{ "name": "ezsystems/ezfind-ls", "description": "eZ Find is a search extension for eZ Publish legacy, providing more functionality and better results than the default search in eZ Publish.", "type": "ezpublish-legacy-extension", "license": "GPL-2.0", "authors": [ { "name": "eZ Publish dev-team & eZ Community", "homepage": "https://github.com/ezsystems/ezfind/contributors" } ], "minimum-stability": "dev", "require": { "ezsystems/ezpublish-legacy-installer": "*" }, "extra": { "ezpublish-legacy-extension-name": "ezfind" } }
如何在项目中安装
您需要做的只是创建项目根目录下的 composer.json 文件,并要求扩展(如果扩展没有在 Packagist 上发布,您还需要告诉 composer 在哪里可以找到它)。
{ "name": "myvendorname/myproject", "description": "My super cool eZ Publish project", "license": "GPL-2.0", "minimum-stability": "dev", "require": { "php": ">=5.3.3", "lolautruche/sqliimport": "~1.2" }, "repositories" : [ { "type": "vcs", "url": "https://github.com/lolautruche/sqliimport.git" } ] }
然后运行 php composer.phar install
(当然,假设您已经正确安装了 Composer)。
eZ Publish 5 的情况
默认情况下,旧版扩展安装程序假定 eZ Publish 旧版安装在本目录中;换句话说,它配置了纯 eZ Publish 4 项目。如果这不是这种情况(例如,在 eZ Publish 5 中,它位于 ezpublish_legacy/
目录中),则您需要配置其位置。
{ "name": "myvendorname/myproject", "description": "My super cool eZ Publish 5 project", "license": "GPL-2.0", "minimum-stability": "dev", "require": { "php": ">=5.3.3", "lolautruche/sqliimport": "~1.2" }, "repositories" : [ { "type": "vcs", "url": "https://github.com/lolautruche/sqliimport.git" } ], "extra": { "ezpublish-legacy-dir": "ezpublish_legacy" } }