Skip to content

Commit

Permalink
Feature/sylius 1.9 (#4)
Browse files Browse the repository at this point in the history
* update to sylius 1.9

* add github actions

* remove travisCI

* ecs and phpstan fix

* github action fix

* github action change node version

* github action add slick-carousel

* add sylius config folders

* config fix

* readme fix

* changes from PR #3
  • Loading branch information
BartoszWojdalowicz authored Jun 14, 2021
1 parent ea9f422 commit 10b3aa2
Show file tree
Hide file tree
Showing 60 changed files with 670 additions and 225 deletions.
178 changes: 178 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: Build

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request: ~
release:
types: [created]
workflow_dispatch: ~

jobs:
tests:
runs-on: ubuntu-18.04

name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"

strategy:
fail-fast: false
matrix:
php: [7.4, 7.3]
symfony: [^4.4, ^5.2]
sylius: [~1.8.0, ~1.9.0]
node: [14.x]
mysql: [5.7]

exclude:
-
sylius: ~1.8.0
symfony: ^5.2

env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v2

-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
extensions: intl
tools: symfony
coverage: none

-
name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node }}"

-
name: Shutdown default MySQL
run: sudo service mysql stop

-
name: Setup MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"

-
name: Output PHP version for Symfony CLI
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version

-
name: Install certificates
run: symfony server:ca:install

-
name: Run Chrome Headless
run: 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 > /dev/null 2>&1 &

-
name: Run webserver
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)

-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Restrict Sylius version
if: matrix.sylius != ''
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction

-
name: Install PHP dependencies
run: composer install --no-interaction

-
name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

-
name: Cache Yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-yarn-
-
name: Install JS dependencies
run: (cd tests/Application && yarn install)

-
name: Prepare test application database
run: |
(cd tests/Application && bin/console doctrine:database:create -vvv)
(cd tests/Application && bin/console doctrine:schema:create -vvv)
-
name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn add slick-carousel)
(cd tests/Application && yarn build)
-
name: Prepare test application cache
run: (cd tests/Application && bin/console cache:warmup -vvv)

-
name: Load fixtures in test application
run: (cd tests/Application && bin/console sylius:fixtures:load -n)

-
name: Validate composer.json
run: composer validate --ansi --strict

-
name: Validate database schema
run: (cd tests/Application && bin/console doctrine:schema:validate)

-
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/

-
name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction

-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun

-
name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: Behat logs
path: etc/build/
if-no-files-found: ignore
94 changes: 0 additions & 94 deletions .travis.yml

This file was deleted.

17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# [![](https://bitbag.io/wp-content/uploads/2020/10/multisafepay.png)](https://bitbag.io/?utm_source=github&utm_medium=referral&utm_campaign=plugins_multisafepay)

# MultiSafepay Payments Plugin for Sylius

----

[![](https://img.shields.io/packagist/l/bitbag/multisafepay-plugin.svg) ](https://packagist.org/packages/bitbag/multisafepay-plugin "License") [ ![](https://img.shields.io/packagist/v/bitbag/multisafepay-plugin.svg) ](https://packagist.org/packages/bitbag/multisafepay-plugin "Version") [ ![](https://travis-ci.org/BitBagCommerce/SyliusMultiSafepayPlugin.svg?branch=master) ](https://travis-ci.org/BitBagCommerce/SyliusMultiSafepayPlugin "Build status")[ ![](https://img.shields.io/scrutinizer/g/BitBagCommerce/SyliusBraintreePlugin.svg) ](https://scrutinizer-ci.com/g/BitBagCommerce/SyliusMultiSafepayPlugin "Scrutinizer") [![](https://poser.pugx.org/bitbag/multisafepay-plugin/downloads)](https://packagist.org/packages/bitbag/multisafepay-plugin "Total Downloads") [![Slack](https://img.shields.io/badge/community%20chat-slack-FF1493.svg)](http://sylius-devs.slack.com) [![Support](https://img.shields.io/badge/support-contact%20author-blue])](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_multisafepay)

At BitBag we do believe in open source. However, we are able to do it just because of our awesome clients, who are kind enough to share some parts of our work with the community. Therefore, if you feel like there is a possibility for us working together, feel free to reach us out. You will find out more about our professional services, technologies and contact details at [https://bitbag.io/](https://bitbag.io/?utm_source=github&utm_medium=referral&utm_campaign=plugins_multisafepay).

## Table of Content

---
* [Overwiev](#overwiev)
* [Overview](#overview)
* [Installation](#installation)
* [Requirements](#requirements)
* [Customization](#customization)
Expand All @@ -22,7 +24,8 @@ At BitBag we do believe in open source. However, we are able to do it just becau
* [Contact](#contact)


# Overwiev
# overview

---
This plugin allows you to integrate MultiSafepay payment with Sylius platform app.

Expand All @@ -33,6 +36,7 @@ This **open-source plugin was developed to help the Sylius community** and make


# Installation

---

## Requirements
Expand Down Expand Up @@ -84,6 +88,7 @@ bin/console cache:clear
```

## Customization

----
### Available services you can [decorate](https://symfony.com/doc/current/service_container/service_decoration.html) and forms you can [extend](http://symfony.com/doc/current/form/create_form_type_extension.html)

Expand All @@ -94,6 +99,7 @@ $ bin/console debug:container bitbag_sylius_multisafepay_plugin
```

## Testing

----
```bash
$ composer install
Expand All @@ -111,6 +117,7 @@ $ bin/phpspec run


# About us

---

BitBag is an agency that provides high-quality **eCommerce and Digital Experience software**. Our main area of expertise includes eCommerce consulting and development for B2C, B2B, and Multi-vendor Marketplaces.
Expand All @@ -137,15 +144,18 @@ If you need some help with Sylius development, don't be hesitate to contact us d
[![](https://bitbag.io/wp-content/uploads/2020/10/badges-sylius.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_multisafepay)

## Community

----
For online communication, we invite you to chat with us & other users on [Sylius Slack](https://sylius-devs.slack.com/).

# Demo Sylius shop

---

We created a demo app with some useful use-cases of plugins!
Visit b2b.bitbag.shop to take a look at it. The admin can be accessed under https://b2b.bitbag.shop/admin/login link and sylius: sylius credentials.
Plugins that we have used in the demo:

| BitBag's Plugin | GitHub | Sylius' Store|
| ------ | ------ | ------|
| ACL PLugin | *Private. Available after the purchasing.*| https://plugins.sylius.com/plugin/access-control-layer-plugin/|
Expand All @@ -166,6 +176,7 @@ Plugins that we have used in the demo:


## Additional resources for developers

---
To learn more about our contribution workflow and more, we encourage ypu to use the following resources:
* [Sylius Documentation](https://docs.sylius.com/en/latest/)
Expand All @@ -175,13 +186,15 @@ To learn more about our contribution workflow and more, we encourage ypu to use


## License

---

This plugin's source code is completely free and released under the terms of the MIT license.

[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen.)

## Contact

---
If you want to contact us, the best way is to fill the form on [our website](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_multisafepay) or send us an e-mail to hello@bitbag.io with your question(s). We guarantee that we answer as soon as we can!

Expand Down
Loading

0 comments on commit 10b3aa2

Please sign in to comment.