Skip to content

Commit 8916de1

Browse files
authored
bug #156 Update to Sylius 1.4-BETA (Zales0123, pamil)
This PR was merged into the 1.4-dev branch. Discussion ---------- Commits ------- 6d3d593 Use SymfonyExtension ^2.0 c89acd7 Switch to Symfony's dotenv file handling 097e20c Fix the build
2 parents c716705 + 097e20c commit 8916de1

File tree

17 files changed

+116
-127
lines changed

17 files changed

+116
-127
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
!/etc/build/.gitignore
77

88
/tests/Application/yarn.lock
9+
10+
/behat.yml
11+
/phpspec.yml

.travis.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ cache:
1515

1616
env:
1717
global:
18+
- APP_ENV=test
1819
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
1920
- SYLIUS_BUILD_DIR=etc/build
2021
matrix:
@@ -27,24 +28,20 @@ before_install:
2728
- mkdir -p "${SYLIUS_CACHE_DIR}"
2829
- mkdir -p tests/Application/web/media/image
2930

30-
- cp tests/Application/.env.test.dist tests/Application/.env.test
31-
- set -a && source tests/Application/.env.test && set +a
32-
3331
install:
3432
- composer require "symfony/browser-kit:${SYMFONY_VERSION}" --no-interaction --no-update
3533
- composer require "symfony/debug-bundle:${SYMFONY_VERSION}" --no-interaction --no-update
36-
- composer require "symfony/dotenv:${SYMFONY_VERSION}" --no-interaction --no-update
3734
- composer require "symfony/intl:${SYMFONY_VERSION}" --no-interaction --no-update
3835
- composer require "symfony/web-profiler-bundle:${SYMFONY_VERSION}" --no-interaction --no-update
3936
- composer require "symfony/web-server-bundle:${SYMFONY_VERSION}" --no-interaction --no-update
4037
- composer install --no-interaction --prefer-dist
4138
- (cd tests/Application && yarn install)
4239

