Skip to content

webgriffe/SyliusWishlistPlugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

607 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sylius Wishlist Plugin

Build Status

Installation

  1. Require the plugin, as this is a fork of the original plugin, you have to require it by using the following command:

    composer config repositories.bitbag/wishlist-plugin git https://github.com/webgriffe/SyliusWishlistPlugin.git
    composer require bitbag/wishlist-plugin
  2. If they has not been added automatically, you have to add this bundle to config/bundles.php file:

    BitBag\SyliusWishlistPlugin\BitBagSyliusWishlistPlugin::class => ['all' => true],
  3. Add the plugin's configs by creating the config/packages/bitbag_wishlist_plugin.yaml file with the following content:

    imports:
       - { resource: "@BitBagSyliusWishlistPlugin/config/config.yaml" }
  4. Add the plugin's routes by creating the config/routes/bitbag_wishlist_plugin.yaml file with the following content:

    bitbag_sylius_wishlist_plugin:
       resource: "@BitBagSyliusWishlistPlugin/config/routes.yaml"
  5. Run migration

    bin/console cache:clear
    bin/console doctrine:migrations:migrate

Contributing

To contribute you need to:

  1. Clone this repository into you development environment and go to the plugin's root directory,

  2. Then, from the plugin's root directory, run the following commands:

    composer install
  3. Copy tests/TestApplication/.env in tests/TestApplication/.env.local and set configuration specific for your development environment.

  4. Link node_modules:

    ln -s vendor/sylius/test-application/node_modules node_modules
  5. Run docker (create a compose.override.yml if you need to customize services):

    docker-compose up -d
  6. Then, from the plugin's root directory, run the following commands:

    composer test-app-init
  7. Run your local server:

    symfony server:ca:install
    symfony server:start -d
  8. Now at http://localhost:8080/ you have a full Sylius testing application which runs the plugin

Static checks

  • Coding Standard

    vendor/bin/ecs check --fix
  • Psalm

    vendor/bin/psalm
  • PHPStan

    vendor/bin/phpstan analyse

Testing

After your changes you must ensure that the tests are still passing.

First setup your test database:

    APP_ENV=test vendor/bin/console doctrine:database:create
    APP_ENV=test vendor/bin/console doctrine:migrations:migrate -n
    # Optionally load data fixtures
    APP_ENV=test vendor/bin/console sylius:fixtures:load -n

And build assets:

    (cd vendor/sylius/test-application && yarn install)
    (cd vendor/sylius/test-application && yarn build)
    vendor/bin/console assets:install

The current CI suite runs the following tests:

  • PHPUnit

    vendor/bin/phpunit
  • PHPSpec

    vendor/bin/phpspec run
  • Behat (non-JS scenarios)

    vendor/bin/behat --strict --tags="~@javascript"
  • Behat (JS scenarios)

    1. Install Symfony CLI command.

    2. Start Headless Chrome:

    google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1
    1. Install SSL certificates (only once needed) and run test application's webserver on 127.0.0.1:8080:
    symfony server:ca:install
    APP_ENV=test symfony server:start --port=8080 --dir=tests/TestApplication/public --daemon
    1. Run Behat:
    vendor/bin/behat --strict --tags="@javascript"

License

This library is under the MIT license. See the complete license in the LICENSE file.

Credits

Developed by Webgriffe®.

About

This plugin allows you to integrate wishlist features with Sylius platform app.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • PHP 85.1%
  • Twig 4.7%
  • Gherkin 3.6%
  • JavaScript 2.3%
  • SCSS 2.0%
  • Makefile 1.8%
  • Shell 0.5%