Skip to content

Commit

Permalink
Revert "Support for psr/container v2"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius authored Jul 20, 2022
1 parent 65910ef commit cd56cf5
Show file tree
Hide file tree
Showing 14 changed files with 193 additions and 320 deletions.
12 changes: 1 addition & 11 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{
"ignore_php_platform_requirements": {
"8.1": true
},
"additional_checks": [
{
"name": "Psalm for psr/container v1",
"job": {
"php": "@lowest",
"dependencies": "locked",
"command": "composer require -W psr/container:^1 && vendor/bin/psalm --stats --output-format=github --no-cache"
}
}
]
}
}
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@
},
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/package-versions-deprecated": true,
"laminas/laminas-dependency-plugin": true
}
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0",
"composer-plugin-api": "^2.0",
"laminas/laminas-stdlib": "^3.2.1",
"psr/container": "^1.1 || ^2.0.2"
"psr/container": "^1.0"
},
"require-dev": {
"composer/package-versions-deprecated": "^1.0",
"laminas/laminas-coding-standard": "~2.3.0",
"laminas/laminas-container-config-test": "^0.6",
"laminas/laminas-dependency-plugin": "^2.1.2",
"mikey179/vfsstream": "^1.6.10@alpha",
"ocramius/proxy-manager": "^2.11",
"phpbench/phpbench": "^1.1",
Expand All @@ -47,7 +50,7 @@
"vimeo/psalm": "^4.8"
},
"provide": {
"psr/container-implementation": "^1.1 || ^2.0"
"psr/container-implementation": "^1.0"
},
"conflict": {
"ext-psr": "*",
Expand Down
115 changes: 92 additions & 23 deletions composer.lock

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

2 changes: 0 additions & 2 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<file>bin</file>
<file>src</file>
<file>test</file>
<!-- psr/container v2 exclusion -->
<exclude-pattern>src/AbstractUntypedContainerImplementation.php</exclude-pattern>
<exclude-pattern>test/TestAsset/laminas-code/*.php</exclude-pattern>

<!-- Include all rules from the Laminas Coding Standard -->
Expand Down
4 changes: 4 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@
<code>$config['services']</code>
<code>$config['shared']</code>
</MixedOperand>
<ParamNameMismatch occurrences="2">
<code>$name</code>
<code>$name</code>
</ParamNameMismatch>
<RedundantCastGivenDocblockType occurrences="2">
<code>(bool) $flag</code>
<code>(bool) $flag</code>
Expand Down
16 changes: 0 additions & 16 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@
<referencedClass name="Interop\Container\Exception\ContainerException"/>
</errorLevel>
</InvalidThrow>
<MethodSignatureMismatch>
<errorLevel type="suppress">
<!-- <editor-fold desc="psr/container v2 hacks"> -->
<file name="src/AbstractTypedContainerImplementation.php"/>
<file name="src/AbstractUntypedContainerImplementation.php"/>
<!-- </editor-fold> -->
</errorLevel>
</MethodSignatureMismatch>
<TypeDoesNotContainType>
<errorLevel type="suppress">
<!-- <editor-fold desc="psr/container v2 hacks"> -->
<file name="src/AbstractTypedContainerImplementation.php"/>
<file name="src/AbstractUntypedContainerImplementation.php"/>
<!-- </editor-fold> -->
</errorLevel>
</TypeDoesNotContainType>
</issueHandlers>

<plugins>
Expand Down
3 changes: 2 additions & 1 deletion src/AbstractPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ public function get($name, ?array $options = null)
}

/**
* @param mixed $instance
* {@inheritDoc}
*
* @psalm-assert InstanceType $instance
*/
public function validate($instance)
Expand Down
63 changes: 0 additions & 63 deletions src/AbstractTypedContainerImplementation.php

This file was deleted.

Loading

0 comments on commit cd56cf5

Please sign in to comment.