diff --git a/src/Handler.php b/src/Handler.php index 4cb2557d5bab4c1d85d72c95a3501e4aa2ce6f54..dbff5645ee58f71bcea7dbbce354e0a6f760b1f7 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -45,7 +45,6 @@ class Handler { * Configure composer.json. */ public function configureComposerJson() { - $fs = new Filesystem(); $projectRoot = getcwd(); $composerJson = getenv('COMPOSER'); @@ -67,7 +66,7 @@ class Handler { $jsonFile->write($content); // Add some patterns to .gitignore. - foreach ([$composerJson, $composerLock, '/vendor/', '/web/', '.env'] as $item) { + foreach (['/' . $composerJson, '/' . $composerLock, '/vendor/', '/web/', '/.env'] as $item) { exec('git ignore ' . $item); } } @@ -94,9 +93,9 @@ class Handler { } $fs->mkdir($moduleRoot); foreach (scandir($projectRoot) as $item) { - if (!in_array($item, ['.', '..', '.git', '.idea', 'vemdor', 'web'])) { + if (!in_array($item, ['.', '..', '.git', '.idea', 'vendor', 'web'])) { $rel = $fs->makePathRelative($projectRoot, $moduleRoot); - $fs->symlink($rel . "/$item", $moduleRoot . "/$item"); + $fs->symlink($rel . $item, $moduleRoot . "/$item"); } } }