Skip to content

Commit 82c15a1

Browse files
committed
qa: remove deprecated configuration support
Signed-off-by: Maximilian Bösing <[email protected]>
1 parent 1cbe3e6 commit 82c15a1

11 files changed

+5
-632
lines changed

psalm-baseline.xml

-24
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
3-
<file src="src/Command/DeprecatedStorageFactoryConfigurationCheckCommand.php">
4-
<MixedArgument>
5-
<code><![CDATA[$cacheConfiguration]]></code>
6-
<code><![CDATA[$configuration]]></code>
7-
</MixedArgument>
8-
<MixedPropertyTypeCoercion>
9-
<code><![CDATA[$projectConfiguration]]></code>
10-
</MixedPropertyTypeCoercion>
11-
</file>
123
<file src="src/Exception/BadMethodCallException.php">
134
<UnusedClass>
145
<code><![CDATA[BadMethodCallException]]></code>
@@ -352,15 +343,6 @@
352343
<code><![CDATA[TotalSpaceCapableInterface]]></code>
353344
</UnusedClass>
354345
</file>
355-
<file src="test/Command/DeprecatedStorageFactoryConfigurationCheckCommandTest.php">
356-
<DeprecatedMethod>
357-
<code><![CDATA[withConsecutive]]></code>
358-
<code><![CDATA[withConsecutive]]></code>
359-
<code><![CDATA[withConsecutive]]></code>
360-
<code><![CDATA[withConsecutive]]></code>
361-
<code><![CDATA[withConsecutive]]></code>
362-
</DeprecatedMethod>
363-
</file>
364346
<file src="test/Pattern/AbstractCommonPatternTest.php">
365347
<PossiblyUnusedMethod>
366348
<code><![CDATA[getCommonPatternNamesProvider]]></code>
@@ -483,12 +465,6 @@
483465
<code><![CDATA[array]]></code>
484466
</MixedInferredReturnType>
485467
</file>
486-
<file src="test/Service/DeprecatedSchemaDetectorTest.php">
487-
<MixedInferredReturnType>
488-
<code><![CDATA[Generator]]></code>
489-
<code><![CDATA[Generator]]></code>
490-
</MixedInferredReturnType>
491-
</file>
492468
<file src="test/Service/StorageAdapterFactoryFactoryTest.php">
493469
<DeprecatedMethod>
494470
<code><![CDATA[withConsecutive]]></code>

src/Command/DeprecatedStorageFactoryConfigurationCheckCommand.php

-141
This file was deleted.

src/Command/DeprecatedStorageFactoryConfigurationCheckCommandFactory.php

-48
This file was deleted.

src/ConfigProvider.php

+2-34
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,18 @@
22

33
namespace Laminas\Cache;
44

5-
use Laminas\Cache\Command\DeprecatedStorageFactoryConfigurationCheckCommand;
6-
use Laminas\Cache\Command\DeprecatedStorageFactoryConfigurationCheckCommandFactory;
75
use Laminas\Cache\Service\StorageAdapterFactory;
86
use Laminas\Cache\Service\StorageAdapterFactoryFactory;
97
use Laminas\Cache\Service\StorageAdapterFactoryInterface;
108
use Laminas\Cache\Service\StoragePluginFactory;
119
use Laminas\Cache\Service\StoragePluginFactoryFactory;
1210
use Laminas\Cache\Service\StoragePluginFactoryInterface;
1311
use Laminas\ServiceManager\ServiceManager;
14-
use Symfony\Component\Console\Command\Command;
15-
16-
use function class_exists;
1712

1813
/**
1914
* @psalm-import-type ServiceManagerConfiguration from ServiceManager
2015
*/
21-
class ConfigProvider
16+
final class ConfigProvider
2217
{
2318
public const ADAPTER_PLUGIN_MANAGER_CONFIGURATION_KEY = 'storage_adapters';
2419

@@ -31,7 +26,6 @@ public function __invoke(): array
3126
{
3227
return [
3328
'dependencies' => $this->getDependencyConfig(),
34-
'laminas-cli' => $this->getCliConfig(),
3529
];
3630
}
3731

@@ -42,7 +36,7 @@ public function __invoke(): array
4236
*/
4337
public function getDependencyConfig(): array
4438
{
45-
$dependencies = [
39+
return [
4640
'abstract_factories' => [
4741
Service\StorageCacheAbstractServiceFactory::class,
4842
],
@@ -55,31 +49,5 @@ public function getDependencyConfig(): array
5549
StorageAdapterFactoryInterface::class => StorageAdapterFactoryFactory::class,
5650
],
5751
];
58-
59-
if (class_exists(Command::class)) {
60-
$dependencies['factories'] += [
61-
DeprecatedStorageFactoryConfigurationCheckCommand::class
62-
=> DeprecatedStorageFactoryConfigurationCheckCommandFactory::class,
63-
];
64-
}
65-
66-
return $dependencies;
67-
}
68-
69-
/**
70-
* @return array<string,mixed>
71-
*/
72-
public function getCliConfig(): array
73-
{
74-
if (! class_exists(Command::class)) {
75-
return [];
76-
}
77-
78-
return [
79-
'commands' => [
80-
DeprecatedStorageFactoryConfigurationCheckCommand::NAME
81-
=> DeprecatedStorageFactoryConfigurationCheckCommand::class,
82-
],
83-
];
8452
}
8553
}

src/Module.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Laminas\Cache;
44

5-
class Module
5+
final class Module
66
{
77
/**
88
* Return default laminas-cache configuration for laminas-mvc context.
@@ -12,7 +12,6 @@ public function getConfig(): array
1212
$provider = new ConfigProvider();
1313
return [
1414
'service_manager' => $provider->getDependencyConfig(),
15-
'laminas-cli' => $provider->getCliConfig(),
1615
];
1716
}
1817
}

src/Service/DeprecatedSchemaDetector.php

-41
This file was deleted.

src/Service/DeprecatedSchemaDetectorInterface.php

-16
This file was deleted.

0 commit comments

Comments
 (0)