From d8634d616e3305a349c7810cf6548c01e1f0093c Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Sat, 11 Jul 2020 18:01:22 +0300 Subject: [PATCH 1/2] Made LocateUsedSymbolsFromASTRootsTest fail --- test/fixtures/unknownSymbols/src/OtherThing.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/fixtures/unknownSymbols/src/OtherThing.php b/test/fixtures/unknownSymbols/src/OtherThing.php index b74aa532..cdbbecb6 100644 --- a/test/fixtures/unknownSymbols/src/OtherThing.php +++ b/test/fixtures/unknownSymbols/src/OtherThing.php @@ -6,6 +6,9 @@ use Foo\Bar\Baz; +function foo() { +} + final class OtherThing { public function baz(Baz $baz) @@ -18,5 +21,7 @@ public function baz(Baz $baz) $baz->value(), FILTER_VALIDATE_URL ); + + foo(); } } From fa3443378ecc7978987f989db60eb0cde41d50c0 Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Sat, 11 Jul 2020 23:09:03 +0300 Subject: [PATCH 2/2] Corrected expectations in LocateUsedSymbolsFromASTRootsTest --- .../UsedSymbolsLocator/LocateUsedSymbolsFromASTRootsTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ComposerRequireCheckerTest/UsedSymbolsLocator/LocateUsedSymbolsFromASTRootsTest.php b/test/ComposerRequireCheckerTest/UsedSymbolsLocator/LocateUsedSymbolsFromASTRootsTest.php index a8a0ff11..7b96ae14 100644 --- a/test/ComposerRequireCheckerTest/UsedSymbolsLocator/LocateUsedSymbolsFromASTRootsTest.php +++ b/test/ComposerRequireCheckerTest/UsedSymbolsLocator/LocateUsedSymbolsFromASTRootsTest.php @@ -46,6 +46,7 @@ public function testInvokeReturnsSymbolsSorted(): void { $expectedSymbols = [ 'Doctrine\Common\Collections\ArrayCollection', + 'Example\Library\foo', 'FILTER_VALIDATE_URL', 'filter_var', 'Foo\Bar\Baz',