Skip to content

Commit

Permalink
Merge pull request #28 from GediminasLaurinaitis/feature/updating-syl…
Browse files Browse the repository at this point in the history
…ius-to-1.12

Updating for Sylius 1.12
  • Loading branch information
jacquesbh authored Jun 13, 2023
2 parents 2173ce7 + e87444a commit 893b296
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 50 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,32 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4' ,'8.0']
sylius: ["~1.8.0", "~1.9.0", "~1.10.0", "~1.11.0"]
php: ['7.4' ,'8.0', '8.1']
sylius: ["~1.8.0", "~1.9.0", "~1.10.0", "~1.11.0", "~1.12.0"]
exclude:
- php: 8.1
sylius: "~1.8.0"
- php: 8.1
sylius: "~1.9.0"
- php: 8.0
sylius: "~1.8.0"
- php: 8.0
sylius: "~1.9.0"
- php: 7.4
sylius: "~1.11.0"
- php: 7.4
sylius: "~1.12.0"

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, intl, json

- name: Set project php-version
run: |
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
echo "date.timezone=UTC" >> /tmp/timezone.ini
sudo mv /tmp/timezone.ini /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
echo ${{ matrix.php }} > .php-version
echo "${{ matrix.php }}" > .php-version
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -82,7 +91,7 @@ jobs:
- name: Require plugin without install
working-directory: ./sylius
run: |
composer require --no-install --no-update monsieurbiz/sylius-menu-plugin="*@dev"
composer require --no-install --no-scripts monsieurbiz/sylius-menu-plugin="*@dev"
- name: Composer install
working-directory: ./sylius
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']
php: ['7.4', '8.0', '8.1']

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, intl, json

- name: Set project php-version
run: |
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
echo "date.timezone=UTC" | sudo tee /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
echo "${{ matrix.php }}" > .php-version
- uses: actions/cache@v1
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0']
php: ['8.0', '8.1']

env:
SYMFONY_ARGS: --no-tls
Expand All @@ -26,11 +26,14 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, intl, json

- name: Set project php-version
run: |
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
echo "date.timezone=UTC" | sudo tee /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
echo "${{ matrix.php }}" > .php-version
- name: Install symfony CLI
Expand Down
2 changes: 1 addition & 1 deletion .php-version.dist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0
8.1
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT_GOAL := help
SHELL=/bin/bash
APP_DIR=tests/Application
SYLIUS_VERSION=1.11.0
SYLIUS_VERSION=1.12.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
Expand Down Expand Up @@ -144,7 +144,7 @@ test.twig: ## Validate Twig templates
### SYLIUS
### ¯¯¯¯¯¯

sylius: dependencies sylius.database sylius.fixtures sylius.assets ## Install Sylius
sylius: dependencies sylius.database sylius.fixtures sylius.assets messenger.setup ## Install Sylius
.PHONY: sylius

sylius.database: ## Setup the database
Expand All @@ -160,6 +160,9 @@ sylius.assets: ## Install all assets with symlinks
${CONSOLE} sylius:install:assets
${CONSOLE} sylius:theme:assets:install --symlink

messenger.setup: ## Setup Messenger transports
${CONSOLE} messenger:setup-transports

