Skip to content

Commit

Permalink
Update the scoper.inc.php snippet in scoper.inc.php.tpl to support …
Browse files Browse the repository at this point in the history
…intellisense for the Finder component
  • Loading branch information
hirasso committed Jan 11, 2025
1 parent a1aba49 commit e2bc2e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/scoper.inc.php.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

declare(strict_types=1);

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

// You can do your own things here, e.g. collecting symbols to expose dynamically
// or files to exclude.
Expand All @@ -16,7 +17,7 @@ use Isolated\Symfony\Component\Finder\Finder;
// $excludedFiles = array_map(
// static fn (SplFileInfo $fileInfo) => $fileInfo->getPathName(),
// iterator_to_array(
// Finder::create()->files()->in(__DIR__),
// $finder::create()->files()->in(__DIR__),
// false,
// ),
// );
Expand All @@ -42,8 +43,8 @@ return [
// For more see: /~https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#finders-and-paths
'finders' => [
/*
Finder::create()->files()->in('src'),
Finder::create()
$finder::create()->files()->in('src'),
$finder::create()
->files()
->ignoreVCS(true)
->notName('/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/')
Expand All @@ -56,7 +57,7 @@ return [
'vendor-bin',
])
->in('vendor'),
Finder::create()->append([
$finder::create()->append([
'composer.json',
]),
*/
Expand Down

0 comments on commit e2bc2e1

Please sign in to comment.