setono/sylius-log-entry-plugin

Sylius 插件,使处理日志条目变得容易

安装次数: 5,289

依赖者: 0

建议者: 0

安全性: 0

星标: 2

关注者: 2

分支: 0

开放问题: 3

类型:symfony-bundle


README

Latest Version Latest Unstable Version Software License Build Status Quality Score

添加一个 LogEntry 实体,您可以将其用于记录消息并将其与您的其他实体关联。测试应用程序中有一个示例,我们在此示例中添加了日志条目到订单中。

安装

  • 使用 composer 安装插件

    $ composer require setono/sylius-log-entry-plugin
  • 将束添加到 config/bundles.php

    <?php
    // config/bundles.php
    
    return [
        // ...
        Setono\SyliusLogEntryPlugin\SetonoSyliusLogEntryPlugin::class => ['all' => true],
    ];
  • 配置实体和存储库,如这里

  • 导入路由

    # config/routes/setono_sylius_log_entry.yaml
    setono_sylius_log_entry:
        resource: "@SetonoSyliusLogEntryPlugin/Resources/config/routes.yaml"
  • 更新您的模式

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

贡献

安装

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

# 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

运行插件测试

  • PHPSpec

    $ composer phpspec
  • Behat

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

    $ composer test

推送更改并创建 PR

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