Git repository inside composer vendors

After creating my first laravel package last week, I discovered a tip I wanted to share with you.

If you have write access to a composer package repository, you have the possibility to continue its development while it is installed as requirement in another project. Let's see how we can accomplish this.

PhpStorm & phpspec

Phpspec has been my favorite unit testing tool after watching this laracasts tutorial. Phpspec is a toolset that helps writing fast and easy tests, and guides towards a better software design. PhpStorm on the other hand is a very powerful PHP editor and my IDE of choice.

Unfortunately phpspec is not supported by PhpStorm yet, although they promised to support it when they find the resources. There are some plugins out there but they are buggy, so it is not safe to use them. 

A nice tip to add autocompletion in your specs is to use @mixin annotation:

use PhpSpec\ObjectBehavior;

 * @mixin User
class UserSpec extends ObjectBehavior {


Finally, here are some useful resources about phpunit and phpstorm: