Skip to content

Commit

Permalink
fix: Refactor container test and remove obsolete Prophecy dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mitelg committed Nov 7, 2023
1 parent e86ff65 commit 0884f15
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 472 deletions.
40 changes: 0 additions & 40 deletions .phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -40675,46 +40675,6 @@ parameters:
count: 1
path: tests/Unit/Components/DependencyInjection/Compiler/TagReplaceTraitTest.php

-
message: "#^Call to an undefined method Enlight_Event_EventArgs\\:\\:getSubject\\(\\)\\.$#"
count: 3
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Call to an undefined method Prophecy\\\\Prophecy\\\\ObjectProphecy\\:\\:notify\\(\\)\\.$#"
count: 7
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Call to an undefined method Prophecy\\\\Prophecy\\\\ObjectProphecy\\:\\:notifyUntil\\(\\)\\.$#"
count: 4
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Service \"alias\" is not registered in the container\\.$#"
count: 1
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Service \"bar\" is not registered in the container\\.$#"
count: 3
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Service \"foo\" is not registered in the container\\.$#"
count: 5
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Service \"parent\" is not registered in the container\\.$#"
count: 3
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Service \"someKey\" is not registered in the container\\.$#"
count: 1
path: tests/Unit/Components/DependencyInjection/ContainerTest.php

-
message: "#^Property Shopware\\\\Tests\\\\Unit\\\\Components\\\\DependencyInjection\\\\ProjectServiceContainer\\:\\:\\$__bar has no type specified\\.$#"
count: 1
Expand Down
4 changes: 4 additions & 0 deletions .phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,7 @@ parameters:
message: '#Parameter \#1 \$calculationType of method Shopware\\Bundle\\OrderBundle\\Service\\ShippingCostService::getShippingCostMultiplier\(\) expects 0\|1\|2\|3, 99 given#'
count: 1
path: tests/Unit/Bundle/OrderBundle/ShippingConstServiceTest.php

- # Test services are not recognized correctly by PHPStan in this container test class
message: '#Service ".*" is not registered in the container#'
path: tests/Unit/Components/DependencyInjection/ContainerTest.php
3 changes: 3 additions & 0 deletions UPGRADE-5.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ This changelog references changes done in Shopware 5.7 patch versions.
* Updated npm dependencies in `themes/package.json`
* Updated npm dependencies in `themes/Frontend/Responsive/package.json`

### Removals

* Removed development dependency `phpspec/prophecy-phpunit` as it is no longer used due to a refactoring of a PHPUnit test

## 5.7.19

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"behat/mink-selenium2-driver": "1.6.0",
"friends-of-behat/mink-extension": "2.7.4",
"php-parallel-lint/php-var-dump-check": "^0.5",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "1.3.1",
"phpstan/phpstan": "1.10.41",
"phpstan/phpstan-doctrine": "1.3.45",
Expand Down
Loading

0 comments on commit 0884f15

Please sign in to comment.