###
### PLATFORM
### ¯¯¯¯¯¯¯¯
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": "~7.4|~8.0",
"sylius/sylius": ">=1.8 <1.12"
"sylius/sylius": ">=1.8 <1.13"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand All @@ -28,7 +28,7 @@
"mikey179/vfsstream": "^1.6",
"mockery/mockery": "^1.4",
"pamil/prophecy-common": "^0.1",
"phpspec/phpspec": "^6.1",
"phpspec/phpspec": "^6.1 || ^7.2",
"phpstan/phpstan": "^0.12.57",
"phpstan/phpstan-doctrine": "^0.12.19",
"phpstan/phpstan-webmozart-assert": "^0.12.7",
Expand All @@ -54,7 +54,7 @@
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"phpcs": "php-cs-fixer fix --using-cache=false",
"phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --using-cache=no",
"phpstan": "phpstan analyse -c phpstan.neon src/",
"phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml",
"phpunit": "phpunit",
Expand All @@ -73,7 +73,8 @@
"symfony/thanks": true,
"symfony/flex": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true
"ergebnis/composer-normalize": true,
"php-http/discovery": true
}
}
}
1 change: 1 addition & 0 deletions dist/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SYLIUS_FIXTURES_HOSTNAME=${SYMFONY_DEFAULT_ROUTE_HOST:-localhost}
2 changes: 1 addition & 1 deletion src/DependencyInjection/MonsieurBizSyliusMenuExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function load(array $config, ContainerBuilder $container): void
/**
* @inheritdoc
*/
public function getAlias()
public function getAlias(): string
{
return str_replace('monsieur_biz', 'monsieurbiz', parent::getAlias());
}
Expand Down
12 changes: 6 additions & 6 deletions src/Resources/config/routes/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ monsieurbiz_menu_admin_menu_item_create_for_menu:
path: /menus/{menuId}/new-item
methods: [GET, POST]
defaults:
_controller: monsieurbiz_menu.controller.menu_item:createAction
_controller: monsieurbiz_menu.controller.menu_item::createAction
_sylius:
section: admin
permission: true
Expand Down Expand Up @@ -47,7 +47,7 @@ monsieurbiz_menu_admin_menu_item_create_for_parent:
path: /menus/{menuId}/item/{parentId}/new-item
methods: [GET, POST]
defaults:
_controller: monsieurbiz_menu.controller.menu_item:createAction
_controller: monsieurbiz_menu.controller.menu_item::createAction
_sylius:
section: admin
permission: true
Expand All @@ -69,7 +69,7 @@ monsieurbiz_menu_admin_menu_item_update:
path: /menus/{menuId}/update-item/{id}
methods: [GET, PUT, POST]
defaults:
_controller: monsieurbiz_menu.controller.menu_item:updateAction
_controller: monsieurbiz_menu.controller.menu_item::updateAction
_sylius:
section: admin
permission: true
Expand All @@ -88,7 +88,7 @@ monsieurbiz_menu_admin_menu_item_delete:
path: /menus/{menuId}/delete-item/{id}
methods: [DELETE]
defaults:
_controller: monsieurbiz_menu.controller.menu_item:deleteAction
_controller: monsieurbiz_menu.controller.menu_item::deleteAction
_sylius:
section: admin
permission: true
Expand All @@ -98,7 +98,7 @@ monsieurbiz_menu_admin_menu_item_move_up:
path: /menus/{menuId}/move-item/{id}/up
methods: [PUT]
defaults:
_controller: monsieurbiz_menu.controller.menu_item:moveUpAction
_controller: monsieurbiz_menu.controller.menu_item::moveUpAction
_sylius: &move_sylius
section: admin
permission: true
Expand All @@ -108,5 +108,5 @@ monsieurbiz_menu_admin_menu_item_move_down:
path: /menus/{menuId}/move-item/{id}/down
methods: [PUT]
defaults:
_controller: monsieurbiz_menu.controller.menu_item:moveDownAction
_controller: monsieurbiz_menu.controller.menu_item::moveDownAction
_sylius: *move_sylius
44 changes: 22 additions & 22 deletions src/Resources/config/sylius/fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,47 @@ sylius_fixtures:
- translations:
en_US:
label: 'T-shirts'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/t-shirts'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/t-shirts'
fr_FR:
label: 'T-shirts'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_fr/taxons/category/t-shirts'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/t-shirts'
children:
- translations:
en_US:
en_US:
label: 'Men'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/t-shirts/men'
fr_FR:
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/t-shirts/men'
fr_FR:
label: 'Homme'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/t-shirts/men'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/t-shirts/men'
- translations:
en_US:
en_US:
label: 'Women'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/t-shirts/women'
fr_FR:
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/t-shirts/women'
fr_FR:
label: 'Femme'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/t-shirts/women'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/t-shirts/women'
- translations:
en_US:
label: 'Caps'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/caps'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/caps'
fr_FR:
label: 'Bonnets'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/caps'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/caps'
children:
- translations:
en_US:
label: 'Simple'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/caps/simple'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/caps/simple'
fr_FR:
label: 'Simple'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/caps/simple'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/caps/simple'
- translations:
en_US:
label: 'With pompons'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/caps/with-pompons'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/caps/with-pompons'
fr_FR:
label: 'Avec pompons'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/caps/with-pompons'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/caps/with-pompons'
- translations:
en_US:
label: 'Dresses'
Expand All @@ -62,25 +62,25 @@ sylius_fixtures:
- translations:
en_US:
label: 'Jeans'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/category/jeans'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/jeans'
fr_FR:
label: 'Jeans'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/jeans'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/jeans'
children:
- translations:
en_US:
label: 'Men'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/jeans/men'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/jeans/men'
fr_FR:
label: 'Homme'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/jeans/men'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/jeans/men'
- translations:
en_US:
label: 'Women'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/jeans/women'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/en_US/taxons/jeans/women'
fr_FR:
label: 'Femme'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/category/jeans/women'
url: 'https://%env(SYLIUS_FIXTURES_HOSTNAME)%/fr_FR/taxons/jeans/women'
- isSystem: true
code: 'your_store'
items:
Expand Down

0 comments on commit 893b296

Please sign in to comment.