Skip to content

Commit

Permalink
feat: Update GHA and other stuff for Sylius 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesbh committed Jan 2, 2023
1 parent 9972668 commit b2a659d
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 43 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,35 @@ 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.0
sylius: "~1.8.0"
- php: 8.0
sylius: "~1.9.0"
- php: 7.4
sylius: "~1.11.0"
- php: '8.0'
sylius: '~1.8.0'
- php: '8.0'
sylius: '~1.9.0'
- php: '8.1'
sylius: '~1.8.0'
- php: '8.1'
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
ini-values: date.timezone=UTC

- 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
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: plugin

Expand All @@ -48,7 +58,7 @@ jobs:
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}

- uses: actions/cache@v1
- uses: actions/cache@v3
id: cache-composer
with:
path: /home/runner/.composer/cache
Expand Down Expand Up @@ -83,7 +93,7 @@ jobs:
- name: Require plugin without install
working-directory: ./sylius
run: |
composer require --no-install --no-update monsieurbiz/sylius-cms-page-plugin="*@dev"
composer require --no-install --no-scripts monsieurbiz/sylius-cms-page-plugin="*@dev"
- name: Composer install
working-directory: ./sylius
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,23 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']
php: ['7.4', '8.0', '8.1']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- 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
echo ${{ matrix.php }} > .php-version
- uses: actions/cache@v1
- uses: actions/cache@v3
id: cache-composer
with:
path: /home/runner/.composer/cache
Expand All @@ -39,7 +44,7 @@ jobs:
- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install PHP dependencies
run: composer update --prefer-dist
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,37 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0']
php: ['8.0', '8.1']

env:
SYMFONY_ARGS: --no-tls
COMPOSER_ARGS: --prefer-dist
DOCKER_INTERACTIVE_ARGS: -t

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '14'

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

- 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
echo ${{ matrix.php }} > .php-version
- name: Install symfony CLI
run: |
curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | sudo -E bash
sudo apt install symfony-cli
- uses: actions/cache@v1
- uses: actions/cache@v3
id: cache-composer
with:
path: /home/runner/.composer/cache
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
2 changes: 1 addition & 1 deletion 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
9 changes: 3 additions & 6 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.12",
"sylius/sylius": ">=1.8 <1.13",
"gedmo/doctrine-extensions": "^2.4.12 || ^3.0",
"monsieurbiz/sylius-rich-editor-plugin": "^2.0"
},
Expand All @@ -30,7 +30,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 @@ -56,16 +56,13 @@
"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=false",
"phpstan": "phpstan analyse -c phpstan.neon src/",
"phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml",
"phpunit": "phpunit",
"phpspec": "phpspec run"
},
"extra": {
"symfony": {
"require": "^4.4"
},
"branch-alias": {
"dev-master": "1.0-dev"
}
Expand Down
7 changes: 0 additions & 7 deletions src/Entity/PageTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ class PageTranslation extends AbstractTranslation implements PageTranslationInte
*/
protected $metaDescription;

/**
* Redeclared for annotations.
*
* @var string|null
*/
protected ?string $locale;

public function getId(): ?int
{
return $this->id;
Expand Down

0 comments on commit b2a659d

Please sign in to comment.