public function testSourceFilesForWrongDeprecatedAnnotations(): void
{ $finder =
new Finder();
$finder->
in($this->rootDir
) ->
files() ->
name('*.php'
) ->
name('*.js'
) ->
name('*.scss'
) ->
name('*.html.twig'
) ->
name('*.xsd'
) ->
exclude('node_modules'
) ->
contains(['@deprecated', '@experimental'
]);
foreach ($this->whiteList
as $path) { $finder->
notPath($path);
} $invalidFiles =
[];
foreach ($finder->
getIterator() as $file) { $filePath =
$file->
getRealPath();
$content =
(string) file_get_contents($filePath);