setono / sylius-scheduler-plugin
Scheduler plugin for Sylius.
Installs: 5 276
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 1
Type:sylius-plugin
Requires
- php: ^7.2
- ext-json: *
- mtdowling/cron-expression: ^1.2
- sylius/sylius: ~1.3
Requires (Dev)
- behat/behat: ^3.4
- behat/mink: ^1.7@dev
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.2
- behat/mink-selenium2-driver: ^1.3
- friends-of-behat/context-service-extension: ^1.2
- friends-of-behat/cross-container-extension: ^1.1
- friends-of-behat/page-object-extension: ^0.2.0
- friends-of-behat/service-container-extension: ^1.0
- friends-of-behat/symfony-extension: ^1.2.1
- friends-of-behat/variadic-extension: ^1.1
- lakion/mink-debug-extension: ^1.2.3
- phpspec/phpspec: ^5.0
- phpstan/phpstan-doctrine: ^0.10
- phpstan/phpstan-shim: ^0.10
- phpstan/phpstan-symfony: ^0.10
- phpstan/phpstan-webmozart-assert: ^0.10
- phpunit/phpunit: ^6.5
- roave/security-advisories: dev-master
- sensiolabs/security-checker: ^5.0
- sylius-labs/coding-standard: ^2.0
- symfony/browser-kit: ^3.4|^4.1
- symfony/debug-bundle: ^3.4|^4.1
- symfony/dotenv: ^3.4|^4.1
- symfony/intl: ^3.4|^4.1
- symfony/web-profiler-bundle: ^3.4|^4.1
- symfony/web-server-bundle: ^3.4|^4.1
Suggests
- ext-pcntl: Allows signal handlers
This package is auto-updated.
Last update: 2024-12-15 07:40:50 UTC
README
Sylius plugin to schedule jobs at admin panel and track their status.
Installation
-
Install plugin using
composer
:$ composer require setono/sylius-scheduler-plugin
-
Add bundle to
config/bundles.php
before (!)SyliusResourceBundle
:<?php // config/bundles.php return [ // ... Setono\SyliusSchedulerPlugin\SetonoSyliusSchedulerPlugin::class => ['all' => true], Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true], ];
-
Import config:
# config/packages/_sylius.yaml imports: # ... - { resource: "@SetonoSyliusSchedulerPlugin/Resources/config/app/config.yaml" }
-
Import routes:
# config/routes.yaml setono_sylius_scheduler_admin: resource: "@SetonoSyliusSchedulerPlugin/Resources/config/admin_routing.yaml" prefix: /admin
-
Update your schema (for existing project):
# Generate and edit migration bin/console doctrine:migrations:diff # Then apply migration bin/console doctrine:migrations:migrate
Plugin configuration
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: []
Contribution
Installation
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
or follow next steps manually:
-
Initialize:
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)
-
If you want to manually play with plugin test app, run:
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)
Running plugin tests
-
PHPSpec
$ composer phpspec
-
Behat
$ composer behat
-
All tests (phpspec & behat)
$ composer test
Pushing changes & making PRs
Please run composer all
to run all checks and tests before making PR or pushing changes to repo.