franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 73 forks source link

Errors When Creating Package #6

Closed mikebronner closed 9 years ago

mikebronner commented 9 years ago

When creating packages, I get the following error outputs:

studio create test
PHP Notice:  Undefined property: stdClass::$name in /home/vagrant/.composer/vendor/franzliedke/studio/src/Package.php on line 19
PHP Stack trace:
PHP   1. {main}() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:0
PHP   2. Symfony\Component\Console\Application->run() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:22
PHP   3. Symfony\Component\Console\Application->doRun() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   5. Symfony\Component\Console\Command\Command->run() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   6. Studio\Console\CreateCommand->execute() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
PHP   7. Studio\Creator\SkeletonCreator->create() /home/vagrant/.composer/vendor/franzliedke/studio/src/Console/CreateCommand.php:56
PHP   8. Studio\Package::fromFolder() /home/vagrant/.composer/vendor/franzliedke/studio/src/Creator/SkeletonCreator.php:58

Notice: Undefined property: stdClass::$name in /home/vagrant/.composer/vendor/franzliedke/studio/src/Package.php on line 19

Call Stack:
    0.0002     226304   1. {main}() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:0
    0.0148    1663808   2. Symfony\Component\Console\Application->run() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:22
    0.0187    1999912   3. Symfony\Component\Console\Application->doRun() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
    0.0189    2000832   4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
    0.0189    2001304   5. Symfony\Component\Console\Command\Command->run() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
    0.0192    2004880   6. Studio\Console\CreateCommand->execute() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
    0.0203    2105736   7. Studio\Creator\SkeletonCreator->create() /home/vagrant/.composer/vendor/franzliedke/studio/src/Console/CreateCommand.php:56
    0.1230    2423488   8. Studio\Package::fromFolder() /home/vagrant/.composer/vendor/franzliedke/studio/src/Creator/SkeletonCreator.php:58

PHP Notice:  Undefined offset: 1 in /home/vagrant/.composer/vendor/franzliedke/studio/src/Package.php on line 19
PHP Stack trace:
PHP   1. {main}() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:0
PHP   2. Symfony\Component\Console\Application->run() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:22
PHP   3. Symfony\Component\Console\Application->doRun() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   5. Symfony\Component\Console\Command\Command->run() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   6. Studio\Console\CreateCommand->execute() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
PHP   7. Studio\Creator\SkeletonCreator->create() /home/vagrant/.composer/vendor/franzliedke/studio/src/Console/CreateCommand.php:56
PHP   8. Studio\Package::fromFolder() /home/vagrant/.composer/vendor/franzliedke/studio/src/Creator/SkeletonCreator.php:58

Notice: Undefined offset: 1 in /home/vagrant/.composer/vendor/franzliedke/studio/src/Package.php on line 19

Call Stack:
    0.0002     226304   1. {main}() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:0
    0.0148    1663808   2. Symfony\Component\Console\Application->run() /home/vagrant/.composer/vendor/franzliedke/studio/bin/studio:22
    0.0187    1999912   3. Symfony\Component\Console\Application->doRun() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
    0.0189    2000832   4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
    0.0189    2001304   5. Symfony\Component\Console\Command\Command->run() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
    0.0192    2004880   6. Studio\Console\CreateCommand->execute() /home/vagrant/.composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
    0.0203    2105736   7. Studio\Creator\SkeletonCreator->create() /home/vagrant/.composer/vendor/franzliedke/studio/src/Console/CreateCommand.php:56
    0.1230    2423488   8. Studio\Package::fromFolder() /home/vagrant/.composer/vendor/franzliedke/studio/src/Creator/SkeletonCreator.php:58

Package directory test created.
Running composer install for new package...
Package successfully created.
Dumping autoloads...
Autoloads successfully generated.

I'm not sure if this is affecting the result or not, but it does create folders and files within them. I have it running on Laravel Homestead 2.x vm, which is running on Ubuntu 14.04. Will be happy to help troubleshoot if needed.

franzliedke commented 9 years ago

The problem is I'm currently trying to execute composer init directly in the newly-created project directory. The way I do that (using symfony/process) causes problems, though. Not sure how we can use composer init and simply forward input/output to/from that process.

mikebronner commented 9 years ago

Could you hide the output of composer init, i.e. by suppressing errors in the call using @-- given that the errors are false positives?

franzliedke commented 9 years ago

The errors above actually aren't from composer init. They're a result of init not being executed properly (because it doesn't get any input, such as a package name).

franzliedke commented 9 years ago

Try now, we're getting there. =)