Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeException while creating new package #12

Closed
driesvints opened this issue Mar 22, 2015 · 4 comments
Closed

RuntimeException while creating new package #12

driesvints opened this issue Mar 22, 2015 · 4 comments

Comments

@driesvints
Copy link

Reproduce: run studio create <dir name> --> throws RuntimeException.

Here's the console output:

Balerion:projects summer$ studio create rss
Please name this package RSS
 Please enter a valid package name in the format "vendor/name".
Please name this package prologue/rss
Please provide a default namespace (PSR-4) [Prologue\Rss]
Do you want to set up PhpUnit as a testing tool? [y|N] y
Do you want to set up PhpSpec as a testing tool? [y|N] y
Do you want to set up TravisCI as continuous integration tool? [y|N] y
Package directory rss created.
Running composer install for new package...
Package successfully created.
Dumping autoloads...



  [RuntimeException]
  Error while running composer: Composer could not find a composer.json file in /Users/summer/Sites/projects
  To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section



create [-g|--git="..."] path

I also now have a studio.json file in the directory where I called the command with the following contents:

{
    "packages": {
        "prologue/rss": "rss"
    }
}

I don't know what that file does or why it was created. I guess it gets removed again at the end of the install process and wasn't because the installer never reached the end?

Anyway, looks like the skeleton got set up nicely. Great package, thanks! :)

@franzliedke
Copy link
Owner

Ah, apparently you ran this in a directory that wasn't a Composer project itself.

Funny that I didn't anticipate that use-case, it's quite straightforward. Probably because I started out with the objective of replacing Workbench, which always ran inside Composer projects (a Laravel install).

Thanks for bringing this to my attention, it will be fixed soon.

P.S.: The studio.json file is important for autoloading when developing a library as part of a larger project (when you don't yet want to have it in the vendor directory). It lets my Composer plugin know that your libraries dependencies should be autoloadable from the main application, too.

@franzliedke
Copy link
Owner

Fixed. Again, thanks for the report.

This should be available under dev-master and in the next release (0.9.6).

@driesvints
Copy link
Author

Thanks! :)

@franzliedke
Copy link
Owner

You're welcome.

I must correct myself, though: it's in 0.9.x-dev, not dev-master. I mixed up my branches...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants