Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Intellisense for the Finder in scoper.inc.php #1097

Closed
hirasso opened this issue Dec 27, 2024 · 3 comments
Closed

Provide Intellisense for the Finder in scoper.inc.php #1097

hirasso opened this issue Dec 27, 2024 · 3 comments

Comments

@hirasso
Copy link
Contributor

hirasso commented Dec 27, 2024

Feature Request

Because the Symfony Finder reference in scoper.inc.php is under the Isolated namespace, there is no autosuggest/intellisense available. Storing the class itself in a $finder variable and annotating it via DocBlock brings it back:

/** @var Symfony\Component\Finder\Finder $finder */
$finder = Isolated\Symfony\Component\Finder\Finder::class;

return [
    'finders' => [
        $finder::create()->files()->in('src'),
        $finder::create()
            ->files()
            ->ignoreVCS(true)
            ->notName('/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/')
            ->exclude([
                'doc',
                'test',
                'test_old',
                'tests',
                'Tests',
                'vendor-bin',
            ])
            ->in('vendor'),
        $finder::create()->append([
            'bin/php-scoper',
            'composer.json',
        ])
    ],
]

Maybe this could be updated in the docs and in the generated scoper.inc.php file?

@theofidry
Copy link
Member

That's a good idea!

@hirasso
Copy link
Contributor Author

hirasso commented Jan 8, 2025

Nice to hear you like the idea! Would you accept a PR?

@theofidry
Copy link
Member

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants