sylius / plugin-template
Sylius Plugin Template
Requires
- php: ^8.0
- symfony/console: ^5.4
- symfony/filesystem: ^5.4
- symfony/finder: ^5.4
- symfony/framework-bundle: ^5.4
- symfony/runtime: ^5.4
- symfony/yaml: ^5.4
Requires (Dev)
- phpunit/phpunit: ^9.5
README
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.
Plugin Template
Template for starting Sylius plugins.
Requirements
- *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.
Usage
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>
:plugin_name
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
-
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
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
Please see the License File for more information about licensing.