From d9477e70825a4b2ebe3fe3aa6a91a0b78377e72f Mon Sep 17 00:00:00 2001 From: alanef Date: Mon, 26 Apr 2021 18:11:25 +0100 Subject: [PATCH] Component: Package.php the copy of the package directory adds itself to its own subdirectory thus breaking PSR4 auto loader path fix removes one subdir from the copy add comments in code fixes #1 --- Source/Models/Package.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Models/Package.php b/Source/Models/Package.php index 4f8d542..f7bf80f 100644 --- a/Source/Models/Package.php +++ b/Source/Models/Package.php @@ -164,7 +164,8 @@ public function process($configuration, string $packagePrefix, string $namespace * change $this->name dirname of $this->name it make sthe assumption ALL packages are in teh format account/package * maybe this needs to be validated but I haven't found an example that doesn't */ - `cp -r {$this->path} $outputPath . dirname( $this->name )`; + $target = $outputPath . dirname( $this->name ); + `cp -r {$this->path} {$target}`; file_put_contents($outputPath.$this->name.'/composer.json', json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));