nfq/sylius-omnisend-plugin

Sylius 的 Omnisend 插件。


README

Omnisend 插件

文档

此插件实现了 Omnisend API 和所有必要的跟踪脚本。

测试

运行插件测试

  • PHPUnit

    vendor/bin/phpunit
  • Behat(非 JavaScript 场景)

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

    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)