section:readme
Attention! Sylius Template Plugin is in alpha stage. Keep in mind that some bugs while creating a project may occur.
This repository is highly inspired by spatie/package-skeleton-laravel.
Template for starting Sylius plugins.
- *nix based operating system (macOS, Linux, WSL2)
- make
- PHP version 8.0 or higher
- Node.js version 16 or higher
If you want to start quickly, it is recommended to install the Symfony CLI. It will help you to run the project locally with using our Make commands.
This repo can be used to scaffold a Sylius plugin. Follow these steps to get started:
- Run
composer create-project sylius/plugin-template ProjectName
- Have fun creating your package.
- If you need help creating a plugin, consider reading our Plugin Development guide.
Alternatively you can use the "Use this template" button on GitHub to create a new repository based on this template.
After that you can clone your freshly created repository and run make configure
set up your brand-new plugin.
</section:readme>
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
-
Run
composer require :vendor_name_slug/:plugin_name_slug
. -
Import routes
# config/routes/sylius_shop.yaml :config_key_shop: resource: "@:plugin_class/config/shop_routing.yaml" prefix: /{_locale} requirements: _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ # config/routes/sylius_admin.yaml :config_key_admin: resource: "@:plugin_class/config/admin_routing.yml" prefix: /admin
-
Import configuration
# config/packages/_sylius.yaml imports: # ... - { resource: "@:plugin_class/config/config.yaml" }
-
Apply migrations
bin/console doctrine:migrations:migrate
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
Please see the License File for more information about licensing.