Skip to content

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

@hirasso

Description

@hirasso

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions