Skip to content

Commit 27f2b24

Browse files
authored
Merge pull request #96 from pamil/beta
Update to Sylius v1.2.0-BETA
2 parents b79b584 + 46357f5 commit 27f2b24

File tree

8 files changed

+143
-41
lines changed

8 files changed

+143
-41
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,25 @@ env:
1818
global:
1919
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
2020
- SYLIUS_BUILD_DIR=etc/build
21+
matrix:
22+
- SYMFONY_VERSION="3.4.*"
23+
- SYMFONY_VERSION="4.0.*"
2124

2225
before_install:
2326
- phpenv config-rm xdebug.ini
2427
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
2528
- mkdir -p "${SYLIUS_CACHE_DIR}"
2629

2730
install:
31+
- composer require "symfony/symfony:${SYMFONY_VERSION}" --no-interaction --no-update
2832
- composer install --no-interaction --prefer-dist
2933
- (cd tests/Application && yarn install)
3034

3135
before_script:
3236
- (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
3337
- (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
3438
- (cd tests/Application && bin/console assets:install web --env=test -vvv)
35-
- (cd tests/Application && yarn run gulp)
39+
- (cd tests/Application && yarn build)
3640

3741
# Configure display
3842
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@
66
"require": {
77
"php": "^7.1",
88

9-
"sylius/sylius": "^1.2@dev"
9+
"sylius/sylius": "^1.2@beta",
10+
"symfony/symfony": "^3.4|^4.0"
1011
},
1112
"require-dev": {
12-
"behat/behat": "^3.3",
13-
"behat/mink": "^1.7",
13+
"behat/behat": "^3.4",
14+
"behat/mink": "^1.7@dev",
1415
"behat/mink-browserkit-driver": "^1.3",
1516
"behat/mink-extension": "^2.2",
1617
"behat/mink-selenium2-driver": "^1.3",
17-
"friends-of-behat/context-service-extension": "^1.0",
18-
"friends-of-behat/cross-container-extension": "^1.0",
18+
"friends-of-behat/context-service-extension": "^1.2",
19+
"friends-of-behat/cross-container-extension": "^1.1",
1920
"friends-of-behat/service-container-extension": "^1.0",
20-
"friends-of-behat/symfony-extension": "^1.0",
21-
"friends-of-behat/variadic-extension": "^1.0",
21+
"friends-of-behat/symfony-extension": "^1.2.1",
22+
"friends-of-behat/variadic-extension": "^1.1",
2223
"lakion/mink-debug-extension": "^1.2.3",
23-
"phpspec/phpspec": "^3.2",
24+
"phpspec/phpspec": "^4.0",
2425
"phpstan/phpstan-shim": "^0.9.2",
2526
"phpunit/phpunit": "^6.5",
2627
"se/selenium-server-standalone": "^2.52",
27-
"sylius-labs/coding-standard": "^1.0",
28-
"symplify/easy-coding-standard": "^2.4"
28+
"sylius-labs/coding-standard": "^2.0"
2929
},
3030
"prefer-stable": true,
3131
"autoload": {
@@ -39,7 +39,7 @@
3939
},
4040
"extra": {
4141
"branch-alias": {
42-
"dev-master": "1.1-dev"
42+
"dev-master": "1.2-dev"
4343
}
4444
},
4545
"config": {

tests/Application/.babelrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"targets": {
5+
"node": "6"
6+
},
7+
"useBuiltIns": true
8+
}]
9+
],
10+
"plugins": [
11+
["transform-object-rest-spread", {
12+
"useBuiltIns": true
13+
}],
14+
["transform-runtime", {
15+
"helpers": true,
16+
"polyfill": true,
17+
"regenerator": true
18+
}]
19+
]
20+
}

tests/Application/.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
extends: 'airbnb-base',
3+
rules: {
4+
'function-paren-newline': ['error', 'consistent'],
5+
'max-len': ['warn', 120, 2, {
6+
ignoreUrls: true,
7+
ignoreComments: false,
8+
ignoreRegExpLiterals: true,
9+
ignoreStrings: true,
10+
ignoreTemplateLiterals: true,
11+
}],
12+
},
13+
};

tests/Application/Gulpfile.js

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

tests/Application/app/config/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ framework:
2121
validation: { enable_annotations: true }
2222
templating: { engines: ["twig"] }
2323
default_locale: "%locale%"
24-
trusted_proxies: ~
2524
session:
2625
storage_id: session.storage.mock_file
2726
test: ~
@@ -64,3 +63,10 @@ fos_rest:
6463
sylius_theme:
6564
sources:
6665
test: ~
66+
67+
liip_imagine:
68+
resolvers:
69+
default:
70+
web_path:
71+
web_root: "%kernel.project_dir%/web"
72+
cache_prefix: "media/cache"

