brille24 / sylius-order-log-plugin
用于记录订单变化的插件。
0.6.1
2023-11-11 10:23 UTC
Requires
- php: ^8.0
- sylius/mailer-bundle: ^1.8 || ^2.0@beta
- sylius/sylius: ^1.11
- symfony/webpack-encore-bundle: ^1.15
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- phpspec/phpspec: ^7.2
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^1.8.1
- phpstan/phpstan-doctrine: 1.3.37
- phpstan/phpstan-strict-rules: ^1.3.0
- phpstan/phpstan-webmozart-assert: ^1.2.0
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sylius-labs/coding-standard: ^4.2
- symfony/browser-kit: ^5.4 || ^6.0
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/flex: ^2.2.2
- symfony/intl: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- vimeo/psalm: 5.9.0
README
插件骨架
用于启动 Sylius 插件的骨架。
文档
有关 Sylius 插件开发的全面指南,请访问 Sylius 文档,在那里您将找到插件开发指南,其中包含大量示例。
快速开始安装
-
运行
composer create-project sylius/plugin-skeleton ProjectName
。 -
从插件骨架的根目录,运行以下命令
$ (cd tests/Application && yarn install) $ (cd tests/Application && yarn build) $ (cd tests/Application && bin/console assets:install public -e test) $ (cd tests/Application && bin/console doctrine:database:create -e test) $ (cd tests/Application && bin/console doctrine:schema:create -e test)
为了能够设置插件数据库,请记住在 tests/Application/.env
和 tests/Application/.env.test
中配置您的数据库凭据。
用法
运行插件测试
-
PHPUnit
$ vendor/bin/phpunit
-
PHPSpec
$ vendor/bin/phpspec run
-
Behat(非 JS 场景)
$ vendor/bin/behat --tags="~@javascript"
-
Behat(JS 场景)
-
下载 Chromedriver
-
使用之前下载的 Chromedriver 运行 Selenium 服务器
$ java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone.jar
-
在
localhost:8080
上运行测试应用程序的 web 服务器$ (cd tests/Application && bin/console server:run localhost:8080 -d public -e test)
-
运行 Behat
$ vendor/bin/behat --tags="@javascript"
-
使用您的插件打开 Sylius
-
使用
test
环境$ (cd tests/Application && bin/console sylius:fixtures:load -e test) $ (cd tests/Application && bin/console server:run -d public -e test)
-
使用
dev
环境$ (cd tests/Application && bin/console sylius:fixtures:load -e dev) $ (cd tests/Application && bin/console server:run -d public -e dev)