Skip to content

Commit

Permalink
Add skeleton config/bundles.php and fix Akeneo 4 (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
andytson-inviqa authored Feb 24, 2023
1 parent f9f010d commit 7c551c3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/akeneo/application/skeleton/behat.yml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ default:
- App\Acceptance\Context\WebWithPageObjectsWithConstructorInjectionContext

extensions:
{% if version_compare(@('akeneo.major_version'), '5', '>=') %}
FriendsOfBehat\SymfonyExtension:
bootstrap: config/bootstrap.php
kernel:
class: Kernel
environment: test
{% else %}
Behat\Symfony2Extension:
kernel:
class: Kernel
bootstrap: config/bootstrap.php
{% endif %}
Behat\MinkExtension:
base_url: 'https://{{ @('hostname') }}'
default_session: goutte
Expand Down
10 changes: 8 additions & 2 deletions src/akeneo/application/skeleton/composer.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,23 @@
},
"require-dev": {
"behat/behat": "^3.12",
"behat/mink-goutte-driver": "^2.0",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "^2.8",
{% if version_compare(@('akeneo.major_version'), '5', '>=') %}
"behat/mink-goutte-driver": "^2.0",
"friends-of-behat/mink-extension": "^2.7",
"friends-of-behat/symfony-extension": "^2.4",
{% else %}
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/symfony2-extension": "^2.1",
{% endif %}
"phpcompatibility/php-compatibility": "dev-develop",
"phpcsstandards/phpcsutils": "1.0.0-alpha4",
"phpmd/phpmd": "^2.13",
"phpspec/phpspec": "^7.3",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.2",
"rector/rector": "^0.15",
"sensiolabs/behat-page-object-extension": "^2.3",
"slevomat/coding-standard": "^8.6",
Expand Down
4 changes: 3 additions & 1 deletion src/akeneo/harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ attributes:
web_group: www-data
web_writable_dirs:
- = @('app.uploads_directory')
- = @('app.file_storage_directory')
- /app/var/cache
- /app/var/logs
services:
Expand Down Expand Up @@ -77,6 +78,7 @@ attributes:
run "chmod 0600 /home/build/.ssh/id_*"
fi
- task composer:install
- "= version_compare(@('akeneo.major_version'), '5', '>=') ? '! [ -e config/bundles.harness.php ] || run mv config/bundles.harness.php config/bundles.php' : 'rm -f config/bundles.harness.php'"
install:
steps:
- task http:wait "${ELASTICSEARCH_URL:-${ELASTICSEARCH_SCHEME:-http}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}}" ${ELASTICSEARCH_USERNAME:+--user "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"}
Expand Down Expand Up @@ -113,7 +115,7 @@ attributes:
build:
when: -f "package.json"
steps:
- export NODE_OPTIONS=--openssl-legacy-provider
- "= version_compare(@('akeneo.major_version'), '6', '>=') ? '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

0 comments on commit 7c551c3

Please sign in to comment.