From c75bd62433cdbf3729ec791c1a142e4fa2a154ad Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko Date: Thu, 11 Mar 2021 00:06:04 +0000 Subject: [PATCH 1/5] #32321 #31854 remove laminas-console and laminas-mvc-console packages from composer --- composer.json | 2 - composer.lock | 202 ++++++++++---------------------------------------- 2 files changed, 39 insertions(+), 165 deletions(-) diff --git a/composer.json b/composer.json index 8ed9253f27133..d347ac1702059 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,6 @@ "guzzlehttp/guzzle": "^6.3.3", "laminas/laminas-captcha": "^2.7.1", "laminas/laminas-code": "~3.4.1", - "laminas/laminas-console": "^2.6.0", "laminas/laminas-crypt": "^3.4.0", "laminas/laminas-db": "^2.12.0", "laminas/laminas-dependency-plugin": "^2.1.0", @@ -53,7 +52,6 @@ "laminas/laminas-mime": "^2.5.0", "laminas/laminas-modulemanager": "^2.7", "laminas/laminas-mvc": "^3.2.0", - "laminas/laminas-mvc-console": "^1.3.0", "laminas/laminas-serializer": "^2.7.2", "laminas/laminas-server": "^2.6.1", "laminas/laminas-servicemanager": "^3.6.0", diff --git a/composer.lock b/composer.lock index 69d1b93f96370..a14028a814e17 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3cbafd4778f61eff78672eeed21a17e3", + "content-hash": "df8f8fd1b18eb0679e4a2f733023c7ba", "packages": [ { "name": "aws/aws-sdk-php", @@ -1288,64 +1288,6 @@ ], "time": "2021-02-11T15:06:51+00:00" }, - { - "name": "laminas/laminas-console", - "version": "2.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-console.git", - "reference": "478a6ceac3e31fb38d6314088abda8b239ee23a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-console/zipball/478a6ceac3e31fb38d6314088abda8b239ee23a5", - "reference": "478a6ceac3e31fb38d6314088abda8b239ee23a5", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.2.1", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-console": "self.version" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.7.2", - "laminas/laminas-json": "^2.6 || ^3.0", - "laminas/laminas-validator": "^2.10.1", - "phpunit/phpunit": "^5.7.23 || ^6.4.3" - }, - "suggest": { - "laminas/laminas-filter": "To support DefaultRouteMatcher usage", - "laminas/laminas-validator": "To support DefaultRouteMatcher usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8.x-dev", - "dev-develop": "2.9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Console\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Build console applications using getopt syntax or routing, complete with prompts", - "homepage": "https://laminas.dev", - "keywords": [ - "console", - "laminas" - ], - "abandoned": "laminas/laminas-cli", - "time": "2019-12-31T16:31:45+00:00" - }, { "name": "laminas/laminas-crypt", "version": "3.4.0", @@ -2695,85 +2637,6 @@ ], "time": "2020-12-14T21:54:40+00:00" }, - { - "name": "laminas/laminas-mvc-console", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mvc-console.git", - "reference": "90338c7b61a5fa8445c0a41925a4ae351459fa79" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc-console/zipball/90338c7b61a5fa8445c0a41925a4ae351459fa79", - "reference": "90338c7b61a5fa8445c0a41925a4ae351459fa79", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-console": "^2.6", - "laminas/laminas-eventmanager": "^3.3", - "laminas/laminas-modulemanager": "^2.7.1", - "laminas/laminas-mvc": "^3.0.3", - "laminas/laminas-router": "^3.0", - "laminas/laminas-servicemanager": "^3.3", - "laminas/laminas-stdlib": "^3.3", - "laminas/laminas-text": "^2.6", - "laminas/laminas-view": "^2.11.3", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0" - }, - "conflict": { - "laminas/laminas-mvc": "<3.0.0" - }, - "replace": { - "zendframework/zend-mvc-console": "^1.2.0" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.6.1", - "phpspec/prophecy": "^1.12.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "laminas/laminas-filter": "^2.6.1, to filter rendered results" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" - }, - "laminas": { - "component": "Laminas\\Mvc\\Console" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Mvc\\Console\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Integration between laminas-mvc and laminas-console", - "homepage": "https://laminas.dev", - "keywords": [ - "console", - "laminas", - "mvc" - ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "abandoned": "laminas/laminas-cli", - "time": "2020-12-28T09:19:48+00:00" - }, { "name": "laminas/laminas-router", "version": "3.4.4", @@ -3491,24 +3354,26 @@ }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642" + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "squizlabs/php_codesniffer": "^3.5" + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" }, "type": "library", "extra": { @@ -3541,7 +3406,7 @@ "type": "community_bridge" } ], - "time": "2020-09-14T14:23:00+00:00" + "time": "2021-02-25T21:54:58+00:00" }, { "name": "league/flysystem", @@ -3808,11 +3673,13 @@ "Magento\\Composer\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0", "AFL-3.0" ], - "description": "Magento composer library helps to instantiate Composer application and run composer commands." + "description": "Magento composer library helps to instantiate Composer application and run composer commands.", + "time": "2020-06-15T17:52:31+00:00" }, { "name": "magento/magento-composer-installer", @@ -4606,27 +4473,22 @@ }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -4639,7 +4501,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -4651,7 +4513,7 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/http-message", @@ -4849,11 +4711,6 @@ "MIT" ], "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -4861,6 +4718,11 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -7694,6 +7556,20 @@ "parser", "php" ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], "time": "2020-05-25T17:44:05+00:00" }, { From 5e890c3848b9241cf6a7c0c04b2e27072564f878 Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko Date: Thu, 11 Mar 2021 00:09:03 +0000 Subject: [PATCH 2/5] #32321 Remove laminas-console and use $argv instead as Setup Wizard is removed --- .../Setup/Mvc/Bootstrap/InitParamListener.php | 15 ++---- .../Mvc/Bootstrap/InitParamListenerTest.php | 48 ++++--------------- .../LazyControllerAbstractFactory.php | 2 - 3 files changed, 13 insertions(+), 52 deletions(-) diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index 218743b6de2d7..d47f0da295136 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -11,14 +11,12 @@ use Magento\Framework\App\State; use Magento\Framework\Filesystem; use Magento\Framework\Shell\ComplexParameter; -use Laminas\Console\Request; use Laminas\EventManager\EventManagerInterface; use Laminas\EventManager\ListenerAggregateInterface; use Laminas\Mvc\Application; use Laminas\Mvc\MvcEvent; use Laminas\ServiceManager\Factory\FactoryInterface; use Laminas\ServiceManager\ServiceLocatorInterface; -use Laminas\Stdlib\RequestInterface; /** * A listener that injects relevant Magento initialization parameters and initializes filesystem @@ -138,8 +136,8 @@ private function extractInitParameters(Application $application) $result[$initKey] = $_SERVER[$initKey]; } } - $result = array_replace_recursive($result, $this->extractFromCli($application->getRequest())); - return $result; + + return array_replace_recursive($result, $this->extractFromCli($result['argv'])); } /** @@ -147,16 +145,13 @@ private function extractInitParameters(Application $application) * * Uses format of a URL query * - * @param RequestInterface $request + * @param array $argv * @return array */ - private function extractFromCli(RequestInterface $request) + private function extractFromCli(array $argv): array { - if (!($request instanceof Request)) { - return []; - } $bootstrapParam = new ComplexParameter(self::BOOTSTRAP_PARAM); - foreach ($request->getContent() as $paramStr) { + foreach ($argv as $paramStr) { $result = $bootstrapParam->getFromString($paramStr); if (!empty($result)) { return $result; diff --git a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php index a766a3ef51e5f..1cf96af5c7c13 100644 --- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php @@ -7,31 +7,16 @@ namespace Magento\Setup\Test\Unit\Mvc\Bootstrap; -use Laminas\Console\Request; use Laminas\EventManager\EventManagerInterface; use Laminas\EventManager\SharedEventManager; -use Laminas\Http\Headers; -use Laminas\Http\Response; use Laminas\Mvc\Application; use Laminas\Mvc\MvcEvent; -use Laminas\Mvc\Router\Http\RouteMatch; use Laminas\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceManager; use Laminas\Stdlib\RequestInterface; -use Magento\Backend\App\BackendApp; -use Magento\Backend\App\BackendAppList; -use Magento\Backend\Model\Auth; -use Magento\Backend\Model\Auth\Session; -use Magento\Backend\Model\Session\AdminConfig; -use Magento\Backend\Model\Url; -use Magento\Framework\App\Area; use Magento\Framework\App\Bootstrap as AppBootstrap; -use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\App\State; use Magento\Framework\Filesystem; -use Magento\Framework\ObjectManagerInterface; -use Magento\Setup\Model\ObjectManagerProvider; use Magento\Setup\Mvc\Bootstrap\InitParamListener; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -118,22 +103,6 @@ public function testCreateDirectoryListException() $this->listener->createDirectoryList([]); } - public function testCreateServiceNotConsole() - { - /** - * @var ServiceLocatorInterface|MockObject $container - */ - $container = $this->getMockForAbstractClass(ServiceLocatorInterface::class); - $mvcApplication = $this->getMockBuilder(Application::class) - ->disableOriginalConstructor() - ->getMock(); - $request = $this->getMockForAbstractClass(RequestInterface::class); - $mvcApplication->expects($this->any())->method('getRequest')->willReturn($request); - $container->expects($this->once())->method('get')->with('Application') - ->willReturn($mvcApplication); - $this->assertEquals([], $this->listener->createService($container)); - } - /** * @param array $zfAppConfig Data that comes from Laminas Framework Application config * @param array $env Config that comes from SetEnv @@ -155,19 +124,18 @@ public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray) $mvcApplication = $this->getMockBuilder(Application::class) ->disableOriginalConstructor() ->getMock(); - $request = $this->getMockBuilder(Request::class) - ->disableOriginalConstructor() - ->getMock(); - $request->expects($this->any()) - ->method('getContent') - ->willReturn( - $cliParam ? ['install', '--magento-init-params=' . $cliParam] : ['install'] - ); + + $argv = ['bin/magento', 'setup:install']; + if ($cliParam) { + $argv[] = '--magento-init-params=' . $cliParam; + } + $zfAppConfig['argv'] = $argv; + $expectedArray['argv'] = $argv; + $mvcApplication->expects($this->any())->method('getConfig')->willReturn( $zfAppConfig ? [InitParamListener::BOOTSTRAP_PARAM => $zfAppConfig] : [] ); - $mvcApplication->expects($this->any())->method('getRequest')->willReturn($request); $serviceLocator->expects($this->once())->method('get')->with('Application') ->willReturn($mvcApplication); diff --git a/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php b/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php index b37fd41cf6e52..ac76499078de0 100644 --- a/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php +++ b/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php @@ -11,7 +11,6 @@ namespace Zend\Mvc\Controller; use Interop\Container\ContainerInterface; -use Laminas\Console\Adapter\AdapterInterface as ConsoleAdapterInterface; use Laminas\Filter\FilterPluginManager; use Laminas\Hydrator\HydratorPluginManager; use Laminas\InputFilter\InputFilterPluginManager; @@ -88,7 +87,6 @@ class LazyControllerAbstractFactory implements AbstractFactoryInterface * @var string[] */ protected $aliases = [ - ConsoleAdapterInterface::class => 'ConsoleAdapter', FilterPluginManager::class => 'FilterManager', HydratorPluginManager::class => 'HydratorManager', InputFilterPluginManager::class => 'InputFilterManager', From 3fe67e376f08ff1c1e7e4470d023fd27ee19cc2d Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko Date: Thu, 11 Mar 2021 14:52:52 +0000 Subject: [PATCH 3/5] #31854 Remove Laminas\Mvc\Console from modules.config.php --- setup/config/modules.config.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup/config/modules.config.php b/setup/config/modules.config.php index 610fa29083125..a856e967dcbb1 100644 --- a/setup/config/modules.config.php +++ b/setup/config/modules.config.php @@ -22,6 +22,5 @@ 'Laminas\Router', 'Laminas\Serializer', 'Laminas\Session', - 'Laminas\Validator', - 'Laminas\Mvc\Console' + 'Laminas\Validator' ]; From 6a27516777c88a6e3b7d377502362722cdfaa1a5 Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko Date: Thu, 11 Mar 2021 21:10:56 +0000 Subject: [PATCH 4/5] #32321 small fix for usage of argv --- setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index d47f0da295136..a906c055f6e5b 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -137,6 +137,10 @@ private function extractInitParameters(Application $application) } } + if (!isset($result['argv'])) { + return $result; + } + return array_replace_recursive($result, $this->extractFromCli($result['argv'])); } From 9933b334c552de7d8b1cd6d178bc4300d98ebec0 Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko Date: Sat, 13 Mar 2021 17:35:52 +0000 Subject: [PATCH 5/5] #32321: Update unit test to cover not existing or non-array argv in config --- .../Setup/Mvc/Bootstrap/InitParamListener.php | 2 +- .../Mvc/Bootstrap/InitParamListenerTest.php | 61 +++++++++++++------ 2 files changed, 43 insertions(+), 20 deletions(-) diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index a906c055f6e5b..6bd801742f134 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -137,7 +137,7 @@ private function extractInitParameters(Application $application) } } - if (!isset($result['argv'])) { + if (!isset($result['argv']) || !is_array($result['argv'])) { return $result; } diff --git a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php index 1cf96af5c7c13..e8bf006c3427b 100644 --- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php @@ -106,12 +106,12 @@ public function testCreateDirectoryListException() /** * @param array $zfAppConfig Data that comes from Laminas Framework Application config * @param array $env Config that comes from SetEnv - * @param string $cliParam Parameter string + * @param array|string|null $argv Argv * @param array $expectedArray Expected result array * * @dataProvider createServiceDataProvider */ - public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray) + public function testCreateService($zfAppConfig, $env, $argv, $expectedArray) { foreach ($env as $envKey => $envValue) { $_SERVER[$envKey] = $envValue; @@ -125,12 +125,10 @@ public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray) ->disableOriginalConstructor() ->getMock(); - $argv = ['bin/magento', 'setup:install']; - if ($cliParam) { - $argv[] = '--magento-init-params=' . $cliParam; + if ($argv !== null) { + $zfAppConfig['argv'] = $argv; + $expectedArray['argv'] = $argv; } - $zfAppConfig['argv'] = $argv; - $expectedArray['argv'] = $argv; $mvcApplication->expects($this->any())->method('getConfig')->willReturn( $zfAppConfig ? [InitParamListener::BOOTSTRAP_PARAM => $zfAppConfig] : [] @@ -148,36 +146,61 @@ public function testCreateService($zfAppConfig, $env, $cliParam, $expectedArray) public function createServiceDataProvider() { return [ - 'none' => [[], [], '', []], - 'mage_mode App' => [['MAGE_MODE' => 'developer'], [], '', ['MAGE_MODE' => 'developer']], - 'mage_mode Env' => [[], ['MAGE_MODE' => 'developer'], '', ['MAGE_MODE' => 'developer']], - 'mage_mode CLI' => [[], [], 'MAGE_MODE=developer', ['MAGE_MODE' => 'developer']], + 'none' => [ + [], //zfAppConfig + [], //env + null, //argv + [] //expectedArray + ], + 'mage_mode App' => [ + ['MAGE_MODE' => 'developer'], + [], + '', //test non array value + ['MAGE_MODE' => 'developer'] + ], + 'mage_mode Env' => [ + [], + ['MAGE_MODE' => 'developer'], + null, + ['MAGE_MODE' => 'developer'] + ], + 'mage_mode CLI' => [ + [], + [], + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_MODE=developer'], + ['MAGE_MODE' => 'developer'] + ], 'one MAGE_DIRS CLI' => [ [], [], - 'MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/magento2', + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/magento2'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2']], 'MAGE_MODE' => 'developer'], ], 'two MAGE_DIRS CLI' => [ [], [], - 'MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/magento2&MAGE_DIRS[cache][path]=/tmp/cache', + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/magento2&MAGE_DIRS[cache][path]=/tmp/cache'], [ 'MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2'], 'cache' => ['path' => '/tmp/cache']], 'MAGE_MODE' => 'developer', ], ], - 'mage_mode only' => [[], [], 'MAGE_MODE=developer', ['MAGE_MODE' => 'developer']], + 'mage_mode only' => [ + [], + [], + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_MODE=developer'], + ['MAGE_MODE' => 'developer'] + ], 'MAGE_DIRS Env' => [ [], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2']], 'MAGE_MODE' => 'developer'], - '', + null, ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2']], 'MAGE_MODE' => 'developer'], ], 'two MAGE_DIRS' => [ [], [], - 'MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/magento2&MAGE_DIRS[cache][path]=/tmp/cache', + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/magento2&MAGE_DIRS[cache][path]=/tmp/cache'], [ 'MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2'], 'cache' => ['path' => '/tmp/cache']], 'MAGE_MODE' => 'developer', @@ -186,19 +209,19 @@ public function createServiceDataProvider() 'Env overwrites App' => [ ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/App']], 'MAGE_MODE' => 'developer'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/Env']], 'MAGE_MODE' => 'developer'], - '', + ['bin/magento', 'setup:install'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/Env']], 'MAGE_MODE' => 'developer'], ], 'CLI overwrites Env' => [ ['MAGE_MODE' => 'developer'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/Env']]], - 'MAGE_DIRS[base][path]=/var/www/magento2/CLI', + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_DIRS[base][path]=/var/www/magento2/CLI'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/CLI']], 'MAGE_MODE' => 'developer'], ], 'CLI overwrites All' => [ ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/App']], 'MAGE_MODE' => 'production'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/Env']]], - 'MAGE_DIRS[base][path]=/var/www/magento2/CLI', + ['bin/magento', 'setup:install', '--magento-init-params=MAGE_DIRS[base][path]=/var/www/magento2/CLI'], ['MAGE_DIRS' => ['base' => ['path' => '/var/www/magento2/CLI']], 'MAGE_MODE' => 'developer'], ], ];