ntzrbtr/shopware-plugin-management 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ntzrbtr/shopware-plugin-management

最新稳定版本:v1.7.1

Composer 安装命令:

composer require ntzrbtr/shopware-plugin-management

包简介

Tools for plugin management in Shopware 6

README 文档

README

This package provides a simple way to manage your Shopware plugins. It can handle the installation, update and removal of plugins.

The package provides a new command netzarbeiter:plugin:manage which can be used to manage your plugins. The command takes a JSON file with plugins that should be active in your Shopware installation.

Usage

bin/console netzarbeiter:plugin:manage <file>

Options

--refresh

Refresh plugin list before doing anything.

--keep-others

Keep plugins which are not in the list installed; this is helpful when testing new plugins from the Shopware store.

--dry-run

Do not install or uninstall plugins, just show what would be done.

plugins.json

The command takes a JSON file with the following schema:

{
  "<plugin name>": {
    "active": true|false,
    "update": true|false|"force"
  }
}

The command will install all plugins in that file, activate them if active is true and update them if update is true and an update is available or if update is set to "force" (useful for local plugins).

The command will afterwards uninstall all plugins that are installed in your Shopware installation, but are not in the plugins.json file.

Automation

You can use the command in your CI/CD pipeline to automate the installation of plugins. To do so, you can add the command as a post-update script to your composer.json file:

{
  "scripts": {
    "post-install-cmd": [
        "[ ! -f vendor/autoload.php ] || [ ! -f plugins.json ] || ($PHP_BINARY bin/console plugin:refresh -s && $PHP_BINARY bin/console netzarbeiter:plugins:handle plugins.json)"
    ],
    "post-update-cmd": [
        "[ ! -f vendor/autoload.php ] || [ ! -f plugins.json ] || ($PHP_BINARY bin/console plugin:refresh -s && $PHP_BINARY bin/console netzarbeiter:plugins:handle plugins.json)"
    ]
  }
}

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

$ composer require <package-name>

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require <package-name>

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Netzarbeiter\Shopware\PluginManagement\NetzarbeiterShopwarePluginManagementBundle::class => ['all' => true],
];

统计信息

  • 总下载量: 1.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-23