php-pds / skeleton

Standard PHP package skeleton.
Creative Commons Attribution Share Alike 4.0 International
2.32k stars 167 forks source link

Generator path issue #43

Closed tbreuss closed 4 years ago

tbreuss commented 6 years ago

When trying to generate the structure for a new project, I get a bunch of error messages...

php vendor/bin/pds-skeleton generate xxx
PHP Warning:  mkdir(): File exists in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): File exists in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29

Warning: mkdir(): Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 29
PHP Warning:  file_put_contents(/CHANGELOG.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34

Warning: file_put_contents(/CHANGELOG.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34
PHP Warning:  chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35

Warning: chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35
PHP Warning:  file_put_contents(/CONTRIBUTING.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34

Warning: file_put_contents(/CONTRIBUTING.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34
PHP Warning:  chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35

Warning: chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35
PHP Warning:  file_put_contents(/LICENSE.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34

Warning: file_put_contents(/LICENSE.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34
PHP Warning:  chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35

Warning: chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35
PHP Warning:  file_put_contents(/README.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34

Warning: file_put_contents(/README.md): failed to open stream: Permission denied in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 34
PHP Warning:  chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35

Warning: chmod(): No such file or directory in /tmp/test/vendor/pds/skeleton/src/PackageGenerator.php on line 35
Created /bin
Created /config
Created /docs
Created /public
Created /resources
Created /src
Created /tests
Created CHANGELOG.md
Created CONTRIBUTING.md
Created LICENSE.md
Created README.md

It looks like a permission problem. But it seems that the generator expects that the folder "xxx" already exists.

The following works:

mkdir yyy
php vendor/bin/pds-skeleton generate yyy