Skip to content

Commit

Permalink
[Scoped] Add back SmartFileInfo to bootstrap.php (#2846)
Browse files Browse the repository at this point in the history
* [Scoped] Add back SmartFileInfo to bootstrap.php

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
samsonasik and actions-user committed Aug 29, 2022
1 parent c579c28 commit 4765d5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions build/target-repository/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@
$composerAutoloader->loadClass($class);
}
}

if ($class === 'Symplify\SmartFileSystem\SmartFileInfo') {
$filePath = __DIR__ . '/vendor/symplify/smart-file-system/src/SmartFileInfo.php';
if (file_exists($filePath)) {
require_once $filePath;
}
}
});
2 changes: 1 addition & 1 deletion scoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
),

// unprefixed SmartFileInfo - needed in AbstractTestCase
fn (string $filePath, string $prefix, string $content): string => Strings::replace(
static fn (string $filePath, string $prefix, string $content): string => Strings::replace(
$content,
'#' . $prefix . '\\\\Symplify\\\\SmartFileSystem\\\\SmartFileInfo#',
'Symplify\SmartFileSystem\SmartFileInfo'
Expand Down

0 comments on commit 4765d5a

Please sign in to comment.