From f2e70de3e0fe8038ccd1eb5703e1b4978d00140a Mon Sep 17 00:00:00 2001 From: Vitaliy Prokopoov Date: Wed, 27 Jan 2021 13:19:11 +0200 Subject: [PATCH 1/7] updated laminas/laminas-di module --- composer.json | 2 +- composer.lock | 767 +++----------------------------------------------- 2 files changed, 34 insertions(+), 735 deletions(-) diff --git a/composer.json b/composer.json index 6aa9355cec7b1..3cfd0d924d89e 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "laminas/laminas-crypt": "^2.6.0", "laminas/laminas-db": "^2.8.2", "laminas/laminas-dependency-plugin": "^1.0", - "laminas/laminas-di": "^2.6.1", + "laminas/laminas-di": "^3.2.0", "laminas/laminas-eventmanager": "^3.0.0", "laminas/laminas-feed": "^2.9.0", "laminas/laminas-form": "^2.10.0", diff --git a/composer.lock b/composer.lock index b0b15f4e13f6c..fc780645a3c4d 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": "ac6fc13ba98a815bce589d300d28012c", + "content-hash": "1e35ddc47906ca8144b4c449e7a7d25d", "packages": [ { "name": "aws/aws-sdk-php", @@ -291,20 +291,6 @@ "ssl", "tls" ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], "time": "2020-08-23T12:54:47+00:00" }, { @@ -385,20 +371,6 @@ "dependency", "package" ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], "time": "2020-10-30T21:31:58+00:00" }, { @@ -460,20 +432,6 @@ "validation", "versioning" ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], "time": "2020-09-27T13:13:07+00:00" }, { @@ -534,20 +492,6 @@ "spdx", "validator" ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], "time": "2020-07-15T15:35:07+00:00" }, { @@ -592,20 +536,6 @@ "Xdebug", "performance" ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], "time": "2020-10-24T12:39:10+00:00" }, { @@ -1463,37 +1393,49 @@ }, { "name": "laminas/laminas-di", - "version": "2.6.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-di.git", - "reference": "239b22408a1f8eacda6fc2b838b5065c4cf1d88e" + "reference": "feee971d50ea327a0cac987f5de313a988203b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-di/zipball/239b22408a1f8eacda6fc2b838b5065c4cf1d88e", - "reference": "239b22408a1f8eacda6fc2b838b5065c4cf1d88e", + "url": "https://api.github.com/repos/laminas/laminas-di/zipball/feee971d50ea327a0cac987f5de313a988203b9f", + "reference": "feee971d50ea327a0cac987f5de313a988203b9f", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-code": "^2.6 || ^3.0", - "laminas/laminas-stdlib": "^2.7 || ^3.0", + "laminas/laminas-stdlib": "^3.3", "laminas/laminas-zendframework-bridge": "^0.4.5 || ^1.0", - "php": "^5.5 || ^7.0" + "php": "^7.3 || ~8.0.0", + "psr/container": "^1.0", + "psr/log": "^1.0" + }, + "conflict": { + "laminas/laminas-servicemanager-di": "*", + "phpspec/prophecy": "<1.9.0" }, "replace": { - "zendframework/zend-di": "self.version" + "zendframework/zend-di": "^3.1.2" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "container-interop/container-interop": "^1.2.0", + "laminas/laminas-coding-standard": "^2", + "laminas/laminas-servicemanager": "^3.4", + "mikey179/vfsstream": "^1.6.7", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/phpstan": "^0.12.64", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "laminas/laminas-servicemanager": "An IoC container without auto wiring capabilities" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.6-dev", - "dev-develop": "2.7-dev" + "laminas": { + "component": "Laminas\\Di", + "config-provider": "Laminas\\Di\\ConfigProvider" } }, "autoload": { @@ -1505,12 +1447,14 @@ "license": [ "BSD-3-Clause" ], + "description": "Automated dependency injection for PSR-11 containers", "homepage": "https://laminas.dev", "keywords": [ + "PSR-11", "di", "laminas" ], - "time": "2019-12-31T15:17:33+00:00" + "time": "2020-12-24T12:46:22+00:00" }, { "name": "laminas/laminas-diactoros", @@ -1692,12 +1636,6 @@ "events", "laminas" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-08-25T11:10:44+00:00" }, { @@ -1765,12 +1703,6 @@ "feed", "laminas" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-08-18T13:45:04+00:00" }, { @@ -1922,12 +1854,6 @@ "form", "laminas" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-07-14T13:53:27+00:00" }, { @@ -1980,12 +1906,6 @@ "http client", "laminas" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-08-18T17:11:58+00:00" }, { @@ -2121,12 +2041,6 @@ "i18n", "laminas" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-10-24T13:14:32+00:00" }, { @@ -2432,12 +2346,6 @@ "laminas", "mail" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-08-12T14:51:33+00:00" }, { @@ -2610,12 +2518,6 @@ "laminas", "modulemanager" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-08-25T09:29:22+00:00" }, { @@ -3002,12 +2904,6 @@ "laminas", "session" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-10-31T15:33:31+00:00" }, { @@ -3115,12 +3011,6 @@ "laminas", "stdlib" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-08-25T09:08:16+00:00" }, { @@ -3218,12 +3108,6 @@ "laminas", "uri" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-10-31T20:20:07+00:00" }, { @@ -3442,12 +3326,6 @@ "laminas", "zf" ], - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], "time": "2020-09-14T14:23:00+00:00" }, { @@ -3533,12 +3411,6 @@ "sftp", "storage" ], - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], "time": "2020-08-23T07:39:11+00:00" }, { @@ -3674,16 +3546,6 @@ } ], "description": "Mime-type detection for Flysystem", - "funding": [ - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" - } - ], "time": "2020-10-18T11:50:25+00:00" }, { @@ -3921,16 +3783,6 @@ "logging", "psr-3" ], - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], "time": "2020-07-23T08:35:51+00:00" }, { @@ -4402,20 +4254,6 @@ "x.509", "x509" ], - "funding": [ - { - "url": "https://github.com/terrafrost", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpseclib", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", - "type": "tidelift" - } - ], "time": "2020-09-08T04:24:43+00:00" }, { @@ -4825,16 +4663,6 @@ "parser", "validator" ], - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], "time": "2020-08-25T06:56:57+00:00" }, { @@ -4951,20 +4779,6 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "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": "2020-10-24T11:50:19+00:00" }, { @@ -5013,20 +4827,6 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:01:57+00:00" }, { @@ -5093,20 +4893,6 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "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": "2020-10-24T11:50:19+00:00" }, { @@ -5169,20 +4955,6 @@ "interoperability", "standards" ], - "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": "2020-07-06T13:19:58+00:00" }, { @@ -5228,20 +5000,6 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:01:57+00:00" }, { @@ -5286,20 +5044,6 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:01:57+00:00" }, { @@ -5362,20 +5106,6 @@ "polyfill", "portable" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5446,20 +5176,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5527,20 +5243,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5604,20 +5306,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5677,20 +5365,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5753,20 +5427,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5833,20 +5493,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -5891,20 +5537,6 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "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": "2020-10-24T11:50:19+00:00" }, { @@ -5967,20 +5599,6 @@ "interoperability", "standards" ], - "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": "2020-09-07T11:33:47+00:00" }, { @@ -6175,12 +5793,6 @@ "safe writer", "webimpress" ], - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], "time": "2020-08-25T07:21:11+00:00" }, { @@ -6233,12 +5845,6 @@ "api", "graphql" ], - "funding": [ - { - "url": "https://opencollective.com/webonyx-graphql-php", - "type": "open_collective" - } - ], "time": "2020-07-02T05:49:25+00:00" }, { @@ -6755,12 +6361,6 @@ "functional testing", "unit testing" ], - "funding": [ - { - "url": "https://opencollective.com/codeception", - "type": "open_collective" - } - ], "time": "2020-11-03T17:34:51+00:00" }, { @@ -7335,20 +6935,6 @@ "redis", "xcache" ], - "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%2Fcache", - "type": "tidelift" - } - ], "time": "2020-07-07T18:54:01+00:00" }, { @@ -7472,20 +7058,6 @@ "constructor", "instantiate" ], - "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%2Finstantiator", - "type": "tidelift" - } - ], "time": "2020-05-29T17:27:14+00:00" }, { @@ -7639,12 +7211,6 @@ } ], "description": "A tool to automatically fix PHP code style", - "funding": [ - { - "url": "https://github.com/keradus", - "type": "github" - } - ], "time": "2020-10-27T22:44:27+00:00" }, { @@ -8705,12 +8271,6 @@ "object", "object graph" ], - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], "time": "2020-06-29T13:22:24+00:00" }, { @@ -9362,12 +8922,6 @@ "phpmd", "pmd" ], - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", - "type": "tidelift" - } - ], "time": "2020-09-23T22:06:32+00:00" }, { @@ -9423,16 +8977,6 @@ "php", "type" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], "time": "2020-07-20T17:29:33+00:00" }, { @@ -9602,12 +9146,6 @@ "testing", "xunit" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-05-23T08:02:54+00:00" }, { @@ -9658,12 +9196,6 @@ "filesystem", "iterator" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T05:57:25+00:00" }, { @@ -9717,12 +9249,6 @@ "keywords": [ "process" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T05:58:55+00:00" }, { @@ -9772,12 +9298,6 @@ "keywords": [ "template" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T05:33:50+00:00" }, { @@ -9876,12 +9396,6 @@ "keywords": [ "tokenizer" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "abandoned": true, "time": "2020-08-04T08:28:15+00:00" }, @@ -10065,12 +9579,6 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T13:08:54+00:00" }, { @@ -10116,12 +9624,6 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T05:30:19+00:00" }, { @@ -10186,12 +9688,6 @@ "compare", "equality" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T15:49:45+00:00" }, { @@ -10248,12 +9744,6 @@ "unidiff", "unified diff" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T13:10:38+00:00" }, { @@ -10307,12 +9797,6 @@ "environment", "hhvm" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T05:52:38+00:00" }, { @@ -10380,12 +9864,6 @@ "export", "exporter" ], - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T05:24:23+00:00" }, { @@ -10534,12 +10012,6 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T13:12:34+00:00" }, { @@ -10585,12 +10057,6 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T13:14:26+00:00" }, { @@ -10695,12 +10161,6 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T13:17:30+00:00" }, { @@ -10746,12 +10206,6 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T06:45:17+00:00" }, { @@ -10798,12 +10252,6 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-10-26T13:18:59+00:00" }, { @@ -10847,12 +10295,6 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], "time": "2020-09-28T06:39:44+00:00" }, { @@ -11036,20 +10478,6 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:01:57+00:00" }, { @@ -11120,20 +10548,6 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "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": "2020-10-27T10:11:13+00:00" }, { @@ -11184,20 +10598,6 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "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": "2020-09-07T11:33:47+00:00" }, { @@ -11254,20 +10654,6 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:01:57+00:00" }, { @@ -11326,20 +10712,6 @@ "mime", "mime-type" ], - "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": "2020-10-24T12:01:57+00:00" }, { @@ -11391,20 +10763,6 @@ "configuration", "options" ], - "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": "2020-10-24T12:01:57+00:00" }, { @@ -11456,20 +10814,6 @@ "portable", "shim" ], - "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": "2020-10-23T14:02:19+00:00" }, { @@ -11515,20 +10859,6 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:01:57+00:00" }, { @@ -11587,20 +10917,6 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "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": "2020-10-24T12:03:25+00:00" }, { @@ -11816,12 +11132,6 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], "time": "2020-07-12T23:59:07+00:00" }, { @@ -11884,16 +11194,6 @@ "env", "environment" ], - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], "time": "2020-07-14T17:54:18+00:00" }, { @@ -11901,12 +11201,12 @@ "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, @@ -12007,6 +11307,5 @@ "ext-zip": "*", "lib-libxml": "*" }, - "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-dev": [] } From 2dd88ef6c4058c7433e6c2064d2a5eb7d956107d Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Wed, 3 Mar 2021 15:11:09 +0000 Subject: [PATCH 2/7] magento/magento2#31346: Updated laminas/laminas-servicemanager --- composer.json | 2 +- composer.lock | 67 +++++++++++++------ .../Setup/Mvc/Bootstrap/InitParamListener.php | 26 ++++--- .../Mvc/Bootstrap/InitParamListenerTest.php | 8 +-- .../LazyControllerAbstractFactory.php | 2 +- 5 files changed, 68 insertions(+), 37 deletions(-) diff --git a/composer.json b/composer.json index 7b798f7a2f774..5d5e3f0608055 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "laminas/laminas-mvc": "~2.7.0", "laminas/laminas-serializer": "^2.7.2", "laminas/laminas-server": "^2.6.1", - "laminas/laminas-servicemanager": "^2.7.8", + "laminas/laminas-servicemanager": "^3.6.0", "laminas/laminas-session": "^2.7.3", "laminas/laminas-soap": "^2.7.0", "laminas/laminas-stdlib": "^3.2.1", diff --git a/composer.lock b/composer.lock index 9a91a5e774422..e629a622e88a1 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": "82a20212974342f16e47df2f4743d82f", + "content-hash": "0934e0b0f4c972c1a971daa84bf9fb1d", "packages": [ { "name": "aws/aws-sdk-php", @@ -2958,44 +2958,55 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "2.7.11", + "version": "3.6.4", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "841abb656c6018afebeec1f355be438426d6a3dd" + "reference": "b1445e1a7077c21b0fad0974a1b7a11b9dbe0828" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/841abb656c6018afebeec1f355be438426d6a3dd", - "reference": "841abb656c6018afebeec1f355be438426d6a3dd", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/b1445e1a7077c21b0fad0974a1b7a11b9dbe0828", + "reference": "b1445e1a7077c21b0fad0974a1b7a11b9dbe0828", "shasum": "" }, "require": { - "container-interop/container-interop": "~1.0", + "container-interop/container-interop": "^1.2", + "laminas/laminas-stdlib": "^3.2.1", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.5 || ^7.0" + "php": "^7.3 || ~8.0.0", + "psr/container": "^1.0" + }, + "conflict": { + "laminas/laminas-code": "<3.3.1", + "zendframework/zend-code": "<3.3.1" + }, + "provide": { + "container-interop/container-interop-implementation": "^1.2", + "psr/container-implementation": "^1.0" }, "replace": { - "zendframework/zend-servicemanager": "self.version" + "zendframework/zend-servicemanager": "^3.4.0" }, "require-dev": { - "athletic/athletic": "dev-master", - "fabpot/php-cs-fixer": "1.7.*", - "laminas/laminas-di": "~2.5", - "laminas/laminas-mvc": "~2.5", - "phpunit/phpunit": "~4.0" + "composer/package-versions-deprecated": "^1.0", + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-container-config-test": "^0.3", + "laminas/laminas-dependency-plugin": "^2.1", + "mikey179/vfsstream": "^1.6.8", + "ocramius/proxy-manager": "^2.2.3", + "phpbench/phpbench": "^1.0.0-alpha3", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.4" }, "suggest": { - "laminas/laminas-di": "Laminas\\Di component", - "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services" + "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" }, + "bin": [ + "bin/generate-deps-for-config-factory", + "bin/generate-factory-for-class" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "3.0-dev" - } - }, "autoload": { "psr-4": { "Laminas\\ServiceManager\\": "src/" @@ -3005,12 +3016,24 @@ "license": [ "BSD-3-Clause" ], + "description": "Factory-Driven Dependency Injection Container", "homepage": "https://laminas.dev", "keywords": [ + "PSR-11", + "dependency-injection", + "di", + "dic", "laminas", + "service-manager", "servicemanager" ], - "time": "2019-12-31T17:44:16+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-02-03T08:44:41+00:00" }, { "name": "laminas/laminas-session", diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index 4c25753aa87ac..9f674622f556a 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -5,10 +5,9 @@ */ namespace Magento\Setup\Mvc\Bootstrap; +use Interop\Container\ContainerInterface; use Magento\Framework\App\Bootstrap as AppBootstrap; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\App\Request\Http; use Magento\Framework\App\State; use Magento\Framework\Filesystem; use Magento\Framework\Shell\ComplexParameter; @@ -17,11 +16,9 @@ use Laminas\EventManager\ListenerAggregateInterface; use Laminas\Mvc\Application; use Laminas\Mvc\MvcEvent; -use Laminas\Router\Http\RouteMatch; -use Laminas\ServiceManager\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use Laminas\ServiceManager\ServiceLocatorInterface; use Laminas\Stdlib\RequestInterface; -use Laminas\Uri\UriInterface; /** * A listener that injects relevant Magento initialization parameters and initializes filesystem @@ -37,7 +34,7 @@ class InitParamListener implements ListenerAggregateInterface, FactoryInterface const BOOTSTRAP_PARAM = 'magento-init-params'; /** - * @var \Laminas\Stdlib\CallbackHandler[] + * @var callable[] */ private $listeners = []; @@ -97,14 +94,25 @@ public function onBootstrap(MvcEvent $e) } /** - * @inheritdoc + * Create service. Proxy to the __invoke method + * + * @deprecared use the __invoke method instead * * @param ServiceLocatorInterface $serviceLocator - * @return mixed + * @return array + * @throws \Interop\Container\Exception\ContainerException */ public function createService(ServiceLocatorInterface $serviceLocator) { - return $this->extractInitParameters($serviceLocator->get('Application')); + return $this($serviceLocator, 'Application'); + } + + /** + * @inheritdoc + */ + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + return $this->extractInitParameters($container->get($requestedName)); } /** 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 b18345666af5e..a766a3ef51e5f 100644 --- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php @@ -121,17 +121,17 @@ public function testCreateDirectoryListException() public function testCreateServiceNotConsole() { /** - * @var ServiceLocatorInterface|MockObject $serviceLocator + * @var ServiceLocatorInterface|MockObject $container */ - $serviceLocator = $this->getMockForAbstractClass(ServiceLocatorInterface::class); + $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); - $serviceLocator->expects($this->once())->method('get')->with('Application') + $container->expects($this->once())->method('get')->with('Application') ->willReturn($mvcApplication); - $this->assertEquals([], $this->listener->createService($serviceLocator)); + $this->assertEquals([], $this->listener->createService($container)); } /** diff --git a/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php b/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php index 57697cd9cd9bf..2f2a32a8ca469 100644 --- a/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php +++ b/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php @@ -20,7 +20,7 @@ use Laminas\Log\ProcessorPluginManager as LogProcessorManager; use Laminas\Log\WriterPluginManager as LogWriterManager; use Laminas\Serializer\AdapterPluginManager as SerializerAdapterManager; -use Laminas\ServiceManager\AbstractFactoryInterface; +use Laminas\ServiceManager\Factory\AbstractFactoryInterface; use Laminas\ServiceManager\Exception\ServiceNotFoundException; use Laminas\ServiceManager\ServiceLocatorInterface; use Laminas\Stdlib\DispatchableInterface; From 98925c2497fff423fbeafd679699c531caadadc0 Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Thu, 4 Mar 2021 15:48:59 +0000 Subject: [PATCH 3/7] magento/magento2#31783: Updated laminas-mvc --- composer.json | 2 +- composer.lock | 360 ++++++++++-------- setup/config/application.config.php | 19 +- setup/config/di.config.php | 22 +- setup/config/modules.config.php | 29 ++ setup/src/Magento/Setup/Application.php | 1 - .../Setup/Mvc/Bootstrap/InitParamListener.php | 2 +- 7 files changed, 252 insertions(+), 183 deletions(-) create mode 100644 setup/config/modules.config.php diff --git a/composer.json b/composer.json index 5d5e3f0608055..a157664d6b522 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "laminas/laminas-mail": "^2.9.0", "laminas/laminas-mime": "^2.5.0", "laminas/laminas-modulemanager": "^2.7", - "laminas/laminas-mvc": "~2.7.0", + "laminas/laminas-mvc": "^3.2.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 e629a622e88a1..3710342cd9843 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": "0934e0b0f4c972c1a971daa84bf9fb1d", + "content-hash": "c21f452e51ee5cf13bcd46a570853d12", "packages": [ { "name": "aws/aws-sdk-php", @@ -1580,81 +1580,6 @@ ], "time": "2020-12-24T12:46:22+00:00" }, - { - "name": "laminas/laminas-diactoros", - "version": "1.8.7p2", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "6991c1af7c8d2c8efee81b22ba97024781824aaa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6991c1af7c8d2c8efee81b22ba97024781824aaa", - "reference": "6991c1af7c8d2c8efee81b22ba97024781824aaa", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "replace": { - "zendframework/zend-diactoros": "~1.8.7.0" - }, - "require-dev": { - "ext-dom": "*", - "ext-libxml": "*", - "laminas/laminas-coding-standard": "~1.0", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-release-1.8": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php", - "src/functions/create_uploaded_file.legacy.php", - "src/functions/marshal_headers_from_sapi.legacy.php", - "src/functions/marshal_method_from_sapi.legacy.php", - "src/functions/marshal_protocol_version_from_sapi.legacy.php", - "src/functions/marshal_uri_from_sapi.legacy.php", - "src/functions/normalize_server.legacy.php", - "src/functions/normalize_uploaded_files.legacy.php", - "src/functions/parse_cookie_header.legacy.php" - ], - "psr-4": { - "Laminas\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "laminas", - "psr", - "psr-7" - ], - "time": "2020-03-23T15:28:28+00:00" - }, { "name": "laminas/laminas-escaper", "version": "2.7.0", @@ -2694,85 +2619,57 @@ }, { "name": "laminas/laminas-mvc", - "version": "2.7.15", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mvc.git", - "reference": "7e7198b03556a57fb5fd3ed919d9e1cf71500642" + "reference": "88da7200cf8f5a970c35d91717a5c4db94981e5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/7e7198b03556a57fb5fd3ed919d9e1cf71500642", - "reference": "7e7198b03556a57fb5fd3ed919d9e1cf71500642", + "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/88da7200cf8f5a970c35d91717a5c4db94981e5e", + "reference": "88da7200cf8f5a970c35d91717a5c4db94981e5e", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-console": "^2.7", - "laminas/laminas-eventmanager": "^2.6.4 || ^3.0", - "laminas/laminas-form": "^2.11", - "laminas/laminas-hydrator": "^1.1 || ^2.4", - "laminas/laminas-psr7bridge": "^0.2", - "laminas/laminas-servicemanager": "^2.7.10 || ^3.0.3", - "laminas/laminas-stdlib": "^2.7.5 || ^3.0", + "container-interop/container-interop": "^1.2", + "laminas/laminas-eventmanager": "^3.2", + "laminas/laminas-http": "^2.7", + "laminas/laminas-modulemanager": "^2.8", + "laminas/laminas-router": "^3.0.2", + "laminas/laminas-servicemanager": "^3.3", + "laminas/laminas-stdlib": "^3.2.1", + "laminas/laminas-view": "^2.11.3", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.5 || ^7.0" + "php": "^7.3 || ~8.0.0" }, "replace": { - "zendframework/zend-mvc": "self.version" + "zendframework/zend-mvc": "^3.1.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "1.7.*", - "laminas/laminas-authentication": "^2.6", - "laminas/laminas-cache": "^2.8", - "laminas/laminas-di": "^2.6", - "laminas/laminas-filter": "^2.8", - "laminas/laminas-http": "^2.8", - "laminas/laminas-i18n": "^2.8", - "laminas/laminas-inputfilter": "^2.8", - "laminas/laminas-json": "^2.6.1", - "laminas/laminas-log": "^2.9.3", - "laminas/laminas-modulemanager": "^2.8", - "laminas/laminas-serializer": "^2.8", - "laminas/laminas-session": "^2.8.1", - "laminas/laminas-text": "^2.7", - "laminas/laminas-uri": "^2.6", - "laminas/laminas-validator": "^2.10", - "laminas/laminas-view": "^2.9", - "phpunit/phpunit": "^4.8.36", - "sebastian/comparator": "^1.2.4", - "sebastian/version": "^1.0.4" + "http-interop/http-middleware": "^0.4.1", + "laminas/laminas-coding-standard": "^1.0.0", + "laminas/laminas-json": "^2.6.1 || ^3.0", + "laminas/laminas-psr7bridge": "^1.0", + "laminas/laminas-stratigility": ">=2.0.1 <2.2", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.4.2" }, "suggest": { - "laminas/laminas-authentication": "Laminas\\Authentication component for Identity plugin", - "laminas/laminas-config": "Laminas\\Config component", - "laminas/laminas-di": "Laminas\\Di component", - "laminas/laminas-filter": "Laminas\\Filter component", - "laminas/laminas-http": "Laminas\\Http component", - "laminas/laminas-i18n": "Laminas\\I18n component for translatable segments", - "laminas/laminas-inputfilter": "Laminas\\Inputfilter component", - "laminas/laminas-json": "Laminas\\Json component", - "laminas/laminas-log": "Laminas\\Log component", - "laminas/laminas-modulemanager": "Laminas\\ModuleManager component", - "laminas/laminas-serializer": "Laminas\\Serializer component", - "laminas/laminas-servicemanager-di": "^1.0.1, if using laminas-servicemanager v3 and requiring the laminas-di integration", - "laminas/laminas-session": "Laminas\\Session component for FlashMessenger, PRG, and FPRG plugins", - "laminas/laminas-text": "Laminas\\Text component", - "laminas/laminas-uri": "Laminas\\Uri component", - "laminas/laminas-validator": "Laminas\\Validator component", - "laminas/laminas-view": "Laminas\\View component" + "laminas/laminas-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", + "laminas/laminas-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", + "laminas/laminas-mvc-console": "laminas-mvc-console provides the ability to expose laminas-mvc as a console application", + "laminas/laminas-mvc-i18n": "laminas-mvc-i18n provides integration with laminas-i18n, including a translation bridge and translatable route segments", + "laminas/laminas-mvc-middleware": "To dispatch middleware in your laminas-mvc application", + "laminas/laminas-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", + "laminas/laminas-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", + "laminas/laminas-mvc-plugin-identity": "To access the authenticated identity (per laminas-authentication) in controllers", + "laminas/laminas-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", + "laminas/laminas-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", + "laminas/laminas-servicemanager-di": "laminas-servicemanager-di provides utilities for integrating laminas-di and laminas-servicemanager in your laminas-mvc application" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "3.0-dev" - } - }, "autoload": { - "files": [ - "src/autoload.php" - ], "psr-4": { "Laminas\\Mvc\\": "src/" } @@ -2781,66 +2678,82 @@ "license": [ "BSD-3-Clause" ], + "description": "Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins", "homepage": "https://laminas.dev", "keywords": [ "laminas", "mvc" ], - "time": "2019-12-31T17:32:15+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-12-14T21:54:40+00:00" }, { - "name": "laminas/laminas-psr7bridge", - "version": "0.2.2", + "name": "laminas/laminas-router", + "version": "3.4.4", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-psr7bridge.git", - "reference": "14780ef1d40effd59d77ab29c6d439b2af42cdfa" + "url": "https://github.com/laminas/laminas-router.git", + "reference": "2a7068508af4de67d80ea292e0cc7c37563a33c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-psr7bridge/zipball/14780ef1d40effd59d77ab29c6d439b2af42cdfa", - "reference": "14780ef1d40effd59d77ab29c6d439b2af42cdfa", + "url": "https://api.github.com/repos/laminas/laminas-router/zipball/2a7068508af4de67d80ea292e0cc7c37563a33c6", + "reference": "2a7068508af4de67d80ea292e0cc7c37563a33c6", "shasum": "" }, "require": { - "laminas/laminas-diactoros": "^1.1", - "laminas/laminas-http": "^2.5", + "container-interop/container-interop": "^1.2", + "laminas/laminas-http": "^2.8.1", + "laminas/laminas-servicemanager": "^2.7.8 || ^3.3", + "laminas/laminas-stdlib": "^3.3", "laminas/laminas-zendframework-bridge": "^1.0", - "php": ">=5.5", - "psr/http-message": "^1.0" + "php": "^7.3 || ~8.0.0" }, "replace": { - "zendframework/zend-psr7bridge": "self.version" + "zendframework/zend-router": "^3.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.7", - "squizlabs/php_codesniffer": "^2.3" + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-i18n": "^2.7.4", + "phpunit/phpunit": "^9.4" + }, + "suggest": { + "laminas/laminas-i18n": "^2.7.4, if defining translatable HTTP path segments" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "1.1-dev" + "laminas": { + "component": "Laminas\\Router", + "config-provider": "Laminas\\Router\\ConfigProvider" } }, "autoload": { "psr-4": { - "Laminas\\Psr7Bridge\\": "src/" + "Laminas\\Router\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "PSR-7 <-> Laminas\\Http bridge", + "description": "Flexible routing system for HTTP and console applications", "homepage": "https://laminas.dev", "keywords": [ - "http", "laminas", - "psr", - "psr-7" + "routing" ], - "time": "2019-12-31T17:38:47+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-12-16T22:10:51+00:00" }, { "name": "laminas/laminas-serializer", @@ -8523,6 +8436,135 @@ ], "time": "2020-02-22T20:59:37+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "1.8.7p2", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "6991c1af7c8d2c8efee81b22ba97024781824aaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6991c1af7c8d2c8efee81b22ba97024781824aaa", + "reference": "6991c1af7c8d2c8efee81b22ba97024781824aaa", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "replace": { + "zendframework/zend-diactoros": "~1.8.7.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "laminas/laminas-coding-standard": "~1.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-7" + ], + "time": "2020-03-23T15:28:28+00:00" + }, + { + "name": "laminas/laminas-psr7bridge", + "version": "0.2.2", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-psr7bridge.git", + "reference": "14780ef1d40effd59d77ab29c6d439b2af42cdfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-psr7bridge/zipball/14780ef1d40effd59d77ab29c6d439b2af42cdfa", + "reference": "14780ef1d40effd59d77ab29c6d439b2af42cdfa", + "shasum": "" + }, + "require": { + "laminas/laminas-diactoros": "^1.1", + "laminas/laminas-http": "^2.5", + "laminas/laminas-zendframework-bridge": "^1.0", + "php": ">=5.5", + "psr/http-message": "^1.0" + }, + "replace": { + "zendframework/zend-psr7bridge": "self.version" + }, + "require-dev": { + "phpunit/phpunit": "^4.7", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Psr7Bridge\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR-7 <-> Laminas\\Http bridge", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-7" + ], + "time": "2019-12-31T17:38:47+00:00" + }, { "name": "lusitanian/oauth", "version": "v0.8.11", diff --git a/setup/config/application.config.php b/setup/config/application.config.php index a293e20219b27..fca03c1ede2c0 100644 --- a/setup/config/application.config.php +++ b/setup/config/application.config.php @@ -5,13 +5,13 @@ */ use Magento\Setup\Mvc\Bootstrap\InitParamListener; -use Laminas\Mvc\Service\DiAbstractServiceFactoryFactory; -use Laminas\ServiceManager\Di\DiAbstractServiceFactory; +use Laminas\Di\ConfigInterface; +use Laminas\Di\InjectorInterface; +use Laminas\Di\Container\ConfigFactory; +use Laminas\Di\Container\InjectorFactory; return [ - 'modules' => [ - 'Magento\Setup', - ], + 'modules' => require __DIR__ . '/modules.config.php', 'module_listener_options' => [ 'module_paths' => [ __DIR__ . '/../src', @@ -25,12 +25,9 @@ ], 'service_manager' => [ 'factories' => [ - DiAbstractServiceFactory::class => DiAbstractServiceFactoryFactory::class, - InitParamListener::BOOTSTRAP_PARAM => InitParamListener::class, +// ConfigInterface::class => ConfigFactory::class, +// InjectorInterface::class => InjectorFactory::class, + InitParamListener::BOOTSTRAP_PARAM => InitParamListener::class ], - ], - // list of Magento specific required services, like default abstract factory - 'required_services' => [ - DiAbstractServiceFactory::class ] ]; diff --git a/setup/config/di.config.php b/setup/config/di.config.php index ccbf3b51fe1c2..c3abe439f65f1 100644 --- a/setup/config/di.config.php +++ b/setup/config/di.config.php @@ -17,9 +17,9 @@ use Magento\Framework\Setup\Declaration\Schema\SchemaConfig; return [ - 'di' => [ - 'instance' => [ - 'preference' => [ + 'dependencies' => [ + 'auto' => [ + 'preferences' => [ EventManagerInterface::class => 'EventManager', ServiceLocatorInterface::class => ServiceManager::class, LoggerInterface::class => Quiet::class, @@ -27,14 +27,16 @@ DriverInterface::class => \Magento\Framework\Filesystem\Driver\File::class, ComponentRegistrarInterface::class => ComponentRegistrar::class, ], - SchemaConfig::class => [ - 'parameters' => [ - 'connectionScopes' => [ - 'default', - 'checkout', - 'sales' + 'types' => [ + SchemaConfig::class => [ + 'parameters' => [ + 'connectionScopes' => [ + 'default', + 'checkout', + 'sales' + ] ] - ] + ], ], ], ], diff --git a/setup/config/modules.config.php b/setup/config/modules.config.php new file mode 100644 index 0000000000000..92841b0e8217e --- /dev/null +++ b/setup/config/modules.config.php @@ -0,0 +1,29 @@ +getListeners($serviceManager, $configuration); $application = new LaminasApplication( - $configuration, $serviceManager, $serviceManager->get('EventManager'), $serviceManager->get('Request'), diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index 9f674622f556a..218743b6de2d7 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -112,7 +112,7 @@ public function createService(ServiceLocatorInterface $serviceLocator) */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { - return $this->extractInitParameters($container->get($requestedName)); + return $this->extractInitParameters($container->get('Application')); } /** From 4416bc18bb046cf8b5e400afb48586ecad887caf Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Fri, 5 Mar 2021 14:02:30 +0000 Subject: [PATCH 4/7] magento/magento2#31854: Customized laminas-di to resolve only required constructor parameters --- setup/config/application.config.php | 9 +-- setup/src/Magento/Setup/Application.php | 3 + .../Magento/Setup/Di/DependencyResolver.php | 53 +++++++++++++++++ .../src/Magento/Setup/Di/InjectorFactory.php | 58 +++++++++++++++++++ 4 files changed, 116 insertions(+), 7 deletions(-) create mode 100644 setup/src/Magento/Setup/Di/DependencyResolver.php create mode 100644 setup/src/Magento/Setup/Di/InjectorFactory.php diff --git a/setup/config/application.config.php b/setup/config/application.config.php index fca03c1ede2c0..bd769c58f7dde 100644 --- a/setup/config/application.config.php +++ b/setup/config/application.config.php @@ -4,11 +4,8 @@ * See COPYING.txt for license details. */ -use Magento\Setup\Mvc\Bootstrap\InitParamListener; -use Laminas\Di\ConfigInterface; use Laminas\Di\InjectorInterface; -use Laminas\Di\Container\ConfigFactory; -use Laminas\Di\Container\InjectorFactory; +use Magento\Setup\Mvc\Bootstrap\InitParamListener; return [ 'modules' => require __DIR__ . '/modules.config.php', @@ -25,9 +22,7 @@ ], 'service_manager' => [ 'factories' => [ -// ConfigInterface::class => ConfigFactory::class, -// InjectorInterface::class => InjectorFactory::class, - InitParamListener::BOOTSTRAP_PARAM => InitParamListener::class + InitParamListener::BOOTSTRAP_PARAM => InitParamListener::class, ], ] ]; diff --git a/setup/src/Magento/Setup/Application.php b/setup/src/Magento/Setup/Application.php index f24395dd9f794..b8c2f9fec10fd 100644 --- a/setup/src/Magento/Setup/Application.php +++ b/setup/src/Magento/Setup/Application.php @@ -5,9 +5,11 @@ */ namespace Magento\Setup; +use Laminas\Di\InjectorInterface; use Laminas\Mvc\Application as LaminasApplication; use Laminas\Mvc\Service\ServiceManagerConfig; use Laminas\ServiceManager\ServiceManager; +use Magento\Setup\Di\InjectorFactory; /** * This class is wrapper on \Laminas\Mvc\Application @@ -35,6 +37,7 @@ public function bootstrap(array $configuration) $serviceManager->setService('ApplicationConfig', $configuration); $serviceManager->get('ModuleManager')->loadModules(); + $serviceManager->setFactory(InjectorInterface::class, InjectorFactory::class); // load specific services if (!empty($configuration['required_services'])) { diff --git a/setup/src/Magento/Setup/Di/DependencyResolver.php b/setup/src/Magento/Setup/Di/DependencyResolver.php new file mode 100644 index 0000000000000..427701eabb880 --- /dev/null +++ b/setup/src/Magento/Setup/Di/DependencyResolver.php @@ -0,0 +1,53 @@ +config->isAlias($type)) { + $type = $this->config->getClassForAlias($type) ?? $type; + } + + return $this->definition->getClassDefinition($type); + } + + /** + * @inheritDoc + */ + public function resolveParameters(string $requestedType, array $callTimeParameters = []): array + { + $result = parent::resolveParameters($requestedType, $callTimeParameters); + if (empty($result)) { + return []; + } + + $parameters = $this->getClassDefinition($requestedType)->getParameters(); + $requiredOnlyResult = []; + + foreach ($parameters as $paramInfo) { + if (!$paramInfo->isRequired()) { + continue; + } + $name = $paramInfo->getName(); + $requiredOnlyResult[$name] = $result[$name]; + } + + return $requiredOnlyResult; + } +} diff --git a/setup/src/Magento/Setup/Di/InjectorFactory.php b/setup/src/Magento/Setup/Di/InjectorFactory.php new file mode 100644 index 0000000000000..c211f55a63383 --- /dev/null +++ b/setup/src/Magento/Setup/Di/InjectorFactory.php @@ -0,0 +1,58 @@ +has(ConfigInterface::class)) { + return $container->get(ConfigInterface::class); + } + + if ($container->has(LegacyConfigInterace::class)) { + return $container->get(LegacyConfigInterace::class); + } + + return (new ConfigFactory())->create($container); + } + + /** + * {@inheritDoc} + */ + public function create(ContainerInterface $container): InjectorInterface + { + $config = $this->createConfig($container); + $definition = new RuntimeDefinition(); + return new Injector( + $config, + $container, + $definition, + new DependencyResolver($definition, $config) + ); + } + + /** + * Make the instance invokable + */ + public function __invoke(ContainerInterface $container): InjectorInterface + { + return $this->create($container); + } +} From 53f29054a75d42cede9016d60d29b45e5772bd47 Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Fri, 5 Mar 2021 17:27:32 +0000 Subject: [PATCH 5/7] magento/magento2#31854: Removed optional parameters types from classes instantiated by laminas di --- .../Magento/Deploy/Console/InputValidator.php | 2 +- .../Console/Command/IndexerReindexCommand.php | 6 +- .../Framework/App/DeploymentConfig/Writer.php | 2 +- .../Magento/Framework/App/MaintenanceMode.php | 2 +- .../Framework/Setup/FilePermissions.php | 2 +- lib/internal/Magento/Framework/composer.json | 2 +- setup/config/modules.config.php | 7 +-- setup/src/Magento/Setup/Application.php | 3 - .../Setup/Console/Command/BackupCommand.php | 6 +- .../Console/Command/DiCompileCommand.php | 2 +- .../Command/InfoBackupsListCommand.php | 2 +- .../Command/InfoCurrencyListCommand.php | 2 +- .../Command/InfoLanguageListCommand.php | 2 +- .../Command/InfoTimezoneListCommand.php | 2 +- .../Command/ModuleUninstallCommand.php | 2 +- .../Setup/Console/Command/RollbackCommand.php | 4 +- .../Setup/Console/Command/UpgradeCommand.php | 6 +- .../Magento/Setup/Di/DependencyResolver.php | 53 ----------------- .../src/Magento/Setup/Di/InjectorFactory.php | 58 ------------------- .../Magento/Setup/Model/ConfigGenerator.php | 6 +- .../Magento/Setup/Model/ConfigOptionsList.php | 4 +- 21 files changed, 27 insertions(+), 148 deletions(-) delete mode 100644 setup/src/Magento/Setup/Di/DependencyResolver.php delete mode 100644 setup/src/Magento/Setup/Di/InjectorFactory.php diff --git a/app/code/Magento/Deploy/Console/InputValidator.php b/app/code/Magento/Deploy/Console/InputValidator.php index 24541174bbabc..e9aaa4243d642 100644 --- a/app/code/Magento/Deploy/Console/InputValidator.php +++ b/app/code/Magento/Deploy/Console/InputValidator.php @@ -72,7 +72,7 @@ class InputValidator */ public function __construct( Locale $localeValidator, - ?RegexFactory $versionValidatorFactory = null + $versionValidatorFactory = null ) { $this->localeValidator = $localeValidator; $this->versionValidatorFactory = $versionValidatorFactory ?: diff --git a/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php b/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php index d6e6c2f1fc2cb..d82ad33cc2dc2 100644 --- a/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php +++ b/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php @@ -58,9 +58,9 @@ class IndexerReindexCommand extends AbstractIndexerManageCommand */ public function __construct( ObjectManagerFactory $objectManagerFactory, - IndexerRegistry $indexerRegistry = null, - DependencyInfoProvider $dependencyInfoProvider = null, - MakeSharedIndexValid $makeSharedValid = null + $indexerRegistry = null, + $dependencyInfoProvider = null, + $makeSharedValid = null ) { $this->indexerRegistry = $indexerRegistry; $this->dependencyInfoProvider = $dependencyInfoProvider; diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php b/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php index 1722ca4fe2577..acc13e4aba8ad 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php @@ -71,7 +71,7 @@ public function __construct( ConfigFilePool $configFilePool, DeploymentConfig $deploymentConfig, Writer\FormatterInterface $formatter = null, - CommentParser $commentParser = null + $commentParser = null ) { $this->reader = $reader; $this->filesystem = $filesystem; diff --git a/lib/internal/Magento/Framework/App/MaintenanceMode.php b/lib/internal/Magento/Framework/App/MaintenanceMode.php index 11347e4220c26..16ae9512ad6e0 100644 --- a/lib/internal/Magento/Framework/App/MaintenanceMode.php +++ b/lib/internal/Magento/Framework/App/MaintenanceMode.php @@ -48,7 +48,7 @@ class MaintenanceMode * @param \Magento\Framework\Filesystem $filesystem * @param Manager|null $eventManager */ - public function __construct(Filesystem $filesystem, ?Manager $eventManager = null) + public function __construct(Filesystem $filesystem, $eventManager = null) { $this->flagDir = $filesystem->getDirectoryWrite(self::FLAG_DIR); $this->eventManager = $eventManager ?: ObjectManager::getInstance()->get(Manager::class); diff --git a/lib/internal/Magento/Framework/Setup/FilePermissions.php b/lib/internal/Magento/Framework/Setup/FilePermissions.php index 8003f2241f22a..90d0365cdfdfe 100644 --- a/lib/internal/Magento/Framework/Setup/FilePermissions.php +++ b/lib/internal/Magento/Framework/Setup/FilePermissions.php @@ -75,7 +75,7 @@ class FilePermissions public function __construct( Filesystem $filesystem, DirectoryList $directoryList, - State $state = null + $state = null ) { $this->filesystem = $filesystem; $this->directoryList = $directoryList; diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 9c46a8089cd64..0f1e23354e3e4 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -30,7 +30,7 @@ "laminas/laminas-http": "^2.6.0", "laminas/laminas-mail": "^2.9.0", "laminas/laminas-mime": "^2.5.0", - "laminas/laminas-mvc": "~2.7.0", + "laminas/laminas-mvc": "^3.2.0", "laminas/laminas-stdlib": "^3.2.1", "laminas/laminas-uri": "^2.5.1", "laminas/laminas-validator": "^2.6.0", diff --git a/setup/config/modules.config.php b/setup/config/modules.config.php index 92841b0e8217e..021961703cb53 100644 --- a/setup/config/modules.config.php +++ b/setup/config/modules.config.php @@ -1,11 +1,8 @@ setService('ApplicationConfig', $configuration); $serviceManager->get('ModuleManager')->loadModules(); - $serviceManager->setFactory(InjectorInterface::class, InjectorFactory::class); // load specific services if (!empty($configuration['required_services'])) { diff --git a/setup/src/Magento/Setup/Console/Command/BackupCommand.php b/setup/src/Magento/Setup/Console/Command/BackupCommand.php index ebfcab5a18417..33de4f0571497 100644 --- a/setup/src/Magento/Setup/Console/Command/BackupCommand.php +++ b/setup/src/Magento/Setup/Console/Command/BackupCommand.php @@ -60,7 +60,6 @@ class BackupCommand extends AbstractSetupCommand * Constructor * * @param ObjectManagerProvider $objectManagerProvider - * @param MaintenanceMode $maintenanceMode deprecated, use $maintenanceModeEnabler instead * @param DeploymentConfig $deploymentConfig * @param MaintenanceModeEnabler $maintenanceModeEnabler * @@ -68,9 +67,8 @@ class BackupCommand extends AbstractSetupCommand */ public function __construct( ObjectManagerProvider $objectManagerProvider, - MaintenanceMode $maintenanceMode, DeploymentConfig $deploymentConfig, - MaintenanceModeEnabler $maintenanceModeEnabler = null + $maintenanceModeEnabler = null ) { $this->objectManager = $objectManagerProvider->get(); $this->backupRollbackFactory = $this->objectManager->get(\Magento\Framework\Setup\BackupRollbackFactory::class); @@ -155,7 +153,7 @@ function () use ($input, $output) { $output, false ); - + return $returnValue; } diff --git a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php index 4c50a3de4fb31..1c493567c198b 100644 --- a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php +++ b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php @@ -99,7 +99,7 @@ public function __construct( Filesystem $filesystem, DriverInterface $fileDriver, ComponentRegistrar $componentRegistrar, - File $file = null + $file = null ) { $this->deploymentConfig = $deploymentConfig; $this->directoryList = $directoryList; diff --git a/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php index 94337dd0742e3..eda9f855fece2 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php @@ -48,7 +48,7 @@ class InfoBackupsListCommand extends Command public function __construct( DirectoryList $directoryList, File $file, - TableFactory $tableHelperFactory = null + $tableHelperFactory = null ) { $this->directoryList = $directoryList; $this->file = $file; diff --git a/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php index 91cfb5e7f6b5c..4f6c2c2f192a7 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php @@ -34,7 +34,7 @@ class InfoCurrencyListCommand extends Command * @param Lists $lists * @param TableFactory $tableHelperFactory */ - public function __construct(Lists $lists, TableFactory $tableHelperFactory = null) + public function __construct(Lists $lists, $tableHelperFactory = null) { $this->lists = $lists; $this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php index 8950bd5edb2fa..33d4bdbce4c2d 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php @@ -34,7 +34,7 @@ class InfoLanguageListCommand extends Command * @param Lists $lists * @param TableFactory $tableHelperFactory */ - public function __construct(Lists $lists, TableFactory $tableHelperFactory = null) + public function __construct(Lists $lists, $tableHelperFactory = null) { $this->lists = $lists; $this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php index 2ff1d228dfe24..99bd0593d06d0 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php @@ -34,7 +34,7 @@ class InfoTimezoneListCommand extends Command * @param Lists $lists * @param TableFactory $tableHelperFactory */ - public function __construct(Lists $lists, TableFactory $tableHelperFactory = null) + public function __construct(Lists $lists, $tableHelperFactory = null) { $this->lists = $lists; $this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php b/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php index 5754bbca986c8..58884fb596d6b 100644 --- a/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php +++ b/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php @@ -139,7 +139,7 @@ public function __construct( UninstallCollector $collector, ModuleUninstaller $moduleUninstaller, ModuleRegistryUninstaller $moduleRegistryUninstaller, - MaintenanceModeEnabler $maintenanceModeEnabler = null + $maintenanceModeEnabler = null ) { parent::__construct($objectManagerProvider); $this->composer = $composer; diff --git a/setup/src/Magento/Setup/Console/Command/RollbackCommand.php b/setup/src/Magento/Setup/Console/Command/RollbackCommand.php index e114c84ba79bc..48dc14a49f261 100644 --- a/setup/src/Magento/Setup/Console/Command/RollbackCommand.php +++ b/setup/src/Magento/Setup/Console/Command/RollbackCommand.php @@ -59,7 +59,6 @@ class RollbackCommand extends AbstractSetupCommand * Constructor * * @param ObjectManagerProvider $objectManagerProvider - * @param MaintenanceMode $maintenanceMode deprecated, use $maintenanceModeEnabler instead * @param DeploymentConfig $deploymentConfig * @param MaintenanceModeEnabler $maintenanceModeEnabler * @@ -67,9 +66,8 @@ class RollbackCommand extends AbstractSetupCommand */ public function __construct( ObjectManagerProvider $objectManagerProvider, - MaintenanceMode $maintenanceMode, DeploymentConfig $deploymentConfig, - MaintenanceModeEnabler $maintenanceModeEnabler = null + $maintenanceModeEnabler = null ) { $this->objectManager = $objectManagerProvider->get(); $this->backupRollbackFactory = $this->objectManager->get(\Magento\Framework\Setup\BackupRollbackFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php index 948e77f81fd2c..4c2a11a93cd81 100644 --- a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php +++ b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php @@ -70,9 +70,9 @@ class UpgradeCommand extends AbstractSetupCommand public function __construct( InstallerFactory $installerFactory, SearchConfigFactory $searchConfigFactory, - DeploymentConfig $deploymentConfig = null, - AppState $appState = null, - CacheInterface $cache = null + $deploymentConfig = null, + $appState = null, + $cache = null ) { $this->installerFactory = $installerFactory; $this->searchConfigFactory = $searchConfigFactory; diff --git a/setup/src/Magento/Setup/Di/DependencyResolver.php b/setup/src/Magento/Setup/Di/DependencyResolver.php deleted file mode 100644 index 427701eabb880..0000000000000 --- a/setup/src/Magento/Setup/Di/DependencyResolver.php +++ /dev/null @@ -1,53 +0,0 @@ -config->isAlias($type)) { - $type = $this->config->getClassForAlias($type) ?? $type; - } - - return $this->definition->getClassDefinition($type); - } - - /** - * @inheritDoc - */ - public function resolveParameters(string $requestedType, array $callTimeParameters = []): array - { - $result = parent::resolveParameters($requestedType, $callTimeParameters); - if (empty($result)) { - return []; - } - - $parameters = $this->getClassDefinition($requestedType)->getParameters(); - $requiredOnlyResult = []; - - foreach ($parameters as $paramInfo) { - if (!$paramInfo->isRequired()) { - continue; - } - $name = $paramInfo->getName(); - $requiredOnlyResult[$name] = $result[$name]; - } - - return $requiredOnlyResult; - } -} diff --git a/setup/src/Magento/Setup/Di/InjectorFactory.php b/setup/src/Magento/Setup/Di/InjectorFactory.php deleted file mode 100644 index c211f55a63383..0000000000000 --- a/setup/src/Magento/Setup/Di/InjectorFactory.php +++ /dev/null @@ -1,58 +0,0 @@ -has(ConfigInterface::class)) { - return $container->get(ConfigInterface::class); - } - - if ($container->has(LegacyConfigInterace::class)) { - return $container->get(LegacyConfigInterace::class); - } - - return (new ConfigFactory())->create($container); - } - - /** - * {@inheritDoc} - */ - public function create(ContainerInterface $container): InjectorInterface - { - $config = $this->createConfig($container); - $definition = new RuntimeDefinition(); - return new Injector( - $config, - $container, - $definition, - new DependencyResolver($definition, $config) - ); - } - - /** - * Make the instance invokable - */ - public function __invoke(ContainerInterface $container): InjectorInterface - { - return $this->create($container); - } -} diff --git a/setup/src/Magento/Setup/Model/ConfigGenerator.php b/setup/src/Magento/Setup/Model/ConfigGenerator.php index 57f462c747ee4..906938573b855 100644 --- a/setup/src/Magento/Setup/Model/ConfigGenerator.php +++ b/setup/src/Magento/Setup/Model/ConfigGenerator.php @@ -80,9 +80,9 @@ class ConfigGenerator public function __construct( Random $random, DeploymentConfig $deploymentConfig, - ConfigDataFactory $configDataFactory = null, - CryptKeyGeneratorInterface $cryptKeyGenerator = null, - DriverOptions $driverOptions = null + $configDataFactory = null, + $cryptKeyGenerator = null, + $driverOptions = null ) { $this->random = $random; $this->deploymentConfig = $deploymentConfig; diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList.php b/setup/src/Magento/Setup/Model/ConfigOptionsList.php index f2135d8bf5202..edc2f6b5abd63 100644 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList.php +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList.php @@ -72,8 +72,8 @@ class ConfigOptionsList implements ConfigOptionsListInterface public function __construct( ConfigGenerator $configGenerator, DbValidator $dbValidator, - KeyValidator $encryptionKeyValidator = null, - DriverOptions $driverOptions = null + $encryptionKeyValidator = null, + $driverOptions = null ) { $this->configGenerator = $configGenerator; $this->dbValidator = $dbValidator; From 8a6d0646e77d8be72c0fad456dbabeef6ac48c6d Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Sat, 6 Mar 2021 16:32:54 +0000 Subject: [PATCH 6/7] magento/magento2#31854: Utilized Magento DI for loading types Laminas DI cannot handle --- .../Magento/Deploy/Console/InputValidator.php | 2 +- .../Console/Command/IndexerReindexCommand.php | 6 ++--- .../Framework/App/DeploymentConfig/Writer.php | 2 +- .../Magento/Framework/App/MaintenanceMode.php | 2 +- .../Framework/Setup/FilePermissions.php | 2 +- setup/config/application.config.php | 8 +++++- .../Setup/Console/Command/BackupCommand.php | 4 ++- .../Console/Command/DiCompileCommand.php | 2 +- .../Command/InfoBackupsListCommand.php | 2 +- .../Command/InfoCurrencyListCommand.php | 2 +- .../Command/InfoLanguageListCommand.php | 2 +- .../Command/InfoTimezoneListCommand.php | 2 +- .../Command/ModuleUninstallCommand.php | 2 +- .../Setup/Console/Command/RollbackCommand.php | 4 ++- .../Setup/Console/Command/UpgradeCommand.php | 6 ++--- .../src/Magento/Setup/Di/MagentoDiFactory.php | 26 +++++++++++++++++++ .../Magento/Setup/Model/ConfigGenerator.php | 6 ++--- .../Magento/Setup/Model/ConfigOptionsList.php | 4 +-- 18 files changed, 60 insertions(+), 24 deletions(-) create mode 100644 setup/src/Magento/Setup/Di/MagentoDiFactory.php diff --git a/app/code/Magento/Deploy/Console/InputValidator.php b/app/code/Magento/Deploy/Console/InputValidator.php index e9aaa4243d642..24541174bbabc 100644 --- a/app/code/Magento/Deploy/Console/InputValidator.php +++ b/app/code/Magento/Deploy/Console/InputValidator.php @@ -72,7 +72,7 @@ class InputValidator */ public function __construct( Locale $localeValidator, - $versionValidatorFactory = null + ?RegexFactory $versionValidatorFactory = null ) { $this->localeValidator = $localeValidator; $this->versionValidatorFactory = $versionValidatorFactory ?: diff --git a/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php b/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php index d82ad33cc2dc2..d6e6c2f1fc2cb 100644 --- a/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php +++ b/app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php @@ -58,9 +58,9 @@ class IndexerReindexCommand extends AbstractIndexerManageCommand */ public function __construct( ObjectManagerFactory $objectManagerFactory, - $indexerRegistry = null, - $dependencyInfoProvider = null, - $makeSharedValid = null + IndexerRegistry $indexerRegistry = null, + DependencyInfoProvider $dependencyInfoProvider = null, + MakeSharedIndexValid $makeSharedValid = null ) { $this->indexerRegistry = $indexerRegistry; $this->dependencyInfoProvider = $dependencyInfoProvider; diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php b/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php index acc13e4aba8ad..1722ca4fe2577 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php @@ -71,7 +71,7 @@ public function __construct( ConfigFilePool $configFilePool, DeploymentConfig $deploymentConfig, Writer\FormatterInterface $formatter = null, - $commentParser = null + CommentParser $commentParser = null ) { $this->reader = $reader; $this->filesystem = $filesystem; diff --git a/lib/internal/Magento/Framework/App/MaintenanceMode.php b/lib/internal/Magento/Framework/App/MaintenanceMode.php index 16ae9512ad6e0..11347e4220c26 100644 --- a/lib/internal/Magento/Framework/App/MaintenanceMode.php +++ b/lib/internal/Magento/Framework/App/MaintenanceMode.php @@ -48,7 +48,7 @@ class MaintenanceMode * @param \Magento\Framework\Filesystem $filesystem * @param Manager|null $eventManager */ - public function __construct(Filesystem $filesystem, $eventManager = null) + public function __construct(Filesystem $filesystem, ?Manager $eventManager = null) { $this->flagDir = $filesystem->getDirectoryWrite(self::FLAG_DIR); $this->eventManager = $eventManager ?: ObjectManager::getInstance()->get(Manager::class); diff --git a/lib/internal/Magento/Framework/Setup/FilePermissions.php b/lib/internal/Magento/Framework/Setup/FilePermissions.php index 90d0365cdfdfe..8003f2241f22a 100644 --- a/lib/internal/Magento/Framework/Setup/FilePermissions.php +++ b/lib/internal/Magento/Framework/Setup/FilePermissions.php @@ -75,7 +75,7 @@ class FilePermissions public function __construct( Filesystem $filesystem, DirectoryList $directoryList, - $state = null + State $state = null ) { $this->filesystem = $filesystem; $this->directoryList = $directoryList; diff --git a/setup/config/application.config.php b/setup/config/application.config.php index bd769c58f7dde..7a55e71560f1e 100644 --- a/setup/config/application.config.php +++ b/setup/config/application.config.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -use Laminas\Di\InjectorInterface; +use Magento\Setup\Di\MagentoDiFactory; use Magento\Setup\Mvc\Bootstrap\InitParamListener; return [ @@ -23,6 +23,12 @@ 'service_manager' => [ 'factories' => [ InitParamListener::BOOTSTRAP_PARAM => InitParamListener::class, + \Magento\Framework\App\MaintenanceMode::class => MagentoDiFactory::class, + \Magento\Setup\Model\ConfigGenerator::class => MagentoDiFactory::class, + \Magento\Indexer\Console\Command\IndexerReindexCommand::class => MagentoDiFactory::class, + \Symfony\Component\Console\Helper\TableFactory::class => MagentoDiFactory::class, + \Magento\Deploy\Console\InputValidator::class => MagentoDiFactory::class, + \Magento\Framework\App\State::class => MagentoDiFactory::class, ], ] ]; diff --git a/setup/src/Magento/Setup/Console/Command/BackupCommand.php b/setup/src/Magento/Setup/Console/Command/BackupCommand.php index 33de4f0571497..841e766ebcb90 100644 --- a/setup/src/Magento/Setup/Console/Command/BackupCommand.php +++ b/setup/src/Magento/Setup/Console/Command/BackupCommand.php @@ -60,6 +60,7 @@ class BackupCommand extends AbstractSetupCommand * Constructor * * @param ObjectManagerProvider $objectManagerProvider + * @param MaintenanceMode $maintenanceMode deprecated, use $maintenanceModeEnabler instead * @param DeploymentConfig $deploymentConfig * @param MaintenanceModeEnabler $maintenanceModeEnabler * @@ -67,8 +68,9 @@ class BackupCommand extends AbstractSetupCommand */ public function __construct( ObjectManagerProvider $objectManagerProvider, + MaintenanceMode $maintenanceMode, DeploymentConfig $deploymentConfig, - $maintenanceModeEnabler = null + MaintenanceModeEnabler $maintenanceModeEnabler = null ) { $this->objectManager = $objectManagerProvider->get(); $this->backupRollbackFactory = $this->objectManager->get(\Magento\Framework\Setup\BackupRollbackFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php index 1c493567c198b..4c50a3de4fb31 100644 --- a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php +++ b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php @@ -99,7 +99,7 @@ public function __construct( Filesystem $filesystem, DriverInterface $fileDriver, ComponentRegistrar $componentRegistrar, - $file = null + File $file = null ) { $this->deploymentConfig = $deploymentConfig; $this->directoryList = $directoryList; diff --git a/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php index eda9f855fece2..94337dd0742e3 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php @@ -48,7 +48,7 @@ class InfoBackupsListCommand extends Command public function __construct( DirectoryList $directoryList, File $file, - $tableHelperFactory = null + TableFactory $tableHelperFactory = null ) { $this->directoryList = $directoryList; $this->file = $file; diff --git a/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php index 4f6c2c2f192a7..91cfb5e7f6b5c 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php @@ -34,7 +34,7 @@ class InfoCurrencyListCommand extends Command * @param Lists $lists * @param TableFactory $tableHelperFactory */ - public function __construct(Lists $lists, $tableHelperFactory = null) + public function __construct(Lists $lists, TableFactory $tableHelperFactory = null) { $this->lists = $lists; $this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php index 33d4bdbce4c2d..8950bd5edb2fa 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php @@ -34,7 +34,7 @@ class InfoLanguageListCommand extends Command * @param Lists $lists * @param TableFactory $tableHelperFactory */ - public function __construct(Lists $lists, $tableHelperFactory = null) + public function __construct(Lists $lists, TableFactory $tableHelperFactory = null) { $this->lists = $lists; $this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php b/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php index 99bd0593d06d0..2ff1d228dfe24 100644 --- a/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php @@ -34,7 +34,7 @@ class InfoTimezoneListCommand extends Command * @param Lists $lists * @param TableFactory $tableHelperFactory */ - public function __construct(Lists $lists, $tableHelperFactory = null) + public function __construct(Lists $lists, TableFactory $tableHelperFactory = null) { $this->lists = $lists; $this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php b/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php index 58884fb596d6b..5754bbca986c8 100644 --- a/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php +++ b/setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php @@ -139,7 +139,7 @@ public function __construct( UninstallCollector $collector, ModuleUninstaller $moduleUninstaller, ModuleRegistryUninstaller $moduleRegistryUninstaller, - $maintenanceModeEnabler = null + MaintenanceModeEnabler $maintenanceModeEnabler = null ) { parent::__construct($objectManagerProvider); $this->composer = $composer; diff --git a/setup/src/Magento/Setup/Console/Command/RollbackCommand.php b/setup/src/Magento/Setup/Console/Command/RollbackCommand.php index 48dc14a49f261..e114c84ba79bc 100644 --- a/setup/src/Magento/Setup/Console/Command/RollbackCommand.php +++ b/setup/src/Magento/Setup/Console/Command/RollbackCommand.php @@ -59,6 +59,7 @@ class RollbackCommand extends AbstractSetupCommand * Constructor * * @param ObjectManagerProvider $objectManagerProvider + * @param MaintenanceMode $maintenanceMode deprecated, use $maintenanceModeEnabler instead * @param DeploymentConfig $deploymentConfig * @param MaintenanceModeEnabler $maintenanceModeEnabler * @@ -66,8 +67,9 @@ class RollbackCommand extends AbstractSetupCommand */ public function __construct( ObjectManagerProvider $objectManagerProvider, + MaintenanceMode $maintenanceMode, DeploymentConfig $deploymentConfig, - $maintenanceModeEnabler = null + MaintenanceModeEnabler $maintenanceModeEnabler = null ) { $this->objectManager = $objectManagerProvider->get(); $this->backupRollbackFactory = $this->objectManager->get(\Magento\Framework\Setup\BackupRollbackFactory::class); diff --git a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php index 4c2a11a93cd81..948e77f81fd2c 100644 --- a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php +++ b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php @@ -70,9 +70,9 @@ class UpgradeCommand extends AbstractSetupCommand public function __construct( InstallerFactory $installerFactory, SearchConfigFactory $searchConfigFactory, - $deploymentConfig = null, - $appState = null, - $cache = null + DeploymentConfig $deploymentConfig = null, + AppState $appState = null, + CacheInterface $cache = null ) { $this->installerFactory = $installerFactory; $this->searchConfigFactory = $searchConfigFactory; diff --git a/setup/src/Magento/Setup/Di/MagentoDiFactory.php b/setup/src/Magento/Setup/Di/MagentoDiFactory.php new file mode 100644 index 0000000000000..c78d51fd253ea --- /dev/null +++ b/setup/src/Magento/Setup/Di/MagentoDiFactory.php @@ -0,0 +1,26 @@ +get($requestedName); + } +} diff --git a/setup/src/Magento/Setup/Model/ConfigGenerator.php b/setup/src/Magento/Setup/Model/ConfigGenerator.php index 906938573b855..57f462c747ee4 100644 --- a/setup/src/Magento/Setup/Model/ConfigGenerator.php +++ b/setup/src/Magento/Setup/Model/ConfigGenerator.php @@ -80,9 +80,9 @@ class ConfigGenerator public function __construct( Random $random, DeploymentConfig $deploymentConfig, - $configDataFactory = null, - $cryptKeyGenerator = null, - $driverOptions = null + ConfigDataFactory $configDataFactory = null, + CryptKeyGeneratorInterface $cryptKeyGenerator = null, + DriverOptions $driverOptions = null ) { $this->random = $random; $this->deploymentConfig = $deploymentConfig; diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList.php b/setup/src/Magento/Setup/Model/ConfigOptionsList.php index edc2f6b5abd63..f2135d8bf5202 100644 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList.php +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList.php @@ -72,8 +72,8 @@ class ConfigOptionsList implements ConfigOptionsListInterface public function __construct( ConfigGenerator $configGenerator, DbValidator $dbValidator, - $encryptionKeyValidator = null, - $driverOptions = null + KeyValidator $encryptionKeyValidator = null, + DriverOptions $driverOptions = null ) { $this->configGenerator = $configGenerator; $this->dbValidator = $dbValidator; From c9f729beaa097a6401f77e38e0d287bcd73fccb2 Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Tue, 9 Mar 2021 16:27:58 +0000 Subject: [PATCH 7/7] magento/magento2#31783: Added laminas-mvc-console dependency --- composer.json | 11 +++-- composer.lock | 81 ++++++++++++++++++++++++++++++++- setup/config/modules.config.php | 1 + 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index a157664d6b522..909c99862c0bd 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,6 @@ "colinmollenhour/credis": "1.11.1", "colinmollenhour/php-redis-session-abstract": "~1.4.0", "composer/composer": "^1.9 || ^2.0", - "magento/magento-composer-installer": ">=0.1.11", "elasticsearch/elasticsearch": "~7.11.0", "guzzlehttp/guzzle": "^6.3.3", "laminas/laminas-captcha": "^2.7.1", @@ -54,6 +53,7 @@ "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", @@ -64,7 +64,11 @@ "laminas/laminas-uri": "^2.5.1", "laminas/laminas-validator": "^2.6.0", "laminas/laminas-view": "~2.11.2", + "league/flysystem": "^1.0", + "league/flysystem-aws-s3-v3": "^1.0", + "league/flysystem-cached-adapter": "^1.0", "magento/composer": "1.6.0", + "magento/magento-composer-installer": ">=0.1.11", "magento/zendframework1": "~1.14.2", "monolog/monolog": "^1.17", "paragonie/sodium_compat": "^1.6", @@ -79,10 +83,7 @@ "tedivm/jshrink": "~1.4.0", "tubalmartin/cssmin": "4.1.1", "webonyx/graphql-php": "^0.13.8", - "wikimedia/less.php": "^3.0.0", - "league/flysystem": "^1.0", - "league/flysystem-aws-s3-v3": "^1.0", - "league/flysystem-cached-adapter": "^1.0" + "wikimedia/less.php": "^3.0.0" }, "require-dev": { "allure-framework/allure-phpunit": "~1.2.0", diff --git a/composer.lock b/composer.lock index 3710342cd9843..1033d1fc6c614 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": "c21f452e51ee5cf13bcd46a570853d12", + "content-hash": "1ea84c9542b956d1049cdae41beb7cbd", "packages": [ { "name": "aws/aws-sdk-php", @@ -2692,6 +2692,85 @@ ], "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", diff --git a/setup/config/modules.config.php b/setup/config/modules.config.php index 021961703cb53..610fa29083125 100644 --- a/setup/config/modules.config.php +++ b/setup/config/modules.config.php @@ -23,4 +23,5 @@ 'Laminas\Serializer', 'Laminas\Session', 'Laminas\Validator', + 'Laminas\Mvc\Console' ];