Skip to content

Commit

Permalink
Merge pull request #211 from laminas/3.22.x-merge-up-into-4.0.x_0gv6fO2q
Browse files Browse the repository at this point in the history
Merge release 3.22.0 into 4.0.x
  • Loading branch information
boesing authored Oct 11, 2023
2 parents 282a204 + d8386b6 commit c902c41
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 40 deletions.
5 changes: 5 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ignore_php_platform_requirements": {
"8.3": true
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"brick/varexporter": "^0.3.8 || ^0.4.0",
"laminas/laminas-stdlib": "^3.17",
"psr/container": "^1.1 || ^2.0"
Expand All @@ -50,7 +50,7 @@
"lctrs/psalm-psr-container-plugin": "^1.9",
"mikey179/vfsstream": "^1.6.11@alpha",
"phpbench/phpbench": "^1.2.7",
"phpunit/phpunit": "^10.1",
"phpunit/phpunit": "^10.4",
"psalm/plugin-phpunit": "^0.18.4",
"symfony/console": "^6.0",
"vimeo/psalm": "^5.10"
Expand Down
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" colors="true" cacheDirectory=".phpunit.cache">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" colors="true" cacheDirectory=".phpunit.cache">
<coverage/>
<testsuites>
<testsuite name="laminas-servicemanager Test Suite">
Expand Down
53 changes: 50 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.10.0@a5effd2d2dddd1a7ea7a0f6a051ce63ff979e356">
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<file src="src/AbstractFactory/ConfigAbstractFactory.php">
<InvalidStringClass>
<code>new $requestedName(...$arguments)</code>
Expand All @@ -24,6 +24,11 @@
<code>new $requestedName(...$parameters)</code>
</MixedMethodCall>
</file>
<file src="src/AbstractPluginManager.php">
<PossiblyUnusedMethod>
<code>mapLazyService</code>
</PossiblyUnusedMethod>
</file>
<file src="src/Exception/CyclicAliasException.php">
<InvalidArgument>
<code>self::deDuplicateDetectedCycles($detectedCycles)</code>
Expand All @@ -38,6 +43,16 @@
<code>new $requestedName()</code>
</InvalidStringClass>
</file>
<file src="src/Module.php">
<UnusedClass>
<code>Module</code>
</UnusedClass>
</file>
<file src="src/PluginManagerInterface.php">
<PossiblyUnusedMethod>
<code>validate</code>
</PossiblyUnusedMethod>
</file>
<file src="src/Proxy/LazyServiceFactory.php">
<MissingClosureParamType>
<code>$wrappedInstance</code>
Expand All @@ -50,6 +65,9 @@
<InvalidArrayOffset>
<code><![CDATA[$this->services[$service]]]></code>
</InvalidArrayOffset>
<InvalidCast>
<code>$service</code>
</InvalidCast>
<MissingClosureReturnType>
<code>function () use ($name, $options) {</code>
</MissingClosureReturnType>
Expand All @@ -76,7 +94,6 @@
<code>$abstractFactories</code>
<code>$abstractFactory</code>
<code><![CDATA[$config['aliases']]]></code>
<code>$key</code>
<code><![CDATA[$this->aliases]]></code>
<code><![CDATA[$this->factories]]></code>
<code><![CDATA[$this->shared]]></code>
Expand All @@ -88,6 +105,13 @@
<code><![CDATA[$config['factories']]]></code>
<code><![CDATA[$config['shared']]]></code>
</MixedOperand>
<UnusedForeachValue>
<code>$service</code>
<code>$target</code>
</UnusedForeachValue>
<UnusedReturnValue>
<code>DelegatorsConfiguration</code>
</UnusedReturnValue>
</file>
<file src="src/Test/CommonPluginManagerTrait.php">
<ArgumentTypeCoercion>
Expand All @@ -112,7 +136,6 @@
<code>$config[ConfigAbstractFactory::class][$className]</code>
</MixedArrayAssignment>
<MixedAssignment>
<code>$dependency</code>
<code>$key</code>
<code>$value</code>
</MixedAssignment>
Expand All @@ -131,6 +154,11 @@
<code>$instance</code>
</MixedPropertyAssignment>
</file>
<file src="test/Command/ConfigDumperCommandTest.php">
<PossiblyUnusedMethod>
<code>ignoreUnresolvedArguments</code>
</PossiblyUnusedMethod>
</file>
<file src="test/CommonServiceLocatorBehaviorsTrait.php">
<MissingClosureParamType>
<code>$callback</code>
Expand Down Expand Up @@ -159,6 +187,14 @@
<MixedPropertyAssignment>
<code>$instance</code>
</MixedPropertyAssignment>
<PossiblyUndefinedArrayOffset>
<code><![CDATA[$object['get'][0]]]></code>
</PossiblyUndefinedArrayOffset>
<UnusedClosureParam>
<code>$container</code>
<code>$options</code>
<code>$requestedName</code>
</UnusedClosureParam>
</file>
<file src="test/LazyServiceIntegrationTest.php">
<InvalidReturnStatement>
Expand Down Expand Up @@ -186,6 +222,9 @@
<MixedFunctionCall>
<code>$initializer($wrappedInstance, $proxy)</code>
</MixedFunctionCall>
<UnusedVariable>
<code>$wrappedInstance</code>
</UnusedVariable>
</file>
<file src="test/ServiceManagerTest.php">
<MixedAssignment>
Expand All @@ -205,6 +244,14 @@
<MixedOperand>
<code>$inc</code>
</MixedOperand>
<PossiblyUnusedMethod>
<code>sampleFactory</code>
</PossiblyUnusedMethod>
</file>
<file src="test/StaticAnalysis/ServiceManagerConfiguration.php">
<UnusedClass>
<code>ServiceManagerConfiguration</code>
</UnusedClass>
</file>
<file src="test/Tool/ConfigDumperTest.php">
<MixedAssignment>
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
findUnusedPsalmSuppress="true"
findUnusedCode="false"
findUnusedCode="true"
findUnusedBaselineEntry="true"
>
<projectFiles>
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function build(string $name, ?array $options = null): mixed
/**
* {@inheritDoc}
*
* @param string|class-string $name
* @param string|class-string $id
* @return bool
*/
public function has(string $id): bool
Expand Down Expand Up @@ -350,7 +350,7 @@ public function configure(array $config): static
if (isset($config['abstract_factories'])) {
$abstractFactories = $config['abstract_factories'];
// $key not needed, but foreach is faster than foreach + array_values.
foreach ($abstractFactories as $key => $abstractFactory) {
foreach ($abstractFactories as $abstractFactory) {
$this->resolveAbstractFactoryInstance($abstractFactory);
}
}
Expand Down
Loading

0 comments on commit c902c41

Please sign in to comment.