setono/sylius-plugin-skeleton

Acme example plugin for Sylius.

Fund package maintenance!
Setono

Installs: 63

Dependents: 0

Suggesters: 0

Security: 0

Stars: 10

Watchers: 2

Forks: 3

Open Issues: 1

Type:sylius-plugin

1.12.x-dev 2024-03-12 07:43 UTC

This package is auto-updated.

Last update: 2024-04-12 07:49:28 UTC


README

Latest Version Software License Build Status Code Coverage Mutation testing

Setono have made a bunch of plugins for Sylius, and we have some guidelines which we try to follow when developing plugins. These guidelines are used in this repository, and it gives you a very solid base when developing plugins.

Enjoy!

Quickstart

  1. Run

    composer create-project --prefer-source --no-install --remove-vcs setono/sylius-plugin-skeleton:1.12.x-dev ProjectName

    or just click the Use this template button at the right corner of this repository.

  2. Run

    cd ProjectName && composer install
  3. From the plugin skeleton root directory, run the following commands:

    php init
    (cd tests/Application && yarn install)
    (cd tests/Application && yarn build)
    (cd tests/Application && bin/console assets:install)
    
    (cd tests/Application && bin/console doctrine:database:create)
    (cd tests/Application && bin/console doctrine:schema:create)
    
    (cd tests/Application && bin/console sylius:fixtures:load -n)
  4. Start your local PHP server: symfony serve (see https://symfony.com/doc/current/setup/symfony_server.html for docs)

To be able to set up a plugin's database, remember to configure you database credentials in tests/Application/.env and tests/Application/.env.test.