Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ indent_size = 2
[*.md]
trim_trailing_whitespace = false

[*.sh]
indent_style = tab

[*.{yaml,yml}]
trim_trailing_whitespace = false

Expand Down
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/.github export-ignore
/etc export-ignore
/docs export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/README.md export-ignore
/behat.yml.dist export-ignore
Expand All @@ -12,3 +14,5 @@
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
/tests export-ignore
/CHANGELOG.md export-ignore
/UPGRADE.md export-ignore
17 changes: 0 additions & 17 deletions .github/dependabot.yml

This file was deleted.

90 changes: 72 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ env:

jobs:
coding-standards:
name: "Coding Standards"
name: "Coding Standards (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"
- "7.4" # Always use the lowest version of PHP since a higher version could create actual syntax errors in lower versions

dependencies:
- "highest"
Expand Down Expand Up @@ -50,25 +50,40 @@ jobs:
- name: "Check style"
run: "composer check-style"

- name: "Rector"
run: "vendor/bin/rector process --dry-run"

- name: "Lint yaml files"
run: "(cd tests/Application && bin/console lint:yaml ../../src/Resources)"

- name: "Lint twig files"
run: "(cd tests/Application && bin/console lint:twig ../../src/Resources)"

dependency-analysis:
name: "Dependency Analysis"
name: "Dependency Analysis (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"

dependencies:
- "lowest"
- "highest"

symfony:
- "^5.4"
- "^6.0"

exclude:
- php-version: "7.4"
symfony: "^6.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
Expand All @@ -79,86 +94,125 @@ jobs:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "composer-require-checker, composer-unused"
tools: "composer-require-checker, composer-unused, flex"

- name: "Remove require-dev section in composer.json"
run: "composer config --unset require-dev"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run maglnet/composer-require-checker"
run: "composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
run: "composer-require-checker check"

- name: "Run composer-unused/composer-unused"
run: "composer-unused"

static-code-analysis:
name: "Static Code Analysis"
name: "Static Code Analysis (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"

dependencies:
- "lowest"
- "highest"

symfony:
- "^5.4"
- "^6.0"

exclude:
- php-version: "7.4"
symfony: "^6.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "flex"

- name: "Remove sylius/sylius from composer.json"
run: "composer remove --dev sylius/sylius --no-update --no-install"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Static analysis"
run: "composer analyse"
run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}"

unit-tests:
name: "Unit tests"
name: "Unit tests (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"

dependencies:
- "lowest"
- "highest"

symfony:
- "^5.4"
- "^6.0"

exclude:
- php-version: "7.4"
symfony: "^6.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "flex"

- name: "Remove sylius/sylius from composer.json"
run: "composer remove --dev sylius/sylius --no-update --no-install"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run phpspec"
run: "composer phpspec"

- name: "Run phpunit"
run: "composer phpunit"

- name: "Run phpspec"
run: "composer phpspec"

integration-tests:
name: "Integration tests"
Expand Down Expand Up @@ -241,14 +295,14 @@ jobs:
if-no-files-found: "ignore"

code-coverage:
name: "Code Coverage"
name: "Code Coverage (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"
- "8.2"

dependencies:
- "highest"
Expand Down
30 changes: 0 additions & 30 deletions composer-require-checker.json

This file was deleted.

18 changes: 10 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
"doctrine/persistence": "^1.3 || ^2.1",
"league/uri": "^6.0",
"league/uri-components": "^2.3",
"setono/symfony-main-request-trait": "^1.0",
"sylius/channel": "^1.0",
"sylius/channel-bundle": "^1.0",
"sylius/core-bundle": "^1.0",
"sylius/product-bundle": "^1.0",
"sylius/resource-bundle": "^1.6",
"sylius/taxonomy-bundle": "^1.0",
"sylius/ui-bundle": "^1.0",
"symfony/config": "^5.4 || ^6.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
Expand All @@ -32,6 +37,7 @@
"require-dev": {
"api-platform/core": "^2.7",
"lexik/jwt-authentication-bundle": "^2.16",
"php-http/message-factory": "^1.1",
"phpspec/phpspec": "^7.3",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.6",
Expand All @@ -44,8 +50,7 @@
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"symfony/webpack-encore-bundle": "^1.16",
"weirdan/doctrine-psalm-plugin": "^2.8"
"symfony/webpack-encore-bundle": "^1.16"
},
"prefer-stable": true,
"autoload": {
Expand All @@ -65,17 +70,14 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": false,
"ergebnis/composer-normalize": true,
"ocramius/package-versions": true,
"symfony/thanks": false
},
"sort-packages": true
},
"scripts": {
"analyse": [
"@ensure-test-container-exists",
"psalm"
],
"analyse": "psalm",
"check-style": "ecs check",
"ensure-test-container-exists": "[[ -f tests/Application/var/cache/test/ApplicationTests_Setono_SyliusRedirectPlugin_Application_KernelTestDebugContainer.xml ]] || tests/Application/bin/console cache:warmup --env=test",
"fix-style": "ecs check --fix",
"phpspec": "phpspec run",
"phpunit": "phpunit",
Expand Down
Loading