Skip to content

Commit a9d2c71

Browse files
authored
refactor #25 Add Psalm, allow for PHP 8, remove CrossContainerExtension integration (pamil)
This PR was merged into the 1.1-dev branch. Discussion ---------- Commits ------- c319cc6 Add Psalm, allow for PHP 8
2 parents d7b2175 + c319cc6 commit a9d2c71

5 files changed

Lines changed: 22 additions & 35 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
name: Composer validate
3838
run: composer validate --strict --ansi
3939

40+
-
41+
name: Run Psalm
42+
run: vendor/bin/psalm src --no-progress
43+
4044
-
4145
name: Run tests
4246
run: vendor/bin/behat -f progress --strict -vvv --no-interaction --colors

composer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
"behat/behat": "^3.4"
1515
},
1616
"require-dev": {
17-
"friends-of-behat/cross-container-extension": "^1.0",
18-
"friends-of-behat/test-context": "^1.0"
19-
},
20-
"suggest": {
21-
"friends-of-behat/cross-container-extension": "^1.0"
17+
"friends-of-behat/test-context": "^1.2",
18+
"vimeo/psalm": "4.1.1"
2219
},
2320
"autoload": {
2421
"psr-4": {

features/not_crashing_behat_with_cross_container_extension.feature

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

psalm.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="4"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
>
9+
<projectFiles>
10+
<directory name="src" />
11+
<ignoreFiles>
12+
<directory name="vendor" />
13+
</ignoreFiles>
14+
</projectFiles>
15+
</psalm>

src/ServiceContainer/ServiceContainerExtension.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
*/
3333
final class ServiceContainerExtension implements Extension
3434
{
35-
/**
36-
* @var CompilerPassInterface|null
37-
*/
38-
private $crossContainerProcessor;
39-
4035
/**
4136
* {@inheritdoc}
4237
*/
@@ -50,12 +45,7 @@ public function getConfigKey(): string
5045
*/
5146
public function initialize(ExtensionManager $extensionManager): void
5247
{
53-
/** @var CrossContainerExtension $extension */
54-
$extension = $extensionManager->getExtension('fob_cross_container');
5548

56-
if (null !== $extension) {
57-
$this->crossContainerProcessor = $extension->getCrossContainerProcessor();
58-
}
5949
}
6050

6151
/**
@@ -90,9 +80,7 @@ public function load(ContainerBuilder $container, array $config): void
9080
*/
9181
public function process(ContainerBuilder $container): void
9282
{
93-
if (null !== $this->crossContainerProcessor) {
94-
$this->crossContainerProcessor->process($container);
95-
}
83+
9684
}
9785

9886
private function createLoader(ContainerBuilder $container, array $config): LoaderInterface

0 commit comments

Comments
 (0)