Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jan 27, 2025
1 parent 9071792 commit f5132f0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function mapPropertyA(SomeObjectWithUninitializedVariable $object): strin
{
try {
return $object->propertyA;
} catch (\Error $e) { // @phpstan-ignore-line
// @phpstan-ignore catch.neverThrown
} catch (\Error $e) {

Check failure on line 32 in tests/src/Services/PropertyMapper/PropertyMapperFromUnitializedVariable.php

View workflow job for this annotation

GitHub Actions / Symfony 6.4.*, highest deps, PHP 8.4, ubuntu-latest

No error with identifier catch.neverThrown is reported on line 32.

Check failure on line 32 in tests/src/Services/PropertyMapper/PropertyMapperFromUnitializedVariable.php

View workflow job for this annotation

GitHub Actions / Symfony 7.*, highest deps, PHP 8.4, ubuntu-latest

No error with identifier catch.neverThrown is reported on line 32.
if (str_contains($e->getMessage(), 'must not be accessed before initialization')) {
throw new RefuseToMapException();
}
Expand Down

0 comments on commit f5132f0

Please sign in to comment.