tests/Application/gulpfile.babel.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import chug from 'gulp-chug';
2+
import gulp from 'gulp';
3+
import upath from 'path';
4+
import yargs from 'yargs';
5+
6+
const { argv } = yargs
7+
.options({
8+
rootPath: {
9+
description: '<path> path to web assets directory',
10+
type: 'string',
11+
requiresArg: true,
12+
required: false,
13+
},
14+
vendorPath: {
15+
description: '<path> path to vendor directory',
16+
type: 'string',
17+
requiresArg: true,
18+
required: false,
19+
},
20+
nodeModulesPath: {
21+
description: '<path> path to node_modules directory',
22+
type: 'string',
23+
requiresArg: true,
24+
required: false,
25+
},
26+
});
27+
28+
const config = [
29+
'--rootPath',
30+
argv.rootPath || '../../../../../../../tests/Application/web/assets',
31+
...(argv.vendorPath ? [
32+
'--vendorPath',
33+
upath.joinSafe(argv.vendorPath, 'sylius/sylius/src/Sylius/Bundle'),
34+
] : []),
35+
'--nodeModulesPath',
36+
argv.nodeModulesPath || '../../../../../../../tests/Application/node_modules',
37+
];
38+
39+
export const buildAdmin = function buildAdmin() {
40+
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
41+
.pipe(chug({ args: config }));
42+
};
43+
buildAdmin.description = 'Build admin assets.';
44+
45+
export const watchAdmin = function watchAdmin() {
46+
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
47+
.pipe(chug({ args: config, tasks: 'watch' }));
48+
};
49+
watchAdmin.description = 'Watch admin asset sources and rebuild on changes.';
50+
51+
export const buildShop = function buildShop() {
52+
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
53+
.pipe(chug({ args: config }));
54+
};
55+
buildShop.description = 'Build shop assets.';
56+
57+
export const watchShop = function watchShop() {
58+
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
59+
.pipe(chug({ args: config, tasks: 'watch' }));
60+
};
61+
watchShop.description = 'Watch shop asset sources and rebuild on changes.';
62+
63+
export const build = gulp.parallel(buildAdmin, buildShop);
64+
build.description = 'Build assets.';
65+
66+
gulp.task('admin', buildAdmin);
67+
gulp.task('admin-watch', watchAdmin);
68+
gulp.task('shop', buildShop);
69+
gulp.task('shop-watch', watchShop);
70+
71+
export default build;

tests/Application/package.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
{
22
"dependencies": {
3+
"babel-runtime": "^6.26.0",
34
"jquery": "^3.2.0",
45
"lightbox2": "^2.9.0",
6+
"npm": "^6.1.0",
57
"semantic-ui-css": "^2.2.0"
68
},
79
"devDependencies": {
8-
"gulp": "^3.9.0",
10+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
11+
"babel-plugin-transform-runtime": "^6.23.0",
12+
"babel-preset-env": "^1.7.0",
13+
"babel-register": "^6.26.0",
14+
"eslint": "^4.19.1",
15+
"eslint-config-airbnb-base": "^12.1.0",
16+
"eslint-plugin-import": "^2.12.0",
17+
"gulp": "^4.0.0",
918
"gulp-chug": "^0.5",
1019
"gulp-concat": "^2.6.0",
1120
"gulp-debug": "^2.1.2",
1221
"gulp-if": "^2.0.0",
1322
"gulp-livereload": "^3.8.1",
1423
"gulp-order": "^1.1.1",
15-
"gulp-sass": "^2.3.0",
24+
"gulp-sass": "^4.0.1",
1625
"gulp-sourcemaps": "^1.6.0",
1726
"gulp-uglify": "^1.5.1",
1827
"gulp-uglifycss": "^1.0.5",
1928
"merge-stream": "^1.0.0",
20-
"node-sass": "^4.5.3",
29+
"upath": "^1.1.0",
2130
"yargs": "^6.4.0"
2231
},
2332
"scripts": {
24-
"gulp": "gulp"
33+
"build": "gulp",
34+
"gulp": "gulp",
35+
"lint": "yarn lint:js",
36+
"lint:js": "eslint gulpfile.babel.js"
2537
},
2638
"repository": {
2739
"type": "git",

0 commit comments

Comments
 (0)