From 5b5282c3522cf7e53d1875320798cdd9661e5c45 Mon Sep 17 00:00:00 2001 From: Lemuel Roberto Date: Sat, 19 Jan 2019 11:58:48 -0200 Subject: [PATCH 1/5] Fix doctrine migrations Context: The commit 060d1629b3c9261edaf9f48b50da3698008fc605 updated the composer dependencies and introduced some breakages. The composer.lock was using the doctrine/doctrine-migrations-bundle:v1.3.2 and the doctrine/migrations:v1.8.1 versions. The doctrine/migrations package major upgrade to the v2.0.0 version changed the autoload namespace of AbstractMigration class and started to use the new PHP 7.0 return type declarations feature. Fix #317 --- src/Migrations/Version20170912085504.php | 6 +++--- src/Migrations/Version20170913125128.php | 6 +++--- src/Migrations/Version20171003103916.php | 6 +++--- src/Migrations/Version20180102140039.php | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Migrations/Version20170912085504.php b/src/Migrations/Version20170912085504.php index 59bf615922..883ee10256 100644 --- a/src/Migrations/Version20170912085504.php +++ b/src/Migrations/Version20170912085504.php @@ -4,7 +4,7 @@ namespace DoctrineMigrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -15,7 +15,7 @@ class Version20170912085504 extends AbstractMigration /** * @param Schema $schema */ - public function up(Schema $schema) + public function up(Schema $schema) : void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -188,7 +188,7 @@ public function up(Schema $schema) /** * @param Schema $schema */ - public function down(Schema $schema) + public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20170913125128.php b/src/Migrations/Version20170913125128.php index ef810631ae..8b4db99976 100644 --- a/src/Migrations/Version20170913125128.php +++ b/src/Migrations/Version20170913125128.php @@ -4,7 +4,7 @@ namespace DoctrineMigrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -15,7 +15,7 @@ class Version20170913125128 extends AbstractMigration /** * @param Schema $schema */ - public function up(Schema $schema) + public function up(Schema $schema) : void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -47,7 +47,7 @@ public function up(Schema $schema) /** * @param Schema $schema */ - public function down(Schema $schema) + public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20171003103916.php b/src/Migrations/Version20171003103916.php index 3d5f34a544..5442bbe1a5 100644 --- a/src/Migrations/Version20171003103916.php +++ b/src/Migrations/Version20171003103916.php @@ -4,7 +4,7 @@ namespace DoctrineMigrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; use Sylius\Component\Attribute\AttributeType\SelectAttributeType; use Sylius\Component\Product\Model\ProductAttributeInterface; @@ -32,7 +32,7 @@ public function setContainer(?ContainerInterface $container = null): void /** * @param Schema $schema */ - public function up(Schema $schema): void + public function up(Schema $schema) : void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -68,7 +68,7 @@ public function up(Schema $schema): void /** * @param Schema $schema */ - public function down(Schema $schema): void + public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20180102140039.php b/src/Migrations/Version20180102140039.php index 434d19e225..b2f89d8d29 100644 --- a/src/Migrations/Version20180102140039.php +++ b/src/Migrations/Version20180102140039.php @@ -4,7 +4,7 @@ namespace DoctrineMigrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -12,7 +12,7 @@ */ class Version20180102140039 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema) : void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -20,7 +20,7 @@ public function up(Schema $schema) $this->addSql('CREATE INDEX IDX_16C8119EE551C011 ON sylius_channel (hostname)'); } - public function down(Schema $schema) + public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); From 0603090c4a8687cded4e036c89ea424abcd5599f Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Tue, 22 Jan 2019 10:14:33 +0100 Subject: [PATCH 2/5] Add missing migration and remove unused use statements --- src/Migrations/Version20170912085504.php | 6 ++--- src/Migrations/Version20170913125128.php | 6 ++--- src/Migrations/Version20171003103916.php | 6 ++--- src/Migrations/Version20180102140039.php | 6 ++--- src/Migrations/Version20190109095211.php | 34 ++++++++++++++++++++++++ src/Migrations/Version20190109160409.php | 30 +++++++++++++++++++++ 6 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 src/Migrations/Version20190109095211.php create mode 100644 src/Migrations/Version20190109160409.php diff --git a/src/Migrations/Version20170912085504.php b/src/Migrations/Version20170912085504.php index 883ee10256..2f9bf97fd1 100644 --- a/src/Migrations/Version20170912085504.php +++ b/src/Migrations/Version20170912085504.php @@ -4,8 +4,8 @@ namespace DoctrineMigrations; -use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; /** * Auto-generated Migration: Please modify to your needs! @@ -15,7 +15,7 @@ class Version20170912085504 extends AbstractMigration /** * @param Schema $schema */ - public function up(Schema $schema) : void + public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -188,7 +188,7 @@ public function up(Schema $schema) : void /** * @param Schema $schema */ - public function down(Schema $schema) : void + public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20170913125128.php b/src/Migrations/Version20170913125128.php index 8b4db99976..12a6b3446e 100644 --- a/src/Migrations/Version20170913125128.php +++ b/src/Migrations/Version20170913125128.php @@ -4,8 +4,8 @@ namespace DoctrineMigrations; -use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; /** * Auto-generated Migration: Please modify to your needs! @@ -15,7 +15,7 @@ class Version20170913125128 extends AbstractMigration /** * @param Schema $schema */ - public function up(Schema $schema) : void + public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -47,7 +47,7 @@ public function up(Schema $schema) : void /** * @param Schema $schema */ - public function down(Schema $schema) : void + public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20171003103916.php b/src/Migrations/Version20171003103916.php index 5442bbe1a5..4851bc5d63 100644 --- a/src/Migrations/Version20171003103916.php +++ b/src/Migrations/Version20171003103916.php @@ -4,8 +4,8 @@ namespace DoctrineMigrations; -use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; use Sylius\Component\Attribute\AttributeType\SelectAttributeType; use Sylius\Component\Product\Model\ProductAttributeInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; @@ -32,7 +32,7 @@ public function setContainer(?ContainerInterface $container = null): void /** * @param Schema $schema */ - public function up(Schema $schema) : void + public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -68,7 +68,7 @@ public function up(Schema $schema) : void /** * @param Schema $schema */ - public function down(Schema $schema) : void + public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20180102140039.php b/src/Migrations/Version20180102140039.php index b2f89d8d29..67e345b21a 100644 --- a/src/Migrations/Version20180102140039.php +++ b/src/Migrations/Version20180102140039.php @@ -4,15 +4,15 @@ namespace DoctrineMigrations; -use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; /** * Auto-generated Migration: Please modify to your needs! */ class Version20180102140039 extends AbstractMigration { - public function up(Schema $schema) : void + public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -20,7 +20,7 @@ public function up(Schema $schema) : void $this->addSql('CREATE INDEX IDX_16C8119EE551C011 ON sylius_channel (hostname)'); } - public function down(Schema $schema) : void + public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Migrations/Version20190109095211.php b/src/Migrations/Version20190109095211.php new file mode 100644 index 0000000000..cfe7c748c3 --- /dev/null +++ b/src/Migrations/Version20190109095211.php @@ -0,0 +1,34 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('CREATE TABLE sylius_shop_billing_data (id INT AUTO_INCREMENT NOT NULL, company VARCHAR(255) DEFAULT NULL, tax_id VARCHAR(255) DEFAULT NULL, country_code VARCHAR(255) DEFAULT NULL, street VARCHAR(255) DEFAULT NULL, city VARCHAR(255) DEFAULT NULL, postcode VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET UTF8 COLLATE UTF8_unicode_ci ENGINE = InnoDB'); + $this->addSql('ALTER TABLE sylius_channel ADD shop_billing_data_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE sylius_channel ADD CONSTRAINT FK_16C8119EB5282EDF FOREIGN KEY (shop_billing_data_id) REFERENCES sylius_shop_billing_data (id) ON DELETE CASCADE'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_16C8119EB5282EDF ON sylius_channel (shop_billing_data_id)'); + } + + public function down(Schema $schema): void + { + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE sylius_channel DROP FOREIGN KEY FK_16C8119EB5282EDF'); + $this->addSql('DROP TABLE sylius_shop_billing_data'); + $this->addSql('DROP INDEX UNIQ_16C8119EB5282EDF ON sylius_channel'); + $this->addSql('ALTER TABLE sylius_channel DROP shop_billing_data_id'); + } +} diff --git a/src/Migrations/Version20190109160409.php b/src/Migrations/Version20190109160409.php new file mode 100644 index 0000000000..eb49cbb83f --- /dev/null +++ b/src/Migrations/Version20190109160409.php @@ -0,0 +1,30 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE sylius_shop_user ADD encoder_name VARCHAR(255) DEFAULT NULL'); + $this->addSql('ALTER TABLE sylius_admin_user ADD encoder_name VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE sylius_admin_user DROP encoder_name'); + $this->addSql('ALTER TABLE sylius_shop_user DROP encoder_name'); + } +} From 2a1bce1fc2656c8a6f96902020a905c3f20a021f Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Tue, 22 Jan 2019 11:10:56 +0100 Subject: [PATCH 3/5] Use SymfonyExtension 2.0 --- .travis.yml | 4 +- behat.yml.dist | 36 +---- composer.json | 7 +- composer.lock | 251 ++++--------------------------- config/bundles.php | 1 + config/services_test.yaml | 3 + config/services_test_cached.yaml | 2 + symfony.lock | 9 -- 8 files changed, 42 insertions(+), 271 deletions(-) create mode 100644 config/services_test.yaml create mode 100644 config/services_test_cached.yaml diff --git a/.travis.yml b/.travis.yml index 5b4a6f5797..2acd5af2e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,10 +88,10 @@ jobs: - bin/console sylius:fixtures:load --no-interaction --env=test_cached --no-debug -vvv - echo "Testing (Behat, without javascript scenarios; ~@javascript && ~@todo && ~@cli)" "Sylius" - - vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags="~@javascript && ~@todo && ~@cli" + - vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript && ~@todo && ~@cli" - echo "Testing (Behat, only javascript scenarios; @javascript && ~@todo && ~@cli)" "Sylius" - - vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags="@javascript && ~@todo && ~@cli" || vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags="@javascript && ~@todo && ~@cli" --rerun + - vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@javascript && ~@todo && ~@cli" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@javascript && ~@todo && ~@cli" --rerun after_failure: - vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log" diff --git a/behat.yml.dist b/behat.yml.dist index 2162984fbe..cc86b71c1b 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -3,41 +3,9 @@ imports: default: extensions: - FriendsOfBehat\ContextServiceExtension: - imports: - - "vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" - + Behat\MinkExtension: + files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" FriendsOfBehat\SuiteSettingsExtension: paths: - "vendor/sylius/sylius/features" - "features" - - Behat\MinkExtension: - files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" - - FriendsOfBehat\SymfonyExtension: - env_file: .env.test - kernel: - env: test - debug: true - class: App\Kernel - path: src/Kernel.php - bootstrap: ~ - -cached: - extensions: - FriendsOfBehat\ContextServiceExtension: - imports: - - "vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" - - Behat\MinkExtension: - files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" - - FriendsOfBehat\SymfonyExtension: - env_file: .env.test_cached - kernel: - env: test_cached - debug: false - class: App\Kernel - path: src/Kernel.php - bootstrap: ~ diff --git a/composer.json b/composer.json index 0dd95f8c21..cb0fa20b8b 100644 --- a/composer.json +++ b/composer.json @@ -27,12 +27,9 @@ "behat/mink-browserkit-driver": "^1.3", "behat/mink-extension": "^2.2", "behat/mink-selenium2-driver": "^1.3", - "friends-of-behat/context-service-extension": "^1.2", - "friends-of-behat/cross-container-extension": "^1.1", - "friends-of-behat/page-object-extension": "^0.2.1", - "friends-of-behat/service-container-extension": "^1.0", + "friends-of-behat/page-object-extension": "^0.3", "friends-of-behat/suite-settings-extension": "^1.0", - "friends-of-behat/symfony-extension": "^1.2.1", + "friends-of-behat/symfony-extension": "^2.0.0-rc.2", "friends-of-behat/variadic-extension": "^1.1", "lakion/mink-debug-extension": "^1.2.3", "lchrusciel/api-test-case": "^3.0", diff --git a/composer.lock b/composer.lock index 6de7cf1cd9..5c9df117c4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e3eb8c1633e3a6e0786640e2494c3280", + "content-hash": "53974272b82e3f0768efb1b6d1ffc335", "packages": [ { "name": "behat/transliterator", @@ -9846,117 +9846,18 @@ "homepage": "https://github.com/container-interop/container-interop", "time": "2017-02-14T19:40:03+00:00" }, - { - "name": "friends-of-behat/context-service-extension", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfBehat/ContextServiceExtension.git", - "reference": "850299407ff45d3a71b1639f6a1975ed898975db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfBehat/ContextServiceExtension/zipball/850299407ff45d3a71b1639f6a1975ed898975db", - "reference": "850299407ff45d3a71b1639f6a1975ed898975db", - "shasum": "" - }, - "require": { - "behat/behat": "^3.1", - "php": "^7.1", - "symfony/dependency-injection": "^3.4|^4.1" - }, - "require-dev": { - "friends-of-behat/cross-container-extension": "^1.0", - "friends-of-behat/test-context": "^1.0", - "phpspec/phpspec": "^5.0" - }, - "suggest": { - "friends-of-behat/cross-container-extension": "^1.0", - "ocramius/proxy-manager": "^2.0", - "symfony/proxy-manager-bridge": "^3.4|^4.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "FriendsOfBehat\\ContextServiceExtension\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kamil Kokot", - "email": "kamil@kokot.me", - "homepage": "http://kamil.kokot.me" - } - ], - "description": "Allows to declare and use contexts services in scenario scoped container.", - "abandoned": "friends-of-behat/symfony-extension", - "time": "2019-01-21T17:12:48+00:00" - }, - { - "name": "friends-of-behat/cross-container-extension", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfBehat/CrossContainerExtension.git", - "reference": "97c376c450c46d2af7d440464f490b914da0dc89" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfBehat/CrossContainerExtension/zipball/97c376c450c46d2af7d440464f490b914da0dc89", - "reference": "97c376c450c46d2af7d440464f490b914da0dc89", - "shasum": "" - }, - "require": { - "behat/behat": "^3.1", - "php": "^7.1", - "symfony/dependency-injection": "^3.3|^4.0" - }, - "require-dev": { - "friends-of-behat/test-context": "^1.0", - "phpspec/phpspec": "^4.0", - "phpunit/phpunit": "^6.0", - "symfony/http-kernel": "^3.3|^4.0" - }, - "suggest": { - "symfony/http-kernel": "^3.3|^4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "FriendsOfBehat\\CrossContainerExtension\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kamil Kokot", - "email": "kamil@kokot.me", - "homepage": "http://kamil.kokot.me" - } - ], - "description": "Makes possible to inject services and parameters from other containers.", - "abandoned": "friends-of-behat/symfony-extension", - "time": "2018-02-13T17:55:39+00:00" - }, { "name": "friends-of-behat/page-object-extension", - "version": "v0.2.1", + "version": "v0.3.0", "source": { "type": "git", "url": "https://github.com/FriendsOfBehat/PageObjectExtension.git", - "reference": "37804ad78fe51327d4d52445cee701a10c9417dd" + "reference": "447cd6c0248807c456e8283116cbcb1842fe8abf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfBehat/PageObjectExtension/zipball/37804ad78fe51327d4d52445cee701a10c9417dd", - "reference": "37804ad78fe51327d4d52445cee701a10c9417dd", + "url": "https://api.github.com/repos/FriendsOfBehat/PageObjectExtension/zipball/447cd6c0248807c456e8283116cbcb1842fe8abf", + "reference": "447cd6c0248807c456e8283116cbcb1842fe8abf", "shasum": "" }, "require": { @@ -9973,6 +9874,11 @@ "symfony/routing": "Allow better support for PageObject pattern in Symfony applications" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3-dev" + } + }, "autoload": { "psr-4": { "FriendsOfBehat\\PageObjectExtension\\": "src/" @@ -9999,52 +9905,7 @@ } ], "description": "Provides default classes for Page object pattern in Behat", - "time": "2018-11-02T06:53:06+00:00" - }, - { - "name": "friends-of-behat/service-container-extension", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfBehat/ServiceContainerExtension.git", - "reference": "5c8ab1bc3e45a37e01da8601aa2aa3a547981586" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfBehat/ServiceContainerExtension/zipball/5c8ab1bc3e45a37e01da8601aa2aa3a547981586", - "reference": "5c8ab1bc3e45a37e01da8601aa2aa3a547981586", - "shasum": "" - }, - "require": { - "behat/behat": "^3.1", - "php": "^7.1" - }, - "require-dev": { - "friends-of-behat/cross-container-extension": "^1.0", - "friends-of-behat/test-context": "^1.0" - }, - "suggest": { - "friends-of-behat/cross-container-extension": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "FriendsOfBehat\\ServiceContainerExtension\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kamil Kokot", - "email": "kamil@kokot.me", - "homepage": "http://kamil.kokot.me" - } - ], - "description": "Allows to declare own services inside Behat container without writing an extension.", - "time": "2018-02-13T17:50:03+00:00" + "time": "2019-01-09T09:34:38+00:00" }, { "name": "friends-of-behat/suite-settings-extension", @@ -10089,39 +9950,42 @@ }, { "name": "friends-of-behat/symfony-extension", - "version": "v1.4.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/FriendsOfBehat/SymfonyExtension.git", - "reference": "3ef0d0dcf32c48edc928e7a188a94c3afe1c1a31" + "reference": "0b9f2bde9590acff0a469dc5f889fd3c98e1d70e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfBehat/SymfonyExtension/zipball/3ef0d0dcf32c48edc928e7a188a94c3afe1c1a31", - "reference": "3ef0d0dcf32c48edc928e7a188a94c3afe1c1a31", + "url": "https://api.github.com/repos/FriendsOfBehat/SymfonyExtension/zipball/0b9f2bde9590acff0a469dc5f889fd3c98e1d70e", + "reference": "0b9f2bde9590acff0a469dc5f889fd3c98e1d70e", "shasum": "" }, "require": { "behat/behat": "^3.4", "php": "^7.1", - "symfony/dotenv": "^3.4|^4.1", - "symfony/http-kernel": "^3.4|^4.1" + "symfony/http-kernel": "^3.4|^4.1", + "symfony/proxy-manager-bridge": "^3.4|^4.1" }, "require-dev": { "behat/mink": "^1.7", "behat/mink-browserkit-driver": "^1.3", "behat/mink-extension": "^2.2", - "friends-of-behat/cross-container-extension": "^1.0", - "friends-of-behat/test-context": "^1.0", - "phpstan/phpstan-shim": "^0.10", + "phpstan/phpstan-shim": "^0.11", "sylius-labs/coding-standard": "^3.0", - "symfony/framework-bundle": "^3.4|^4.1" + "symfony/framework-bundle": "^3.4|^4.1", + "symfony/yaml": "^3.4|^4.1" }, "suggest": { - "behat/mink-browserkit-driver": "^1.3", - "friends-of-behat/cross-container-extension": "^1.0" + "behat/mink-browserkit-driver": "^1.3" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } }, - "type": "library", "autoload": { "psr-4": { "FriendsOfBehat\\SymfonyExtension\\": "src/" @@ -10139,7 +10003,7 @@ } ], "description": "Integrates Behat with Symfony.", - "time": "2018-12-19T14:42:27+00:00" + "time": "2019-01-21T14:35:38+00:00" }, { "name": "friends-of-behat/variadic-extension", @@ -12584,62 +12448,6 @@ ], "time": "2018-12-19T23:57:18+00:00" }, - { - "name": "stripe/stripe-php", - "version": "v6.28.1", - "source": { - "type": "git", - "url": "https://github.com/stripe/stripe-php.git", - "reference": "59902d9066045744904e682999d2fef62830d037" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/59902d9066045744904e682999d2fef62830d037", - "reference": "59902d9066045744904e682999d2fef62830d037", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "1.*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0", - "symfony/process": "~2.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Stripe\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stripe and contributors", - "homepage": "https://github.com/stripe/stripe-php/contributors" - } - ], - "description": "Stripe PHP Library", - "homepage": "https://stripe.com/", - "keywords": [ - "api", - "payment processing", - "stripe" - ], - "time": "2019-01-21T12:33:00+00:00" - }, { "name": "sylius-labs/coding-standard", "version": "v2.0.0", @@ -13836,7 +13644,8 @@ "minimum-stability": "stable", "stability-flags": { "sylius/sylius": 20, - "behat/mink": 20 + "behat/mink": 20, + "friends-of-behat/symfony-extension": 5 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/config/bundles.php b/config/bundles.php index 8c4b6ae66b..cb45e6deaa 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -57,5 +57,6 @@ Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], + FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true], Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true], ]; diff --git a/config/services_test.yaml b/config/services_test.yaml new file mode 100644 index 0000000000..338a01d2cb --- /dev/null +++ b/config/services_test.yaml @@ -0,0 +1,3 @@ + +imports: + - { resource: "../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } diff --git a/config/services_test_cached.yaml b/config/services_test_cached.yaml new file mode 100644 index 0000000000..0de380ea04 --- /dev/null +++ b/config/services_test_cached.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "services_test.yaml" } diff --git a/symfony.lock b/symfony.lock index 7253218d42..a8181c073a 100644 --- a/symfony.lock +++ b/symfony.lock @@ -122,18 +122,9 @@ "egulias/email-validator": { "version": "2.1.5" }, - "friends-of-behat/context-service-extension": { - "version": "v1.2.0" - }, - "friends-of-behat/cross-container-extension": { - "version": "v1.1.0" - }, "friends-of-behat/page-object-extension": { "version": "0.1" }, - "friends-of-behat/service-container-extension": { - "version": "v1.0.1" - }, "friends-of-behat/suite-settings-extension": { "version": "v1.0.1" }, From fbc4abdcd450c0ad70ff1649690991d429780b91 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Tue, 22 Jan 2019 11:42:09 +0100 Subject: [PATCH 4/5] After rebase fixes --- composer.lock | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 5c9df117c4..73cf1b66e3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "53974272b82e3f0768efb1b6d1ffc335", + "content-hash": "328af1a95106cdac3f5243c24247c80c", "packages": [ { "name": "behat/transliterator", @@ -12448,6 +12448,62 @@ ], "time": "2018-12-19T23:57:18+00:00" }, + { + "name": "stripe/stripe-php", + "version": "v6.28.1", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "59902d9066045744904e682999d2fef62830d037" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/59902d9066045744904e682999d2fef62830d037", + "reference": "59902d9066045744904e682999d2fef62830d037", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "1.*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0", + "symfony/process": "~2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stripe and contributors", + "homepage": "https://github.com/stripe/stripe-php/contributors" + } + ], + "description": "Stripe PHP Library", + "homepage": "https://stripe.com/", + "keywords": [ + "api", + "payment processing", + "stripe" + ], + "time": "2019-01-21T12:33:00+00:00" + }, { "name": "sylius-labs/coding-standard", "version": "v2.0.0", From 40e154759bcdfb0a8446d4d24f5d805b5f258bd0 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Tue, 22 Jan 2019 12:54:40 +0100 Subject: [PATCH 5/5] PR review fixes --- behat.yml.dist | 45 ++++++++++++++++++++++++++++++++++++++- composer.json | 2 +- composer.lock | 5 ++--- config/services_test.yaml | 1 - 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/behat.yml.dist b/behat.yml.dist index cc86b71c1b..eac7e51286 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -1,11 +1,54 @@ imports: - - vendor/sylius/sylius/behat.yml.dist + - vendor/sylius/sylius/src/Sylius/Behat/Resources/config/suites.yml default: + formatters: + pretty: + verbose: true + paths: false + snippets: false + extensions: + Lakion\Behat\MinkDebugExtension: + directory: etc/build + clean_start: false + screenshot: true + Behat\MinkExtension: files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" + base_url: "http://localhost:8080/" + default_session: symfony + javascript_session: chrome + sessions: + symfony: + symfony: ~ + chrome: + selenium2: + browser: chrome + capabilities: + browserName: chrome + browser: chrome + version: "" + marionette: null # https://github.com/Behat/MinkExtension/pull/311 + chrome: + switches: + - "start-fullscreen" + - "start-maximized" + - "no-sandbox" + firefox: + selenium2: + browser: firefox + show_auto: false + + FriendsOfBehat\SymfonyExtension: ~ + + FriendsOfBehat\VariadicExtension: ~ + FriendsOfBehat\SuiteSettingsExtension: paths: - "vendor/sylius/sylius/features" - "features" + + gherkin: + filters: + tags: "~@todo && ~@cli" # CLI is excluded as it registers an error handler that mutes fatal errors diff --git a/composer.json b/composer.json index cb0fa20b8b..65ed2baa17 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "behat/mink-selenium2-driver": "^1.3", "friends-of-behat/page-object-extension": "^0.3", "friends-of-behat/suite-settings-extension": "^1.0", - "friends-of-behat/symfony-extension": "^2.0.0-rc.2", + "friends-of-behat/symfony-extension": "^2.0", "friends-of-behat/variadic-extension": "^1.1", "lakion/mink-debug-extension": "^1.2.3", "lchrusciel/api-test-case": "^3.0", diff --git a/composer.lock b/composer.lock index 73cf1b66e3..89d1673176 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "328af1a95106cdac3f5243c24247c80c", + "content-hash": "ac6d91c568fd7c0fbfd8639984e1b9ec", "packages": [ { "name": "behat/transliterator", @@ -13700,8 +13700,7 @@ "minimum-stability": "stable", "stability-flags": { "sylius/sylius": 20, - "behat/mink": 20, - "friends-of-behat/symfony-extension": 5 + "behat/mink": 20 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/config/services_test.yaml b/config/services_test.yaml index 338a01d2cb..e47b21c4ba 100644 --- a/config/services_test.yaml +++ b/config/services_test.yaml @@ -1,3 +1,2 @@ - imports: - { resource: "../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }