Skip to content

Commit

Permalink
refactor #25 Add Psalm, allow for PHP 8, remove CrossContainerExtensi…
Browse files Browse the repository at this point in the history
…on integration (pamil)

This PR was merged into the 1.1-dev branch.

Discussion
----------



Commits
-------

c319cc6 Add Psalm, allow for PHP 8
  • Loading branch information
pamil authored Nov 5, 2020
2 parents d7b2175 + c319cc6 commit a9d2c71
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 35 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
name: Composer validate
run: composer validate --strict --ansi

-
name: Run Psalm
run: vendor/bin/psalm src --no-progress

-
name: Run tests
run: vendor/bin/behat -f progress --strict -vvv --no-interaction --colors
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
"behat/behat": "^3.4"
},
"require-dev": {
"friends-of-behat/cross-container-extension": "^1.0",
"friends-of-behat/test-context": "^1.0"
},
"suggest": {
"friends-of-behat/cross-container-extension": "^1.0"
"friends-of-behat/test-context": "^1.2",
"vimeo/psalm": "4.1.1"
},
"autoload": {
"psr-4": {
Expand Down
17 changes: 0 additions & 17 deletions features/not_crashing_behat_with_cross_container_extension.feature

This file was deleted.

15 changes: 15 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
14 changes: 1 addition & 13 deletions src/ServiceContainer/ServiceContainerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
*/
final class ServiceContainerExtension implements Extension
{
/**
* @var CompilerPassInterface|null
*/
private $crossContainerProcessor;

/**
* {@inheritdoc}
*/
Expand All @@ -50,12 +45,7 @@ public function getConfigKey(): string
*/
public function initialize(ExtensionManager $extensionManager): void
{
/** @var CrossContainerExtension $extension */
$extension = $extensionManager->getExtension('fob_cross_container');

if (null !== $extension) {
$this->crossContainerProcessor = $extension->getCrossContainerProcessor();
}
}

/**
Expand Down Expand Up @@ -90,9 +80,7 @@ public function load(ContainerBuilder $container, array $config): void
*/
public function process(ContainerBuilder $container): void
{
if (null !== $this->crossContainerProcessor) {
$this->crossContainerProcessor->process($container);
}

}

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

0 comments on commit a9d2c71

Please sign in to comment.