shopware/composer-project 问题修复 & 功能扩展

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

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

shopware/composer-project

Composer 安装命令:

composer create-project shopware/composer-project

包简介

Project template for Shopware projects with composer

README 文档

README

Starting with v5.4 Shopware supports installation using composer out of the box. Earlier versions of Shopware are not supported.

Installation

composer create-project shopware/composer-project my_project_name --no-interaction --stability=dev

This will clone the repository with all necessary dependencies into a new directory my_project_name. You can then either remove the history of this project by deleting the .git directory and start from scratch by executing git init ., or keep the history and just add your own remote to push to.

Afterwards you either provide a .env file for defining database credentials, the shop-url and Shopware version or have one created for you using an interactive installer.

To use the installer, simply run:

$ ./app/bin/install.sh

Configuration

Configuration settings like environment specific database settings, API tokens, server IPs or any type of credentials should be set via environment variables. That way you don't have to include any environment specific or sensitive information in your project. You can use a .env file for local development or as a workaround.

You can also configure some generic project services in app/services.xml. For instance, the error log is configured to use stderr output instead of default log file located at var/log directory. New and additional services should be provided using plugins, though.

Updating Shopware

Update the version number of shopware/shopware in composer.json. Then run composer update shopware/shopware to install the new version. Do not forget to commit the new composer.lock file to your project afterwards.

Prepare plugins for composer installation

Given you have a plugin called SwagMediaSftp add your dependencies in your plugins composer.json file. Also set the type to shopware-plugin. See the SwagMediaSftp repository for the complete plugin.

{
    "name": "shopwarelabs/swag-media-sftp",
    "type": "shopware-plugin",
    "description": "The SFTP adapter allows you to manage your media files in shopware on a SFTP environment.",
    "license": "MIT",
    "extra": {
        "installer-name": "SwagMediaSftp"
    },
    "require": {
        "league/flysystem-sftp": "^1.0"
    }
}

For a complete list of the available Shopware-related types see the Composer Installers repository.

Plugins

Plugins being installed like described above are installed into custom/plugins/, legacy Shopware plugins are getting installed into Plugins/. Those directories are included in the .gitignore of this repo so plugins installed via composer are not being tracked by git.

In case you need some project specific plugins that you don't want to add to your project via composer but track them using this repository, then you can add them to the custom/project directory. Only plugins using the new plugin style are supported.

统计信息

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

GitHub 信息

  • Stars: 68
  • Watchers: 39
  • Forks: 41
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-15