majerome / sylius-workshop-plugin
Majerome workshop plugin for Sylius.
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^8.2
- sylius/sylius: ~2.0.0
Requires (Dev)
- behat/behat: ^3.16
- dmore/behat-chrome-extension: ^1.4
- dmore/chrome-mink-driver: ^2.9
- friends-of-behat/mink: ^1.11
- friends-of-behat/mink-browserkit-driver: ^1.6
- friends-of-behat/mink-debug-extension: ^2.1
- friends-of-behat/mink-extension: ^2.7
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.1
- friends-of-behat/symfony-extension: ^2.6
- friends-of-behat/variadic-extension: ^1.6
- nyholm/psr7: ^1.8
- phpspec/phpspec: ^7.5
- phpstan/phpstan: ^1.12
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10.5
- robertfausk/behat-panther-extension: ^1.1
- sylius-labs/coding-standard: ^4.4
- sylius-labs/suite-tags-extension: ~0.2
- sylius/sylius-rector: ^2.0
- symfony/browser-kit: ^6.4 || ^7.1
- symfony/debug-bundle: ^6.4 || ^7.1
- symfony/dotenv: ^6.4 || ^7.1
- symfony/flex: ^2.4
- symfony/http-client: ^6.4 || ^7.1
- symfony/intl: ^6.4 || ^7.1
- symfony/web-profiler-bundle: ^6.4 || ^7.1
- symfony/webpack-encore-bundle: ^2.2
README
Sylius Practical Mastery Course
Chapter 25.2 - How to create a Plugin
Chapter 26.3 - How to upgrade plugin to 1.14
This plugin is the product of Sylius training. It allows you to add a custom “Brand” resource, with those features :
- Back Office Grid: creation, edition, deletion,
- Assignment to a category "automotive" or "electronics.",
- Workflow for brand validation by State Machine,
- Association brands-products, and listing of branded products.
Installation (Docker)
Notes:
- 1st tested on a Sylius v1.13 Docker Project
- Then tested on a Sylius v1.14 Docker Project
- Finally tested on a Sylius v2.0 Docker Project
- Make sure you're running a correctly installed version of the Sylius Docker project, and that you've performed all the necessary migrations beforehand.
-
Get the plugin from Composer
docker compose exec php composer require majerome/sylius-workshop-plugin --no-scripts
Note:
Depending on your Sylius version, you need to specify the appropriate version of the plugin:
- For Sylius v1.13, use
majerome/sylius-workshop-plugin:1.0.7
- For Sylius v1.14, use
majerome/sylius-workshop-plugin:1.1.3
- For Sylius v1.13, use
-
Apply the git patch to set up the plugin:
git apply vendor/majerome/sylius-workshop-plugin/src/Installer/majerome-workshop-plugin-sylius-2.0.patch
Notes:
- You can revert that patch using majerome-workshop-plugin-sylius-2.0-reverse.patch file instead
- If you are using a Sylius v1.13 project, replace the patch file with
majerome-workshop-plugin-sylius-1.13.patch.
(reverse patch is majerome-workshop-plugin-sylius-1.13-reverse.patch) - If you are using a Sylius v1.14 project, replace the patch file with
majerome-workshop-plugin-sylius-1.14.patch.
(reverse patch is majerome-workshop-plugin-sylius-1.14-reverse.patch)
-
Get into the php container and flush the cache:
make php-shell
Then run:
bin/console cache:clear
-
Generate the migrations:
bin/console doctrine:migrations:diff
Note: Choose namespace
[0] App\Migrations
. -
Run the migration
bin/console doctrine:migrations:migrate
-
Load the fixtures:
bin/console sylius:fixtures:load -n
-
Clear the cache to handle translations
bin/console cache:clear
-
Play with your brand new 'Brand' resource!
Releases
- v1.0.7 - Valid version for Sylius v1.13
- v1.1.3 - Valid version for Sylius v1.14
- v1.2.1 - Valid version for Sylius v2.0
Screenshots
- Sylius v1
- Sylius v2