GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - webgriffe/WebgriffeSyliusTableRateShippingPlugin: Sylius plugin which allows to define shipping rates using weight/rate tables.

BranchesTags
Open more actions menu

Latest commit

 

History

152 Commits
152 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
bin
bin
 
 
config
config
 
 
etc/build
etc/build
 
 
features
features
 
 
spec
spec
 
 
src
src
 
 
templates
templates
 
 
tests
tests
 
 
translations
translations
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
UPGRADE.md
UPGRADE.md
 
 
behat.yml.dist
behat.yml.dist
 
 
compose.yml
compose.yml
 
 
composer.json
composer.json
 
 
e2e-test-server.sh
e2e-test-server.sh
 
 
easy-coding-standard.yml
easy-coding-standard.yml
 
 
ecs.php
ecs.php
 
 
node_modules
node_modules
 
 
phpspec.yml.dist
phpspec.yml.dist
 
 
phpstan.neon
phpstan.neon
 
 
phpunit.xml.dist
phpunit.xml.dist
 
 
psalm.xml
psalm.xml
 
 
roave-bc-check.yaml
roave-bc-check.yaml
 
 
symfony.lock
symfony.lock
 
 

Repository files navigation

Table Rate Shipping Plugin

This plugin allows to define shipping rates using weight tables.

Build Status

Installation

  1. Run composer require --no-scripts webgriffe/sylius-table-rate-shipping-plugin: it's normal that the "cache:clear" command, that is executed automatically at the end, fails because you have to do the next steps.

  2. If they have not been added automatically, you have to add these bundles to config/bundles.php file:

    Webgriffe\SyliusTableRateShippingPlugin\WebgriffeSyliusTableRateShippingPlugin::class => ['all' => true],
  3. Add the plugin's configs by creating the file config/packages/webgriffe_sylius_table_rate_shipping_plugin.yaml with the following content:

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

    webgriffe_sylius_table_rate_shipping_plugin_admin:
      resource: "@WebgriffeSyliusTableRateShippingPlugin/config/routes/admin.yaml"
      prefix: /%sylius_admin.path_name%
    
  5. Finish the installation by updating the database schema:

    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:

```bash
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

Sylius plugin which allows to define shipping rates using weight/rate tables.

Topics

shipping-ratessylius

Resources

Readme
Activity
Custom properties

Stars

14 stars

Watchers

4 watching

Forks

10 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.