Adds a LogEntry entity you can use to log messages and associate them with your other entities.
The test application has an example where we have added log entries to orders.
-
Install plugin using
composer:$ composer require setono/sylius-log-entry-plugin
-
Add bundle to
config/bundles.php:<?php // config/bundles.php return [ // ... Setono\SyliusLogEntryPlugin\SetonoSyliusLogEntryPlugin::class => ['all' => true], ];
-
Configure entities & repositories like here:
-
Import routes:
# config/routes/setono_sylius_log_entry.yaml setono_sylius_log_entry: resource: "@SetonoSyliusLogEntryPlugin/Resources/config/routes.yaml"
-
Update your schema:
# Generate and edit migration bin/console doctrine:migrations:diff # Then apply migration bin/console doctrine:migrations:migrate
To automatically execute installation steps, load fixtures and run server with just one command, run:
# Optional step, if 5 mins enough for webserver to try
# @see https://getcomposer.org/doc/06-config.md#process-timeout
composer config --global process-timeout 0
composer try-
PHPSpec
$ composer phpspec
-
Behat
$ composer behat
-
All tests (phpspec & behat)
$ composer test
Please run composer all to run all checks and tests before making PR or pushing changes to repo.