ezsystems/ezpublish-legacy-installer

eZ Publish legacy扩展和本身 legacy内核的安装程序。

安装次数: 456,890

依赖项: 256

建议者: 0

安全性: 0

星标: 10

关注者: 25

分支: 15

类型:composer-plugin

v2.1.0 2020-06-22 14:00 UTC

This package is auto-updated.

Last update: 2024-08-23 19:39:45 UTC


README

此安装程序允许您使用Composer安装eZ Publish legacy (4.x)的扩展。

它还帮助您安装eZ Publish legacy (4.x)本身,在升级到新版本时不会删除您的设置和自定义代码。

可安装的扩展

要安装 legacy扩展,它必须通过具有有效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": "*"
    }
}

扩展名称与包名称

默认情况下, legacy扩展将被安装在一个以您的包优美名称命名的目录中。例如,包lolautruche/sqliimport将被安装在一个名为sqliimport的目录中。如果您需要将您的composer包的名称与扩展名称不同(例如, legacy扩展ezfind包含在ezsystems/ezfind-ls包中),您可以在您的composer.json文件中添加一个ezpublish-legacy-extension-name额外选项来告诉composer使用特定的扩展名称而不是包的优美名称。

{
    "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的情况

默认情况下, legacy扩展安装程序假定eZ Publish legacy安装在本目录中;换句话说,它是为纯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"
    }
}