From 043a75ee8b3d79f92be5a379cf0da6c4ab4c42c8 Mon Sep 17 00:00:00 2001 From: Michael Telgmann Date: Tue, 28 Feb 2023 10:34:45 +0100 Subject: [PATCH 1/5] chore(SW-27049): Update dependencies --- tests/Context/SubContext.php | 2 +- tests/composer.json | 14 +- tests/composer.lock | 1372 +++++++++++----------------------- 3 files changed, 454 insertions(+), 934 deletions(-) diff --git a/tests/Context/SubContext.php b/tests/Context/SubContext.php index 3ff43b1..d3502e9 100644 --- a/tests/Context/SubContext.php +++ b/tests/Context/SubContext.php @@ -27,7 +27,7 @@ class SubContext extends PageObjectContext implements MinkAwareContext public function __construct() { - $dotenv = new Dotenv(\dirname(__DIR__)); + $dotenv = Dotenv::createUnsafeImmutable(\dirname(__DIR__)); $dotenv->load(); } diff --git a/tests/composer.json b/tests/composer.json index a6b3630..8bc19ff 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -4,22 +4,20 @@ "type": "project", "require-dev": { "ext-json": "*", - "php": "~7.4.0", "behat/behat": "^3.7", "behat/mink": "^1.8", "behat/mink-selenium2-driver": "^1.6", - "bossa/phpspec2-expect": "^3.1", "cocur/slugify": "^2.3", + "fakerphp/faker": "^1.21", "friends-of-behat/mink-extension": "^2.4", "friendsofphp/php-cs-fixer": "^3.1", - "fzaninotto/faker": "^1.6", - "guzzlehttp/guzzle": "^6.2", + "guzzlehttp/guzzle": "^7.5", "kubawerlos/php-cs-fixer-custom-fixers": "^3.0", "phpstan/phpstan": "^0.12.99", "phpunit/phpunit": "^9.4", "sensiolabs/behat-page-object-extension": "^2.0", - "smalot/pdfparser": "^0.14.0", - "vlucas/phpdotenv": "^2.3" + "smalot/pdfparser": "^2.3", + "vlucas/phpdotenv": "^5.5" }, "autoload": { "psr-4": { @@ -27,10 +25,6 @@ } }, "config": { - "platform": { - "php": "7.4" - - }, "sort-packages": true } } diff --git a/tests/composer.lock b/tests/composer.lock index 5ad32b1..8d5306f 100644 --- a/tests/composer.lock +++ b/tests/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": "ded53f1804330e1b4a9fb44bcc58e604", + "content-hash": "be5a239f3953709da15d7919cd5a7648", "packages": [], "packages-dev": [ { @@ -338,60 +338,6 @@ }, "time": "2022-03-30T09:27:43+00:00" }, - { - "name": "bossa/phpspec2-expect", - "version": "3.1.3", - "source": { - "type": "git", - "url": "https://github.com/BossaConsulting/phpspec-expect.git", - "reference": "a46a68dbc97b617be3aecd3723c8a82c7658613a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/BossaConsulting/phpspec-expect/zipball/a46a68dbc97b617be3aecd3723c8a82c7658613a", - "reference": "a46a68dbc97b617be3aecd3723c8a82c7658613a", - "shasum": "" - }, - "require": { - "php": "^7.1", - "phpspec/phpspec": "^5.0 || ^6.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "expect.php" - ], - "psr-0": { - "Bossa\\PhpSpec\\Expect\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marcello Duarte", - "homepage": "http://marcelloduarte.net/" - } - ], - "description": "Helper that decorates any SUS with a phpspec lazy object wrapper", - "keywords": [ - "BDD", - "SpecBDD", - "TDD", - "spec", - "specification" - ], - "support": { - "issues": "https://github.com/BossaConsulting/phpspec-expect/issues", - "source": "https://github.com/BossaConsulting/phpspec-expect/tree/3.1.3" - }, - "time": "2020-02-12T21:34:55+00:00" - }, { "name": "cocur/slugify", "version": "v2.5", @@ -949,6 +895,74 @@ ], "time": "2022-12-14T08:49:07+00:00" }, + { + "name": "fakerphp/faker", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v1.21-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + }, + "time": "2023-06-12T08:44:38+00:00" + }, { "name": "friends-of-behat/mink-extension", "version": "v2.7.2", @@ -1016,16 +1030,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.22.0", + "version": "v3.23.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" + "reference": "35af3cbbacfa91e164b252a28ec0b644f1ed4e78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/35af3cbbacfa91e164b252a28ec0b644f1ed4e78", + "reference": "35af3cbbacfa91e164b252a28ec0b644f1ed4e78", "shasum": "" }, "require": { @@ -1101,7 +1115,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.23.0" }, "funding": [ { @@ -1109,7 +1123,7 @@ "type": "github" } ], - "time": "2023-07-16T23:08:06+00:00" + "time": "2023-08-14T12:27:35+00:00" }, { "name": "friendsofphp/proxy-manager-lts", @@ -1194,36 +1208,30 @@ "time": "2023-05-24T07:17:17+00:00" }, { - "name": "fzaninotto/faker", - "version": "v1.9.2", + "name": "graham-campbell/result-type", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", - "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.1" }, "require-dev": { - "ext-intl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^2.9.2" + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "autoload": { "psr-4": { - "Faker\\": "src/Faker/" + "GrahamCampbell\\ResultType\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1232,55 +1240,78 @@ ], "authors": [ { - "name": "François Zaninotto" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], - "description": "Faker is a PHP library that generates fake data for you.", + "description": "An Implementation Of The Result Type", "keywords": [ - "data", - "faker", - "fixtures" + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" ], "support": { - "issues": "https://github.com/fzaninotto/Faker/issues", - "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" }, - "abandoned": true, - "time": "2020-12-11T09:56:16+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2023-02-25T20:23:15+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.5.8", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.9", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17" + "guzzlehttp/promises": "^1.5.3 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "6.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -1333,19 +1364,20 @@ } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5.8" + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" }, "funding": [ { @@ -1361,33 +1393,37 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:07+00:00" + "time": "2023-05-21T14:04:53+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -1424,7 +1460,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.3" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -1440,42 +1476,48 @@ "type": "tidelift" } ], - "time": "2023-05-21T12:31:43+00:00" + "time": "2023-08-03T15:11:55+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.9.1", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b" + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b", - "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/8bd7c33a0734ae1c5d074360512beb716bef3f77", + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Psr7\\": "src/" } @@ -1514,6 +1556,11 @@ "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -1529,7 +1576,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.0" }, "funding": [ { @@ -1545,7 +1592,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:00:37+00:00" + "time": "2023-08-03T15:06:02+00:00" }, { "name": "instaclick/php-webdriver", @@ -1612,16 +1659,16 @@ }, { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.16.0", + "version": "v3.16.2", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "5f06d9d2eb3bb04a9634d32cacaab4e94f5e6675" + "reference": "d3f2590069d06ba49ad24cac03f802e8ad0aaeba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/5f06d9d2eb3bb04a9634d32cacaab4e94f5e6675", - "reference": "5f06d9d2eb3bb04a9634d32cacaab4e94f5e6675", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/d3f2590069d06ba49ad24cac03f802e8ad0aaeba", + "reference": "d3f2590069d06ba49ad24cac03f802e8ad0aaeba", "shasum": "" }, "require": { @@ -1652,9 +1699,9 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.16.0" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.16.2" }, - "time": "2023-07-17T21:57:45+00:00" + "time": "2023-08-06T13:50:15+00:00" }, { "name": "laminas/laminas-code", @@ -1783,16 +1830,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1833,9 +1880,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", @@ -1949,416 +1996,79 @@ "time": "2022-02-21T01:04:05+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", + "name": "phpoption/phpoption", + "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "bamarni-bin": { + "bin-links": true, + "forward-command": true }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.7.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" - }, - "time": "2023-05-30T18:13:47+00:00" - }, - { - "name": "phpspec/php-diff", - "version": "v1.1.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/php-diff.git", - "reference": "fc1156187f9f6c8395886fe85ed88a0a245d72e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/php-diff/zipball/fc1156187f9f6c8395886fe85ed88a0a245d72e9", - "reference": "fc1156187f9f6c8395886fe85ed88a0a245d72e9", - "shasum": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Diff": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Chris Boulton", - "homepage": "http://github.com/chrisboulton" - } - ], - "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", - "support": { - "source": "https://github.com/phpspec/php-diff/tree/v1.1.3" - }, - "time": "2020-09-18T13:47:07+00:00" - }, - { - "name": "phpspec/phpspec", - "version": "6.3.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/phpspec.git", - "reference": "6f3de03e235ab817aff35cc76aceb09826c3c4f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/phpspec/zipball/6f3de03e235ab817aff35cc76aceb09826c3c4f8", - "reference": "6f3de03e235ab817aff35cc76aceb09826c3c4f8", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "ext-tokenizer": "*", - "php": "^7.2 || 8.0.*", - "phpspec/php-diff": "^1.0.0", - "phpspec/prophecy": "^1.9", - "sebastian/exporter": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "symfony/console": "^3.4 || ^4.0 || ^5.0", - "symfony/event-dispatcher": "^3.4 || ^4.0 || ^5.0", - "symfony/finder": "^3.4 || ^4.0 || ^5.0", - "symfony/process": "^3.4 || ^4.0 || ^5.0", - "symfony/yaml": "^3.4 || ^4.0 || ^5.0" - }, - "conflict": { - "sebastian/comparator": "<1.2.4" - }, - "require-dev": { - "behat/behat": "^3.3", - "phpunit/phpunit": "^8.0 || ^9.0", - "symfony/filesystem": "^3.4 || ^4.0 || ^5.0" - }, - "suggest": { - "phpspec/nyan-formatters": "Adds Nyan formatters" - }, - "bin": [ - "bin/phpspec" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "PhpSpec": "src/" + "PhpOption\\": "src/PhpOption/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { - "name": "Marcello Duarte", - "homepage": "http://marcelloduarte.net/" - }, - { - "name": "Ciaran McNulty", - "homepage": "https://ciaranmcnulty.com/" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], - "description": "Specification-oriented BDD framework for PHP 7.1+", - "homepage": "http://phpspec.net/", + "description": "Option Type for PHP", "keywords": [ - "BDD", - "SpecBDD", - "TDD", - "spec", - "specification", - "testing", - "tests" + "language", + "option", + "php", + "type" ], "support": { - "issues": "https://github.com/phpspec/phpspec/issues", - "source": "https://github.com/phpspec/phpspec/tree/6.3.1" - }, - "time": "2020-12-29T14:47:41+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.17.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/15873c65b207b07765dbc3c95d20fdf4a320cbe2", - "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^8.0 || ^9.0" + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "url": "https://github.com/GrahamCampbell", + "type": "github" }, { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.17.0" - }, - "time": "2023-02-02T15:41:36+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.23.0", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "a2b24135c35852b348894320d47b3902a94bc494" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a2b24135c35852b348894320d47b3902a94bc494", - "reference": "a2b24135c35852b348894320d47b3902a94bc494", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.0" - }, - "time": "2023-07-23T22:17:56+00:00" + "time": "2023-02-25T19:38:58+00:00" }, { "name": "phpstan/phpstan", @@ -2422,16 +2132,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -2487,7 +2197,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -2495,7 +2206,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2740,16 +2451,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.10", + "version": "9.6.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", "shasum": "" }, "require": { @@ -2823,7 +2534,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" }, "funding": [ { @@ -2839,7 +2550,7 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:04:23+00:00" + "time": "2023-08-19T07:10:56+00:00" }, { "name": "psr/cache", @@ -2939,21 +2650,124 @@ "time": "2021-11-05T16:50:12+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/1.0.2" + }, + "time": "2023-04-10T20:12:12+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -2963,7 +2777,7 @@ }, "autoload": { "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2973,33 +2787,37 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Standard interfaces for event handling.", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "events", + "factory", + "http", + "message", "psr", - "psr-14" + "psr-17", + "psr-7", + "request", + "response" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -3008,7 +2826,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3023,7 +2841,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -3037,9 +2855,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -3641,16 +3459,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -3693,7 +3511,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -3701,7 +3519,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -4177,26 +3995,23 @@ }, { "name": "smalot/pdfparser", - "version": "v0.14.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/smalot/pdfparser.git", - "reference": "ec72a99028ba5e21a0acad92047b85e128cbf81f" + "reference": "eef0263bbaec86d30801d3551ac83f4e1015d4c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smalot/pdfparser/zipball/ec72a99028ba5e21a0acad92047b85e128cbf81f", - "reference": "ec72a99028ba5e21a0acad92047b85e128cbf81f", + "url": "https://api.github.com/repos/smalot/pdfparser/zipball/eef0263bbaec86d30801d3551ac83f4e1015d4c3", + "reference": "eef0263bbaec86d30801d3551ac83f4e1015d4c3", "shasum": "" }, "require": { - "ext-mbstring": "*", + "ext-iconv": "*", "ext-zlib": "*", - "php": ">=5.3.0", - "tecnickcom/tcpdf": "~6.0" - }, - "require-dev": { - "atoum/atoum": "^2.8 | ^3.0" + "php": ">=7.1", + "symfony/polyfill-mbstring": "^1.18" }, "type": "library", "autoload": { @@ -4210,12 +4025,12 @@ ], "authors": [ { - "name": "Sebastien Malot", + "name": "Sebastien MALOT", "email": "sebastien@malot.fr" } ], "description": "Pdf parser library. Can read and extract information from pdf file.", - "homepage": "http://www.pdfparser.org", + "homepage": "https://www.pdfparser.org", "keywords": [ "extract", "parse", @@ -4225,22 +4040,22 @@ ], "support": { "issues": "https://github.com/smalot/pdfparser/issues", - "source": "https://github.com/smalot/pdfparser/tree/master" + "source": "https://github.com/smalot/pdfparser/tree/v2.7.0" }, - "time": "2019-01-23T09:14:37+00:00" + "time": "2023-08-10T06:11:26+00:00" }, { "name": "symfony/config", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "2a6b1111d038adfa15d52c0871e540f3b352d1e4" + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/2a6b1111d038adfa15d52c0871e540f3b352d1e4", - "reference": "2a6b1111d038adfa15d52c0871e540f3b352d1e4", + "url": "https://api.github.com/repos/symfony/config/zipball/8109892f27beed9252bd1f1c1880aeb4ad842650", + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650", "shasum": "" }, "require": { @@ -4290,7 +4105,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.4.21" + "source": "https://github.com/symfony/config/tree/v5.4.26" }, "funding": [ { @@ -4306,20 +4121,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-19T20:21:11+00:00" }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273", + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273", "shasum": "" }, "require": { @@ -4389,7 +4204,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.26" }, "funding": [ { @@ -4405,20 +4220,20 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-07-19T20:11:33+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d" + "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/95f3c7468db1da8cc360b24fa2a26e7cefcb355d", - "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", + "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", "shasum": "" }, "require": { @@ -4455,7 +4270,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.21" + "source": "https://github.com/symfony/css-selector/tree/v5.4.26" }, "funding": [ { @@ -4471,20 +4286,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-07T06:10:25+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.4.25", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f0410c30a6c86bbce6c719c2b5cfc343362b982e" + "reference": "6736a10dcf724725a3b1c3b53e63a9ee03b27db9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f0410c30a6c86bbce6c719c2b5cfc343362b982e", - "reference": "f0410c30a6c86bbce6c719c2b5cfc343362b982e", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6736a10dcf724725a3b1c3b53e63a9ee03b27db9", + "reference": "6736a10dcf724725a3b1c3b53e63a9ee03b27db9", "shasum": "" }, "require": { @@ -4544,7 +4359,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.25" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.26" }, "funding": [ { @@ -4560,7 +4375,7 @@ "type": "tidelift" } ], - "time": "2023-06-24T09:45:28+00:00" + "time": "2023-07-19T20:11:33+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4631,16 +4446,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { @@ -4696,7 +4511,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -4712,7 +4527,7 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4859,16 +4674,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", "shasum": "" }, "require": { @@ -4902,7 +4717,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v5.4.27" }, "funding": [ { @@ -4918,7 +4733,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-07-31T08:02:31+00:00" }, { "name": "symfony/options-resolver", @@ -5152,93 +4967,6 @@ ], "time": "2022-11-03T14:55:06+00:00" }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, { "name": "symfony/polyfill-intl-normalizer", "version": "v1.27.0", @@ -5406,82 +5134,6 @@ ], "time": "2022-11-03T14:55:06+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, { "name": "symfony/polyfill-php73", "version": "v1.27.0", @@ -5725,16 +5377,16 @@ }, { "name": "symfony/process", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64" + "reference": "1a44dc377ec86a50fab40d066cd061e28a6b482f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64", + "url": "https://api.github.com/repos/symfony/process/zipball/1a44dc377ec86a50fab40d066cd061e28a6b482f", + "reference": "1a44dc377ec86a50fab40d066cd061e28a6b482f", "shasum": "" }, "require": { @@ -5767,7 +5419,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.24" + "source": "https://github.com/symfony/process/tree/v5.4.26" }, "funding": [ { @@ -5783,7 +5435,7 @@ "type": "tidelift" } ], - "time": "2023-05-17T11:26:05+00:00" + "time": "2023-07-12T15:44:31+00:00" }, { "name": "symfony/service-contracts", @@ -5932,16 +5584,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -5998,7 +5650,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -6014,7 +5666,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" }, { "name": "symfony/translation", @@ -6266,78 +5918,6 @@ ], "time": "2023-04-23T19:33:36+00:00" }, - { - "name": "tecnickcom/tcpdf", - "version": "6.6.2", - "source": { - "type": "git", - "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/e3cffc9bcbc76e89e167e9eb0bbda0cab7518459", - "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-only" - ], - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "role": "lead" - } - ], - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "homepage": "http://www.tcpdf.org/", - "keywords": [ - "PDFD32000-2008", - "TCPDF", - "barcodes", - "datamatrix", - "pdf", - "pdf417", - "qrcode" - ], - "support": { - "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.2" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project", - "type": "custom" - } - ], - "time": "2022-12-17T10:28:59+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -6390,35 +5970,43 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.6.9", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141" + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141", - "reference": "2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", "shasum": "" }, "require": { - "php": "^5.3.9 || ^7.0 || ^8.0", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -6450,7 +6038,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v2.6.9" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" }, "funding": [ { @@ -6462,65 +6050,7 @@ "type": "tidelift" } ], - "time": "2021-12-12T22:59:22+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2022-10-16T01:01:54+00:00" } ], "aliases": [], @@ -6530,11 +6060,7 @@ "prefer-lowest": false, "platform": [], "platform-dev": { - "ext-json": "*", - "php": "~7.4.0" - }, - "platform-overrides": { - "php": "7.4" + "ext-json": "*" }, "plugin-api-version": "2.3.0" } From 9a33ded6002871dec23f64c0b540042b2fddc65f Mon Sep 17 00:00:00 2001 From: Michael Telgmann Date: Wed, 1 Mar 2023 09:43:05 +0100 Subject: [PATCH 2/5] chore(SW-27049): Update PHPStan and improve code quality --- tests/.php-cs-fixer.php | 1 + tests/Component/Api/ApiClient.php | 10 +- tests/Component/Form/FormFillerTrait.php | 20 +- tests/Component/SpinTrait/SpinTrait.php | 16 +- .../XpathBuilder/BackendXpathBuilder.php | 82 +- .../XpathBuilder/BaseXpathBuilder.php | 129 +-- .../XpathBuilder/FrontendXpathBuilder.php | 2 + tests/Context/BackendArticleContext.php | 18 +- tests/Context/BackendContext.php | 13 +- tests/Context/BackendCustomerContext.php | 2 +- tests/Context/BackendOrderContext.php | 17 +- tests/Context/BackendPaymentContext.php | 4 +- tests/Context/BackendQuestionMarkContext.php | 9 +- tests/Context/BackendVoucherContext.php | 14 +- tests/Context/DebugContext.php | 2 +- .../Exception/PageNotDefinedException.php | 8 +- tests/Context/FileCheckContext.php | 2 +- tests/Context/FrontendAccountContext.php | 2 +- tests/Context/FrontendCheckoutContext.php | 25 +- tests/Context/FrontendContext.php | 8 +- tests/Context/FrontendDetailContext.php | 4 +- tests/Context/GeneralContext.php | 5 + tests/Context/InstallerContext.php | 20 +- tests/Context/ProductExportContext.php | 2 +- tests/Context/SubContext.php | 34 +- tests/Context/SubshopContext.php | 6 +- tests/Context/UpdaterContext.php | 12 +- tests/Element/Backend/ExtJsElement.php | 8 +- tests/Element/Backend/Form/Checkbox.php | 2 + tests/Element/Backend/Form/Combobox.php | 47 +- tests/Element/Backend/Form/Input.php | 2 + tests/Element/Backend/Form/Selecttree.php | 2 + tests/Element/Backend/Form/Textarea.php | 2 + tests/Element/Backend/GridView/GridView.php | 52 +- .../Element/Backend/GridView/GridViewRow.php | 2 + .../Frontend/Checkout/CartPosition.php | 2 + tests/Makefile | 6 +- tests/Page/Backend/Backend.php | 11 +- tests/Page/Backend/BackendModule.php | 83 +- tests/Page/Backend/CustomerModule.php | 2 + tests/Page/Backend/ExistingArticleModule.php | 9 +- tests/Page/Backend/NewArticleModule.php | 31 +- tests/Page/Backend/OrderModule.php | 70 +- tests/Page/Backend/PaymentModule.php | 22 +- tests/Page/Backend/ProductExportModule.php | 8 +- tests/Page/Backend/QuestionMarkModule.php | 2 + tests/Page/Backend/SettingsModule.php | 2 + tests/Page/Backend/ShippingModule.php | 7 +- tests/Page/Backend/SystemInfoModule.php | 2 + tests/Page/Backend/VoucherModule.php | 4 +- tests/Page/ContextAwarePage.php | 134 +--- tests/Page/Frontend/Account.php | 2 + tests/Page/Frontend/CheckoutCart.php | 12 +- tests/Page/Frontend/CheckoutConfirm.php | 2 + .../Page/Frontend/CheckoutShippingPayment.php | 12 +- tests/Page/Frontend/Detail.php | 2 + tests/Page/Frontend/Index.php | 2 + tests/Page/Frontend/Search.php | 2 + tests/Page/Installer/InstallerIndex.php | 2 + tests/Page/Updater/UpdaterIndex.php | 22 +- tests/composer.json | 2 +- tests/composer.lock | 28 +- .../backend_article_baseprice.feature | 8 +- .../backend_article_graduatedprices.feature | 10 +- .../features/backend_article_property.feature | 10 +- .../features/backend_article_variants.feature | 1 - tests/phpstan-baseline.neon | 737 ++++-------------- tests/phpstan.neon | 7 +- www/assetgenerator/classes/ImageConfig.php | 112 +-- .../classes/RandomImageGenerator.php | 67 +- www/assetgenerator/index.php | 4 +- www/updates/update.json.php | 2 + 72 files changed, 600 insertions(+), 1425 deletions(-) diff --git a/tests/.php-cs-fixer.php b/tests/.php-cs-fixer.php index 58fe537..237002d 100644 --- a/tests/.php-cs-fixer.php +++ b/tests/.php-cs-fixer.php @@ -24,6 +24,7 @@ 'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], 'concat_space' => ['spacing' => 'one'], + 'declare_strict_types' => true, 'doctrine_annotation_indentation' => true, 'doctrine_annotation_spaces' => true, 'general_phpdoc_annotation_remove' => [ diff --git a/tests/Component/Api/ApiClient.php b/tests/Component/Api/ApiClient.php index b44c9b9..48cc13b 100644 --- a/tests/Component/Api/ApiClient.php +++ b/tests/Component/Api/ApiClient.php @@ -1,5 +1,7 @@ get('api/articles', [ 'filter' => [ - 'name' => (string) $name, + 'name' => $name, ], 'limit' => 1, ]); diff --git a/tests/Component/Form/FormFillerTrait.php b/tests/Component/Form/FormFillerTrait.php index a73d6a7..aaa6c3f 100644 --- a/tests/Component/Form/FormFillerTrait.php +++ b/tests/Component/Form/FormFillerTrait.php @@ -1,7 +1,10 @@ 'sAGB', 'value' => '1', 'type' => 'checkbox']] + * @param array $formData Expected format: [['name' => 'sAGB', 'value' => '1', 'type' => 'checkbox']] */ - public function fillForm(ContextAwarePage $page, array $formData) + public function fillForm(ContextAwarePage $page, array $formData): void { foreach ($formData as $formElement) { switch ($formElement['type']) { @@ -35,12 +38,8 @@ public function fillForm(ContextAwarePage $page, array $formData) /** * Get a NodeElement with the given name - * - * @param string $xpath - * - * @return \Behat\Mink\Element\NodeElement|null */ - private function getElementByName(ContextAwarePage $page, $xpath) + private function getElementByName(ContextAwarePage $page, string $xpath): NodeElement { return $page->waitForSelectorPresent('xpath', $xpath); } @@ -57,12 +56,7 @@ private function isCheckboxChecked(ContextAwarePage $page, string $inputName): b } } - /** - * @param string $xpath - * - * @return string - */ - private function selectLastElement($xpath) + private function selectLastElement(string $xpath): string { return sprintf('(%s)[last()]', $xpath); } diff --git a/tests/Component/SpinTrait/SpinTrait.php b/tests/Component/SpinTrait/SpinTrait.php index a859704..f41c729 100644 --- a/tests/Component/SpinTrait/SpinTrait.php +++ b/tests/Component/SpinTrait/SpinTrait.php @@ -1,5 +1,7 @@ spinWithNoException($lambda, $wait)) { - throw new \Exception("Spin function timed out after {$wait} seconds"); + throw new \Exception(sprintf('Spin function timed out after %s seconds', $wait)); } } @@ -27,11 +27,9 @@ protected function spin($lambda, $wait = 120) * * @see http://docs.behat.org/en/v2.5/cookbook/using_spin_functions.html#adding-a-timeout * - * @param int $wait - * - * @return bool + * @param callable $lambda */ - protected function spinWithNoException($lambda, $wait = 120) + protected function spinWithNoException($lambda, int $wait = 10): bool { $time = time(); $stopTime = $time + $wait; diff --git a/tests/Component/XpathBuilder/BackendXpathBuilder.php b/tests/Component/XpathBuilder/BackendXpathBuilder.php index af0270a..7c7228b 100644 --- a/tests/Component/XpathBuilder/BackendXpathBuilder.php +++ b/tests/Component/XpathBuilder/BackendXpathBuilder.php @@ -1,5 +1,7 @@ descendant('label', ['@text' => $label]) @@ -46,13 +37,8 @@ public static function getFormElementXpathByLabel($label, $tag, $scope = '/') /** * Return an Xpath that finds a button by its label - * - * @param string $label - * @param string $scope - * - * @return string */ - public static function getButtonXpathByLabel($label, $scope = '/') + public static function getButtonXpathByLabel(string $label, string $scope = '/'): string { return static::create($scope) ->child('span', ['@class' => 'x-btn-inner']) @@ -63,26 +49,16 @@ public static function getButtonXpathByLabel($label, $scope = '/') /** * Shorthand function to get an extJS input field by its label - * - * @param string $label - * @param string $scope - * - * @return string */ - public static function getInputXpathByLabel($label, $scope = '/') + public static function getInputXpathByLabel(string $label, string $scope = '/'): string { return self::getFormElementXpathByLabel($label, 'input', $scope); } /** * Returns label-specific xpath for a combobox - * - * @param string $label - * @param string $scope - * - * @return string */ - public static function getComboboxXpathByLabel($label, $scope = '/') + public static function getComboboxXpathByLabel(string $label, string $scope = '/'): string { return static::create($scope) ->descendant('label', ['@text' => $label]) @@ -95,22 +71,16 @@ public static function getComboboxXpathByLabel($label, $scope = '/') /** * Return xpath to the currently focused extJs input - * - * @return string */ - public static function getFocusedElementXpath() + public static function getFocusedElementXpath(): string { return (new self())->child('input', ['~class' => 'x-form-focus'])->getXpath(); } /** * Return xpath to an extJs tab by its label - * - * @param string $label - * - * @return string */ - public static function getTabXpathByLabel($label) + public static function getTabXpathByLabel(string $label): string { return (new self()) ->child('span', ['@text' => $label]) @@ -121,13 +91,9 @@ public static function getTabXpathByLabel($label) /** * Return xpath to extJs icon by type * - * @param string $type - * - * @throws \Exception - * - * @return string + *@throws \Exception */ - public static function getIconXpathByType($type) + public static function getIconXpathByType(string $type): string { switch ($type) { case 'edit': @@ -137,36 +103,14 @@ public static function getIconXpathByType($type) return (new self())->child('img', ['~class' => 'sprite-minus-circle-frame'])->getXpath(); break; default: - throw new \Exception('Unknown icon type ' . $type); + throw new \RuntimeException('Unknown icon type ' . $type); } } - /** - * Return a dropdown xpath by its action - * - * @param string $action - * @param string $optionText - * - * @return string - */ - public function getDropdownXpathByAction($action, $optionText = '') - { - $this->child('div', ['~class' => 'x-boundlist', 'and', '@data-action' => $action]); - - return empty($optionText) - ? $this->descendant('li', ['@role' => 'option'])->getXpath() - : $this->descendant('li', ['@role' => 'option', 'and', '@text' => $optionText])->getXpath(); - } - /** * Return an Xpath that finds a fieldset by its label - * - * @param string $label - * @param string $scope - * - * @return string */ - public static function getFieldsetXpathByLabel($label, $scope = '/') + public static function getFieldsetXpathByLabel(string $label, string $scope = '/'): string { return static::create($scope) ->descendant('fieldset') diff --git a/tests/Component/XpathBuilder/BaseXpathBuilder.php b/tests/Component/XpathBuilder/BaseXpathBuilder.php index efdbe42..3fa04ee 100644 --- a/tests/Component/XpathBuilder/BaseXpathBuilder.php +++ b/tests/Component/XpathBuilder/BaseXpathBuilder.php @@ -1,18 +1,14 @@ xpath = $xpath; } @@ -20,21 +16,17 @@ public function __construct($xpath = '/') /** * Create and return empty Xpath Builder instance * - * @param string $xpath - * * @return BaseXpathBuilder */ - public static function create($xpath = '/') + public static function create(string $xpath = '/') { return new self($xpath); } /** * Get built xpath - * - * @return string */ - public function getXpath() + public function getXpath(): string { return $this->xpath; } @@ -42,7 +34,7 @@ public function getXpath() /** * Replace the built xpath */ - public function setXpath($xpath) + public function setXpath(string $xpath): void { $this->xpath = $xpath; } @@ -50,11 +42,9 @@ public function setXpath($xpath) /** * Explicitly reset the builder to start from anywhere * - * @param string $xpath - * * @return $this */ - public function reset($xpath = '/') + public function reset(string $xpath = '/'): BaseXpathBuilder { $this->setXpath($xpath); @@ -63,96 +53,61 @@ public function reset($xpath = '/') /** * Refine current xpath by a child selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function child($tag, array $conditions = [], $index = null) + public function child(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/', $conditions, $index); } /** * Refine current xpath by an ancestor selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function ancestor($tag, array $conditions = [], $index = null) + public function ancestor(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/ancestor::', $conditions, $index); } /** * Refine current xpath by a descendant selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function descendant($tag, array $conditions = [], $index = null) + public function descendant(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/descendant::', $conditions, $index); } /** * Refine current xpath by a following selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function following($tag, array $conditions = [], $index = null) + public function following(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/following::', $conditions, $index); } /** * Refine current xpath by a preceding selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function preceding($tag, array $conditions = [], $index = null) + public function preceding(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/preceding::', $conditions, $index); } /** * Refine current xpath by a following sibling selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function followingSibling($tag, array $conditions = [], $index = null) + public function followingSibling(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/following-sibling::', $conditions, $index); } /** * Refine current xpath by a preceding sibling selector - * - * @param string $tag - * @param int|null $index - * - * @return self */ - public function precedingSibling($tag, array $conditions = [], $index = null) + public function precedingSibling(string $tag, array $conditions = [], ?int $index = null): BaseXpathBuilder { return $this->appendPartialPath($tag, '/preceding-sibling::', $conditions, $index); } - public function contains($text) + public function contains(string $text): BaseXpathBuilder { if ($text === '') { return $this; @@ -165,18 +120,15 @@ public function contains($text) /** * @param string[]|string $string - * @param string $attribute - * - * @return string */ - public static function getContainsAttributeString($string, $attribute) + public static function getContainsAttributeString($string, string $attribute): string { if (!\is_array($string)) { $string = [$string]; } $result = ''; foreach ($string as $part) { - $result .= "contains(concat(' ', normalize-space(@$attribute), ' '), ' $part ') and "; + $result .= sprintf("contains(concat(' ', normalize-space(@%s), ' '), ' %s ') and ", $attribute, $part); } return rtrim($result, ' and '); @@ -187,19 +139,19 @@ public static function getContainsAttributeString($string, $attribute) * * @internal * - * @throws \Exception + * @param array> $conditions * - * @return string + * @throws \Exception */ - protected function parseConditions($conditions) + protected function parseConditions(array $conditions): string { $conditionString = ''; - $targetModifiersPrefixes = ['!']; $targetModifiers = ['@', '~']; $subConditionHandlers = ['starts-with', 'ends-with', 'visible']; foreach ($conditions as $target => $condition) { + $target = (string) $target; if (\in_array($target, $subConditionHandlers, true)) { switch ($target) { case 'starts-with': @@ -226,14 +178,14 @@ protected function parseConditions($conditions) } $targetModifiersPrefix = substr($target, 0, 1); - if (\in_array($targetModifiersPrefix, $targetModifiersPrefixes)) { + if ($targetModifiersPrefix === '!') { $target = substr($target, 1); } else { $targetModifiersPrefix = null; } $targetModifier = substr($target, 0, 1); - if (\in_array($targetModifier, $targetModifiers)) { + if (\in_array($targetModifier, $targetModifiers, true)) { $target = substr($target, 1); } else { $targetModifier = null; @@ -251,12 +203,18 @@ protected function parseConditions($conditions) switch ($targetModifier) { case '@': + if (!\is_string($condition)) { + throw new \RuntimeException('condition must be string at this point'); + } $conditionString .= $this->equals($target, $condition) . ' '; break; case '~': $conditionString .= $this->getContainsString($target, $condition) . ' '; break; default: + if (!\is_string($condition)) { + throw new \RuntimeException('condition must be string at this point'); + } $conditionString .= $condition . ' '; } @@ -276,24 +234,14 @@ protected function parseConditions($conditions) * Internal helper function to append a new search selector to the xpath * that is being built. * - * @param string $tag - * @param string $prefix - * @param array $conditions - * @param int $index - * * @throws \Exception - * - * @return self */ - private function appendPartialPath($tag, $prefix, $conditions, $index) + private function appendPartialPath(string $tag, string $prefix, array $conditions, ?int $index): BaseXpathBuilder { // Input validation if ($tag === '') { throw new \Exception('Invalid argument: Tag cannot be empty.'); } - if ($index !== null && !\is_int($index)) { - throw new \Exception('Invalid argument: Index must be of type integer.'); - } // Add prefix $this->xpath .= $prefix; @@ -317,29 +265,23 @@ private function appendPartialPath($tag, $prefix, $conditions, $index) /** * Helper function for the predicate parser - * - * @return string */ - private function equals($target, $text) + private function equals(string $target, string $text): string { switch ($target) { case 'text': - return "text()='$text'"; - break; + return sprintf("text()='%s'", $text); default: - return "@$target='$text'"; + return sprintf("@%s='%s'", $target, $text); } } /** * Helper function for the predicate parser * - * @param string $target * @param string[]|string $text - * - * @return string */ - private function getContainsString($target, $text) + private function getContainsString(string $target, $text): string { if (!\is_array($text)) { $text = [$text]; @@ -353,7 +295,6 @@ private function getContainsString($target, $text) } return rtrim($result, ' and '); - break; default: return self::getContainsAttributeString($text, $target); } diff --git a/tests/Component/XpathBuilder/FrontendXpathBuilder.php b/tests/Component/XpathBuilder/FrontendXpathBuilder.php index b9d34ad..e3ac229 100644 --- a/tests/Component/XpathBuilder/FrontendXpathBuilder.php +++ b/tests/Component/XpathBuilder/FrontendXpathBuilder.php @@ -1,5 +1,7 @@ getValidPage('BackendModule', BackendModule::class); + return $this->getValidPage(BackendModule::class); } /** @@ -24,7 +24,7 @@ private function getBackendModulePage(): BackendModule */ private function getExistingArticleModulePage(): ExistingArticleModule { - return $this->getValidPage('ExistingArticleModule', ExistingArticleModule::class); + return $this->getValidPage(ExistingArticleModule::class); } /** @@ -32,7 +32,7 @@ private function getExistingArticleModulePage(): ExistingArticleModule */ private function getNewArticleModulePage(): NewArticleModule { - return $this->getValidPage('NewArticleModule', NewArticleModule::class); + return $this->getValidPage(NewArticleModule::class); } /** @@ -156,18 +156,6 @@ public function iConfirmToDeleteTheEntry(): void $this->getBackendModulePage()->answerMessageBox('Ja'); } - /** - * @Given the :title tab should be active - * - * @throws \Exception - */ - public function theTabShouldBeActive(string $title): void - { - if ($this->getBackendModulePage()->checkIfTabIsActive($title) !== true) { - throw new \RuntimeException('Variant was not set active.'); - } - } - /** * @When I create the :title group via :label * diff --git a/tests/Context/BackendContext.php b/tests/Context/BackendContext.php index 136140d..61edc5f 100644 --- a/tests/Context/BackendContext.php +++ b/tests/Context/BackendContext.php @@ -16,11 +16,12 @@ class BackendContext extends SubContext { /** * @Given I am logged into the backend + * * @When I log in with user :user and password :password */ public function iLogInWithUserAndPassword(string $user = 'demo', string $password = 'demo'): void { - $page = $this->getValidPage('Backend', Backend::class); + $page = $this->getValidPage(Backend::class); $page->login($user, $password); } @@ -65,10 +66,10 @@ public function iClickOnBackendMenuItemThatContains(string $text): void */ public function theFollowingShippingOptionsExist(TableNode $table): void { - $page = $this->getValidPage('Backend', Backend::class); + $page = $this->getValidPage(Backend::class); $page->login(); - $page = $this->getValidPage('ShippingModule', ShippingModule::class); + $page = $this->getValidPage(ShippingModule::class); foreach ($table->getHash() as $shipping) { $page->createShippingMethodIfNotExists($shipping); @@ -80,7 +81,7 @@ public function theFollowingShippingOptionsExist(TableNode $table): void */ public function theShippingMethodHasTheFollowingShippingCosts(string $method, TableNode $table): void { - $page = $this->getValidPage('ShippingModule', ShippingModule::class); + $page = $this->getValidPage(ShippingModule::class); $page->setShippingCosts($method, $table->getHash()); } @@ -89,7 +90,7 @@ public function theShippingMethodHasTheFollowingShippingCosts(string $method, Ta */ public function clickButtonByLabel(string $label): void { - $page = $this->getValidPage('Backend', Backend::class); + $page = $this->getValidPage(Backend::class); $buttonXpath = BackendXpathBuilder::getButtonXpathByLabel($label); $this->waitForSelectorPresent('xpath', $buttonXpath); $buttons = $page->findAll('xpath', $buttonXpath); @@ -114,7 +115,7 @@ public function clickButtonByLabel(string $label): void */ public function iClickOnTheTab(string $tabName): void { - $page = $this->getValidPage('Backend', Backend::class); + $page = $this->getValidPage(Backend::class); $page->clickOnTabWithName($tabName); } } diff --git a/tests/Context/BackendCustomerContext.php b/tests/Context/BackendCustomerContext.php index 5074e82..5368cc7 100644 --- a/tests/Context/BackendCustomerContext.php +++ b/tests/Context/BackendCustomerContext.php @@ -53,6 +53,6 @@ public function iClickTheDeleteIconOnCustomer(string $firstname): void private function getModulePage(): CustomerModule { - return $this->getValidPage('CustomerModule', CustomerModule::class); + return $this->getValidPage(CustomerModule::class); } } diff --git a/tests/Context/BackendOrderContext.php b/tests/Context/BackendOrderContext.php index 3c0f237..5bf9a00 100644 --- a/tests/Context/BackendOrderContext.php +++ b/tests/Context/BackendOrderContext.php @@ -37,14 +37,6 @@ public function iReloadTheStatusHistory(): void $this->getModulePage()->reloadStatusHistory(); } - /** - * @When I click the email icon on the last generated document - */ - public function iClickTheEmailIconOnTheLastGeneratedDocument(): void - { - $this->getModulePage()->clickEmailIconOnLastGeneratedIcon(); - } - /** * @When I filter the backend order list for shipping country :country */ @@ -124,7 +116,7 @@ public function theInvoiceShouldContain(TableNode $content): void private function getModulePage(): OrderModule { - return $this->getValidPage('OrderModule', OrderModule::class); + return $this->getValidPage(OrderModule::class); } /** @@ -135,19 +127,16 @@ private function getDocumentsDirectory(): string $documentsPath = getenv('base_path') . '/files/documents'; if (!is_dir($documentsPath)) { - throw new \Exception('Could not open document directory at ' . $documentsPath); + throw new \RuntimeException('Could not open document directory at ' . $documentsPath); } return $documentsPath; } - /** - *@throws \Exception - */ private function getPdfTextContent(string $filepath): string { if (!is_file($filepath)) { - throw new \Exception('Could not open file ' . $filepath); + throw new \RuntimeException('Could not open file ' . $filepath); } return (new Parser())->parseFile($filepath)->getText(); diff --git a/tests/Context/BackendPaymentContext.php b/tests/Context/BackendPaymentContext.php index 2e2fc7f..0443740 100644 --- a/tests/Context/BackendPaymentContext.php +++ b/tests/Context/BackendPaymentContext.php @@ -15,10 +15,10 @@ class BackendPaymentContext extends SubContext */ public function theFollowingPaymentMethodsAreActivated(TableNode $table): void { - $backendPage = $this->getValidPage('Backend', Backend::class); + $backendPage = $this->getValidPage(Backend::class); $backendPage->login(); - $page = $this->getValidPage('PaymentModule', PaymentModule::class); + $page = $this->getValidPage(PaymentModule::class); foreach ($table as $row) { $page->activatePaymentMethod($row['name']); diff --git a/tests/Context/BackendQuestionMarkContext.php b/tests/Context/BackendQuestionMarkContext.php index f8313c0..9db41d6 100644 --- a/tests/Context/BackendQuestionMarkContext.php +++ b/tests/Context/BackendQuestionMarkContext.php @@ -4,7 +4,6 @@ namespace Shopware\Context; -use Exception; use Shopware\Page\Backend\QuestionMarkModule; class BackendQuestionMarkContext extends SubContext @@ -14,10 +13,10 @@ class BackendQuestionMarkContext extends SubContext */ public function iShouldSeeACorrectBuildNumber(): void { - $questionMark = $this->getValidPage('QuestionMarkModule', QuestionMarkModule::class); + $questionMark = $this->getValidPage(QuestionMarkModule::class); $buildNr = $questionMark->getBuildNr(); if (!strtotime($buildNr)) { - throw new Exception('Build number wrong'); + throw new \Exception('Build number wrong'); } } @@ -26,10 +25,10 @@ public function iShouldSeeACorrectBuildNumber(): void */ public function iShouldSeeACorrectVersionNumber(): void { - $questionMark = $this->getValidPage('QuestionMarkModule', QuestionMarkModule::class); + $questionMark = $this->getValidPage(QuestionMarkModule::class); $versionNr = $questionMark->getVersionNr(); if (!version_compare($versionNr, '0.0.1', '>')) { - throw new Exception('Version number wrong!'); + throw new \Exception('Version number wrong!'); } } } diff --git a/tests/Context/BackendVoucherContext.php b/tests/Context/BackendVoucherContext.php index 64b2035..2f885e0 100644 --- a/tests/Context/BackendVoucherContext.php +++ b/tests/Context/BackendVoucherContext.php @@ -44,7 +44,7 @@ public function iClickTheDeleteIconOnTheVoucherNamed(string $name): void */ public function iAddTheVoucherToMyCart(string $code): void { - $page = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $page = $this->getValidPage(CheckoutCart::class); $page->addVoucher($code); } @@ -67,7 +67,7 @@ public function iShouldBeAbleToUseTheCodeExactlyOnce(): void private function getModulePage(): VoucherModule { - return $this->getValidPage('VoucherModule', VoucherModule::class); + return $this->getValidPage(VoucherModule::class); } /** @@ -90,7 +90,7 @@ private function getVoucherCodeFromPage(bool $voucherWasUsed = false): string private function loginAsFrontendUser(): void { - $accountPage = $this->getValidPage('Account', Account::class); + $accountPage = $this->getValidPage(Account::class); $accountPage->login('regular.customer@shopware.de.test', 'shopware'); } @@ -99,7 +99,7 @@ private function loginAsFrontendUser(): void */ private function fillCartWithProductsAndGeneratedVoucher(string $voucherCode): void { - $cartPage = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $cartPage = $this->getValidPage(CheckoutCart::class); $cartPage->fillCartWithProducts([ ['number' => 'SWT0001', 'quantity' => 1], ]); @@ -108,14 +108,14 @@ private function fillCartWithProductsAndGeneratedVoucher(string $voucherCode): v private function finishCheckout(): void { - $confirmPage = $this->getValidPage('CheckoutConfirm', CheckoutConfirm::class); + $confirmPage = $this->getValidPage(CheckoutConfirm::class); $confirmPage->proceedToCheckout(); $this->waitForText('Vielen Dank', 6); } private function getUsedVoucherCodeFromBackend(): string { - $voucherModule = $this->getValidPage('VoucherModule', VoucherModule::class); + $voucherModule = $this->getValidPage(VoucherModule::class); $voucherModule->open(); $this->waitForText('Neuer Individueller Testgutschein', 3); @@ -123,7 +123,7 @@ private function getUsedVoucherCodeFromBackend(): string $voucherModule->openEditFormForVoucher('Neuer Individueller Testgutschein'); $this->waitForText('Gutschein-Konfiguration', 6); - $backend = $this->getValidPage('Backend', Backend::class); + $backend = $this->getValidPage(Backend::class); $backend->clickOnTabWithName('Individuelle Gutscheincodes'); return $this->getVoucherCodeFromPage(true); diff --git a/tests/Context/DebugContext.php b/tests/Context/DebugContext.php index 8d89dd2..d23e36e 100644 --- a/tests/Context/DebugContext.php +++ b/tests/Context/DebugContext.php @@ -52,7 +52,7 @@ public function saveScreenshot(?string $filename = null, ?string $filepath = nul { $filename = $filename ?: sprintf('%s_%s_%s.%s', $this->getMinkParameter('browser_name'), time(), uniqid('', true), 'png'); - $filepath = $filepath ?: (ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir()); + $filepath = $filepath ?: (\ini_get('upload_tmp_dir') ? \ini_get('upload_tmp_dir') : sys_get_temp_dir()); file_put_contents($filepath . '/' . $filename, $this->getSession()->getScreenshot()); } diff --git a/tests/Context/Exception/PageNotDefinedException.php b/tests/Context/Exception/PageNotDefinedException.php index a5da848..ca0e20e 100644 --- a/tests/Context/Exception/PageNotDefinedException.php +++ b/tests/Context/Exception/PageNotDefinedException.php @@ -4,14 +4,16 @@ namespace Shopware\Context\Exception; +use SensioLabs\Behat\PageObjectExtension\PageObject\Page; + class PageNotDefinedException extends \RuntimeException { /** - * @param class-string $pageClass + * @param class-string $pageClass */ - public function __construct(string $pageName, string $pageClass, int $code = 0, ?\Throwable $previous = null) + public function __construct(string $pageClass, int $code = 0, ?\Throwable $previous = null) { - $message = sprintf('Page "%s" of "%s" is not defined', $pageName, $pageClass); + $message = sprintf('Page "%s" is not defined', $pageClass); parent::__construct($message, $code, $previous); } } diff --git a/tests/Context/FileCheckContext.php b/tests/Context/FileCheckContext.php index 9f244fa..00940aa 100644 --- a/tests/Context/FileCheckContext.php +++ b/tests/Context/FileCheckContext.php @@ -46,7 +46,7 @@ public function iCorrectTheRequirement($requirement): void */ public function aRequirementShouldOwnAsStatus($requirement, $icon): void { - $page = $this->getValidPage('SystemInfoModule', SystemInfoModule::class); + $page = $this->getValidPage(SystemInfoModule::class); $this->waitForText('engine'); $requirementLabel = $requirement === 'folder' ? $this->folderRequirementLabel : $this->fileRequirementLabel; diff --git a/tests/Context/FrontendAccountContext.php b/tests/Context/FrontendAccountContext.php index 1355479..36ec14b 100644 --- a/tests/Context/FrontendAccountContext.php +++ b/tests/Context/FrontendAccountContext.php @@ -16,7 +16,7 @@ public function iRegisterMyself(TableNode $table): void { $data = $table->getHash(); - $page = $this->getValidPage('Account', Account::class); + $page = $this->getValidPage(Account::class); $page->open(); // Already logged in diff --git a/tests/Context/FrontendCheckoutContext.php b/tests/Context/FrontendCheckoutContext.php index 20ec626..4c458a7 100644 --- a/tests/Context/FrontendCheckoutContext.php +++ b/tests/Context/FrontendCheckoutContext.php @@ -19,7 +19,7 @@ public function theCartAggregationsShouldLookLikeThis(TableNode $aggregations): { $aggregations = $aggregations->getHash(); - $checkoutCart = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $checkoutCart = $this->getValidPage(CheckoutCart::class); $checkoutCart->checkAggregation($aggregations); } @@ -28,7 +28,7 @@ public function theCartAggregationsShouldLookLikeThis(TableNode $aggregations): */ public function iFillInTheRegistrationForm(TableNode $customerData): void { - $page = $this->getValidPage('CheckoutConfirm', CheckoutConfirm::class); + $page = $this->getValidPage(CheckoutConfirm::class); $page->fillOutRegistrationForm($customerData->getHash()); } @@ -37,7 +37,7 @@ public function iFillInTheRegistrationForm(TableNode $customerData): void */ public function iAddTheArticleToMyBasket(string $number): void { - $checkoutCart = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $checkoutCart = $this->getValidPage(CheckoutCart::class); $checkoutCart->addArticle($number); $this->waitForText($number); } @@ -47,7 +47,7 @@ public function iAddTheArticleToMyBasket(string $number): void */ public function iRemoveTheArticleOnPosition(string $position): void { - $page = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $page = $this->getValidPage(CheckoutCart::class); $page->removeCartPositionAtIndex($position); } @@ -56,7 +56,7 @@ public function iRemoveTheArticleOnPosition(string $position): void */ public function iProceedToOrderConfirmation(): void { - $frontendCheckoutCart = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $frontendCheckoutCart = $this->getValidPage(CheckoutCart::class); $frontendCheckoutCart->open(); $frontendCheckoutCart->proceedToOrderConfirmation(); } @@ -66,7 +66,7 @@ public function iProceedToOrderConfirmation(): void */ public function iProceedToCheckout(): void { - $frontendCheckoutConfirm = $this->getValidPage('CheckoutConfirm', CheckoutConfirm::class); + $frontendCheckoutConfirm = $this->getValidPage(CheckoutConfirm::class); $frontendCheckoutConfirm->proceedToCheckout(); } @@ -75,7 +75,7 @@ public function iProceedToCheckout(): void */ public function iProceedToCheckoutCart(): void { - $frontendCheckoutCart = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $frontendCheckoutCart = $this->getValidPage(CheckoutCart::class); $frontendCheckoutCart->open(); $frontendCheckoutCart->proceedToOrderConfirmation(); } @@ -85,7 +85,7 @@ public function iProceedToCheckoutCart(): void */ public function iProceedToCheckoutConfirmation(): void { - $frontendCheckoutConfirmation = $this->getValidPage('CheckoutConfirm', CheckoutConfirm::class); + $frontendCheckoutConfirmation = $this->getValidPage(CheckoutConfirm::class); $frontendCheckoutConfirmation->open(); } @@ -96,7 +96,7 @@ public function iProceedToCheckoutConfirmation(): void */ public function theCartContainsTheFollowingProducts(TableNode $items): void { - $page = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $page = $this->getValidPage(CheckoutCart::class); $page->open(); $page->emptyCart(); $page->fillCartWithProducts($items->getHash()); @@ -109,7 +109,7 @@ public function theCartContainsTheFollowingProducts(TableNode $items): void */ public function changePaymentMethodTo(string $paymentMethod): void { - $page = $this->getValidPage('CheckoutShippingPayment', CheckoutShippingPayment::class); + $page = $this->getValidPage(CheckoutShippingPayment::class); $page->open(); $page->changePaymentMethodTo($paymentMethod); } @@ -119,18 +119,19 @@ public function changePaymentMethodTo(string $paymentMethod): void */ public function changeShippingMethodTo(string $shippingMethod): void { - $page = $this->getValidPage('CheckoutShippingPayment', CheckoutShippingPayment::class); + $page = $this->getValidPage(CheckoutShippingPayment::class); $page->open(); $page->changeShippingMethodTo($shippingMethod); } /** * @Given I am not logged in + * * @And I am not logged in */ public function iAmNotLoggedIn(): void { - $page = $this->getValidPage('Account', Account::class); + $page = $this->getValidPage(Account::class); $page->open(); // See if we already are logged out diff --git a/tests/Context/FrontendContext.php b/tests/Context/FrontendContext.php index a7e8afc..d6f6da2 100644 --- a/tests/Context/FrontendContext.php +++ b/tests/Context/FrontendContext.php @@ -17,7 +17,7 @@ class FrontendContext extends SubContext */ public function iAmLoggedInWithAccount(string $email, string $password = ''): void { - $accountPage = $this->getValidPage('Account', Account::class); + $accountPage = $this->getValidPage(Account::class); $accountPage->open(); // We are logged in @@ -46,7 +46,7 @@ public function iAmLoggedInWithAccount(string $email, string $password = ''): vo */ public function theCartShouldContainArticlesWithAValueOf(string $quantity, string $amount): void { - $page = $this->getValidPage('CheckoutCart', CheckoutCart::class); + $page = $this->getValidPage(CheckoutCart::class); $page->open(); $page->checkPositionCountAndCartSum($quantity, $amount); @@ -61,7 +61,7 @@ public function iNavigateToCategoryTree(string $tree): void $treeArray = array_map('trim', $treeArray); $mainCategory = array_shift($treeArray); - $index = $this->getValidPage('Index', Index::class); + $index = $this->getValidPage(Index::class); $index->open(); $this->waitForText('AGB'); $index->getMainNavElement($mainCategory)->click(); @@ -75,7 +75,7 @@ public function iNavigateToCategoryTree(string $tree): void */ public function iShouldBeAbleToSeeTheProductWithPrice(string $name, string $testPrice): void { - $product = $this->getValidPage('Index', Index::class)->getProductListingBoxElement($name); + $product = $this->getValidPage(Index::class)->getProductListingBoxElement($name); $price = $product->find('xpath', (new BaseXpathBuilder())->descendant('span', ['~class' => 'price--default'])->getXpath()); diff --git a/tests/Context/FrontendDetailContext.php b/tests/Context/FrontendDetailContext.php index 0c3c004..0294948 100644 --- a/tests/Context/FrontendDetailContext.php +++ b/tests/Context/FrontendDetailContext.php @@ -15,7 +15,7 @@ class FrontendDetailContext extends SubContext */ private function getDetailPage(): Detail { - return $this->getValidPage('Detail', Detail::class); + return $this->getValidPage(Detail::class); } /** @@ -23,7 +23,7 @@ private function getDetailPage(): Detail */ private function getSearchPage(): Search { - return $this->getValidPage('Search', Search::class); + return $this->getValidPage(Search::class); } /** diff --git a/tests/Context/GeneralContext.php b/tests/Context/GeneralContext.php index aea717e..da3f366 100644 --- a/tests/Context/GeneralContext.php +++ b/tests/Context/GeneralContext.php @@ -6,6 +6,7 @@ use Behat\Behat\Hook\Scope\ScenarioScope; use Behat\Mink\Driver\Selenium2Driver; +use SensioLabs\Behat\PageObjectExtension\PageObject\Page; class GeneralContext extends SubContext { @@ -24,6 +25,7 @@ public static function onAfterFeature(): void * Isolate scenarios tagged with 'isolated' * * @BeforeScenario + * * @AfterScenario */ public static function onAfterScenario(ScenarioScope $scope): void @@ -68,7 +70,10 @@ public function iScrollDown($pixels): void /** * @Given I am on the page :pageName + * * @When I go to the page :pageName + * + * @param class-string $pageName */ public function iAmOnThePage(string $pageName): void { diff --git a/tests/Context/InstallerContext.php b/tests/Context/InstallerContext.php index 8c80ecb..43ca411 100644 --- a/tests/Context/InstallerContext.php +++ b/tests/Context/InstallerContext.php @@ -15,7 +15,7 @@ class InstallerContext extends SubContext */ public function iAdvanceToTheNextInstallerPage(): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->advance(); } @@ -35,7 +35,7 @@ public function iShouldSeeText(TableNode $table): void */ public function iCheckTheCheckbox(): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->tickCheckbox('tos'); } @@ -44,7 +44,7 @@ public function iCheckTheCheckbox(): void */ public function theFollowingFormFieldsMustBeRequired(TableNode $table): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $data = $table->getHash(); foreach ($data as $field) { @@ -57,7 +57,7 @@ public function theFollowingFormFieldsMustBeRequired(TableNode $table): void */ public function iFillTheForm(TableNode $table): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $data = $table->getHash(); $page->fillInAndSubmitForm($data); @@ -68,7 +68,7 @@ public function iFillTheForm(TableNode $table): void */ public function iClickOn(string $text): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->clickOnElementWithText($text); } @@ -77,7 +77,7 @@ public function iClickOn(string $text): void */ public function iGoBackToThePreviousInstallerPage(): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->returnToPreviousDbPage(); } @@ -86,7 +86,7 @@ public function iGoBackToThePreviousInstallerPage(): void */ public function iChooseTheRadioFieldWithValue(string $value): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->tickRadioButtonOption($value); } @@ -95,7 +95,7 @@ public function iChooseTheRadioFieldWithValue(string $value): void */ public function iShouldSeeTheLinkLeadingTo(string $linktext, string $target): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->checkIfShopIsAvailable($linktext, $target); } @@ -126,7 +126,7 @@ public function theFieldShouldGetActivated(string $field): void { usleep(250000); - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->checkIfDisabled('css', $field); } @@ -135,7 +135,7 @@ public function theFieldShouldGetActivated(string $field): void */ public function iSkip(string $text): void { - $page = $this->getValidPage('InstallerIndex', InstallerIndex::class); + $page = $this->getValidPage(InstallerIndex::class); $page->clickOnElementToSkip($text); } } diff --git a/tests/Context/ProductExportContext.php b/tests/Context/ProductExportContext.php index 74c044d..21ab599 100644 --- a/tests/Context/ProductExportContext.php +++ b/tests/Context/ProductExportContext.php @@ -72,6 +72,6 @@ public function iClickTheEditIconOnTheExport(string $exportName): void private function getModulePage(): ProductExportModule { - return $this->getValidPage('ProductExportModule', ProductExportModule::class); + return $this->getValidPage(ProductExportModule::class); } } diff --git a/tests/Context/SubContext.php b/tests/Context/SubContext.php index d3502e9..d3c53bf 100644 --- a/tests/Context/SubContext.php +++ b/tests/Context/SubContext.php @@ -83,11 +83,11 @@ public function getDriver(): DriverInterface * * @return TPage */ - public function getValidPage(string $pageName, string $pageClass): Page + public function getValidPage(string $pageClass): Page { - $page = $this->getPage($pageName); + $page = $this->getPage($pageClass); if (!$page instanceof $pageClass) { - throw new PageNotDefinedException($pageName, $pageClass); + throw new PageNotDefinedException($pageClass); } return $page; @@ -102,7 +102,7 @@ protected function waitForText(string $text, int $sleep = 2): void $this->spin(function (SubContext $context) use ($text) { $result = $context->getSession()->getPage()->findAll('xpath', "//*[contains(text(), '$text')]"); - return $result != null && \count($result) > 0; + return !empty($result); }); } @@ -133,20 +133,6 @@ protected function waitForTextNotPresent(string $text, int $sleep = 2): void $this->waitForSelectorNotPresent('xpath', "//*[contains(text(), '$text')]", $sleep); } - /** - * Checks via spin function if a locator is invisible on page, with sleep at the beginning (default 2) - * - * @param string $selector css, xpath... - */ - protected function waitForSelectorInvisible(string $selector, string $locator): void - { - $this->spin(function (SubContext $context) use ($selector, $locator) { - $elem = $context->getSession()->getPage()->find($selector, $locator); - - return empty($elem) || !$elem->isVisible(); - }, 90); - } - /** * Checks via spin function if a locator is present on page, with sleep at the beginning (default 2) * @@ -206,18 +192,6 @@ protected function waitIfThereIsText(string $text, int $wait = 5): bool }, $wait); } - /** - * Checks via spin function if a string exists, returns false/true after $wait - */ - protected function textExistsEventually(string $text, int $wait = 60): bool - { - return $this->spinWithNoException(function (SubContext $context) use ($text) { - $result = $context->getSession()->getPage()->findAll('xpath', "//*[contains(., '$text')]"); - - return $result != null && \count($result) > 0; - }, $wait); - } - protected function slugify($text, $separator = ''): string { $slugify = new Slugify(); diff --git a/tests/Context/SubshopContext.php b/tests/Context/SubshopContext.php index 185f952..1f08f7b 100644 --- a/tests/Context/SubshopContext.php +++ b/tests/Context/SubshopContext.php @@ -41,7 +41,7 @@ public function iShouldBeAbleToAccessTheSubshopViaUsing(string $url): void */ public function iClickTheMenuElement(string $label): void { - $page = $this->getValidPage('SettingsModule', SettingsModule::class); + $page = $this->getValidPage(SettingsModule::class); $page->clickOnMenuElement($label); } @@ -50,7 +50,7 @@ public function iClickTheMenuElement(string $label): void */ public function iClickTheSettingsElement(string $label): void { - $page = $this->getValidPage('SettingsModule', SettingsModule::class); + $page = $this->getValidPage(SettingsModule::class); $page->clickOnSettingsMenuElement($label); } @@ -59,7 +59,7 @@ public function iClickTheSettingsElement(string $label): void */ public function iFillTheConfigurationForm($formname, TableNode $table): void { - $page = $this->getValidPage('SettingsModule', SettingsModule::class); + $page = $this->getValidPage(SettingsModule::class); $data = $table->getHash(); $page->fillShopConfigurationForm($data); diff --git a/tests/Context/UpdaterContext.php b/tests/Context/UpdaterContext.php index 6bd3bf0..8697f0c 100644 --- a/tests/Context/UpdaterContext.php +++ b/tests/Context/UpdaterContext.php @@ -24,7 +24,7 @@ public function __construct() */ public function iAdvanceToTheNextUpdaterPage(): void { - $page = $this->getValidPage('UpdaterIndex', UpdaterIndex::class); + $page = $this->getValidPage(UpdaterIndex::class); $page->advance(); } @@ -33,7 +33,7 @@ public function iAdvanceToTheNextUpdaterPage(): void */ public function iClickToStartTheDatabaseMigration(): void { - $page = $this->getValidPage('UpdaterIndex', UpdaterIndex::class); + $page = $this->getValidPage(UpdaterIndex::class); $page->clickOnDbStart(); } @@ -42,7 +42,7 @@ public function iClickToStartTheDatabaseMigration(): void */ public function iHaveUnusedFilesInMyInstallation(): void { - $this->getValidPage('UpdaterIndex', UpdaterIndex::class)->find('css', 'td'); + $this->getValidPage(UpdaterIndex::class)->find('css', 'td'); } /** @@ -50,7 +50,7 @@ public function iHaveUnusedFilesInMyInstallation(): void */ public function theCleanupWillBeFinished(): void { - $page = $this->getValidPage('UpdaterIndex', UpdaterIndex::class); + $page = $this->getValidPage(UpdaterIndex::class); $page->finishCleanup(); } @@ -59,7 +59,7 @@ public function theCleanupWillBeFinished(): void */ public function iShouldSeeTheReminderToRemoveTheUpdateAssetsFolder(string $hint): void { - $page = $this->getValidPage('UpdaterIndex', UpdaterIndex::class); + $page = $this->getValidPage(UpdaterIndex::class); $page->handleUpdateAssets($hint); } @@ -105,7 +105,7 @@ public function iCorrectTheRequirements(): void */ public function iAdvanceToTheNextRequirementsStep(string $stepName): void { - $page = $this->getValidPage('UpdaterIndex', UpdaterIndex::class); + $page = $this->getValidPage(UpdaterIndex::class); $page->advanceToStep($stepName); } } diff --git a/tests/Element/Backend/ExtJsElement.php b/tests/Element/Backend/ExtJsElement.php index 1b5531b..038183a 100644 --- a/tests/Element/Backend/ExtJsElement.php +++ b/tests/Element/Backend/ExtJsElement.php @@ -1,5 +1,7 @@ isValid()) { @@ -60,12 +62,12 @@ protected function waitForElementAvailable() // Check if object exists if (!$this->isValid()) { - throw new \Exception('Could not find element of type ' . \get_class($this) . ' with xpath: ' . $this->getXpath()); + throw new \RuntimeException('Could not find element of type ' . \get_class($this) . ' with xpath: ' . $this->getXpath()); } // Check if object is visible if (!$this->isVisible()) { - throw new \Exception('Element of type ' . \get_class($this) . ' not visible.'); + throw new \RuntimeException('Element of type ' . \get_class($this) . ' not visible.'); } } } diff --git a/tests/Element/Backend/Form/Checkbox.php b/tests/Element/Backend/Form/Checkbox.php index 8e06370..66978d2 100644 --- a/tests/Element/Backend/Form/Checkbox.php +++ b/tests/Element/Backend/Form/Checkbox.php @@ -1,5 +1,7 @@ getComboboxPebble(); $pebble->click(); - // Find the correct dropdown by it's positioning on the page + // Find the correct dropdown by its positioning on the page foreach ($this->getOpenDropdowns() as $dropdown) { if (!$this->elementsTouch($dropdown, $pebble)) { continue; } // Click on correct dropdown entry - $this->getOptionByValue($value, $dropdown)->click(); + $option = $this->getOptionByValue($value, $dropdown); + if (!$option instanceof NodeElement) { + throw new \RuntimeException(sprintf('Could not find option with value "%s"', print_r($value, true))); + } + + $option->click(); } } /** * Helper method that returns true if two NodeElements touch - * - * @return bool */ - private function elementsTouch(NodeElement $elemA, NodeElement $elemB) + private function elementsTouch(NodeElement $elemA, NodeElement $elemB): bool { $idA = $elemA->getAttribute('id'); $aTop = $this->getYCoordinateForElement($idA, 'top'); @@ -49,12 +54,9 @@ private function elementsTouch(NodeElement $elemA, NodeElement $elemB) /** * Get the bounding box position value for any element on the page by it's id * - * @param string $id * @param string $side Can be either top, bottom, left or right - * - * @return int */ - private function getYCoordinateForElement($id, $side = 'top') + private function getYCoordinateForElement(string $id, string $side = 'top'): int { return (int) $this->getSession()->getDriver()->evaluateScript( "return document.getElementById('" . $id . "').getBoundingClientRect()." . $side . ';' @@ -63,10 +65,8 @@ private function getYCoordinateForElement($id, $side = 'top') /** * @throws \Exception - * - * @return NodeElement */ - private function getComboboxPebble() + private function getComboboxPebble(): NodeElement { $pebbleXpath = BackendXpathBuilder::create()->child('div', ['~class' => 'x-form-trigger'])->getXpath(); $pebble = $this->find('xpath', $pebbleXpath); @@ -78,10 +78,7 @@ private function getComboboxPebble() return $pebble; } - /** - * @return string - */ - private function getDropdownsXpath() + private function getDropdownsXpath(): string { return BackendXpathBuilder::create()->child('div', ['~class' => 'x-boundlist'])->getXpath(); } @@ -91,29 +88,21 @@ private function getDropdownsXpath() * * @return NodeElement[] */ - private function getOpenDropdowns() + private function getOpenDropdowns(): array { sleep(2); $dropdownsXpath = $this->getDropdownsXpath(); - $dropdowns = $this->getSession()->getPage()->findAll('xpath', $dropdownsXpath); - return $dropdowns; + return $this->getSession()->getPage()->findAll('xpath', $dropdownsXpath); } - /** - * @param string $value - * - * @return NodeElement - */ - private function getOptionByValue($value, NodeElement $dropdown) + private function getOptionByValue(string $value, NodeElement $dropdown): ?NodeElement { $optionXpath = BackendXpathBuilder::create() ->child('li', ['@role' => 'option', 'and', '@text' => $value]) ->getXpath(); - $option = $dropdown->find('xpath', $optionXpath); - - return $option; + return $dropdown->find('xpath', $optionXpath); } } diff --git a/tests/Element/Backend/Form/Input.php b/tests/Element/Backend/Form/Input.php index 4251564..70ce5ee 100644 --- a/tests/Element/Backend/Form/Input.php +++ b/tests/Element/Backend/Form/Input.php @@ -1,5 +1,7 @@ find('xpath', $this->getReloadButtonXpath()); @@ -29,9 +31,9 @@ public function reload() /** * Return all visible rows from a grid view * - * @return GridViewRow[] + * @return array */ - public function getRows() + public function getRows(): array { $rows = $this->findAll('xpath', $this->getGridViewRowsXpath()); @@ -42,24 +44,22 @@ public function getRows() /** * Returns the first row from a grid view - * - * @return GridViewRow */ - public function getFirstRow() + public function getFirstRow(): GridViewRow { - return $this->find('xpath', $this->getGridViewFirstRowXpath()); + $xPath = $this->getGridViewFirstRowXpath(); + $element = $this->find('xpath', $xPath); + if (!$element instanceof NodeElement) { + throw new \RuntimeException(sprintf('Could not find grid view row with xPath: "%s"', $xPath)); + } + + return new GridViewRow($element->getXpath(), $this->getSession()); } /** * Get the first row that contains given string - * - * @param string $content - * - * @throws \Exception - * - * @return GridViewRow */ - public function getRowByContent($content) + public function getRowByContent(string $content): GridViewRow { foreach ($this->getRows() as $row) { if (strpos($row->getHtml(), $content)) { @@ -67,15 +67,13 @@ public function getRowByContent($content) } } - throw new \Exception('Could not find grid view row by with content: ' . $content); + throw new \RuntimeException('Could not find grid view row by with content: ' . $content); } /** * Sort a grid view by a given header name - * - * @param string $headerName */ - public function sortBy($headerName) + public function sortBy(string $headerName): void { $tableHeaderXpath = BackendXpathBuilder::create() ->child('span', ['~class' => 'x-column-header-text']) @@ -91,28 +89,18 @@ public function sortBy($headerName) $tableHeader->click(); } - /** - * @return string - */ - private function getReloadButtonXpath() + private function getReloadButtonXpath(): string { - $reloadButtonXpath = BackendXpathBuilder::create() + return BackendXpathBuilder::create() ->descendant('span', ['~class' => 'x-tbar-loading']) ->getXpath(); - - return $reloadButtonXpath; } - /** - * @return string - */ - private function getGridViewRowsXpath() + private function getGridViewRowsXpath(): string { - $rowsXpath = BackendXpathBuilder::create() + return BackendXpathBuilder::create() ->descendant('tr', ['~class' => 'x-grid-row']) ->getXpath(); - - return $rowsXpath; } private function getGridViewFirstRowXpath(): string diff --git a/tests/Element/Backend/GridView/GridViewRow.php b/tests/Element/Backend/GridView/GridViewRow.php index 4a83332..bd3b8ee 100644 --- a/tests/Element/Backend/GridView/GridViewRow.php +++ b/tests/Element/Backend/GridView/GridViewRow.php @@ -1,5 +1,7 @@ open(); $this->getSession()->setCookie('lastCheckSubscriptionDate', date('dmY')); @@ -44,10 +43,8 @@ public function login($user = 'demo', $password = 'demo') /** * Click on a tab identified by its label - * - * @param string $label */ - public function clickOnTabWithName($label) + public function clickOnTabWithName(string $label): void { $tab = $this->find('xpath', BackendXpathBuilder::getTabXpathByLabel($label)); $tab->click(); diff --git a/tests/Page/Backend/BackendModule.php b/tests/Page/Backend/BackendModule.php index d77dc5b..53462e3 100644 --- a/tests/Page/Backend/BackendModule.php +++ b/tests/Page/Backend/BackendModule.php @@ -1,9 +1,10 @@ > $formElements + * * @throws \Exception */ - public function fillExtJsForm(Window $formParent, array $formElements) + public function fillExtJsForm(Window $formParent, array $formElements): void { foreach ($formElements as $element) { $element['fieldset'] = isset($element['fieldset']) ? $element['fieldset'] : ''; @@ -78,10 +72,8 @@ public function fillExtJsForm(Window $formParent, array $formElements) /** * Helper method that fills an extJS combobox input field - * - * @param string $value */ - public function fillComboboxInput(NodeElement $comboInputField, $value) + public function fillComboboxInput(NodeElement $comboInputField, string $value): void { $comboInputField->click(); $comboInputField->setValue($value); @@ -89,24 +81,15 @@ public function fillComboboxInput(NodeElement $comboInputField, $value) /** * Expands a collapsed element - * - * @param string $label - * @param null $fieldset */ - public function expandCategoryCollapsible($label, $fieldset = null) + public function expandCategoryCollapsible(string $label): void { - $builder = new BackendXpathBuilder(); - - $collapsibleFieldXpath = $builder + $collapsibleFieldXpath = (new BackendXpathBuilder()) ->child('div', ['@text' => $label], 1) ->ancestor('tr', [], 1) ->getXpath(); - if ($fieldset) { - $element = $fieldset->find('xpath', $collapsibleFieldXpath); - } else { - $element = $this->find('xpath', $collapsibleFieldXpath); - } + $element = $this->find('xpath', $collapsibleFieldXpath); $element->doubleClick(); } @@ -116,60 +99,37 @@ public function expandCategoryCollapsible($label, $fieldset = null) * * @throws \Exception */ - public function answerMessageBox($answer) + public function answerMessageBox(string $answer): void { - $builder = new BackendXpathBuilder(); - - $answerButtonXpath = $builder + $answerButtonXpath = (new BackendXpathBuilder()) ->child('span', ['@text' => $answer, 'and', '~class' => 'x-btn-inner'], 1) ->ancestor('button', [], 1) ->getXpath(); $answerButton = $this->find('xpath', $answerButtonXpath); - $this->assertNotNull($answerButton, $answerButtonXpath); $answerButton->click(); } - public function checkIfTabIsActive($title) - { - $builder = new BackendXpathBuilder(); - - $tabXpath = $builder - ->child('span', ['@text' => $title, 'and', '~class' => 'x-tab-inner'], 1) - ->ancestor('button', ['@disabled' => ''], 1) - ->getXpath(); - - return $tabXpath !== null; - } - /** * Helper method that returns the current module window */ protected function getModuleWindow(bool $exactMatch = true): Window { // Cache the window reference as long as it is still valid - if (!$this->moduleWindow || !$this->moduleWindow->isValid() || $exactMatch === false) { + if (!$this->moduleWindow || !$this->moduleWindow->isValid() || !$exactMatch) { $this->moduleWindow = Window::createFromTitle($this->moduleWindowTitle, $this->getSession(), $exactMatch); } - if ($this->moduleWindow === null) { - throw new ElementNotFoundException($this->getDriver()); - } - return $this->moduleWindow; } /** * Helper method that returns the current editor window - * - * @param bool $exactMatch - * - * @return Window|null */ - protected function getEditorWindow($exactMatch = true) + protected function getEditorWindow(bool $exactMatch = true): Window { // Cache the window reference as long as it is still valid - if (!$this->editorWindow || !$this->editorWindow->isValid() || $exactMatch == false) { + if (!$this->editorWindow || !$this->editorWindow->isValid() || !$exactMatch) { $this->editorWindow = Window::createFromTitle($this->editorWindowTitle, $this->getSession(), $exactMatch); } @@ -179,16 +139,11 @@ protected function getEditorWindow($exactMatch = true) /** * Clicks the selected icon for the entry with a given name. * - * @param string $name - * @param string $icon - * * @throws \Exception */ - public function clickEntryIconByName($name, $icon) + public function clickEntryIconByName(string $name, string $icon): void { - $builder = new BackendXpathBuilder(); - - $editIconXpath = $builder + $editIconXpath = (new BackendXpathBuilder()) ->child('div') ->contains($name) ->ancestor('tr', ['~class' => 'x-grid-row']) diff --git a/tests/Page/Backend/CustomerModule.php b/tests/Page/Backend/CustomerModule.php index d63f1fe..22055e1 100644 --- a/tests/Page/Backend/CustomerModule.php +++ b/tests/Page/Backend/CustomerModule.php @@ -1,5 +1,7 @@ descendant('span', ['@text' => $groupTitle], 1) ->getXpath(); - return $groupMatchXpath !== null; + try { + $this->find('xpath', $groupMatchXpath); + + return true; + } catch (ElementNotFoundException $e) { + return false; + } } /** diff --git a/tests/Page/Backend/NewArticleModule.php b/tests/Page/Backend/NewArticleModule.php index 17735a3..59dfc00 100644 --- a/tests/Page/Backend/NewArticleModule.php +++ b/tests/Page/Backend/NewArticleModule.php @@ -1,5 +1,7 @@ getModuleWindow(false); - $builder = new BackendXpathBuilder(); - - $cellElementXpath = $builder->child('span', ['@text' => $cellAnchor, 'and', '~class' => 'x-column-header-text'])->ancestor('div', [], 1)->getXpath(); + $cellElementXpath = (new BackendXpathBuilder()) + ->child('span', ['@text' => $cellAnchor, 'and', '~class' => 'x-column-header-text']) + ->ancestor('div', [], 1) + ->getXpath(); $this->waitForSelectorPresent('xpath', $cellElementXpath); $this->waitForSelectorVisible('xpath', $cellElementXpath); $cellElement = $window->find('xpath', $cellElementXpath); @@ -62,7 +65,7 @@ private function findPriceDataFieldPosition(NodeElement $cellElement, string $an * * @throws \Exception */ - private function setPriceData(string $value, int $position, string $inputName) + private function setPriceData(string $value, int $position, string $inputName): void { $window = $this->getModuleWindow(false); $builder = new BackendXpathBuilder(); @@ -79,10 +82,12 @@ private function setPriceData(string $value, int $position, string $inputName) ->child('div', [], 1) ->getXpath(); - /* @var NodeElement $priceField */ $this->waitForSelectorPresent('xpath', $priceFieldXpath); $this->waitForSelectorVisible('xpath', $priceFieldXpath); $priceField = $row->find('xpath', $priceFieldXpath); + if (!$priceField instanceof NodeElement) { + throw new \RuntimeException(sprintf('Could not find price field with xPath "%s"', $priceFieldXpath)); + } $priceField->click(); $priceInputXpath = $builder->reset()->child('input', ['@name' => $inputName], 1)->getXpath(); @@ -130,9 +135,7 @@ public function setBasicData($data) public function addCategory($name) { $window = $this->getModuleWindow(false); - $builder = new BackendXpathBuilder(); - - $plusXpath = $builder + $plusXpath = (new BackendXpathBuilder()) ->child('div', ['@text' => $name]) ->ancestor('tr', [], 1) ->descendant('td', [], 2) @@ -140,7 +143,6 @@ public function addCategory($name) ->getXpath(); $plus = $window->find('xpath', $plusXpath); - $this->assertNotNull($plus, $plusXpath); $plus->click(); } @@ -152,25 +154,22 @@ public function addCategory($name) * * @throws \Exception */ - public function checkAddedCategory($name, $area) + public function checkAddedCategory($name, $area): void { $window = $this->getModuleWindow(false); - $builder = new BackendXpathBuilder(); - - $plusXpath = $builder + $plusXpath = (new BackendXpathBuilder()) ->child('div', ['@text' => $name]) ->ancestor('div', ['~class' => 'x-panel'], 1) ->descendant('span', ['@text' => $area], 1) ->getXpath(); - $plus = $window->find('xpath', $plusXpath); - $this->assertNotNull($plus, $plusXpath); + $window->find('xpath', $plusXpath); } /** * Saves the article */ - public function saveArticle() + public function saveArticle(): void { $button = $this->waitForSelectorPresent('xpath', BackendXpathBuilder::getButtonXpathByLabel('Artikel speichern')); $button->click(); diff --git a/tests/Page/Backend/OrderModule.php b/tests/Page/Backend/OrderModule.php index 335c068..b028bd6 100644 --- a/tests/Page/Backend/OrderModule.php +++ b/tests/Page/Backend/OrderModule.php @@ -1,10 +1,13 @@ getOrderListGridView()->getRowByContent($email); $orderRow->clickActionIcon('sprite-pencil'); @@ -33,22 +31,19 @@ public function openOrderByEmail($email) /** * Set order or payment status - * - * @param string $type - * @param string $status */ - public function setStatusByType($type, $status) + public function setStatusByType(string $type, string $status): void { $label = strtolower($type) === 'order' ? 'Bestellstatus:' : 'Zahlungsstatus:'; - $statusCombobox = $this->getEditorWindow()->getCombobox($label); + $statusCombobox = $this->getEditorWindow(false)->getCombobox($label); $statusCombobox->setValue($status); } /** * Send a notification email to the customer using the email window opened after saving after a status history change */ - public function sendCustomerNotificationMail() + public function sendCustomerNotificationMail(): void { $this->waitForText('E-Mail an den Kunden senden'); @@ -62,27 +57,16 @@ public function sendCustomerNotificationMail() /** * Reload the status history tab */ - public function reloadStatusHistory() + public function reloadStatusHistory(): void { - $gridView = $this->getEditorWindow()->getGridView('Benutzer'); + $gridView = $this->getEditorWindow(false)->getGridView('Benutzer'); $gridView->reload(); } - /** - * Click the email icon on the topmost generated document - */ - public function clickEmailIconOnLastGeneratedIcon() - { - $row = $this->getLastGeneratedDocumentGridRow(); - $row->clickActionIcon('sprite-mail-send'); - } - /** * Filter the backend order list by shipping country - * - * @param string $country */ - public function filterOrderListForShippingCountry($country) + public function filterOrderListForShippingCountry(string $country): void { $this->getModuleWindow()->getCombobox('Lieferland:')->setValue($country); $this->findButton('Ausführen')->click(); @@ -93,10 +77,8 @@ public function filterOrderListForShippingCountry($country) /** * Get number of orders in backend list - * - * @return int */ - public function getNumberOfOrdersInOrderList() + public function getNumberOfOrdersInOrderList(): int { $gridView = $this->getOrderListGridView(); @@ -106,7 +88,7 @@ public function getNumberOfOrdersInOrderList() /** * Sort backend order list by order value (ascendingly) */ - public function sortOrderListByValue() + public function sortOrderListByValue(): void { sleep(3); $this->getOrderListGridView()->sortBy('Betrag'); @@ -114,39 +96,17 @@ public function sortOrderListByValue() /** * Get the topmost order from the backend listing - * - * @return GridViewRow */ - public function getTopmostOrderFromList() + public function getTopmostOrderFromList(): GridViewRow { return $this->getOrderListGridView()->getFirstRow(); } - /** - * Get the latest generated document grid row - * - * @return GridViewRow - */ - private function getLastGeneratedDocumentGridRow() - { - return $this->getEditorWindow()->getGridView('Betrag')->getRowByContent('Rechnung'); - } - /** * Get main order list grid view - * - * @return GridView */ - private function getOrderListGridView() + private function getOrderListGridView(): GridView { return $this->getModuleWindow()->getGridView('Bestellnummer'); } - - /** - * {@inheritdoc} - */ - protected function getEditorWindow($exactMatch = false) - { - return parent::getEditorWindow($exactMatch); - } } diff --git a/tests/Page/Backend/PaymentModule.php b/tests/Page/Backend/PaymentModule.php index d04eff0..14bacb2 100644 --- a/tests/Page/Backend/PaymentModule.php +++ b/tests/Page/Backend/PaymentModule.php @@ -1,7 +1,10 @@ open(); $window = $this->getModuleWindow(); @@ -38,20 +39,19 @@ public function activatePaymentMethod($name) $checkbox->toggle(); - $window->findButton('Speichern')->click(); + $saveButton = $window->findButton('Speichern'); + if (!$saveButton instanceof NodeElement) { + throw new \RuntimeException('Could not find save button'); + } + $saveButton->click(); $this->waitForText('Zahlungsart gespeichert', 1); } - /** - * @return string - */ - private function getPaymentMethodXpath($name) + private function getPaymentMethodXpath(string $name): string { - $paymentMethodXpath = BackendXpathBuilder::create() + return BackendXpathBuilder::create() ->child('div', ['starts-with' => ['@id', 'payment-main-tree']]) ->descendant('div', ['~class' => 'x-grid-cell-inner', 'and', '~text' => $name]) ->getXpath(); - - return $paymentMethodXpath; } } diff --git a/tests/Page/Backend/ProductExportModule.php b/tests/Page/Backend/ProductExportModule.php index 73f12a2..9fb7028 100644 --- a/tests/Page/Backend/ProductExportModule.php +++ b/tests/Page/Backend/ProductExportModule.php @@ -1,8 +1,9 @@ spin(function (ContextAwarePage $context) use ($text) { @@ -44,13 +30,8 @@ protected function waitForText($text, $sleep = 2) /** * Checks via spin function if a string exists, with sleep at the beginning (default 2) - * - * @param string $text - * @param int $wait - * - * @return bool */ - protected function waitIfThereIsText($text, $wait = 5) + protected function waitIfThereIsText(string $text, int $wait = 5): bool { return $this->spinWithNoException(function (self $context) use ($text) { return $this->checkIfThereIsText($text, $context); @@ -59,12 +40,8 @@ protected function waitIfThereIsText($text, $wait = 5) /** * Checks via a string exists - * - * @param string $text - * - * @return bool */ - protected function checkIfThereIsText($text, ContextAwarePage $context) + protected function checkIfThereIsText(string $text, ContextAwarePage $context): bool { $result = $context->getSession()->getPage()->findAll('xpath', "//*[contains(., '$text')]"); @@ -75,36 +52,10 @@ protected function checkIfThereIsText($text, ContextAwarePage $context) * Checks via spin function if a locator is present on page, with sleep at the beginning (default 2) * * @param string $selector css, xpath... - * @param string $locator - * @param int $sleep - * - * @return NodeElement - */ - protected function waitIfSelectorPresent($selector, $locator, $sleep = 2) - { - sleep($sleep); - $elem = null; - $this->spinWithNoException(function (ContextAwarePage $context) use ($selector, $locator, &$elem) { - $elem = $context->getSession()->getPage()->find($selector, $locator); - - return !($elem === null); - }); - - return $elem; - } - - /** - * Checks via spin function if a locator is present on page, with sleep at the beginning (default 2) - * - * @param string $selector css, xpath... - * @param string $locator - * @param int $sleep * * @throws \Exception - * - * @return NodeElement */ - protected function waitForSelectorPresent($selector, $locator, $sleep = 2) + protected function waitForSelectorPresent(string $selector, string $locator, int $sleep = 2): NodeElement { sleep($sleep); $elem = null; @@ -117,6 +68,10 @@ protected function waitForSelectorPresent($selector, $locator, $sleep = 2) return true; }); + if (!$elem instanceof NodeElement) { + throw new ElementNotFoundException($this->getDriver(), null, $selector, $locator); + } + return $elem; } @@ -124,12 +79,10 @@ protected function waitForSelectorPresent($selector, $locator, $sleep = 2) * Checks via spin function if a locator is not present on page, with sleep at the beginning (default 2) * * @param string $selector css, xpath... - * @param string $locator - * @param int $sleep * * @throws \Exception */ - protected function waitForSelectorNotPresent($selector, $locator, $sleep = 2) + protected function waitForSelectorNotPresent(string $selector, string $locator, int $sleep = 2): void { sleep($sleep); $this->spin(function (ContextAwarePage $context) use ($selector, $locator) { @@ -145,11 +98,9 @@ protected function waitForSelectorNotPresent($selector, $locator, $sleep = 2) /** * Checks via spin function if an element is present on page via given xpath, with sleep at the beginning (default 2) * - * @param int $sleep - * * @throws \Exception */ - protected function waitForXpathElementPresent($xpath, $sleep = 2) + protected function waitForXpathElementPresent(string $xpath, int $sleep = 2): void { sleep($sleep); $this->spin(function (ContextAwarePage $context) use ($xpath) { @@ -165,73 +116,26 @@ protected function waitForXpathElementPresent($xpath, $sleep = 2) /** * Checks via spin function if a string exists, with sleep at the beginning (default 2) * - * @param string $text - * @param int $sleep - * * @throws \Exception */ - protected function waitForTextNotPresent($text, $sleep = 2) + protected function waitForTextNotPresent(string $text, int $sleep = 2): void { $this->waitForSelectorNotPresent('xpath', "//*[contains(text(), '$text')]", $sleep); } - /** - * @param NodeElement $parent - * @param string $xPath - * @param string $class - * - * @throws \Exception - */ - protected function waitForClassNotPresent($parent, $xPath, $class) - { - $this->spin(function () use ($parent, $xPath, $class) { - $element = $parent->find('xpath', $xPath); - if ($element->hasClass($class)) { - return false; - } - - return true; - }); - } - - protected function waitForModalOverlayClosed() - { - $modalXPath = BaseXpathBuilder::create()->child('div', ['~class' => 'js--overlay']); - $this->waitForSelectorInvisible('xpath', $modalXPath); - } - - /** - * Checks via spin function if element is clickable, then clicks it, with sleep at the beginning (default 2) - * - * @throws \Exception - */ - protected function clickOnElementWhenReady(NodeElement $elem) - { - $this->spin(function () use ($elem) { - try { - $elem->click(); - - return true; - } catch (\Exception $e) { - return false; - } - }, 90); - } - /** * Checks via spin function if a locator is visible on page, with sleep at the beginning (default 2) * * @param string $selector css, xpath... - * @param string $locator * * @throws \Exception */ - protected function waitForSelectorVisible($selector, $locator) + protected function waitForSelectorVisible(string $selector, string $locator): void { $this->spin(function (ContextAwarePage $context) use ($selector, $locator) { - $elem = $context->getSession()->getPage()->find($selector, $locator); + $context->getSession()->getPage()->find($selector, $locator); - return !empty($elem) || ($elem !== null && $elem->isVisible()); + return true; }, 90); } @@ -239,12 +143,10 @@ protected function waitForSelectorVisible($selector, $locator) * Checks via spin function if a locator is invisible on page, with sleep at the beginning (default 2) * * @param string $selector css, xpath... - * @param string $locator - * @param int $wait */ - protected function waitForSelectorInvisible($selector, $locator, $wait = 2) + protected function waitForSelectorInvisible(string $selector, string $locator, int $sleep = 2): void { - sleep($wait); + sleep($sleep); $this->spin(function (ContextAwarePage $context) use ($selector, $locator) { $elem = $context->getSession()->getPage()->find($selector, $locator); diff --git a/tests/Page/Frontend/Account.php b/tests/Page/Frontend/Account.php index 4194f1a..58fd2bd 100644 --- a/tests/Page/Frontend/Account.php +++ b/tests/Page/Frontend/Account.php @@ -1,5 +1,7 @@ path; - $detailPage = $this->getPage('Detail'); - if (!$detailPage instanceof Detail) { - throw new PageNotDefinedException('Detail', Detail::class); - } + $detailPage = $this->getPage(Detail::class); foreach ($items as $row) { if (!$this->hasCartProductWithQuantity($row['number'], $row['quantity'])) { @@ -281,8 +279,8 @@ private function assertCartPositionListsAreEqual(array $expected, array $actual) } throw new \Exception(sprintf('Cart positions not as expected: Expected: %s Got: %s', - print_r($expectedPosition, true), - print_r($actualPosition, true)) + print_r($expectedPosition, true), + print_r($actualPosition, true)) ); } } diff --git a/tests/Page/Frontend/CheckoutConfirm.php b/tests/Page/Frontend/CheckoutConfirm.php index d9003aa..878c6e3 100644 --- a/tests/Page/Frontend/CheckoutConfirm.php +++ b/tests/Page/Frontend/CheckoutConfirm.php @@ -1,5 +1,7 @@ waitForSelectorInvisible('xpath', FrontendXpathBuilder::create() - ->child('div', ['~class' => 'js--overlay']) - ->getXpath() + $this->waitForSelectorInvisible( + 'xpath', + FrontendXpathBuilder::create() + ->child('div', ['~class' => 'js--overlay']) + ->getXpath() ); } } diff --git a/tests/Page/Frontend/Detail.php b/tests/Page/Frontend/Detail.php index 823cb5c..32c55c6 100644 --- a/tests/Page/Frontend/Detail.php +++ b/tests/Page/Frontend/Detail.php @@ -1,5 +1,7 @@ BaseXpathBuilder::create()->child('input', ['@value' => 'Weiter'])->getXpath(), @@ -31,7 +33,7 @@ public function getXPathSelectors() /** * {@inheritdoc} */ - public function getCssSelectors() + public function getCssSelectors(): array { return [ 'startDbMigrationButton' => '#start-ajax', @@ -41,7 +43,7 @@ public function getCssSelectors() /** * Advances to the next updater page */ - public function advance() + public function advance(): void { $xpath = $this->getXPathSelectors(); $forwardButton = $this->waitForSelectorPresent('xpath', $xpath['forwardButton']); @@ -52,7 +54,7 @@ public function advance() /** * Starts the database migration */ - public function clickOnDbStart() + public function clickOnDbStart(): void { $forwardButton = $this->find('css', $this->getCssSelectors()['startDbMigrationButton']); $forwardButton->click(); @@ -61,14 +63,10 @@ public function clickOnDbStart() /** * Indicates the finished Cleanup step */ - public function finishCleanup() + public function finishCleanup(): void { - $textNotPresent = $this->waitForTextNotPresent('entfernte Dateien'); - $indicatorNotPresent = $this->waitForSelectorNotPresent('css', '.loading-indicator'); - - if ($textNotPresent === false || $indicatorNotPresent === false) { - throw new \Exception('Cleanup could not be finished'); - } + $this->waitForTextNotPresent('entfernte Dateien'); + $this->waitForSelectorNotPresent('css', '.loading-indicator'); } /** @@ -76,7 +74,7 @@ public function finishCleanup() * * @param string $updateTitle Text which indicates the hint to remove the update assets */ - public function handleUpdateAssets($updateTitle) + public function handleUpdateAssets(string $updateTitle): void { $this->waitForText($updateTitle); } diff --git a/tests/composer.json b/tests/composer.json index 8bc19ff..cd404ba 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -13,7 +13,7 @@ "friendsofphp/php-cs-fixer": "^3.1", "guzzlehttp/guzzle": "^7.5", "kubawerlos/php-cs-fixer-custom-fixers": "^3.0", - "phpstan/phpstan": "^0.12.99", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.4", "sensiolabs/behat-page-object-extension": "^2.0", "smalot/pdfparser": "^2.3", diff --git a/tests/composer.lock b/tests/composer.lock index 8d5306f..eccd463 100644 --- a/tests/composer.lock +++ b/tests/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": "be5a239f3953709da15d7919cd5a7648", + "content-hash": "dcf0ad8b5cadf08ba0014ac40697880c", "packages": [], "packages-dev": [ { @@ -2072,20 +2072,20 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.100", + "version": "1.10.29", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "48236ddf823547081b2b153d1cd2994b784328c3" + "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/48236ddf823547081b2b153d1cd2994b784328c3", - "reference": "48236ddf823547081b2b153d1cd2994b784328c3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", + "reference": "ee5d8f2d3977fb09e55603eee6fb53bdd76ee9c1", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -2095,11 +2095,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -2110,9 +2105,16 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.100" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -2128,7 +2130,7 @@ "type": "tidelift" } ], - "time": "2022-11-01T09:52:08+00:00" + "time": "2023-08-14T13:24:11+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/tests/features/backend_article_baseprice.feature b/tests/features/backend_article_baseprice.feature index 71b3be2..70c62de 100644 --- a/tests/features/backend_article_baseprice.feature +++ b/tests/features/backend_article_baseprice.feature @@ -7,8 +7,8 @@ Feature: I can generate and use article with base price information | Shopkunden | EK | And the category tree "Root > Deutsch > ErsteKategorie > Unterkategorie" exists And the following products exist in the store: - | number | name | price | tax | supplier | categories | - | SW77777 | Einfacher Artikel | 10 | 19 | Finch | Root > Deutsch > ErsteKategorie > Unterkategorie | + | number | name | price | tax | supplier | categories | + | SW77777 | Einfacher Artikel 7 | 10 | 19 | Finch | Root > Deutsch > ErsteKategorie > Unterkategorie | Scenario: I can add graduated prices to the article Given I am logged into the backend @@ -17,7 +17,7 @@ Feature: I can generate and use article with base price information And I click on backend menu item that contains "Übersicht" Then I should see "SW77777" eventually When I click the edit icon of the entry "SW77777" - Then I should see "Artikeldetails : Einfacher Artikel" eventually + Then I should see "Artikeldetails : Einfacher Artikel 7" eventually When I fill in the basic configuration: | label | value | type | fieldset | @@ -36,7 +36,7 @@ Feature: I can generate and use article with base price information | Basis | 1 Liter | | Inhalt | 0.25 | When I am on the detail page for article with ordernumber "SW77777" - Then I should see "Einfacher Artikel" eventually + Then I should see "Einfacher Artikel 7" eventually And I should see "Paket" eventually And I should see the base price information: | information | data | diff --git a/tests/features/backend_article_graduatedprices.feature b/tests/features/backend_article_graduatedprices.feature index 5c495e7..8c3b2d9 100644 --- a/tests/features/backend_article_graduatedprices.feature +++ b/tests/features/backend_article_graduatedprices.feature @@ -7,8 +7,8 @@ Feature: I can generate and use article with graduated prices | Shopkunden | EK | And the category tree "Root > Deutsch > ErsteKategorie > Unterkategorie" exists And the following products exist in the store: - | number | name | price | tax | supplier | categories | - | SW88888 | Einfacher Artikel | 10 | 19 | Finch | Root > Deutsch > ErsteKategorie > Unterkategorie | + | number | name | price | tax | supplier | categories | + | SW88888 | Einfacher Artikel 8 | 10 | 19 | Finch | Root > Deutsch > ErsteKategorie > Unterkategorie | Scenario: I can add graduated prices to the article Given I am logged into the backend @@ -17,7 +17,7 @@ Feature: I can generate and use article with graduated prices And I click on backend menu item that contains "Übersicht" Then I should see "SW88888" eventually When I click the edit icon of the entry "SW88888" - Then I should see "Artikeldetails : Einfacher Artikel" eventually + Then I should see "Artikeldetails : Einfacher Artikel 8" eventually When I limit the price "10" for an amount up to "2" Then I should see "2" as to-price @@ -31,7 +31,7 @@ Feature: I can generate and use article with graduated prices When I am on the homepage And I navigate to category tree "ErsteKategorie > Unterkategorie" And I am on the detail page for article with ordernumber "SW88888" - And I should see "Einfacher Artikel" eventually + And I should see "Einfacher Artikel 8" eventually Then I should see the following graduated prices: | amount | price | | 2 | 10,00 | @@ -41,7 +41,7 @@ Feature: I can generate and use article with graduated prices Then I should see "Der Artikel wurde erfolgreich in den Warenkorb gelegt" eventually And I should see "10" eventually When I click on "Warenkorb bearbeiten" - Then I should see "Einfacher Artikel" eventually + Then I should see "Einfacher Artikel 8" eventually And I should see "10,00" eventually When I am on the detail page for article with ordernumber "SW88888" And I put the current article "2" times into the basket diff --git a/tests/features/backend_article_property.feature b/tests/features/backend_article_property.feature index 9775b78..27ef767 100644 --- a/tests/features/backend_article_property.feature +++ b/tests/features/backend_article_property.feature @@ -7,8 +7,8 @@ Feature: I can add properties to an article | Shopkunden | EK | And the category tree "Root > Deutsch > ErsteKategorie > Unterkategorie" exists And the following products exist in the store: - | number | name | price | tax | supplier | categories | - | SW66666 | Einfacher Artikel | 10 | 19 | Finch | Root > Deutsch > ErsteKategorie > Unterkategorie | + | number | name | price | tax | supplier | categories | + | SW66666 | Einfacher Artikel 6 | 10 | 19 | Finch | Root > Deutsch > ErsteKategorie > Unterkategorie | And the following properties exist in the store: | key | groupKey | set | group | option | | 1 | 1 | ErstesSet | Farbe | Blau | @@ -21,7 +21,7 @@ Feature: I can add properties to an article And I click on backend menu item that contains "Übersicht" Then I should see "SW66666" eventually When I click the edit icon of the entry "SW66666" - Then I should see "Artikeldetails : Einfacher Artikel" eventually + Then I should see "Artikeldetails : Einfacher Artikel 6" eventually When I click on the "Eigenschaften" tab Then I should see "Set auswählen:" eventually @@ -36,10 +36,10 @@ Feature: I can add properties to an article When I am on the detail page for article with ordernumber "SW66666" Then I should see "Blau" eventually - When I should see "Einfacher Artikel" eventually + When I should see "Einfacher Artikel 6" eventually And I put the current article "1" times into the basket Then I should see "Der Artikel wurde erfolgreich in den Warenkorb gelegt" eventually And I should see "10" eventually When I click on "Warenkorb bearbeiten" - Then I should see "Einfacher Artikel" eventually + Then I should see "Einfacher Artikel 6" eventually And I should see "10,00" eventually diff --git a/tests/features/backend_article_variants.feature b/tests/features/backend_article_variants.feature index f6421fc..cf244ed 100644 --- a/tests/features/backend_article_variants.feature +++ b/tests/features/backend_article_variants.feature @@ -23,7 +23,6 @@ Feature: I can generate and use article variants And I set "10" as the article price Then I am able to save my article And I should see "Erfolgreich" eventually - And the "Varianten" tab should be active When I click on the "Varianten" tab Then I should see "Art des Konfigurators:" eventually diff --git a/tests/phpstan-baseline.neon b/tests/phpstan-baseline.neon index 9e48ab4..423619f 100644 --- a/tests/phpstan-baseline.neon +++ b/tests/phpstan-baseline.neon @@ -1,5 +1,10 @@ parameters: ignoreErrors: + - + message: "#^Method RandomImageGenerator\\:\\:imagettfbboxextended\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: ../www/assetgenerator/classes/RandomImageGenerator.php + - message: "#^Access to an undefined property Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:\\$client\\.$#" count: 2 @@ -46,7 +51,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:buildPropertyDataArray\\(\\) has parameter \\$group with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:buildPropertyDataArray\\(\\) has parameter \\$group with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -56,7 +61,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:call\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:call\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -71,12 +76,12 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:call\\(\\) has parameter \\$url with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:call\\(\\) has parameter \\$url with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createArticle\\(\\) has parameter \\$product with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createArticle\\(\\) has parameter \\$product with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -86,7 +91,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createCategoryTree\\(\\) has parameter \\$categories with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createCategoryTree\\(\\) has parameter \\$categories with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -101,17 +106,17 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createCustomerGroup\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createCustomerGroup\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createCustomerGroup\\(\\) has parameter \\$customerGroup with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createCustomerGroup\\(\\) has parameter \\$customerGroup with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createOrder\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createOrder\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -121,7 +126,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createProperty\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:createProperty\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -131,7 +136,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:customerGroupExistsByKey\\(\\) has parameter \\$key with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:customerGroupExistsByKey\\(\\) has parameter \\$key with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -141,7 +146,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:delete\\(\\) has parameter \\$url with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:delete\\(\\) has parameter \\$url with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -151,17 +156,17 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:deleteAllCustomers\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:deleteAllCustomers\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:deleteCustomerByEmail\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:deleteCustomerByEmail\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:deleteCustomerById\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:deleteCustomerById\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -186,7 +191,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:post\\(\\) has parameter \\$url with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:post\\(\\) has parameter \\$url with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -196,17 +201,17 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:prepareResponse\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:prepareResponse\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:prepareResponse\\(\\) has parameter \\$httpCode with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:prepareResponse\\(\\) has parameter \\$httpCode with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:prepareResponse\\(\\) has parameter \\$result with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:prepareResponse\\(\\) has parameter \\$result with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -221,7 +226,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:put\\(\\) has parameter \\$url with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:put\\(\\) has parameter \\$url with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -231,7 +236,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:setCountryData\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:setCountryData\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -241,7 +246,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:throwExceptionWhenEmpty\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:throwExceptionWhenEmpty\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -256,12 +261,12 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:updateCustomerGroup\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:updateCustomerGroup\\(\\) has no return type specified\\.$#" count: 1 path: Component/Api/ApiClient.php - - message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:updateCustomerGroup\\(\\) has parameter \\$customerGroup with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:updateCustomerGroup\\(\\) has parameter \\$customerGroup with no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -271,7 +276,7 @@ parameters: path: Component/Api/ApiClient.php - - message: "#^Property Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:\\$validMethods has no typehint specified\\.$#" + message: "#^Property Shopware\\\\Component\\\\Api\\\\ApiClient\\:\\:\\$validMethods has no type specified\\.$#" count: 1 path: Component/Api/ApiClient.php @@ -295,31 +300,11 @@ parameters: count: 1 path: Component/XpathBuilder/BaseXpathBuilder.php - - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:contains\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:contains\\(\\) has parameter \\$text with no typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:descendant\\(\\) has parameter \\$conditions with no value type specified in iterable type array\\.$#" count: 1 path: Component/XpathBuilder/BaseXpathBuilder.php - - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:equals\\(\\) has parameter \\$target with no typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:equals\\(\\) has parameter \\$text with no typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:following\\(\\) has parameter \\$conditions with no value type specified in iterable type array\\.$#" count: 1 @@ -330,11 +315,6 @@ parameters: count: 1 path: Component/XpathBuilder/BaseXpathBuilder.php - - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:parseConditions\\(\\) has parameter \\$conditions with no typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:preceding\\(\\) has parameter \\$conditions with no value type specified in iterable type array\\.$#" count: 1 @@ -346,47 +326,22 @@ parameters: path: Component/XpathBuilder/BaseXpathBuilder.php - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:setXpath\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:setXpath\\(\\) has parameter \\$xpath with no typehint specified\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Parameter \\#4 \\$index of method Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder\\:\\:appendPartialPath\\(\\) expects int, int\\|null given\\.$#" - count: 7 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Result of && is always false\\.$#" - count: 1 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 2 - path: Component/XpathBuilder/BaseXpathBuilder.php - - - - message: "#^Method Shopware\\\\Context\\\\FileCheckContext\\:\\:aRequirementShouldOwnAsStatus\\(\\) has parameter \\$icon with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\FileCheckContext\\:\\:aRequirementShouldOwnAsStatus\\(\\) has parameter \\$icon with no type specified\\.$#" count: 1 path: Context/FileCheckContext.php - - message: "#^Method Shopware\\\\Context\\\\FileCheckContext\\:\\:aRequirementShouldOwnAsStatus\\(\\) has parameter \\$requirement with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\FileCheckContext\\:\\:aRequirementShouldOwnAsStatus\\(\\) has parameter \\$requirement with no type specified\\.$#" count: 1 path: Context/FileCheckContext.php - - message: "#^Method Shopware\\\\Context\\\\FileCheckContext\\:\\:iCorrectTheRequirement\\(\\) has parameter \\$requirement with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\FileCheckContext\\:\\:iCorrectTheRequirement\\(\\) has parameter \\$requirement with no type specified\\.$#" count: 1 path: Context/FileCheckContext.php - - message: "#^Property Shopware\\\\Context\\\\FileCheckContext\\:\\:\\$testPath has no typehint specified\\.$#" + message: "#^Property Shopware\\\\Context\\\\FileCheckContext\\:\\:\\$testPath has no type specified\\.$#" count: 1 path: Context/FileCheckContext.php @@ -406,7 +361,7 @@ parameters: path: Context/FrontendContext.php - - message: "#^Method Shopware\\\\Context\\\\FrontendDetailContext\\:\\:iChooseTheVariantWithTheNumber\\(\\) has parameter \\$optionNumber with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\FrontendDetailContext\\:\\:iChooseTheVariantWithTheNumber\\(\\) has parameter \\$optionNumber with no type specified\\.$#" count: 1 path: Context/FrontendDetailContext.php @@ -416,37 +371,32 @@ parameters: path: Context/FrontendDetailContext.php - - message: "#^Method Shopware\\\\Context\\\\GeneralContext\\:\\:iScrollDown\\(\\) has parameter \\$pixels with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\GeneralContext\\:\\:iScrollDown\\(\\) has parameter \\$pixels with no type specified\\.$#" count: 1 path: Context/GeneralContext.php - - message: "#^Method Shopware\\\\Context\\\\GeneralContext\\:\\:iWaitForSeconds\\(\\) has parameter \\$amount with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\GeneralContext\\:\\:iWaitForSeconds\\(\\) has parameter \\$amount with no type specified\\.$#" count: 1 path: Context/GeneralContext.php - - message: "#^Method Shopware\\\\Context\\\\InstallerContext\\:\\:iShouldSeeAfterImportIsFinished\\(\\) has parameter \\$text with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\InstallerContext\\:\\:iShouldSeeAfterImportIsFinished\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: Context/InstallerContext.php - - message: "#^Comparison operation \"\\>\" between int\\<1, max\\> and 0 is always true\\.$#" - count: 2 - path: Context/SubContext.php - - - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:getMinkParameter\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:getMinkParameter\\(\\) has no return type specified\\.$#" count: 1 path: Context/SubContext.php - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:setMink\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:setMink\\(\\) has no return type specified\\.$#" count: 1 path: Context/SubContext.php - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:setMinkParameters\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:setMinkParameters\\(\\) has no return type specified\\.$#" count: 1 path: Context/SubContext.php @@ -456,27 +406,12 @@ parameters: path: Context/SubContext.php - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:slugify\\(\\) has parameter \\$separator with no typehint specified\\.$#" - count: 1 - path: Context/SubContext.php - - - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:slugify\\(\\) has parameter \\$text with no typehint specified\\.$#" - count: 1 - path: Context/SubContext.php - - - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:spin\\(\\) has parameter \\$lambda with no typehint specified\\.$#" - count: 1 - path: Context/SubContext.php - - - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:spin\\(\\) should return bool but return statement is missing\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:slugify\\(\\) has parameter \\$separator with no type specified\\.$#" count: 1 path: Context/SubContext.php - - message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:spinWithNoException\\(\\) has parameter \\$lambda with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubContext\\:\\:slugify\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: Context/SubContext.php @@ -491,42 +426,37 @@ parameters: path: Context/SubContext.php - - message: "#^Method Shopware\\\\Context\\\\SubshopContext\\:\\:iAmInSubshopWithURL\\(\\) has parameter \\$url with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubshopContext\\:\\:iAmInSubshopWithURL\\(\\) has parameter \\$url with no type specified\\.$#" count: 1 path: Context/SubshopContext.php - - message: "#^Method Shopware\\\\Context\\\\SubshopContext\\:\\:iFillTheConfigurationForm\\(\\) has parameter \\$formname with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Context\\\\SubshopContext\\:\\:iFillTheConfigurationForm\\(\\) has parameter \\$formname with no type specified\\.$#" count: 1 path: Context/SubshopContext.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\ExtJsElement\\:\\:waitForElementAvailable\\(\\) has no return typehint specified\\.$#" + message: "#^Negated boolean expression is always true\\.$#" count: 1 path: Element/Backend/ExtJsElement.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Checkbox\\:\\:toggle\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Element/Backend/Form/Checkbox.php - - - - message: "#^Cannot call method isVisible\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" + message: "#^Unreachable statement \\- code above always terminates\\.$#" count: 1 - path: Element/Backend/Form/Combobox.php + path: Element/Backend/ExtJsElement.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Combobox\\:\\:getComboboxPebble\\(\\) should return Behat\\\\Mink\\\\Element\\\\NodeElement but returns Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" + message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Checkbox\\:\\:toggle\\(\\) has no return type specified\\.$#" count: 1 - path: Element/Backend/Form/Combobox.php + path: Element/Backend/Form/Checkbox.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Combobox\\:\\:getOptionByValue\\(\\) should return Behat\\\\Mink\\\\Element\\\\NodeElement but returns Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" + message: "#^Cannot call method isVisible\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Element/Backend/Form/Combobox.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Combobox\\:\\:setValue\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Combobox\\:\\:getComboboxPebble\\(\\) should return Behat\\\\Mink\\\\Element\\\\NodeElement but returns Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Element/Backend/Form/Combobox.php @@ -556,7 +486,7 @@ parameters: path: Element/Backend/Form/Selecttree.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Selecttree\\:\\:getDropdownFromWindow\\(\\) has parameter \\$dropdownXpath with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Selecttree\\:\\:getDropdownFromWindow\\(\\) has parameter \\$dropdownXpath with no type specified\\.$#" count: 1 path: Element/Backend/Form/Selecttree.php @@ -566,7 +496,7 @@ parameters: path: Element/Backend/Form/Selecttree.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Selecttree\\:\\:setValue\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Element\\\\Backend\\\\Form\\\\Selecttree\\:\\:setValue\\(\\) has no return type specified\\.$#" count: 1 path: Element/Backend/Form/Selecttree.php @@ -590,28 +520,13 @@ parameters: count: 2 path: Element/Backend/GridView/GridView.php - - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\GridView\\\\GridView\\:\\:getFirstRow\\(\\) should return Shopware\\\\Element\\\\Backend\\\\GridView\\\\GridViewRow but returns Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Element/Backend/GridView/GridView.php - - - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\GridView\\\\GridView\\:\\:reload\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Element/Backend/GridView/GridView.php - - - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\GridView\\\\GridView\\:\\:sortBy\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Element/Backend/GridView/GridView.php - - message: "#^Cannot call method click\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Element/Backend/GridView/GridViewRow.php - - message: "#^Method Shopware\\\\Element\\\\Backend\\\\GridView\\\\GridViewRow\\:\\:clickActionIcon\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Element\\\\Backend\\\\GridView\\\\GridViewRow\\:\\:clickActionIcon\\(\\) has no return type specified\\.$#" count: 1 path: Element/Backend/GridView/GridViewRow.php @@ -626,87 +541,27 @@ parameters: path: Element/Frontend/Checkout/CartPosition.php - - message: "#^Method Shopware\\\\Element\\\\Frontend\\\\Checkout\\\\CartPosition\\:\\:toFloat\\(\\) has parameter \\$string with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Element\\\\Frontend\\\\Checkout\\\\CartPosition\\:\\:toFloat\\(\\) has parameter \\$string with no type specified\\.$#" count: 1 path: Element/Frontend/Checkout/CartPosition.php - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\Backend\\:\\:clickOnTabWithName\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/Backend.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\Backend\\:\\:login\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/Backend.php - - - - message: "#^If condition is always false\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:answerMessageBox\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:answerMessageBox\\(\\) has parameter \\$answer with no typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:checkIfTabIsActive\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:checkIfTabIsActive\\(\\) has parameter \\$title with no typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:clickEntryIconByName\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:expandCategoryCollapsible\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:fillComboboxInput\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:fillExtJsForm\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:fillExtJsForm\\(\\) has parameter \\$formElements with no value type specified in iterable type array\\.$#" - count: 1 - path: Page/Backend/BackendModule.php - - message: "#^Cannot call method click\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:clickDeleteIconForCustomer\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:clickDeleteIconForCustomer\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:clickDeleteIconForCustomer\\(\\) has parameter \\$firstname with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:clickDeleteIconForCustomer\\(\\) has parameter \\$firstname with no type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillCustomerForm\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillCustomerForm\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php @@ -716,7 +571,7 @@ parameters: path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillEditCustomerFormWith\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillEditCustomerFormWith\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php @@ -726,7 +581,7 @@ parameters: path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillNewCustomerFormWith\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillNewCustomerFormWith\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php @@ -736,47 +591,32 @@ parameters: path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillPaymentCombobox\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:fillPaymentCombobox\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:openEditFormForCustomer\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:openEditFormForCustomer\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:openEditFormForCustomer\\(\\) has parameter \\$firstname with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:openEditFormForCustomer\\(\\) has parameter \\$firstname with no type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:skipIntroWizardIfNecessary\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\CustomerModule\\:\\:skipIntroWizardIfNecessary\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/CustomerModule.php - - message: "#^Cannot call method click\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Backend/NewArticleModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:addCategory\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/NewArticleModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:checkAddedCategory\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/NewArticleModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:saveArticle\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:addCategory\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/NewArticleModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:setBasicData\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:setBasicData\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/NewArticleModule.php @@ -786,17 +626,12 @@ parameters: path: Page/Backend/NewArticleModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:setDescription\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/NewArticleModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:setPriceData\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:setDescription\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/NewArticleModule.php - - message: "#^Property Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:\\$priceRowAnchor has no typehint specified\\.$#" + message: "#^Property Shopware\\\\Page\\\\Backend\\\\NewArticleModule\\:\\:\\$priceRowAnchor has no type specified\\.$#" count: 1 path: Page/Backend/NewArticleModule.php @@ -805,103 +640,33 @@ parameters: count: 1 path: Page/Backend/OrderModule.php - - - message: "#^Cannot call method getCombobox\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Cannot call method getGridView\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 2 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:clickEmailIconOnLastGeneratedIcon\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:filterOrderListForShippingCountry\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:openOrderByEmail\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:reloadStatusHistory\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:sendCustomerNotificationMail\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:setStatusByType\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\OrderModule\\:\\:sortOrderListByValue\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/OrderModule.php - - - - message: "#^Cannot call method click\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Backend/PaymentModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\PaymentModule\\:\\:activatePaymentMethod\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Backend/PaymentModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\PaymentModule\\:\\:getPaymentMethodXpath\\(\\) has parameter \\$name with no typehint specified\\.$#" - count: 1 - path: Page/Backend/PaymentModule.php - - - - message: "#^Cannot call method find\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 1 - path: Page/Backend/ProductExportModule.php - - message: "#^Cannot call method getAttribute\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - - message: "#^Cannot call method getInput\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 1 - path: Page/Backend/ProductExportModule.php - - message: "#^Cannot call method setValue\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:addMinimumPriceFilter\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:addMinimumPriceFilter\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:blockSupplier\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:blockSupplier\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:clickEditIconForExport\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:clickEditIconForExport\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:fillConfigurationForm\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:fillConfigurationForm\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ProductExportModule.php @@ -911,12 +676,12 @@ parameters: path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:openExport\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:openExport\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:openExport\\(\\) has parameter \\$exportTitle with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ProductExportModule\\:\\:openExport\\(\\) has parameter \\$exportTitle with no type specified\\.$#" count: 1 path: Page/Backend/ProductExportModule.php @@ -925,28 +690,23 @@ parameters: count: 1 path: Page/Backend/ProductExportModule.php - - - message: "#^Parameter \\#1 \\$formParent of method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:fillExtJsForm\\(\\) expects Shopware\\\\Element\\\\Backend\\\\Window, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/ProductExportModule.php - - message: "#^Parameter \\#1 \\$value of method Behat\\\\Mink\\\\Element\\\\NodeElement\\:\\:setValue\\(\\) expects array\\|bool\\|string, int given\\.$#" count: 1 path: Page/Backend/ProductExportModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\SettingsModule\\:\\:clickOnMenuElement\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\SettingsModule\\:\\:clickOnMenuElement\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/SettingsModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\SettingsModule\\:\\:clickOnSettingsMenuElement\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\SettingsModule\\:\\:clickOnSettingsMenuElement\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/SettingsModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\SettingsModule\\:\\:fillShopConfigurationForm\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\SettingsModule\\:\\:fillShopConfigurationForm\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/SettingsModule.php @@ -961,22 +721,7 @@ parameters: path: Page/Backend/ShippingModule.php - - message: "#^Cannot call method find\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Cannot call method findButton\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 2 - path: Page/Backend/ShippingModule.php - - - - message: "#^Cannot call method getInput\\(\\) on Shopware\\\\Element\\\\Backend\\\\Window\\|null\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:activateCountries\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:activateCountries\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ShippingModule.php @@ -1001,12 +746,12 @@ parameters: path: Page/Backend/ShippingModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:clickAddShippingMethodButton\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:clickAddShippingMethodButton\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ShippingModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:createShippingMethodIfNotExists\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:createShippingMethodIfNotExists\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ShippingModule.php @@ -1016,12 +761,12 @@ parameters: path: Page/Backend/ShippingModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:deleteShippingMethod\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:deleteShippingMethod\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ShippingModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:emptyShippingCostConfiguration\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:emptyShippingCostConfiguration\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ShippingModule.php @@ -1046,7 +791,7 @@ parameters: path: Page/Backend/ShippingModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:fillCell\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:fillCell\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/ShippingModule.php @@ -1061,47 +806,22 @@ parameters: path: Page/Backend/ShippingModule.php - - message: "#^Parameter \\#1 \\$editor of method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:activateCountries\\(\\) expects Behat\\\\Mink\\\\Element\\\\NodeElement, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Parameter \\#1 \\$editor of method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:activatePaymentMethods\\(\\) expects Behat\\\\Mink\\\\Element\\\\NodeElement, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Parameter \\#1 \\$editor of method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:emptyShippingCostConfiguration\\(\\) expects Shopware\\\\Element\\\\Backend\\\\Window, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Parameter \\#1 \\$editor of method Shopware\\\\Page\\\\Backend\\\\ShippingModule\\:\\:getShippingCostCell\\(\\) expects Behat\\\\Mink\\\\Element\\\\NodeElement, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Parameter \\#1 \\$formParent of method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:fillExtJsForm\\(\\) expects Shopware\\\\Element\\\\Backend\\\\Window, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/ShippingModule.php - - - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\SystemInfoModule\\:\\:checkRequirements\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\SystemInfoModule\\:\\:checkRequirements\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/SystemInfoModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:deleteVoucher\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:deleteVoucher\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/VoucherModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:deleteVoucher\\(\\) has parameter \\$name with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:deleteVoucher\\(\\) has parameter \\$name with no type specified\\.$#" count: 1 path: Page/Backend/VoucherModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:fillVoucherEditorFormWith\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:fillVoucherEditorFormWith\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/VoucherModule.php @@ -1111,172 +831,37 @@ parameters: path: Page/Backend/VoucherModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:openEditFormForVoucher\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:openEditFormForVoucher\\(\\) has no return type specified\\.$#" count: 1 path: Page/Backend/VoucherModule.php - - message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:openEditFormForVoucher\\(\\) has parameter \\$name with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Backend\\\\VoucherModule\\:\\:openEditFormForVoucher\\(\\) has parameter \\$name with no type specified\\.$#" count: 1 path: Page/Backend/VoucherModule.php - - - message: "#^Parameter \\#1 \\$formParent of method Shopware\\\\Page\\\\Backend\\\\BackendModule\\:\\:fillExtJsForm\\(\\) expects Shopware\\\\Element\\\\Backend\\\\Window, Shopware\\\\Element\\\\Backend\\\\Window\\|null given\\.$#" - count: 1 - path: Page/Backend/VoucherModule.php - - - - message: "#^Cannot call method hasClass\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:assertNotNull\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:assertNotNull\\(\\) has parameter \\$element with no typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:clickOnElementWhenReady\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:has\\(\\) has parameter \\$locator with no value type specified in iterable type array\\.$#" count: 1 path: Page/ContextAwarePage.php - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:spin\\(\\) has parameter \\$lambda with no typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:spin\\(\\) should return bool but return statement is missing\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:spinWithNoException\\(\\) has parameter \\$lambda with no typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForClassNotPresent\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForModalOverlayClosed\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForSelectorInvisible\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForSelectorNotPresent\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForSelectorPresent\\(\\) should return Behat\\\\Mink\\\\Element\\\\NodeElement but returns Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForSelectorVisible\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForText\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForTextNotPresent\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForXpathElementPresent\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForXpathElementPresent\\(\\) has parameter \\$xpath with no typehint specified\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitIfSelectorPresent\\(\\) should return Behat\\\\Mink\\\\Element\\\\NodeElement but returns Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Parameter \\#1 \\$object of function get_class expects object, null given\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Parameter \\#2 \\$locator of method Shopware\\\\Page\\\\ContextAwarePage\\:\\:waitForSelectorInvisible\\(\\) expects string, Shopware\\\\Component\\\\XpathBuilder\\\\BaseXpathBuilder given\\.$#" - count: 1 - path: Page/ContextAwarePage.php - - - - message: "#^Cannot call method check\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Frontend/Account.php - - message: "#^Cannot call method click\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 path: Page/Frontend/Account.php - - message: "#^Cannot call method selectOption\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Frontend/Account.php - - - - message: "#^Cannot call method setValue\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Frontend/Account.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:fillForm\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Frontend/Account.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:fillForm\\(\\) has parameter \\$formData with no value type specified in iterable type array\\.$#" - count: 1 - path: Page/Frontend/Account.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:getElementByName\\(\\) never returns null so it can be removed from the return typehint\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:login\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Account.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:login\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:logout\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Account.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:logout\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Frontend/Account.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:register\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Account\\:\\:register\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Account.php @@ -1296,17 +881,17 @@ parameters: path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:addArticle\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:addArticle\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:addVoucher\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:addVoucher\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:assertCartPositionListsAreEqual\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:assertCartPositionListsAreEqual\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php @@ -1316,17 +901,17 @@ parameters: path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:checkPositionCountAndCartSum\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:checkPositionCountAndCartSum\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:emptyCart\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:emptyCart\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:fillCartWithProducts\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:fillCartWithProducts\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php @@ -1336,22 +921,22 @@ parameters: path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:getCssSelectors\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:getCssSelectors\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:getXPathSelectors\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:getXPathSelectors\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:hasCartProductWithQuantity\\(\\) has parameter \\$number with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:hasCartProductWithQuantity\\(\\) has parameter \\$number with no type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:hasCartProductWithQuantity\\(\\) has parameter \\$quantity with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:hasCartProductWithQuantity\\(\\) has parameter \\$quantity with no type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php @@ -1366,22 +951,22 @@ parameters: path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:proceedToOrderConfirmation\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:proceedToOrderConfirmation\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:removeCartPositionAtIndex\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:removeCartPositionAtIndex\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:toFloat\\(\\) has parameter \\$string with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:toFloat\\(\\) has parameter \\$string with no type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:validateCart\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:validateCart\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php @@ -1391,15 +976,10 @@ parameters: path: Page/Frontend/CheckoutCart.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:verifyPage\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutCart\\:\\:verifyPage\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutCart.php - - - message: "#^Cannot call method check\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Frontend/CheckoutConfirm.php - - message: "#^Cannot call method click\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" count: 1 @@ -1411,27 +991,7 @@ parameters: path: Page/Frontend/CheckoutConfirm.php - - message: "#^Cannot call method selectOption\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Frontend/CheckoutConfirm.php - - - - message: "#^Cannot call method setValue\\(\\) on Behat\\\\Mink\\\\Element\\\\NodeElement\\|null\\.$#" - count: 1 - path: Page/Frontend/CheckoutConfirm.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:fillForm\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Frontend/CheckoutConfirm.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:fillForm\\(\\) has parameter \\$formData with no value type specified in iterable type array\\.$#" - count: 1 - path: Page/Frontend/CheckoutConfirm.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:fillOutRegistrationForm\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:fillOutRegistrationForm\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutConfirm.php @@ -1441,12 +1001,7 @@ parameters: path: Page/Frontend/CheckoutConfirm.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:getElementByName\\(\\) never returns null so it can be removed from the return typehint\\.$#" - count: 1 - path: Page/Frontend/CheckoutConfirm.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:proceedToCheckout\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutConfirm\\:\\:proceedToCheckout\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutConfirm.php @@ -1456,27 +1011,27 @@ parameters: path: Page/Frontend/CheckoutShippingPayment.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:changePaymentMethodTo\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:changePaymentMethodTo\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutShippingPayment.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectPaymentMethod\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectPaymentMethod\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutShippingPayment.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectPaymentMethod\\(\\) has parameter \\$paymentMethod with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectPaymentMethod\\(\\) has parameter \\$paymentMethod with no type specified\\.$#" count: 1 path: Page/Frontend/CheckoutShippingPayment.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectShippingMethod\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectShippingMethod\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/CheckoutShippingPayment.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectShippingMethod\\(\\) has parameter \\$shippingMethod with no typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:selectShippingMethod\\(\\) has parameter \\$shippingMethod with no type specified\\.$#" count: 1 path: Page/Frontend/CheckoutShippingPayment.php @@ -1486,27 +1041,22 @@ parameters: path: Page/Frontend/CheckoutShippingPayment.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\CheckoutShippingPayment\\:\\:waitForJsOverlayToClose\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Frontend/CheckoutShippingPayment.php - - - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:checkBasePrice\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:checkBasePrice\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Detail.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:checkGraduatedPrice\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:checkGraduatedPrice\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Detail.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:toBasket\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:toBasket\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Detail.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:waitForOverlayToDisappear\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Detail\\:\\:waitForOverlayToDisappear\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Detail.php @@ -1536,7 +1086,7 @@ parameters: path: Page/Frontend/Detail.php - - message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Index\\:\\:getXPathSelectors\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Frontend\\\\Index\\:\\:getXPathSelectors\\(\\) has no return type specified\\.$#" count: 1 path: Page/Frontend/Index.php @@ -1546,37 +1096,37 @@ parameters: path: Page/Frontend/Search.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:advance\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:advance\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:checkIfDisabled\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:checkIfDisabled\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:checkIfShopIsAvailable\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:checkIfShopIsAvailable\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:checkRequiredFields\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:checkRequiredFields\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:clickOnElementToSkip\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:clickOnElementToSkip\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:clickOnElementWithText\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:clickOnElementWithText\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:fillInAndSubmitForm\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:fillInAndSubmitForm\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php @@ -1586,27 +1136,27 @@ parameters: path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:getCssSelectors\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:getCssSelectors\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:getXPathSelectors\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:getXPathSelectors\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:returnToPreviousDbPage\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:returnToPreviousDbPage\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:tickCheckbox\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:tickCheckbox\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:tickRadioButtonOption\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Installer\\\\InstallerIndex\\:\\:tickRadioButtonOption\\(\\) has no return type specified\\.$#" count: 1 path: Page/Installer/InstallerIndex.php @@ -1616,32 +1166,11 @@ parameters: path: Page/Installer/InstallerIndex.php - - message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:advance\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:getCssSelectors\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: Page/Updater/UpdaterIndex.php - - message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:clickOnDbStart\\(\\) has no return typehint specified\\.$#" + message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:getXPathSelectors\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: Page/Updater/UpdaterIndex.php - - - - message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:finishCleanup\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Updater/UpdaterIndex.php - - - - message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:getCssSelectors\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Updater/UpdaterIndex.php - - - - message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:getXPathSelectors\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Updater/UpdaterIndex.php - - - - message: "#^Method Shopware\\\\Page\\\\Updater\\\\UpdaterIndex\\:\\:handleUpdateAssets\\(\\) has no return typehint specified\\.$#" - count: 1 - path: Page/Updater/UpdaterIndex.php - diff --git a/tests/phpstan.neon b/tests/phpstan.neon index b07801b..96e2fcf 100644 --- a/tests/phpstan.neon +++ b/tests/phpstan.neon @@ -1,12 +1,13 @@ includes: - - phpstan-baseline.neon + - phpstan-baseline.neon + - vendor/phpstan/phpstan/conf/bleedingEdge.neon parameters: level: 8 + phpVersion: 70400 paths: - Component - Context - Element - Page - ignoreErrors: - - '#has parameter \$.* with no value type specified in iterable type Behat\\Gherkin\\Node\\TableNode#' + - ../www diff --git a/www/assetgenerator/classes/ImageConfig.php b/www/assetgenerator/classes/ImageConfig.php index c42a9e3..4eb317b 100644 --- a/www/assetgenerator/classes/ImageConfig.php +++ b/www/assetgenerator/classes/ImageConfig.php @@ -1,133 +1,71 @@ imageWidth)) { - return 640; - } + private int $imageWidth = 640; + + private int $imageHeight = 480; + + private int $maxLineWidth = 15; + + private int $colorDeviation = 20; + private string $text = ''; + + public function getImageWidth(): int + { return $this->imageWidth; } - /** - * @param int $imageWidth - */ - public function setImageWidth($imageWidth) + public function setImageWidth(int $imageWidth): void { $this->imageWidth = $imageWidth; } - /** - * @return int - */ - public function getImageHeight() + public function getImageHeight(): int { - if (!\is_int($this->imageHeight)) { - return 480; - } - return $this->imageHeight; } - /** - * @param int $imageHeight - */ - public function setImageHeight($imageHeight) + public function setImageHeight(int $imageHeight): void { $this->imageHeight = $imageHeight; } - /** - * @return int - */ - public function getMaxLineWidth() + public function getMaxLineWidth(): int { - if (!\is_int($this->maxLineWidth)) { - return 15; - } - return $this->maxLineWidth; } - /** - * @param int $maxLineWidth - */ - public function setMaxLineWidth($maxLineWidth) + public function setMaxLineWidth(int $maxLineWidth): void { $this->maxLineWidth = $maxLineWidth; } - /** - * @return int - */ - public function getColorDeviation() + public function getColorDeviation(): int { - if (!\is_int($this->colorDeviation)) { - return 20; - } - return $this->colorDeviation; } - /** - * @param int $colorDeviation - */ - public function setColorDeviation($colorDeviation) + public function setColorDeviation(int $colorDeviation): void { $this->colorDeviation = $colorDeviation; } - /** - * @return float - */ - public function getSeed() + public function getSeed(): float { return (float) microtime() * 1000000; } - /** - * @return string - */ - public function getText() + public function getText(): string { - return $this->text ?: ''; + return $this->text; } - /** - * @param string $text - */ - public function setText($text) + public function setText(string $text): void { - $this->text = (string) $text; + $this->text = $text; } } diff --git a/www/assetgenerator/classes/RandomImageGenerator.php b/www/assetgenerator/classes/RandomImageGenerator.php index ef7adc5..b9ae8a3 100644 --- a/www/assetgenerator/classes/RandomImageGenerator.php +++ b/www/assetgenerator/classes/RandomImageGenerator.php @@ -1,9 +1,14 @@ generateImageData(); } + /** + * @return resource + */ public static function create(ImageConfig $imageConfig) { - $generator = new self($imageConfig); - - return $generator->getImageData(); + return (new self($imageConfig))->getImageData(); } + /** + * @return resource + */ public function getImageData() { return $this->image; } - private function generateImageData() + private function generateImageData(): void { $width = $this->config->getImageWidth(); $height = $this->config->getImageHeight(); $text = $this->config->getText(); $squareSize = rand(1, 3) * 10 + \strlen($text); $canvas = imagecreatetruecolor($width, $height); + if ($canvas === false) { + throw new RuntimeException('Could not create image'); + } for ($y = 0; $y < $height / $squareSize; ++$y) { for ($x = 0; $x < $width / $squareSize; ++$x) { $color = imagecolorallocate($canvas, rand(0, 255), rand(0, 255), rand(0, 255)); + if (!\is_int($color)) { + throw new RuntimeException('Could not create color'); + } imagefilledrectangle($canvas, $x * $squareSize, $y * $squareSize, ($x * $squareSize) + $squareSize, ($y * $squareSize) + $squareSize, $color); } } $font = 'fonts/OpenSans-Regular.ttf'; $black = imagecolorallocate($canvas, 0, 0, 0); + if (!\is_int($black)) { + throw new RuntimeException('Could not create black color'); + } $white = imagecolorallocate($canvas, 255, 255, 255); + if (!\is_int($white)) { + throw new RuntimeException('Could not create white color'); + } $font_size = 72; - $boundingBox = $this->imagettfbboxextended($font_size + 3, 0, $font, $text); + $boundingBox = $this->imagettfbboxextended($font_size + 3, $font, $text); while ($boundingBox['width'] > $width || $boundingBox['height'] > $height) { --$font_size; - $boundingBox = $this->imagettfbboxextended($font_size, 0, $font, $text); + $boundingBox = $this->imagettfbboxextended($font_size, $font, $text); } - $this->imagettfstroketext($canvas, $font_size, 0, $boundingBox['x'], $boundingBox['y'], $white, $black, $font, $text, 2); + $this->imagettfstroketext($canvas, $font_size, $boundingBox['x'], $boundingBox['y'], $white, $black, $font, $text); $this->image = $canvas; } - private function imagettfstroketext(&$image, $size, $angle, $x, $y, &$textcolor, &$strokecolor, $fontfile, $text, $px) - { - for ($c1 = $x - abs($px); $c1 <= ($x + abs($px)); ++$c1) { - for ($c2 = $y - abs($px); $c2 <= ($y + abs($px)); ++$c2) { - imagettftext($image, $size, $angle, $c1, $c2, $strokecolor, $fontfile, $text); + /** + * @param resource $image + */ + private function imagettfstroketext( + $image, + int $size, + int $x, + int $y, + int $textcolor, + int $strokecolor, + string $fontfile, + string $text + ): void { + for ($c1 = $x - abs(2); $c1 <= ($x + abs(2)); ++$c1) { + for ($c2 = $y - abs(2); $c2 <= ($y + abs(2)); ++$c2) { + imagettftext($image, $size, 0, $c1, $c2, $strokecolor, $fontfile, $text); } } - return imagettftext($image, $size, $angle, $x, $y, $textcolor, $fontfile, $text); + imagettftext($image, $size, 0, $x, $y, $textcolor, $fontfile, $text); } - private function imagettfbboxextended($size, $angle, $fontfile, $text) + private function imagettfbboxextended(int $size, string $fontfile, string $text): array { - $bbox = imagettfbbox($size, $angle, $fontfile, $text); + $bbox = imagettfbbox($size, 0, $fontfile, $text); + if (!\is_array($bbox)) { + throw new RuntimeException('Could not create image box'); + } if ($bbox[0] >= -1) { $bbox['x'] = abs($bbox[0] + 1) * -1; diff --git a/www/assetgenerator/index.php b/www/assetgenerator/index.php index 20551c9..111f80c 100644 --- a/www/assetgenerator/index.php +++ b/www/assetgenerator/index.php @@ -1,6 +1,8 @@ Date: Mon, 21 Aug 2023 10:52:56 +0200 Subject: [PATCH 3/5] fix: Remove docker references from readme file --- README.md | 111 +++++++----------------------------------------------- 1 file changed, 13 insertions(+), 98 deletions(-) diff --git a/README.md b/README.md index cfd59b4..e5da75a 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,6 @@ This project automates rudimentary QA tasks to ensure the most basic features of ## Installation -This project is only supported on Linux and requires that both [docker](https://docs.docker.com/engine/installation/linux/) -and [docker compose](https://docs.docker.com/compose/) are available on the system. - Clone the project and copy the following .dist files: ```bash @@ -28,42 +25,6 @@ Create a token in your personal gitlab area and use it as password. ## Running tests -Running the tests is as easy as calling the appropriate shell scripts in the `./docker` directory. -Please note that these scripts need a build key as first argument. -For local testing purposes, you can simply pass any arbitrary string as an argument such as: - -* `./stage_installer.sh testing` Tests install functionality -* `./stage_updater.sh testing` Tests update functionality -* `./stage_general.sh testing` Regular shop functionality - -## Running single features - -For local development, it is very useful to be able to run single features or tests without running a whole stage. -That is what the `./docker/_local_manual_testing.sh` script is for. -It sets up the same environment the stages execute in but doesn't execute a single test on its own. -After calling the script you can run specific features manually. -It is recommended to use an alias like the following: - - ```bash -alias runmink='docker compose -f docker/docker-compose.yml -f docker/docker-compose.local.yml run --rm behat --format=pretty --out=std --format=junit --out=/logs/mink $1' - ``` - - Then you can run a specific feature by simply calling: - - ```bash -runmink /tests/features/backend_customers.feature - ``` -## The helper script - -Inside the root directory you will find a helper script that can do most of the aforementioned things for you to spare you the trouble of remembering everything. -The script offers the following methods -* `./helper.sh installmink` installs a mink setup based on the install zip inside the `files/` directory -* `./helper.sh delmink` stops and removes the installation -* `./helper.sh runmink` allows you to run tests e.g `./helper.sh runmink tests/features/backend_article.feature` -## Running tests without Docker - -If you don't want to use Docker, you can still execute `behat` manually. - - Execute `composer install` in `tests`. - Make sure that you have installed Selenium on your maschine like described here: https://github.com/shopware/shopware/tree/5.7/tests/Mink#selenium - Adjust the value `assets_url` in the `tests/.env` file @@ -78,28 +39,6 @@ If you don't want to use Docker, you can still execute `behat` manually. Now you can execute `./behat` in the `tests` directory for the whole test suite. Or use `./behat features/frontend_account.feature` for a specific feature. - -## Debugging and Development - -### Remote debugging using VNC Sessions - -When run in development mode (by using `./docker/_local_manual_testing.sh`), -Selenium is run in debug mode and exposes port 5900. -It is necessary to forward this port from the docker container to the host (your development machine), -which is already done in `./docker/docker-compose.local.yml`. -That means if you use the alias supplied above for running your tests, -you can use any VNC client to connect to `localhost:5900`. -When prompted for a password, enter `secret`. - -#### Note for Windows user - -If you develop on Windows and run the test suite in a virtual machine, -make sure you also forward the port from your VM to your host machine. -With Vagrant, add the following port forwarding rule to your Vagrantfile and restart your VM: - -``` - config.vm.network "forwarded_port", guest: 5900, host: 5900 -``` ## Writing Tests @@ -108,10 +47,10 @@ With Vagrant, add the following port forwarding rule to your Vagrantfile and res The `*.feature` files should only contain human-readable, english sentences, assumptions and actions. The `*Context.php` files all live in the `Shopware\Context` namespace -and may only contain step definitions for steps used the feature files. -All logic should be handled by the `Pages`. -Step definitions should be short and expressive. -Only use regular expressions in step name definitions when absolutely necessary. +and may only contain step definitions for steps used the feature files. +All logic should be handled by the `Pages`. +Step definitions should be short and expressive. +Only use regular expressions in step name definitions when absolutely necessary. Most of the time it might be better to refactor steps into smaller sub-steps that only handle one single functionality. ### Using Tags @@ -120,7 +59,7 @@ Additional functionality for tests can be enabled by tagging either single scena #### @knownFailing -This tag prevents features from being tested completely, +This tag prevents features from being tested completely, useful to be able to commit WIP features that would otherwise cause a breaking CI build. #### @isolated @@ -132,8 +71,8 @@ Per default, the database is being reset to a clean state after every feature. The `Shopware\Component\XpathBuilder` namespace contains a few classes that can be helpful when writing tests that rely on complicated xpath queries. -It is recommended to use either the `FrontendXpathBuilder` or the `BackendXpathBuilder`, -which both inherit from the `BaseXpathBuilder` but additionally provide useful shortcuts for often-needed functionality, +It is recommended to use either the `FrontendXpathBuilder` or the `BackendXpathBuilder`, +which both inherit from the `BaseXpathBuilder` but additionally provide useful shortcuts for often-needed functionality, like e.g. selecting an ExtJS window by its title. #### Using the BaseXpathBuilder @@ -160,18 +99,18 @@ $builder ``` -The BaseXpathBuilder comes pre-configured with a single `/` as its path. -There is *no implicit resetting* with the base builder. -If you configured a path and want to reuse the same Builder-instance, -you need to call `$builder->reset()` on it again in order to reset the path to its default value. +The BaseXpathBuilder comes pre-configured with a single `/` as its path. +There is *no implicit resetting* with the base builder. +If you configured a path and want to reuse the same Builder-instance, +you need to call `$builder->reset()` on it again in order to reset the path to its default value. It is recommended that you explicitly call `->reset()` explicitly at the beginning of every xpath build to mitigate any possible, hard-to-debug mistakes. All builder support building xpaths fluently by chaining calls such as `->child([...])`, `->descendant([...])` or`->followingSibling([...])`. Those public methods all have the same signature of `->child($tag, $predicates, $index)`, with the latter two being optional. To retrieve the currently configured xpath, call the `->getXpath()` method. -Please note that in contrast to the LegacyXpathBuilder, -the BaseXpathBuilder() *does not* implicitly reset the builder when you get the path. +Please note that in contrast to the LegacyXpathBuilder, +the BaseXpathBuilder() *does not* implicitly reset the builder when you get the path. There is a static shorthand method useful for creating xpaths inline: @@ -221,27 +160,3 @@ The asset generator is available over HTTP at `http://assetgenerator/`: ``` Please note that the size parameter is completely optional. - -## Docker Container Reference - -### Apache container -* -* Runs PHP7 and Apache Server -* Serves Shopware installation from `/var/www/shopware` -* Serves asset generator from `/var/www/assetgenerator` - -### MySQL container -* -* Provides mariaDB database named `shopware` for user `shopware` with password `shopware` -* Root access for user `root` with password `toor` - -### Selenium container -* -* Uses the selenium/standalone-chrome Docker image -* Exposes port 5900 in development mode (`docker-compose.local.yml`) for remote debugging via VNC - -### SMTP container -* -* Based on mailhog Docker image -* Configured to receive all mails from apache container -* Refer to [Mailhog's API Documentation](https://github.com/mailhog/MailHog/blob/master/docs/APIv2.md) From 091e25b80878f14808b6183344c2f5a753b5290a Mon Sep 17 00:00:00 2001 From: Michael Telgmann Date: Mon, 21 Aug 2023 10:53:23 +0200 Subject: [PATCH 4/5] fix: Unify code style of YAML files --- .editorconfig | 9 ++ .github/workflows/test_bluegreen.yml | 209 +++++++++++++-------------- .github/workflows/test_general.yml | 55 ++++--- .github/workflows/test_installer.yml | 161 ++++++++++----------- .github/workflows/test_update.yml | 153 ++++++++++---------- 5 files changed, 296 insertions(+), 291 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..2ff010f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +end_of_line = lf +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.github/workflows/test_bluegreen.yml b/.github/workflows/test_bluegreen.yml index 20df233..9284155 100644 --- a/.github/workflows/test_bluegreen.yml +++ b/.github/workflows/test_bluegreen.yml @@ -1,108 +1,107 @@ on: - push: + push: jobs: - setup-shopware: - name: Blue Green Shopware - runs-on: ubuntu-latest - - container: - image: ghcr.io/shopware5/docker-images-testing/zip:shopware_5.6.10_install_5.6.10_b9471cf7c3f30dfc05d7c959f555c2a8d1c24420_5.7_7.4_none - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} - - steps: - - run: | - apt-get update - apt-get install -y ca-certificates curl gnupg lsb-release - mkdir -m 0755 -p /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list - apt-get update - apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin - - - run: apt-get install -y unzip - - - uses: actions/checkout@v3 - - - run: docker run -d --network=container:$(docker ps -q) --name chrome -e LANGUAGE=de --shm-size 3g selenium/standalone-chrome:94.0 - - - name: Exnable extra services - run: | - cp -r ./www/assetgenerator /var/www/assetgenerator - cp -r ./www/updates /var/www/updates - cp .github/sites-enabled/* /etc/nginx/sites-enabled - echo "127.0.0.1 assetgenerator.example" >> /etc/hosts - echo "127.0.0.1 mysql" >> /etc/hosts - echo "127.0.0.1 updates.example" >> /etc/hosts - echo "127.0.0.1 cdn.example" >> /etc/hosts - echo "127.0.0.1 shopware.test" >> /etc/hosts - echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts - - - run: | - /usr/bin/supervisord -c /etc/supervisord.conf & - bash .github/wait-for-mysql.sh - - - name: Download latest Shopware - id: download-artifact - uses: dawidd6/action-download-artifact@v2 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - workflow: create-release.yml - workflow_conclusion: success - branch: 5.7 - repo: shopware5/shopware - - - name: Unzip artifacts - run: | - cd artifact && mv install*.zip ../update.zip && cd .. - unzip update.zip -d newInstallation - - - name: Install database - run: | - mysql -u root -proot -e 'DROP DATABASE shopware; CREATE DATABASE shopware' - mysql -u root -proot shopware --default-character-set=utf8 < ./newInstallation/recovery/install/data/sql/install.sql - mysql -u root -proot shopware -e 'TRUNCATE s_core_snippets' - mysql -u root -proot shopware --default-character-set=utf8 < /shopware/recovery/install/data/sql/snippets.sql - mysql -u root -proot shopware -e 'UPDATE s_core_shops SET name = "Demo shop" WHERE id = 1' - - - name: Setup shop - run: | - /shopware/bin/console sw:theme:initialize - /shopware/bin/console sw:admin:create --name="Demo" --email="demo@demo.de" --username="demo" --password="demo" --locale=de_DE -n - - - run: mysql -u root -proot shopware -e 'UPDATE s_core_shops SET host = "shopware.test" WHERE id = 1;' - - - name: Configure Shopware - run: bash ./.github/configure-sw-installation.sh - - - name: Copy files - run: | - cp ./tests/.env.dist ./tests/.env - cp ./tests/behat.yml.dist ./tests/behat.yml - shell: bash - - - name: Adjust config all files - run: | - cp ./.github/php/config_testing.php /shopware/config_testing.php - - - run: | - mysqldump -u root -proot shopware > clean_db.sql - - - name: Chmod all files - run: | - chmod -R 777 /shopware - - - name: Run Mink - run: | - cd tests - composer install - vendor/bin/behat -vv --format=pretty --out=std --tags '~@updater&&~@installer&&~@knownFailing&&~@shopware52' - - - name: Archive results - if: always() - uses: actions/upload-artifact@v3 - with: - name: build data - path: tests/logs/mink + setup-shopware: + name: Blue Green Shopware + runs-on: ubuntu-latest + container: + image: ghcr.io/shopware5/docker-images-testing/zip:shopware_5.6.10_install_5.6.10_b9471cf7c3f30dfc05d7c959f555c2a8d1c24420_5.7_7.4_none + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + + steps: + - run: | + apt-get update + apt-get install -y ca-certificates curl gnupg lsb-release + mkdir -m 0755 -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list + apt-get update + apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin + + - run: apt-get install -y unzip + + - uses: actions/checkout@v3 + + - run: docker run -d --network=container:$(docker ps -q) --name chrome -e LANGUAGE=de --shm-size 3g selenium/standalone-chrome:94.0 + + - name: Exnable extra services + run: | + cp -r ./www/assetgenerator /var/www/assetgenerator + cp -r ./www/updates /var/www/updates + cp .github/sites-enabled/* /etc/nginx/sites-enabled + echo "127.0.0.1 assetgenerator.example" >> /etc/hosts + echo "127.0.0.1 mysql" >> /etc/hosts + echo "127.0.0.1 updates.example" >> /etc/hosts + echo "127.0.0.1 cdn.example" >> /etc/hosts + echo "127.0.0.1 shopware.test" >> /etc/hosts + echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts + + - run: | + /usr/bin/supervisord -c /etc/supervisord.conf & + bash .github/wait-for-mysql.sh + + - name: Download latest Shopware + id: download-artifact + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: create-release.yml + workflow_conclusion: success + branch: 5.7 + repo: shopware5/shopware + + - name: Unzip artifacts + run: | + cd artifact && mv install*.zip ../update.zip && cd .. + unzip update.zip -d newInstallation + + - name: Install database + run: | + mysql -u root -proot -e 'DROP DATABASE shopware; CREATE DATABASE shopware' + mysql -u root -proot shopware --default-character-set=utf8 < ./newInstallation/recovery/install/data/sql/install.sql + mysql -u root -proot shopware -e 'TRUNCATE s_core_snippets' + mysql -u root -proot shopware --default-character-set=utf8 < /shopware/recovery/install/data/sql/snippets.sql + mysql -u root -proot shopware -e 'UPDATE s_core_shops SET name = "Demo shop" WHERE id = 1' + + - name: Setup shop + run: | + /shopware/bin/console sw:theme:initialize + /shopware/bin/console sw:admin:create --name="Demo" --email="demo@demo.de" --username="demo" --password="demo" --locale=de_DE -n + + - run: mysql -u root -proot shopware -e 'UPDATE s_core_shops SET host = "shopware.test" WHERE id = 1;' + + - name: Configure Shopware + run: bash ./.github/configure-sw-installation.sh + + - name: Copy files + run: | + cp ./tests/.env.dist ./tests/.env + cp ./tests/behat.yml.dist ./tests/behat.yml + shell: bash + + - name: Adjust config all files + run: | + cp ./.github/php/config_testing.php /shopware/config_testing.php + + - run: | + mysqldump -u root -proot shopware > clean_db.sql + + - name: Chmod all files + run: | + chmod -R 777 /shopware + + - name: Run Mink + run: | + cd tests + composer install + vendor/bin/behat -vv --format=pretty --out=std --tags '~@updater&&~@installer&&~@knownFailing&&~@shopware52' + + - name: Archive results + if: always() + uses: actions/upload-artifact@v3 + with: + name: build data + path: tests/logs/mink diff --git a/.github/workflows/test_general.yml b/.github/workflows/test_general.yml index 35c8f84..3a62cb3 100644 --- a/.github/workflows/test_general.yml +++ b/.github/workflows/test_general.yml @@ -31,15 +31,15 @@ jobs: id: download-artifact uses: dawidd6/action-download-artifact@v2 with: - github_token: ${{secrets.GITHUB_TOKEN}} - workflow: create-release.yml - workflow_conclusion: success - branch: 5.7 - repo: shopware5/shopware + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: create-release.yml + workflow_conclusion: success + branch: 5.7 + repo: shopware5/shopware - name: Unzip artifacts run: | - cd artifact && mv install*.zip ../update.zip + cd artifact && mv install*.zip ../update.zip - name: Download last update package and unzip it run: | @@ -49,17 +49,17 @@ jobs: run: | cp ./.github/php/config_testing.php /shopware/config_testing.php - - name: Exnable extra services - run: | - cp -r ./www/assetgenerator /var/www/assetgenerator - cp -r ./www/updates /var/www/updates - cp .github/sites-enabled/* /etc/nginx/sites-enabled - echo "127.0.0.1 assetgenerator.example" >> /etc/hosts - echo "127.0.0.1 mysql" >> /etc/hosts - echo "127.0.0.1 updates.example" >> /etc/hosts - echo "127.0.0.1 cdn.example" >> /etc/hosts - echo "127.0.0.1 shopware.test" >> /etc/hosts - echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts + - name: Exnable extra services + run: | + cp -r ./www/assetgenerator /var/www/assetgenerator + cp -r ./www/updates /var/www/updates + cp .github/sites-enabled/* /etc/nginx/sites-enabled + echo "127.0.0.1 assetgenerator.example" >> /etc/hosts + echo "127.0.0.1 mysql" >> /etc/hosts + echo "127.0.0.1 updates.example" >> /etc/hosts + echo "127.0.0.1 cdn.example" >> /etc/hosts + echo "127.0.0.1 shopware.test" >> /etc/hosts + echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts - run: | /usr/bin/supervisord -c /etc/supervisord.conf & @@ -68,29 +68,28 @@ jobs: - run: mysql -u root -proot -e "CREATE DATABASE shopware" - run: mysqladmin --user=root password 'root' - - name: Install shopware - run: | - php -d memory_limit=3G /shopware/recovery/install/index.php --no-interaction --db-name="shopware" --db-user="root" --db-password="root" --shop-locale="de_DE" --shop-host="shopware.test" --shop-currency="EUR" --admin-username="demo" --admin-password="demo" --admin-email="demo@demo.demo" --admin-locale="de_DE" --admin-name="Demouser" + - name: Install shopware + run: | + php -d memory_limit=3G /shopware/recovery/install/index.php --no-interaction --db-name="shopware" --db-user="root" --db-password="root" --shop-locale="de_DE" --shop-host="shopware.test" --shop-currency="EUR" --admin-username="demo" --admin-password="demo" --admin-email="demo@demo.demo" --admin-locale="de_DE" --admin-name="Demouser" - name: Chmod all files run: | - chmod -R 777 /shopware/var /shopware/web/cache /shopware/files + chmod -R 777 /shopware/var /shopware/web/cache /shopware/files - - name: Copy files - run: | - cp ./tests/.env.dist ./tests/.env - cp ./tests/behat.yml.dist ./tests/behat.yml - shell: bash + - name: Copy files + run: | + cp ./tests/.env.dist ./tests/.env + cp ./tests/behat.yml.dist ./tests/behat.yml + shell: bash - name: Configure Shopware run: bash ./.github/configure-sw-installation.sh - run: | - mysqldump -u root -proot shopware > clean_db.sql + mysqldump -u root -proot shopware > clean_db.sql - name: Run Mink run: | cd tests composer install vendor/bin/behat -vv --format=pretty --out=std --tags '~@updater&&~@installer&&~@knownFailing' - diff --git a/.github/workflows/test_installer.yml b/.github/workflows/test_installer.yml index 7092079..277d25e 100644 --- a/.github/workflows/test_installer.yml +++ b/.github/workflows/test_installer.yml @@ -3,9 +3,8 @@ on: jobs: setup-shopware: - name: Setup Shopware + name: General Shopware Tests runs-on: ubuntu-latest - container: image: ghcr.io/shopware5/docker-images-testing/running:shopware_5.7_8.0_7.4 credentials: @@ -13,82 +12,82 @@ jobs: password: ${{ secrets.github_token }} steps: - - run: | - apt-get update - apt-get install -y ca-certificates curl gnupg lsb-release - mkdir -m 0755 -p /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list - apt-get update - apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin - - - run: apt-get install -y unzip - - - uses: actions/checkout@v3 - - - run: docker run -d --network=container:$(docker ps -q) --name chrome -e LANGUAGE=de --shm-size 3g selenium/standalone-chrome:94.0 - - - name: Download latest Shopware - id: download-artifact - uses: dawidd6/action-download-artifact@v2 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - workflow: create-release.yml - workflow_conclusion: success - branch: 5.7 - repo: shopware5/shopware - - - name: Unzip artifacts - run: | - cd artifact && mv install*.zip ../update.zip - - - name: Download last update package and unzip it - run: | - unzip update.zip -d /shopware - - - name: Exnable extra services - run: | - cp -r ./www/assetgenerator /var/www/assetgenerator - cp -r ./www/updates /var/www/updates - cp .github/sites-enabled/* /etc/nginx/sites-enabled - echo "127.0.0.1 assetgenerator.example" >> /etc/hosts - echo "127.0.0.1 mysql" >> /etc/hosts - echo "127.0.0.1 updates.example" >> /etc/hosts - echo "127.0.0.1 cdn.example" >> /etc/hosts - echo "127.0.0.1 shopware.test" >> /etc/hosts - echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts - - - run: | - /usr/bin/supervisord -c /etc/supervisord.conf & - bash .github/wait-for-mysql.sh - - - run: mysqladmin --user=root password 'root' - - run: mysql -u root -proot -e "CREATE DATABASE shopware" - - - name: Adjust config all files - run: | - cp ./.github/php/config_testing.php /shopware/config_testing.php - cp ./.github/php/config.php /shopware/config.php - - - name: Copy files - run: | - cp ./tests/.env.dist ./tests/.env - cp ./tests/behat.yml.dist ./tests/behat.yml - shell: bash - - - name: Chmod all files - run: | - chmod -R 777 /shopware/ - - - name: Run Mink - run: | - cd tests - composer install - vendor/bin/behat -vv --format=pretty --out=std --tags '@installer&&~@knownFailing' - - - name: Archive results - if: always() - uses: actions/upload-artifact@v3 - with: - name: build data - path: tests/logs/mink + - run: | + apt-get update + apt-get install -y ca-certificates curl gnupg lsb-release + mkdir -m 0755 -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list + apt-get update + apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin + + - run: apt-get install -y unzip + + - uses: actions/checkout@v3 + + - run: docker run -d --network=container:$(docker ps -q) --name chrome -e LANGUAGE=de --shm-size 3g selenium/standalone-chrome:94.0 + + - name: Download latest Shopware + id: download-artifact + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: create-release.yml + workflow_conclusion: success + branch: 5.7 + repo: shopware5/shopware + + - name: Unzip artifacts + run: | + cd artifact && mv install*.zip ../update.zip + + - name: Download last update package and unzip it + run: | + unzip update.zip -d /shopware + + - name: Exnable extra services + run: | + cp -r ./www/assetgenerator /var/www/assetgenerator + cp -r ./www/updates /var/www/updates + cp .github/sites-enabled/* /etc/nginx/sites-enabled + echo "127.0.0.1 assetgenerator.example" >> /etc/hosts + echo "127.0.0.1 mysql" >> /etc/hosts + echo "127.0.0.1 updates.example" >> /etc/hosts + echo "127.0.0.1 cdn.example" >> /etc/hosts + echo "127.0.0.1 shopware.test" >> /etc/hosts + echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts + + - run: | + /usr/bin/supervisord -c /etc/supervisord.conf & + bash .github/wait-for-mysql.sh + + - run: mysqladmin --user=root password 'root' + - run: mysql -u root -proot -e "CREATE DATABASE shopware" + + - name: Adjust config all files + run: | + cp ./.github/php/config_testing.php /shopware/config_testing.php + cp ./.github/php/config.php /shopware/config.php + + - name: Copy files + run: | + cp ./tests/.env.dist ./tests/.env + cp ./tests/behat.yml.dist ./tests/behat.yml + shell: bash + + - name: Chmod all files + run: | + chmod -R 777 /shopware/ + + - name: Run Mink + run: | + cd tests + composer install + vendor/bin/behat -vv --format=pretty --out=std --tags '@installer&&~@knownFailing' + + - name: Archive results + if: always() + uses: actions/upload-artifact@v3 + with: + name: build data + path: tests/logs/mink diff --git a/.github/workflows/test_update.yml b/.github/workflows/test_update.yml index 6e2ff63..7925f09 100644 --- a/.github/workflows/test_update.yml +++ b/.github/workflows/test_update.yml @@ -5,7 +5,6 @@ jobs: setup-shopware: name: Update Shopware runs-on: ubuntu-latest - container: image: ghcr.io/shopware5/docker-images-testing/zip:shopware_5.6.10_install_5.6.10_b9471cf7c3f30dfc05d7c959f555c2a8d1c24420_5.7_7.4_none credentials: @@ -13,79 +12,79 @@ jobs: password: ${{ secrets.github_token }} steps: - - run: | - apt-get update - apt-get install -y ca-certificates curl gnupg lsb-release - mkdir -m 0755 -p /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list - apt-get update - apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin - - - run: apt-get install -y unzip - - - uses: actions/checkout@v3 - - - run: docker run -d --network=container:$(docker ps -q) --name chrome -e LANGUAGE=de --shm-size 3g selenium/standalone-chrome:94.0 - - - name: Exnable extra services - run: | - cp -r ./www/assetgenerator /var/www/assetgenerator - cp -r ./www/updates /var/www/updates - cp .github/sites-enabled/* /etc/nginx/sites-enabled - echo "127.0.0.1 assetgenerator.example" >> /etc/hosts - echo "127.0.0.1 mysql" >> /etc/hosts - echo "127.0.0.1 updates.example" >> /etc/hosts - echo "127.0.0.1 cdn.example" >> /etc/hosts - echo "127.0.0.1 shopware.test" >> /etc/hosts - echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts - - - name: Download last update package and unzip it - run: | - mkdir ./output - LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/shopware5/shopware/releases/latest) - LATEST_VERSION_ID=$(echo $LATEST_RELEASE | sed -e 's/.*"id":\([^",]*\).*/\1/') - ASSETS=$(curl -L -s -H 'Accept: application/json' https://api.github.com/repos/shopware5/shopware/releases/$LATEST_VERSION_ID/assets) - ARTIFACT_URL=$(echo $ASSETS | sed -e 's/.*"browser_download_url": "\([^",]*update[^",]*\)".*/\1/') - wget -O update.zip $ARTIFACT_URL - unzip -o update.zip -d /shopware - - - run: | - /usr/bin/supervisord -c /etc/supervisord.conf & - bash .github/wait-for-mysql.sh - - - run: mysql -u root -proot shopware -e 'UPDATE s_core_shops SET host = "shopware.test" WHERE id = 1;' - - - name: Copy files - run: | - cp ./tests/.env.dist ./tests/.env - cp ./tests/behat.yml.dist ./tests/behat.yml - shell: bash - - - name: Chmod all files - run: | - chmod -R 777 /shopware/var /shopware/web/cache /shopware/files - - - name: Adjust config all files - run: | - cp ./.github/php/config_testing.php /shopware/config_testing.php - - - run: | - mysqldump -u root -proot shopware > clean_db.sql - - - name: Chmod all files - run: | - chmod -R 777 /shopware - - - name: Run Mink - run: | - cd tests - composer install - vendor/bin/behat -vv --format=pretty --out=std --tags '@updater&&~@knownFailing' - - - name: Archive results - if: always() - uses: actions/upload-artifact@v3 - with: - name: build data - path: tests/logs/mink + - run: | + apt-get update + apt-get install -y ca-certificates curl gnupg lsb-release + mkdir -m 0755 -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list + apt-get update + apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin + + - run: apt-get install -y unzip + + - uses: actions/checkout@v3 + + - run: docker run -d --network=container:$(docker ps -q) --name chrome -e LANGUAGE=de --shm-size 3g selenium/standalone-chrome:94.0 + + - name: Exnable extra services + run: | + cp -r ./www/assetgenerator /var/www/assetgenerator + cp -r ./www/updates /var/www/updates + cp .github/sites-enabled/* /etc/nginx/sites-enabled + echo "127.0.0.1 assetgenerator.example" >> /etc/hosts + echo "127.0.0.1 mysql" >> /etc/hosts + echo "127.0.0.1 updates.example" >> /etc/hosts + echo "127.0.0.1 cdn.example" >> /etc/hosts + echo "127.0.0.1 shopware.test" >> /etc/hosts + echo "127.0.0.1 shopware-subshop-01.test" >> /etc/hosts + + - name: Download last update package and unzip it + run: | + mkdir ./output + LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/shopware5/shopware/releases/latest) + LATEST_VERSION_ID=$(echo $LATEST_RELEASE | sed -e 's/.*"id":\([^",]*\).*/\1/') + ASSETS=$(curl -L -s -H 'Accept: application/json' https://api.github.com/repos/shopware5/shopware/releases/$LATEST_VERSION_ID/assets) + ARTIFACT_URL=$(echo $ASSETS | sed -e 's/.*"browser_download_url": "\([^",]*update[^",]*\)".*/\1/') + wget -O update.zip $ARTIFACT_URL + unzip -o update.zip -d /shopware + + - run: | + /usr/bin/supervisord -c /etc/supervisord.conf & + bash .github/wait-for-mysql.sh + + - run: mysql -u root -proot shopware -e 'UPDATE s_core_shops SET host = "shopware.test" WHERE id = 1;' + + - name: Copy files + run: | + cp ./tests/.env.dist ./tests/.env + cp ./tests/behat.yml.dist ./tests/behat.yml + shell: bash + + - name: Chmod all files + run: | + chmod -R 777 /shopware/var /shopware/web/cache /shopware/files + + - name: Adjust config all files + run: | + cp ./.github/php/config_testing.php /shopware/config_testing.php + + - run: | + mysqldump -u root -proot shopware > clean_db.sql + + - name: Chmod all files + run: | + chmod -R 777 /shopware + + - name: Run Mink + run: | + cd tests + composer install + vendor/bin/behat -vv --format=pretty --out=std --tags '@updater&&~@knownFailing' + + - name: Archive results + if: always() + uses: actions/upload-artifact@v3 + with: + name: build data + path: tests/logs/mink From 74635938ddc51ca32354d9df7e69b8ce374db788 Mon Sep 17 00:00:00 2001 From: Michael Telgmann Date: Mon, 21 Aug 2023 11:22:09 +0200 Subject: [PATCH 5/5] ci: Add scheduled run for everyday --- .github/workflows/test_bluegreen.yml | 2 ++ .github/workflows/test_general.yml | 2 ++ .github/workflows/test_installer.yml | 2 ++ .github/workflows/test_update.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/test_bluegreen.yml b/.github/workflows/test_bluegreen.yml index 9284155..267006f 100644 --- a/.github/workflows/test_bluegreen.yml +++ b/.github/workflows/test_bluegreen.yml @@ -1,5 +1,7 @@ on: push: + schedule: + - cron: "0 1 * * *" jobs: setup-shopware: diff --git a/.github/workflows/test_general.yml b/.github/workflows/test_general.yml index 3a62cb3..30cb899 100644 --- a/.github/workflows/test_general.yml +++ b/.github/workflows/test_general.yml @@ -1,5 +1,7 @@ on: push: + schedule: + - cron: "0 2 * * *" jobs: setup-shopware: diff --git a/.github/workflows/test_installer.yml b/.github/workflows/test_installer.yml index 277d25e..8caa942 100644 --- a/.github/workflows/test_installer.yml +++ b/.github/workflows/test_installer.yml @@ -1,5 +1,7 @@ on: push: + schedule: + - cron: "0 3 * * *" jobs: setup-shopware: diff --git a/.github/workflows/test_update.yml b/.github/workflows/test_update.yml index 7925f09..eb507cc 100644 --- a/.github/workflows/test_update.yml +++ b/.github/workflows/test_update.yml @@ -1,5 +1,7 @@ on: push: + schedule: + - cron: "0 4 * * *" jobs: setup-shopware: