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

Diff between 1.2 and 1.3 #134

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e8b982a
Require Sylius v1.3.x@dev
pamil May 31, 2018
66a2300
Merge branch '1.2'
pamil Jun 7, 2018
8f84f20
Merge branch '1.2'
pamil Jun 7, 2018
341734e
Merge branch '1.2'
pamil Jun 12, 2018
5613969
Merge branch '1.2'
pamil Jun 13, 2018
a3fb9ea
Merge branch '1.2'
pamil Jul 3, 2018
eecc192
Make 1.3 build great again
pamil Jul 3, 2018
4f0ec71
Remove PHP 7.1 build for 1.3 branch
pamil Jul 3, 2018
ba97b0b
Merge pull request #110 from pamil/1.3-green
pamil Jul 3, 2018
11e553d
Merge branch '1.2'
pamil Jul 5, 2018
d8730e8
Merge branch '1.2'
pamil Jul 5, 2018
03cd896
Merge branch '1.2'
pamil Jul 9, 2018
4826957
Merge branch '1.2'
pamil Jul 10, 2018
36ea26a
include_all_descendants parameter added to config.yml
bartoszpietrzak1994 Aug 2, 2018
a844fe5
Merge pull request #114 from bartoszpietrzak1994/add-new-product-repo…
pamil Aug 17, 2018
1cbf33b
Use phpspec 5
pamil Sep 19, 2018
8af6c45
Introduce Symfony 4 directory structure
pamil Sep 24, 2018
b8173af
Merge pull request #119 from pamil/1.3-sf4-structure
pamil Sep 24, 2018
2543500
Merge pull request #116 from pamil/1.3-phpspec-5
pamil Sep 24, 2018
d1fbf83
Merge branch '1.2' into 1.3
pamil Sep 24, 2018
28e3df2
Upgrade README after directory structure changes
pamil Sep 25, 2018
0d959b5
Merge pull request #120 from pamil/1.3-readme
bartoszpietrzak1994 Sep 25, 2018
581af60
Merge branch '1.2' into 1.3
pamil Sep 25, 2018
0d8c117
Load .dist env files
pamil Sep 25, 2018
3915451
Change package type to "symfony-bundle" in order to support Flex
pamil Sep 25, 2018
1bbe0cf
Merge pull request #123 from pamil/1.3-type
pamil Sep 25, 2018
0f73f6a
Bring back "sylius-plugin" package type
pamil Sep 26, 2018
fac9445
Merge pull request #125 from pamil/1.3-back-to-sylius-plugin
bartoszpietrzak1994 Sep 26, 2018
b1bc10c
Remove dependency on "symfony/symfony"
pamil Sep 25, 2018
302761a
Merge pull request #124 from pamil/1.3-remove-sf-dep
pamil Sep 26, 2018
cc1a32e
Miscellaneous fixes for 1.3
pamil Oct 2, 2018
3a76148
Merge pull request #129 from pamil/1.3-misc-fixes
pamil Oct 2, 2018
7660d65
Merge branch '1.2' into 1.3
pamil Oct 5, 2018
e0aa95e
Update security checker
pamil Oct 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/bin/*
!/bin/.gitignore

/vendor/
/node_modules/
/composer.lock
Expand Down
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dist: trusty
sudo: false

php:
- 7.1
- 7.2

cache:
Expand All @@ -27,6 +26,9 @@ before_install:
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mkdir -p "${SYLIUS_CACHE_DIR}"

- cp tests/Application/.env.test.dist tests/Application/.env.test
- set -a && source tests/Application/.env.test && set +a

install:
- composer require "symfony/symfony:${SYMFONY_VERSION}" --no-interaction --no-update
- composer install --no-interaction --prefer-dist
Expand All @@ -35,7 +37,7 @@ install:
before_script:
- (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
- (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
- (cd tests/Application && bin/console assets:install web --env=test -vvv)
- (cd tests/Application && bin/console assets:install public --env=test -vvv)
- (cd tests/Application && bin/console cache:warmup --env=test -vvv)
- (cd tests/Application && yarn build)

Expand Down Expand Up @@ -66,15 +68,15 @@ before_script:
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &

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

script:
- composer validate --strict
- bin/phpstan.phar analyse -c phpstan.neon -l max src/
- vendor/bin/phpstan analyse -c phpstan.neon -l max src/

- bin/phpunit
- bin/phpspec run
- bin/behat --strict -vvv --no-interaction || bin/behat --strict -vvv --no-interaction --rerun
- vendor/bin/phpunit
- vendor/bin/phpspec run
- vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun

after_failure:
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

```bash
$ (cd tests/Application && yarn install)
$ (cd tests/Application && yarn run gulp)
$ (cd tests/Application && bin/console assets:install web -e test)
$ (cd tests/Application && yarn build)
$ (cd tests/Application && bin/console assets:install public -e test)

$ (cd tests/Application && bin/console doctrine:database:create -e test)
$ (cd tests/Application && bin/console doctrine:schema:create -e test)
Expand All @@ -30,19 +30,19 @@
- PHPUnit

```bash
$ bin/phpunit
$ vendor/bin/phpunit
```

- PHPSpec

```bash
$ bin/phpspec run
$ vendor/bin/phpspec run
```

- Behat (non-JS scenarios)

```bash
$ bin/behat --tags="~@javascript"
$ vendor/bin/behat --tags="~@javascript"
```

- Behat (JS scenarios)
Expand All @@ -60,13 +60,13 @@
3. Run test application's webserver on `localhost:8080`:

```bash
$ (cd tests/Application && bin/console server:run localhost:8080 -d web -e test)
$ (cd tests/Application && bin/console server:run localhost:8080 -d public -e test)
```

4. Run Behat:

```bash
$ bin/behat --tags="@javascript"
$ vendor/bin/behat --tags="@javascript"
```

### Opening Sylius with your plugin
Expand All @@ -75,12 +75,12 @@

```bash
$ (cd tests/Application && bin/console sylius:fixtures:load -e test)
$ (cd tests/Application && bin/console server:run -d web -e test)
$ (cd tests/Application && bin/console server:run -d public -e test)
```

- Using `dev` environment:

```bash
$ (cd tests/Application && bin/console sylius:fixtures:load -e dev)
$ (cd tests/Application && bin/console server:run -d web -e dev)
$ (cd tests/Application && bin/console server:run -d public -e dev)
```
9 changes: 6 additions & 3 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ default:
- tests/Behat/Resources/services.xml

FriendsOfBehat\SymfonyExtension:
env_file: tests/Application/.env.test
kernel:
class: AppKernel
path: tests/Application/app/AppKernel.php
bootstrap: vendor/autoload.php
env: test
debug: true
class: Tests\Acme\SyliusExamplePlugin\Application\Kernel
path: tests/Application/Kernel.php
bootstrap: ~

Lakion\Behat\MinkDebugExtension:
directory: etc/build
Expand Down
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "sylius/plugin-skeleton",
"type": "sylius-plugin",
"keywords": ["sylius", "sylius-plugin"],
"description": "Acme example plugin for Sylius.",
"license": "MIT",
"require": {
"php": "^7.1",
"php": "^7.2",

"sylius/sylius": "~1.2.3",
"symfony/symfony": "^3.4|^4.1"
"sylius/sylius": "~1.3.0@dev"
},
"require-dev": {
"behat/behat": "^3.4",
Expand All @@ -21,13 +21,20 @@
"friends-of-behat/symfony-extension": "^1.2.1",
"friends-of-behat/variadic-extension": "^1.1",
"lakion/mink-debug-extension": "^1.2.3",
"phpspec/phpspec": "^4.0",
"phpspec/phpspec": "^5.0",
"phpstan/phpstan-doctrine": "^0.10",
"phpstan/phpstan-shim": "^0.10",
"phpstan/phpstan-symfony": "^0.10",
"phpstan/phpstan-webmozart-assert": "^0.10",
"phpunit/phpunit": "^6.5",
"sylius-labs/coding-standard": "^2.0"
"sensiolabs/security-checker": "^5.0",
"sylius-labs/coding-standard": "^2.0",
"symfony/browser-kit": "^3.4|^4.1",
"symfony/debug-bundle": "^3.4|^4.1",
"symfony/dotenv": "^3.4|^4.1",
"symfony/intl": "^3.4|^4.1",
"symfony/web-profiler-bundle": "^3.4|^4.1",
"symfony/web-server-bundle": "^3.4|^4.1"
},
"prefer-stable": true,
"autoload": {
Expand All @@ -36,15 +43,9 @@
"Tests\\Acme\\SyliusExamplePlugin\\": "tests/"
}
},
"autoload-dev": {
"classmap": ["tests/Application/app/AppKernel.php"]
},
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
"dev-master": "1.3-dev"
}
},
"config": {
"bin-dir": "bin"
}
}
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
reportUnmatchedIgnoredErrors: false

symfony:
container_xml_path: tests/Application/var/cache/test/appTestDebugProjectContainer.xml
container_xml_path: tests/Application/var/cache/test/ApplicationTestDebugProjectContainer.xml

excludes_analyse:
# Makes PHPStan crash
Expand Down
5 changes: 0 additions & 5 deletions tests/Application/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
"plugins": [
["transform-object-rest-spread", {
"useBuiltIns": true
}],
["transform-runtime", {
"helpers": true,
"polyfill": true,
"regenerator": true
}]
]
}
23 changes: 23 additions & 0 deletions tests/Application/.env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_DEBUG=1
APP_SECRET=EDITME
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment%?serverVersion=5.5
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://localhost
###< symfony/swiftmailer-bundle ###
23 changes: 23 additions & 0 deletions tests/Application/.env.prod.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=prod
APP_DEBUG=0
APP_SECRET=EDITME
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment%?serverVersion=5.5
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://localhost
###< symfony/swiftmailer-bundle ###
23 changes: 23 additions & 0 deletions tests/Application/.env.test.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=test
APP_DEBUG=1
APP_SECRET=EDITME
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment%?serverVersion=5.5
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###
29 changes: 18 additions & 11 deletions tests/Application/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
module.exports = {
extends: 'airbnb-base',
rules: {
'function-paren-newline': ['error', 'consistent'],
'max-len': ['warn', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
},
extends: 'airbnb-base',
env: {
node: true,
},
rules: {
'object-shorthand': ['error', 'always', {
avoidQuotes: true,
avoidExplicitReturnArrows: true,
}],
'function-paren-newline': ['error', 'consistent'],
'max-len': ['warn', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
},
};
24 changes: 15 additions & 9 deletions tests/Application/.gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
/node_modules/

/var/*
!/var/.gitignore

/web/*
!/web/assets/.gitignore
!/web/bundles/.gitignore
!/web/media/image/.gitignore
!/web/app.php
!/web/app_dev.php
!/web/app_test.php
/public/assets
/public/bundles
/public/css
/public/js
/public/media
!/public/media/image/.gitignore

/vendor
/node_modules

/.env
/.env.prod
/.env.staging
/.env.test
/.env.test_cached