sylius/plugin-template

Sylius Plugin Template

v0.3.0 2023-06-19 09:30 UTC

This package is auto-updated.

Last update: 2024-11-11 21:27:14 UTC


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:

  1. Run composer create-project sylius/plugin-template ProjectName
  2. Have fun creating your package.
  3. 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

Latest Version on Packagist Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

  1. Run composer require :vendor_name_slug/:plugin_name_slug.

  2. 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
  3. Import configuration

    # config/packages/_sylius.yaml
    
    imports:
    # ...
    - { resource: "@:plugin_class/config/config.yaml" }
  4. 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.