Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akeneo breakage bug fix #740

Merged
merged 6 commits into from
Feb 15, 2023
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
17 changes: 16 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pipeline {
}
when {
beforeAgent true
expression { return isHarnessChange(['base', 'drupal8', 'wordpress']) }
expression { return isHarnessChange(['base', 'akeneo', 'drupal8', 'wordpress']) }
}
stages {
stage('Prepare') {
Expand All @@ -54,16 +54,19 @@ pipeline {
steps {
sh './test php static'
sh './test drupal8 static'
sh './test akeneo6 static'
sh './test akeneo5 static'
sh './test akeneo4 static'
sh './test wordpress static'
sh './test php dynamic'
sh './test drupal8 dynamic'
sh './test akeneo6 dynamic'
sh './test akeneo5 dynamic'
sh './test akeneo4 dynamic'
sh './test wordpress dynamic'
sh './test php dynamic mutagen'
sh './test drupal8 dynamic mutagen'
sh './test akeneo6 dynamic mutagen'
sh './test akeneo5 dynamic mutagen'
sh './test akeneo4 dynamic mutagen'
sh './test wordpress dynamic mutagen'
Expand All @@ -83,6 +86,10 @@ pipeline {
when { expression { return isHarnessChange(['drupal8']) } }
steps { sh './test drupal8 static' }
}
stage('Akeneo 6') {
when { expression { return isHarnessChange(['akeneo']) } }
steps { sh './test akeneo6 static' }
}
stage('Akeneo 5') {
when { expression { return isHarnessChange(['akeneo']) } }
steps { sh './test akeneo5 static' }
Expand All @@ -104,6 +111,10 @@ pipeline {
when { expression { return isHarnessChange(['drupal8']) } }
steps { sh './test drupal8 dynamic' }
}
stage('Akeneo 6 Dynamic') {
when { expression { return isHarnessChange(['akeneo']) } }
steps { sh './test akeneo6 dynamic' }
}
stage('Akeneo 5 Dynamic') {
when { expression { return isHarnessChange(['akeneo']) } }
steps { sh './test akeneo5 dynamic' }
Expand All @@ -125,6 +136,10 @@ pipeline {
when { expression { return isHarnessChange(['drupal8']) } }
steps { sh './test drupal8 dynamic mutagen' }
}
stage('Akeneo 6 Mutagen') {
when { expression { return isHarnessChange(['akeneo']) } }
steps { sh './test akeneo6 dynamic mutagen' }
}
stage('Akeneo 5 Mutagen') {
when { expression { return isHarnessChange(['akeneo']) } }
steps { sh './test akeneo5 dynamic mutagen' }
Expand Down
10 changes: 8 additions & 2 deletions src/akeneo/application/skeleton/behat.yml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,23 @@ default:
- App\Acceptance\Context\WebWithPageObjectsWithConstructorInjectionContext

extensions:
Behat\Symfony2Extension:
FriendsOfBehat\SymfonyExtension:
bootstrap: config/bootstrap.php
kernel:
class: Kernel
bootstrap: config/bootstrap.php
environment: test
Behat\MinkExtension:
base_url: 'https://{{ @('hostname') }}'
default_session: goutte
javascript_session: chrome
sessions:
goutte:
goutte:
# Symfony HttpClient
server_parameters:
verify_peer: false
verify_host: false
# Guzzle
guzzle_parameters:
verify: false
chrome:
Expand Down
33 changes: 9 additions & 24 deletions src/akeneo/application/skeleton/composer.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -37,44 +37,29 @@
"akeneo/pim-{{ @('akeneo.edition') }}-dev": "^{{ @('akeneo.major_version') }}.0.0"
},
"require-dev": {
{% if version_compare(@('akeneo.major_version'), '6', '>=') }
"behat/behat": "^3.12",
"friends-of-behat/mink-extension": "^2.7",
"behat/mink-goutte-driver": "^2.0",
"friends-of-behat/symfony-extension": "^2.4",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "^2.8",
"league/flysystem-aws-s3-v3": "^2.0",
"rector/rector": "^0.15",
"friends-of-behat/mink-extension": "^2.7",
"friends-of-behat/symfony-extension": "^2.4",
"phpcompatibility/php-compatibility": "dev-develop",
"phpcsstandards/phpcsutils": "1.0.0-alpha4",
"phpmd/phpmd": "^2.13",
"phpspec/phpspec": "^7.2",
"phpspec/phpspec": "^7.3",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.15",
"sensiolabs/behat-page-object-extension": "^2.3",
"slevomat/coding-standard": "^8.6",
"squizlabs/php_codesniffer": "^3.7",
"symfony/debug-bundle": "^5.4"
{% if version_compare(@('akeneo.major_version'), '6', '>=') %}
"league/flysystem-aws-s3-v3": "^2.0",
"symfony/debug-bundle": "^5.4",
"symfony/web-profiler-bundle": "^5.4"
{% else %}
"behat/behat": "^3.5",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/symfony2-extension": "^2.1",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"doctrine/doctrine-migrations-bundle": "1.3.2",
"league/flysystem-aws-s3-v3": "^1.0",
"rector/rector": "^0.7",
"phpcompatibility/php-compatibility": "dev-develop",
"phpcsstandards/phpcsutils": "1.0.0-alpha4",
"phpmd/phpmd": "^2.7",
"phpspec/phpspec": "^6.0",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.4",
"sensiolabs/behat-page-object-extension": "^2.3",
"slevomat/coding-standard": "^6.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/debug-bundle": "^4.4.7",
"symfony/web-profiler-bundle": "^4.4.7",
"symfony/web-server-bundle": "^4.4.7"
Expand Down Expand Up @@ -125,7 +110,7 @@
},
"config": {
"platform": {
"php": "{{ (version_compare(@('akeneo.major_version'), '5', '>=')) ? '7.4' : '7.3.22' }}"
"php": "{{ @('php.version') }}"
},
"allow-plugins": {
"symfony/flex": true,
Expand Down
5 changes: 5 additions & 0 deletions src/akeneo/application/skeleton/config/bundles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true]
];
22 changes: 7 additions & 15 deletions src/akeneo/application/skeleton/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$arr1 of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: src/Kernel.php

-
message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: src/Kernel.php

-
message: "#^Parameter \\#3 \\.\\.\\.\\$args of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: src/Kernel.php
ignoreErrors:
- message: "#^Parameter \\#\\d .* of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 3
path: src/Kernel.php
- message: "#Generator expects value type Symfony\\\\Component\\\\HttpKernel\\\\Bundle\\\\BundleInterface, object given\\.#"
reportUnmatched: false
path: src/Kernel.php
1 change: 1 addition & 0 deletions src/akeneo/harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ attributes:
build:
when: -f "package.json"
steps:
- export NODE_OPTIONS=--openssl-legacy-provider
- run yarn install --frozen-lockfile
- run bin/console cache:warmup
- run bin/console pim:installer:assets --symlink --clean
Expand Down
3 changes: 3 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ function main()
elif [[ "$harness" =~ ^(akeneo5)$ ]]; then
akeneo_version=5
harness="akeneo"
elif [[ "$harness" =~ ^(akeneo6)$ ]]; then
akeneo_version=6
harness="akeneo"
fi

if [[ "$REUSE_EXISTING_WORKSPACE" != "yes" ]]; then
Expand Down