4340
before_script:
44-
- (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
45-
- (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
46-
- (cd tests/Application && bin/console assets:install public --env=test -vvv)
47-
- (cd tests/Application && bin/console cache:warmup --env=test -vvv)
41+
- (cd tests/Application && bin/console doctrine:database:create -vvv)
42+
- (cd tests/Application && bin/console doctrine:schema:create -vvv)
43+
- (cd tests/Application && bin/console assets:install public -vvv)
44+
- (cd tests/Application && bin/console cache:warmup -vvv)
4845
- (cd tests/Application && yarn build)
4946

5047
# Configure display
@@ -74,7 +71,7 @@ before_script:
7471
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &
7572

7673
# Run webserver
77-
- (cd tests/Application && bin/console server:run 127.0.0.1:8080 -d public --env=test --quiet > /dev/null 2>&1 &)
74+
- (cd tests/Application && bin/console server:run 127.0.0.1:8080 --quiet > /dev/null 2>&1 &)
7875

7976
script:
8077
- composer validate --strict

behat.yml.dist

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
11
imports:
2-
- vendor/sylius/sylius/behat.yml.dist
2+
- vendor/sylius/sylius/src/Sylius/Behat/Resources/config/suites.yml
33
- tests/Behat/Resources/suites.yml
44

55
default:
66
extensions:
7-
FriendsOfBehat\ContextServiceExtension:
8-
imports:
9-
- vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml
10-
- tests/Behat/Resources/services.xml
7+
Lakion\Behat\MinkDebugExtension:
8+
directory: etc/build
9+
clean_start: false
10+
screenshot: true
11+
12+
Behat\MinkExtension:
13+
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/"
14+
base_url: "http://localhost:8080/"
15+
default_session: symfony
16+
javascript_session: chrome
17+
sessions:
18+
symfony:
19+
symfony: ~
20+
chrome:
21+
selenium2:
22+
browser: chrome
23+
capabilities:
24+
browserName: chrome
25+
browser: chrome
26+
version: ""
27+
marionette: null # https://github.com/Behat/MinkExtension/pull/311
28+
chrome:
29+
switches:
30+
- "start-fullscreen"
31+
- "start-maximized"
32+
- "no-sandbox"
33+
firefox:
34+
selenium2:
35+
browser: firefox
36+
show_auto: false
1137

1238
FriendsOfBehat\SymfonyExtension:
13-
env_file: tests/Application/.env.test
39+
bootstrap: tests/Application/config/bootstrap.php
1440
kernel:
15-
env: test
16-
debug: true
1741
class: Tests\Acme\SyliusExamplePlugin\Application\Kernel
18-
path: tests/Application/Kernel.php
19-
bootstrap: ~
2042

21-
Lakion\Behat\MinkDebugExtension:
22-
directory: etc/build
23-
clean_start: false
24-
screenshot: true
43+
FriendsOfBehat\VariadicExtension: ~
44+
45+
FriendsOfBehat\SuiteSettingsExtension:
46+
paths:
47+
- "features"

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@
1515
"behat/mink-browserkit-driver": "^1.3",
1616
"behat/mink-extension": "^2.2",
1717
"behat/mink-selenium2-driver": "^1.3",
18-
"friends-of-behat/context-service-extension": "^1.2",
19-
"friends-of-behat/cross-container-extension": "^1.1",
20-
"friends-of-behat/page-object-extension": "^0.2.1",
21-
"friends-of-behat/service-container-extension": "^1.0",
22-
"friends-of-behat/symfony-extension": "^1.2.1",
18+
"friends-of-behat/page-object-extension": "^0.3",
19+
"friends-of-behat/suite-settings-extension": "^1.0",
20+
"friends-of-behat/symfony-extension": "^2.0",
2321
"friends-of-behat/variadic-extension": "^1.1",
2422
"lakion/mink-debug-extension": "^1.2.3",
2523
"phpspec/phpspec": "^5.0",
@@ -32,7 +30,7 @@
3230
"sylius-labs/coding-standard": "^2.0",
3331
"symfony/browser-kit": "^3.4|^4.1",
3432
"symfony/debug-bundle": "^3.4|^4.1",
35-
"symfony/dotenv": "^3.4|^4.1",
33+
"symfony/dotenv": "^4.2",
3634
"symfony/intl": "^3.4|^4.1",
3735
"symfony/web-profiler-bundle": "^3.4|^4.1",
3836
"symfony/web-server-bundle": "^3.4|^4.1"
@@ -51,6 +49,9 @@
5149
"Tests\\Acme\\SyliusExamplePlugin\\": "tests/"
5250
}
5351
},
52+
"autoload-dev": {
53+
"classmap": ["tests/Application/Kernel.php"]
54+
},
5455
"extra": {
5556
"branch-alias": {
5657
"dev-master": "1.4-dev"

phpunit.xml.dist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.6/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
7-
bootstrap="vendor/autoload.php">
7+
bootstrap="tests/Application/config/bootstrap.php">
88
<testsuites>
99
<testsuite name="AcmeSyliusExamplePlugin Test Suite">
1010
<directory>tests</directory>
1111
</testsuite>
12+
<env name="APP_ENV" value="test"/>
13+
<env name="SHELL_VERBOSITY" value="-1" />
1214
</testsuites>
1315

1416
<php>

tests/Application/.env.prod.dist

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/Application/.env.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_SECRET='ch4mb3r0f5ecr3ts'
2+
3+
KERNEL_CLASS='Tests\Acme\SyliusExamplePlugin\Application\Kernel'

tests/Application/.env.test.dist

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/Application/.gitignore

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
/var/*
2-
!/var/.gitignore
3-
41
/public/assets
5-
/public/bundles
62
/public/css
73
/public/js
84
/public/media/*
95
!/public/media/image/
106
/public/media/image/*
117
!/public/media/image/.gitignore
128

13-
/vendor
149
/node_modules
1510

16-
/.env
17-
/.env.prod
18-
/.env.staging
19-
/.env.test
20-
/.env.test_cached
11+
###> symfony/framework-bundle ###
12+
/.env.*.local
13+
/.env.local
14+
/.env.local.php
15+
/public/bundles
16+
/var/
17+
/vendor/
18+
###< symfony/framework-bundle ###
19+
20+
###> symfony/web-server-bundle ###
21+
/.web-server-pid
22+
###< symfony/web-server-bundle ###

0 commit comments

Comments
 (0)