Search code examples
phpgithubcomposer-phppackagist

My own composer package: automatic dev-master download


I'm making my own Composer package for educational purposes. It's just a Laravel extended package with some libraries already installed.

I uploaded to GitHub: jorgeanzola/laravel

I posted it at Packagist

When I try to run:

$ composer create-package jorgeanzola/laravel <path>

It gave me this error:

Could not find package jorgeanzola/laravel with stability stable

In order to make it work, I have to add =dev-master, like this:

$ composer create-package jorgeanzola/laravel=dev-master

It downloads correctly but at the end it gave me this warning:

Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?

My question is: How can I set the download process to be more neat? Like, ie: Laravel itself:

$ composer create-project laravel/laravel <path>

Solution

  • Release versions of your package, by creating git tags (git tag). Then, the latest stable version will be installed when using composer create-project.

    If you don't want that, then set the stability to dev by doing composer create-project --stability=dev xxx/yyy