dige / sylius-tinypng-plugin
Tinypng plugin for Sylius.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: >=7.4
- sylius/sylius: ^1.10 || ^1.11 || ^1.12
- tinify/tinify: ^1.6
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- friendsofsymfony/oauth-server-bundle: ^1.6 || >2.0.0-alpha.0 ^2.0@dev
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: 0.12.85
- phpstan/phpstan-doctrine: 0.12.33
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: 0.12.12
- phpunit/phpunit: ^9.5
- sensiolabs/security-checker: ^6.0
- sylius-labs/coding-standard: ^4.0
- symfony/browser-kit: ^4.4 || ^5.2
- symfony/debug-bundle: ^4.4 || ^5.2
- symfony/dotenv: ^4.4 || ^5.2
- symfony/intl: ^4.4 || ^5.2
- symfony/web-profiler-bundle: ^4.4 || ^5.2
- vimeo/psalm: 4.7.1
This package is not auto-updated.
Last update: 2025-03-25 16:13:05 UTC
README
Installation
Composer install
composer require dige/sylius-tinypng-plugin
Register bundle:
Dige\TinypngPlugin\DigeSyliusTinypngPlugin::class => ['all' => true]
Register routing:
In file config/routes.yaml
add:
dige_tinypng_plugin: resource: "@DigeSyliusTinypngPlugin/Resources/config/admin_routing.yml"
Register messenger routing
routing: 'Dige\TinypngPlugin\Message\CompressImage': default 'Dige\TinypngPlugin\Message\CompressImages': default 'Dige\TinypngPlugin\Message\CreateMediaLogs': default
Import required config in your config/packages/_sylius.yaml
file:
# config/packages/_sylius.yaml imports: ... - { resource: "@DigeSyliusTinypngPlugin/Resources/config/app/config.yml" }
Finish the installation by updating the database schema and installing assets:
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
Modify AdminUser entity by adding method
getUserIdentifier(): string
Notes:
For automatic register compression for an image, entity image have to implement Sylius\Component\Core\Model\ImageInterface
.
Otherwise, override configuration dige_sylius_tinypng_plugin.evenet_listener.compress_image_register