setono/sylius-scheduler-plugin

Sylius的调度插件。

安装数量: 5,276

依赖者: 0

建议者: 0

安全性: 0

星标: 4

关注者: 2

分支: 0

开放问题: 1

类型:sylius-plugin


README

Latest Version on Packagist Software License Build Status Quality Score

Sylius插件,用于在管理面板中安排作业并跟踪其状态。

Admin screenshot

安装

  • 使用composer安装插件

    $ composer require setono/sylius-scheduler-plugin
  • config/bundles.php中添加bundle,在SyliusResourceBundle之前(!)

    <?php
    // config/bundles.php
    
    return [
        // ...
        Setono\SyliusSchedulerPlugin\SetonoSyliusSchedulerPlugin::class => ['all' => true],
        Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
    ];
  • 导入配置

    # config/packages/_sylius.yaml
    imports:
        # ...
        - { resource: "@SetonoSyliusSchedulerPlugin/Resources/config/app/config.yaml" }
  • 导入路由

    # config/routes.yaml
    setono_sylius_scheduler_admin:
        resource: "@SetonoSyliusSchedulerPlugin/Resources/config/admin_routing.yaml"
        prefix: /admin
  • 更新你的架构(对于现有项目)

    # Generate and edit migration
    bin/console doctrine:migrations:diff
    
    # Then apply migration
    bin/console doctrine:migrations:migrate

插件配置

setono_sylius_scheduler:
    driver: doctrine/orm

    # Wipe logs in X days after command execution
    # Specify 0 to never wipe logs
    wipe_logs_in: 0

    # We can specify emails to receive error reports on every Job
    # But here we can specify emails which receive error reports for all Jobs
    error_report_emails: []

贡献

安装

要自动执行安装步骤、加载 fixtures 并运行服务器,只需一个命令,运行

# Optional step, if 5 mins enough for webserver to try
# @see https://getcomposer.org.cn/doc/06-config.md#process-timeout
composer config --global process-timeout 0

composer try

或者手动执行以下步骤

  • 初始化

    SYMFONY_ENV=test
    (cd tests/Application && yarn install) && \
        (cd tests/Application && yarn build) && \
        (cd tests/Application && bin/console assets:install public -e $SYMFONY_ENV) && \
        (cd tests/Application && bin/console doctrine:database:create -e $SYMFONY_ENV) && \
        (cd tests/Application && bin/console doctrine:schema:create -e $SYMFONY_ENV)
  • 如果您想手动玩插件测试应用程序,运行

    SYMFONY_ENV=test
    (cd tests/Application && bin/console sylius:fixtures:load --no-interaction -e $SYMFONY_ENV && \
        (cd tests/Application && bin/console server:run -d public -e $SYMFONY_ENV)

运行插件测试

  • PHPSpec

    $ composer phpspec
  • Behat

    $ composer behat
  • 所有测试(phpspec & behat)

    $ composer test

推送更改 & 制作PR

在制作PR或推送更改到仓库之前,请运行composer all以运行所有检查和测试。