twint-ag / twint-shopware-plugin
Shopware 6 的 TWINT 支付插件
1.0.0-RC25
2024-08-29 03:56 UTC
Requires
- ext-openssl: *
- chillerlan/php-qrcode: 4.3.4
- twint-ag/sdk: ^1.0
Requires (Dev)
- dg/bypass-finals: ^1.8
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.5
- rector/rector: ^1.0
- shopware/core: >=6.5.0.0
- slevomat/coding-standard: ^8.15
- symfony/browser-kit: *
- symplify/easy-coding-standard: ^12.1
This package is auto-updated.
Last update: 2024-09-29 04:14:43 UTC
README
开发环境
前往 infra/demo65 或 infra/demo66 并运行 docker compose up -d
使用以下命令访问容器
docker exec -it sw66 bash
如果您使用的是 demo65 环境,请使用 sw65
。
安装插件的依赖项
cd /var/www/html/custom/plugins/TwintPayment
composer install
安装 Shopware 依赖项
cd /var/www/html
composer install
运行 phpstan
在容器内部运行以下命令
./bin/phpstan.sh
检查编码规范
在容器内部运行以下命令
vendor/bin/ecs
修复编码规范违规
vendor/bin/ecs --fix
运行单元测试
准备测试数据库
首次运行单元测试时,我们需要创建测试数据库:假设我们将使用 shopware_test
数据库进行单元测试,您也可以使用其他数据库名称。更新 .env.local
以使用
DATABASE_URL=mysql://root:root@127.0.0.1:3306/shopware_test
然后运行
bin/console system:install --basic-setup
Shopware 将运行迁移脚本并为测试数据库创建数据库表。
准备环境文件
单元测试将使用 infra/demo66/.env.test
(类似地,对于 infra/demo65/.env.test
)中的环境变量进行测试。
检查其中的 DATABASE_URL
并确保它与您在上一步准备的测试数据库匹配。
运行测试
在容器内部运行以下命令一次
ln -s /var/www/plugin /var/www/html/custom/plugins/TwintPayment
然后运行单元测试
cd /var/www/html/custom/plugins/TwintPayment
./bin/phpunit.sh
版本管理
标记新的版本,例如版本 1.2.3
bin/release.sh 1.2.3
CI 将随后与公共 GitHub 仓库同步。