Skip to content

Commit

Permalink
require filesytem
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Aug 12, 2023
1 parent 9cfc8fa commit 31b9ca5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"symfony/dependency-injection": "6.1.*",
"symfony/finder": "^6.2",
"symplify/package-builder": "^11.1",
"webmozart/assert": "^1.11"
"webmozart/assert": "^1.11",
"symfony/filesystem": "^6.3"
},
"require-dev": {
"rector/rector": "^0.15.13",
Expand Down
5 changes: 2 additions & 3 deletions src/FileSystem/PathHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

namespace Rector\RectorGenerator\FileSystem;

use Symplify\SmartFileSystem\SmartFileSystem;
use Symfony\Component\Filesystem\Filesystem;

final class PathHelper
{
public static function getRelativePathFromDirector(string $filePath, string $directory): string
{
$smartFileSystem = new SmartFileSystem();

$smartFileSystem = new Filesystem();
$relativeFilePath = $smartFileSystem->makePathRelative($filePath, (string) realpath($directory));

return rtrim($relativeFilePath, '/');
Expand Down

0 comments on commit 31b9ca5

Please sign in to comment.