Skip to content

Commit 53f2905

Browse files
committed
#31854: Removed optional parameters types from classes instantiated by laminas di
1 parent 4416bc1 commit 53f2905

21 files changed

+27
-148
lines changed

app/code/Magento/Deploy/Console/InputValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class InputValidator
7272
*/
7373
public function __construct(
7474
Locale $localeValidator,
75-
?RegexFactory $versionValidatorFactory = null
75+
$versionValidatorFactory = null
7676
) {
7777
$this->localeValidator = $localeValidator;
7878
$this->versionValidatorFactory = $versionValidatorFactory ?:

app/code/Magento/Indexer/Console/Command/IndexerReindexCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class IndexerReindexCommand extends AbstractIndexerManageCommand
5858
*/
5959
public function __construct(
6060
ObjectManagerFactory $objectManagerFactory,
61-
IndexerRegistry $indexerRegistry = null,
62-
DependencyInfoProvider $dependencyInfoProvider = null,
63-
MakeSharedIndexValid $makeSharedValid = null
61+
$indexerRegistry = null,
62+
$dependencyInfoProvider = null,
63+
$makeSharedValid = null
6464
) {
6565
$this->indexerRegistry = $indexerRegistry;
6666
$this->dependencyInfoProvider = $dependencyInfoProvider;

lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
ConfigFilePool $configFilePool,
7272
DeploymentConfig $deploymentConfig,
7373
Writer\FormatterInterface $formatter = null,
74-
CommentParser $commentParser = null
74+
$commentParser = null
7575
) {
7676
$this->reader = $reader;
7777
$this->filesystem = $filesystem;

lib/internal/Magento/Framework/App/MaintenanceMode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class MaintenanceMode
4848
* @param \Magento\Framework\Filesystem $filesystem
4949
* @param Manager|null $eventManager
5050
*/
51-
public function __construct(Filesystem $filesystem, ?Manager $eventManager = null)
51+
public function __construct(Filesystem $filesystem, $eventManager = null)
5252
{
5353
$this->flagDir = $filesystem->getDirectoryWrite(self::FLAG_DIR);
5454
$this->eventManager = $eventManager ?: ObjectManager::getInstance()->get(Manager::class);

lib/internal/Magento/Framework/Setup/FilePermissions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class FilePermissions
7575
public function __construct(
7676
Filesystem $filesystem,
7777
DirectoryList $directoryList,
78-
State $state = null
78+
$state = null
7979
) {
8080
$this->filesystem = $filesystem;
8181
$this->directoryList = $directoryList;

lib/internal/Magento/Framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"laminas/laminas-http": "^2.6.0",
3131
"laminas/laminas-mail": "^2.9.0",
3232
"laminas/laminas-mime": "^2.5.0",
33-
"laminas/laminas-mvc": "~2.7.0",
33+
"laminas/laminas-mvc": "^3.2.0",
3434
"laminas/laminas-stdlib": "^3.2.1",
3535
"laminas/laminas-uri": "^2.5.1",
3636
"laminas/laminas-validator": "^2.6.0",

setup/config/modules.config.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<?php
2-
32
/**
4-
* @see https://github.com/laminas/laminas-mvc-skeleton for the canonical source repository
5-
* @copyright https://github.com/laminas/laminas-mvc-skeleton/blob/master/COPYRIGHT.md
6-
* @license https://github.com/laminas/laminas-mvc-skeleton/blob/master/LICENSE.md New BSD License
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
75
*/
8-
96
/**
107
* List of enabled modules for this application.
118
*

setup/src/Magento/Setup/Application.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
*/
66
namespace Magento\Setup;
77

8-
use Laminas\Di\InjectorInterface;
98
use Laminas\Mvc\Application as LaminasApplication;
109
use Laminas\Mvc\Service\ServiceManagerConfig;
1110
use Laminas\ServiceManager\ServiceManager;
12-
use Magento\Setup\Di\InjectorFactory;
1311

1412
/**
1513
* This class is wrapper on \Laminas\Mvc\Application
@@ -37,7 +35,6 @@ public function bootstrap(array $configuration)
3735
$serviceManager->setService('ApplicationConfig', $configuration);
3836

3937
$serviceManager->get('ModuleManager')->loadModules();
40-
$serviceManager->setFactory(InjectorInterface::class, InjectorFactory::class);
4138

4239
// load specific services
4340
if (!empty($configuration['required_services'])) {

setup/src/Magento/Setup/Console/Command/BackupCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,15 @@ class BackupCommand extends AbstractSetupCommand
6060
* Constructor
6161
*
6262
* @param ObjectManagerProvider $objectManagerProvider
63-
* @param MaintenanceMode $maintenanceMode deprecated, use $maintenanceModeEnabler instead
6463
* @param DeploymentConfig $deploymentConfig
6564
* @param MaintenanceModeEnabler $maintenanceModeEnabler
6665
*
6766
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
6867
*/
6968
public function __construct(
7069
ObjectManagerProvider $objectManagerProvider,
71-
MaintenanceMode $maintenanceMode,
7270
DeploymentConfig $deploymentConfig,
73-
MaintenanceModeEnabler $maintenanceModeEnabler = null
71+
$maintenanceModeEnabler = null
7472
) {
7573
$this->objectManager = $objectManagerProvider->get();
7674
$this->backupRollbackFactory = $this->objectManager->get(\Magento\Framework\Setup\BackupRollbackFactory::class);
@@ -155,7 +153,7 @@ function () use ($input, $output) {
155153
$output,
156154
false
157155
);
158-
156+
159157
return $returnValue;
160158
}
161159

setup/src/Magento/Setup/Console/Command/DiCompileCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function __construct(
9999
Filesystem $filesystem,
100100
DriverInterface $fileDriver,
101101
ComponentRegistrar $componentRegistrar,
102-
File $file = null
102+
$file = null
103103
) {
104104
$this->deploymentConfig = $deploymentConfig;
105105
$this->directoryList = $directoryList;

setup/src/Magento/Setup/Console/Command/InfoBackupsListCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class InfoBackupsListCommand extends Command
4848
public function __construct(
4949
DirectoryList $directoryList,
5050
File $file,
51-
TableFactory $tableHelperFactory = null
51+
$tableHelperFactory = null
5252
) {
5353
$this->directoryList = $directoryList;
5454
$this->file = $file;

setup/src/Magento/Setup/Console/Command/InfoCurrencyListCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class InfoCurrencyListCommand extends Command
3434
* @param Lists $lists
3535
* @param TableFactory $tableHelperFactory
3636
*/
37-
public function __construct(Lists $lists, TableFactory $tableHelperFactory = null)
37+
public function __construct(Lists $lists, $tableHelperFactory = null)
3838
{
3939
$this->lists = $lists;
4040
$this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class);

setup/src/Magento/Setup/Console/Command/InfoLanguageListCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class InfoLanguageListCommand extends Command
3434
* @param Lists $lists
3535
* @param TableFactory $tableHelperFactory
3636
*/
37-
public function __construct(Lists $lists, TableFactory $tableHelperFactory = null)
37+
public function __construct(Lists $lists, $tableHelperFactory = null)
3838
{
3939
$this->lists = $lists;
4040
$this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class);

setup/src/Magento/Setup/Console/Command/InfoTimezoneListCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class InfoTimezoneListCommand extends Command
3434
* @param Lists $lists
3535
* @param TableFactory $tableHelperFactory
3636
*/
37-
public function __construct(Lists $lists, TableFactory $tableHelperFactory = null)
37+
public function __construct(Lists $lists, $tableHelperFactory = null)
3838
{
3939
$this->lists = $lists;
4040
$this->tableHelperFactory = $tableHelperFactory ?: ObjectManager::getInstance()->create(TableFactory::class);

setup/src/Magento/Setup/Console/Command/ModuleUninstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function __construct(
139139
UninstallCollector $collector,
140140
ModuleUninstaller $moduleUninstaller,
141141
ModuleRegistryUninstaller $moduleRegistryUninstaller,
142-
MaintenanceModeEnabler $maintenanceModeEnabler = null
142+
$maintenanceModeEnabler = null
143143
) {
144144
parent::__construct($objectManagerProvider);
145145
$this->composer = $composer;

setup/src/Magento/Setup/Console/Command/RollbackCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,15 @@ class RollbackCommand extends AbstractSetupCommand
5959
* Constructor
6060
*
6161
* @param ObjectManagerProvider $objectManagerProvider
62-
* @param MaintenanceMode $maintenanceMode deprecated, use $maintenanceModeEnabler instead
6362
* @param DeploymentConfig $deploymentConfig
6463
* @param MaintenanceModeEnabler $maintenanceModeEnabler
6564
*
6665
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
6766
*/
6867
public function __construct(
6968
ObjectManagerProvider $objectManagerProvider,
70-
MaintenanceMode $maintenanceMode,
7169
DeploymentConfig $deploymentConfig,
72-
MaintenanceModeEnabler $maintenanceModeEnabler = null
70+
$maintenanceModeEnabler = null
7371
) {
7472
$this->objectManager = $objectManagerProvider->get();
7573
$this->backupRollbackFactory = $this->objectManager->get(\Magento\Framework\Setup\BackupRollbackFactory::class);

setup/src/Magento/Setup/Console/Command/UpgradeCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ class UpgradeCommand extends AbstractSetupCommand
7070
public function __construct(
7171
InstallerFactory $installerFactory,
7272
SearchConfigFactory $searchConfigFactory,
73-
DeploymentConfig $deploymentConfig = null,
74-
AppState $appState = null,
75-
CacheInterface $cache = null
73+
$deploymentConfig = null,
74+
$appState = null,
75+
$cache = null
7676
) {
7777
$this->installerFactory = $installerFactory;
7878
$this->searchConfigFactory = $searchConfigFactory;

setup/src/Magento/Setup/Di/DependencyResolver.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

setup/src/Magento/Setup/Di/InjectorFactory.php

Lines changed: 0 additions & 58 deletions
This file was deleted.

setup/src/Magento/Setup/Model/ConfigGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ class ConfigGenerator
8080
public function __construct(
8181
Random $random,
8282
DeploymentConfig $deploymentConfig,
83-
ConfigDataFactory $configDataFactory = null,
84-
CryptKeyGeneratorInterface $cryptKeyGenerator = null,
85-
DriverOptions $driverOptions = null
83+
$configDataFactory = null,
84+
$cryptKeyGenerator = null,
85+
$driverOptions = null
8686
) {
8787
$this->random = $random;
8888
$this->deploymentConfig = $deploymentConfig;

setup/src/Magento/Setup/Model/ConfigOptionsList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class ConfigOptionsList implements ConfigOptionsListInterface
7272
public function __construct(
7373
ConfigGenerator $configGenerator,
7474
DbValidator $dbValidator,
75-
KeyValidator $encryptionKeyValidator = null,
76-
DriverOptions $driverOptions = null
75+
$encryptionKeyValidator = null,
76+
$driverOptions = null
7777
) {
7878
$this->configGenerator = $configGenerator;
7979
$this->dbValidator = $dbValidator;

0 commit comments

Comments
 (0)