torq/shopwarecommon
最新稳定版本:4.1.0
Composer 安装命令:
composer require torq/shopwarecommon
包简介
torq/shopwarecommon
README 文档
README
This repository (plugin) provides a centralized location for commonly reused code across multiple Torq Shopware projects, ensuring a single point of truth for shared functionality and enabling easier maintenance.
Package Versions
Shopware 6.6.x use branch v3.x
Shopware 6.7.x use branch v4.x
Adding a Submodule to an existing repository
Run the following command to create the shopwarecommon submodule in an existing Torq Showpare repo, then perform the steps in Submodule Installation.
git submodule add -f https://github.com/TorqIT/shopware-common src/custom/plugins/TorqShopwareCommon
Updating Submodule
After cloning your Git repository for the first time, pull down the submodule code by executing the following commands.
git submodule init git submodule update
Note: This ensures the submodule is initialized and its content is fetched.
Submodule Installation
To install the submodule and set up the container, follow these steps:
-
Build and start the container:
docker compose up --build
-
Access the container: Connect to the container as the www-data user by running:
docker compose exec -it -u www-data php bash -
Install the
shopwarecommonplugin: Inside the container, add the shopwarecommon plugin to your Shopware project using Composer:composer require torq/shopwarecommon <version_number_here>
Note: The
composer requirecommand will add the shopwarecommon plugin as a dependency and update thecomposer.jsonandcomposer.lockfiles accordingly. It will also add the necessary files and folders to the vendor directory.
Encryption
Presently we're using the defuse/php-encryption library for handling encryption, and our wrapper class is TorqShopwareCommon/src/Security/Encryption/EncryptionHandler.php.
In order to use this plugin successfully your project will need to have an environment variable called TORQ_SHOPWARE_COMMON_ENCRYPTION_SECRET. The value of this can be generated using the included key generation tool available inside of all PHP containers at vendor/bin/generate-defuse-key.
YOU MUST FOLLOW THESE RULES WHEN MANAGING KEYS:
-
NEVER PUT THE ENCRYPTION KEY DIRECTLY INSIDE THE CONFIG FILE
-
NEVER COMMIT AN ENCRYPTION KEY TO A REPOSITORY
-
NEVER USE THE SAME ENCRYPTION KEY IN DEV, TEST or PROD ENVIRONMENTS.
统计信息
- 总下载量: 5.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-12