netgen/ezpublish-legacy-installer

为eZ Publish遗留扩展和遗留内核本身提供的安装程序。

2.2.0 2022-06-08 13:18 UTC

This package is auto-updated.

Last update: 2024-08-30 01:38:21 UTC


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.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"
    }
}