Skip to content

Commit

Permalink
Drop Sylius 1.11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mpysiak committed Dec 5, 2023
1 parent f29982a commit 35c13ba
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 428 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.0"]
symfony: ["^5.4", "^6.0"]
sylius: ["~1.11.0", "~1.12.0"]
php: ["8.0", "8.1", "8.2"]
symfony: ["^5.4", "6.3.*"]
sylius: ["~1.12.0"]
node: ["^14.17.x"]
mysql: ["8.0"]

exclude:
- sylius: ~1.11.0
symfony: "^6.0"
env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"
Expand Down Expand Up @@ -115,10 +112,6 @@ jobs:
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-yarn-
- name: Copy package.json.dist to package.json
if: matrix.sylius != ''
run: (cd tests/Application && cp package.json.\${{ matrix.sylius }}.dist package.json)

- name: Install JS dependencies
run: (cd tests/Application && yarn install)

Expand All @@ -136,6 +129,7 @@ jobs:
run: (cd tests/Application && bin/console cache:warmup -vvv)

- name: Load fixtures in test application
if: matrix.sylius != '~1.11.0'
run: (cd tests/Application && bin/console sylius:fixtures:load -n)

- name: Validate composer.json
Expand Down
12 changes: 2 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"php": "^8.0",
"sylius/sylius": "~1.11.0 || ~1.12.0",
"sylius/sylius": "~1.12.0",
"symfony/webpack-encore-bundle": "^1.15",
"dompdf/dompdf": "^2.0"
},
Expand Down Expand Up @@ -35,15 +35,7 @@
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"league/flysystem-bundle": "2.4.0",
"sylius/mailer-bundle": "^1.8 || ^2.0@beta"
},
"conflict": {
"doctrine/orm": ">=2.15.2",
"symfony/symfony": "4.1.8",
"symfony/browser-kit": "4.1.8",
"symfony/dom-crawler": "4.1.8",
"symfony/routing": "4.1.8",
"symfony/doctrine-bridge": "4.4.16"
"sylius/mailer-bundle": "^1.8 || ^2.0"
},
"prefer-stable": true,
"autoload": {
Expand Down
18 changes: 9 additions & 9 deletions doc/01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
1. *We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.*

```bash
$ composer require bitbag/wishlist-plugin
composer require bitbag/wishlist-plugin
```

2. Add plugin dependencies to your `config/bundles.php` file:
Expand Down Expand Up @@ -45,37 +45,37 @@ bitbag_sylius_wishlist_plugin:
5. Clear application cache by using command:

```bash
$ bin/console cache:clear
bin/console cache:clear
```

6. Update your database

First, please run legacy-versioned migrations by using command:

```bash
$ bin/console doctrine:migrations:migrate
bin/console doctrine:migrations:migrate
```

After migration, please create a new diff migration and run it:

```bash
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
```

**Note:** If you are running it on production, add the `-e prod` flag to this command.

**Note:** If you are updating this plugin from version 1.4.x you need to run:

```bash
$ bin/console doctrine:migrations:version BitBag\\SyliusWishlistPlugin\\Migrations\\Version20201029161558 --add --no-interaction
bin/console doctrine:migrations:version BitBag\\SyliusWishlistPlugin\\Migrations\\Version20201029161558 --add --no-interaction
```

7. Please add plugin templates into your project:
```bash
$ cp -R vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/Product templates/bundles/SyliusShopBundle
$ cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_header.html.twig templates/bundles/SyliusShopBundle
$ cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_logo.html.twig templates/bundles/SyliusShopBundle
cp -R vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/Product templates/bundles/SyliusShopBundle
cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_header.html.twig templates/bundles/SyliusShopBundle
cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_logo.html.twig templates/bundles/SyliusShopBundle
```

8. Add plugin assets to your project
Expand Down
2 changes: 1 addition & 1 deletion doc/01.5-non-webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
1. Install plugin assets using:

```bash
$ bin/console assets:install
bin/console assets:install
```

2. Add twig inclusions in your templates:
Expand Down
6 changes: 3 additions & 3 deletions doc/03-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

Run the below command to see what Symfony services are shared with this plugin:
```bash
$ bin/console debug:container | grep bitbag_sylius_wishlist_plugin
bin/console debug:container | grep bitbag_sylius_wishlist_plugin
```

### List of parameters you can override in your parameters.yml(.dist) file
```bash
$ bin/console debug:container --parameters | grep bitbag
$ bin/console debug:container --parameters | grep wishlist
bin/console debug:container --parameters | grep bitbag
bin/console debug:container --parameters | grep wishlist
```
22 changes: 11 additions & 11 deletions doc/04-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@
Clone this repository, go to the plugin root directory and run

```bash
$ composer install
$ cd tests/Application
composer install
cd tests/Application
```

If needed, create `.env.local` file with the correct configuration for your environment in the `tests/Application` directory. <br>
Then run the following commands from `tests/Application`:

```bash
$ bin/console doctrine:database:create
$ bin/console doctrine:schema:create
$ bin/console sylius:fixtures:load
$ bin/console assets:install --symlink
bin/console doctrine:database:create
bin/console doctrine:schema:create
bin/console sylius:fixtures:load
bin/console assets:install --symlink
```

Copy `package.json.~1.xx.dist` file to `package.json` for specific version of Sylius (example for 1.12.0):
```bash
$ cp package.json.\~1.12.dist package.json
cp package.json.\~1.12.dist package.json
```

Then:

```bash
$ yarn install
$ yarn dev
yarn install
yarn dev
```

You're ready to start coding 🎉
Expand All @@ -48,7 +48,7 @@ You're ready to start coding 🎉
To start the development server, from the `tests/Application` directory run:

```bash
$ symfony server:start
symfony server:start
```

and then you should get information about the server address and port (usually http://localhost:8000). <br>
Expand All @@ -60,7 +60,7 @@ If you don't already have Symfony CLI, here's how to install it: https://symfony
To start working on frontend, from the `tests/Application` directory run:

```bash
$ yarn watch
yarn watch
```

It's an infinite process, which will watch your changes in the assets folder and (re)build them. So all of your frontend changes should be done in `{root}/src/Resources/assets` directory. We have configured two independent entry points that should not be combined - `shop` for the storefront and `admin` for the admin panel.
Expand Down
24 changes: 12 additions & 12 deletions doc/05-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
## Testing

```bash
$ composer install
$ cd tests/Application
composer install
cd tests/Application
```

Copy `package.json.~1.xx.dist` file to `package.json` for specific version of Sylius (example for 1.12.0):
```bash
$ cp package.json.\~1.12.dist package.json
cp package.json.\~1.12.dist package.json
```

Then:

```bash
$ yarn install
$ yarn dev
$ APP_ENV=test bin/console assets:install public
$ APP_ENV=test bin/console doctrine:schema:create
$ cd ../..
$ APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
$ open https://localhost:8080
$ vendor/bin/behat
$ vendor/bin/phpspec run
yarn install
yarn dev
APP_ENV=test bin/console assets:install public
APP_ENV=test bin/console doctrine:schema:create
cd ../..
APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
open https://localhost:8080
vendor/bin/behat
vendor/bin/phpspec run
```
2 changes: 2 additions & 0 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
];
7 changes: 0 additions & 7 deletions tests/Application/config/sylius/1.11/bundles.php

This file was deleted.

This file was deleted.

Loading

0 comments on commit 35c13ba

Please sign in to comment.