You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix mentions of Symfony\Finder to StubsGenerator\Finder (#37)
The help documentation on the command states that the finder file should return a `Symfony\Finder` instance when the command actual checks for a `StubsGenerator\Finder` instance. This commit updates the command to correctly state what it looks for.
Copy file name to clipboardExpand all lines: src/GenerateStubsCommand.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ public function configure(): void
58
58
->addArgument('sources', InputArgument::IS_ARRAY, 'The sources from which to generate stubs. Either directories or specific files. At least one must be specified, unless --finder is specified.')
59
59
->addOption('out', null, InputOption::VALUE_REQUIRED, 'Path to a file to write pretty-printed stubs to. If unset, stubs will be written to stdout.')
60
60
->addOption('force', null, InputOption::VALUE_NONE, 'Whether to force an overwrite.')
61
-
->addOption('finder', null, InputOption::VALUE_REQUIRED, 'Path to a PHP file which returns a `Symfony\Finder` instance including the set of files that should be parsed. Can be used instead of, but not in addition to, passing sources directly.')
61
+
->addOption('finder', null, InputOption::VALUE_REQUIRED, 'Path to a PHP file which returns a `StubsGenerator\Finder` instance including the set of files that should be parsed. Can be used instead of, but not in addition to, passing sources directly.')
62
62
->addOption('visitor', null, InputOption::VALUE_REQUIRED, 'Path to a PHP file which returns a `StubsGenerator\NodeVisitor` instance to replace the default node visitor.')
63
63
->addOption('header', null, InputOption::VALUE_REQUIRED, 'A doc comment to prepend to the top of the generated stubs file. (Will be added below the opening `<?php` tag.)', '')
64
64
->addOption('nullify-globals', null, InputOption::VALUE_NONE, 'Initialize all global variables with a value of `null`, instead of their assigned value.')
@@ -198,10 +198,10 @@ private function parseSources(InputInterface $input): Finder
198
198
try {
199
199
$finder = @include$finderPath;
200
200
} catch (Exception$e) {
201
-
thrownewRuntimeException("Could not resolve a `Symfony\Finder` from '$finderPath'.", 0, $e);
201
+
thrownewRuntimeException("Could not resolve a `StubsGenerator\Finder` from '$finderPath'.", 0, $e);
202
202
}
203
203
if (!$finder || !($finderinstanceof Finder)) {
204
-
thrownewRuntimeException("Could not resolve a `Symfony\Finder` from '$finderPath'.");
204
+
thrownewRuntimeException("Could not resolve a `StubsGenerator\Finder` from '$finderPath'.");
0 commit comments