vanssata/sylius-pag-online-imprese-plugin

插件,用于启用UniCredit Bulbank PagOnline Imprese支付服务提供商


README

插件骨架

用于启动Sylius插件的骨架。

文档

有关Sylius插件开发的全面指南,请访问Sylius文档,在那里您可以找到插件开发指南,其中包含大量示例。

快速安装

  1. 运行 composer create-project sylius/plugin-skeleton ProjectName

  2. 从插件骨架根目录,运行以下命令

    $ (cd tests/Application && yarn install)
    $ (cd tests/Application && yarn build)
    $ (cd tests/Application && APP_ENV=test bin/console assets:install public)
    
    $ (cd tests/Application && APP_ENV=test bin/console doctrine:database:create)
    $ (cd tests/Application && APP_ENV=test bin/console doctrine:schema:create)

要设置插件数据库,请记得在tests/Application/.envtests/Application/.env.test中配置您的数据库凭据。

使用方法

运行插件测试

  • PHPUnit

    vendor/bin/phpunit
  • PHPSpec

    vendor/bin/phpspec run
  • Behat(非JS场景)

    vendor/bin/behat --strict --tags="~@javascript"
  • Behat(JS场景)

    1. 安装Symfony CLI命令.

    2. 启动无头Chrome

    google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1
    1. 安装SSL证书(只需一次)并在127.0.0.1:8080上运行测试应用的web服务器
    symfony server:ca:install
    APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
    1. 运行Behat
    vendor/bin/behat --strict --tags="@javascript"
  • 静态分析

    • Psalm

      vendor/bin/psalm
    • PHPStan

      vendor/bin/phpstan analyse -c phpstan.neon -l max src/  
  • 编码规范

    vendor/bin/ecs check src

使用您的插件打开Sylius

  • 使用test环境

    (cd tests/Application && APP_ENV=test bin/console sylius:fixtures:load)
    (cd tests/Application && APP_ENV=test bin/console server:run -d public)
  • 使用dev环境

    (cd tests/Application && APP_ENV=dev bin/console sylius:fixtures:load)
    (cd tests/Application && APP_ENV=dev bin/console server:run -d public)