With the latest releases of Laravel we found that upgrading to a new version takes more and more time with every release. I created the Pull Request for Laravel 5.6, for 5.7 did someone else create the PR and for 5.8 the PR wasn't merged after more than a month. The other PR's didn't get a lot of attention.
Because of our wishes we came to the conclusion that forking laroute wasn't the best approach. This resulted in the idea to create a new package and open source it.
Our approach was simple. We wanted to create a Laravel package that could be used in our projects. The requirements being:
- It should generate one or more JSON files with the routes data;
- It should be possible to publish specific routes both on route and group level;
- It should have automated tests, both on the functionality and code quality;
- It should be easy to use, well documented and configurable;
- It should be easy to upgrade from lord/laroute to bluedragon/laravel-routes;
Another idea that came to mind was to open source the package. This way other people were able to use the package and provide us with feedback. This would hereby be the first open source package we created as a team. I already create some packages myself so I already had a little experience.
We wrote the code with a dedicated team frontend and backend developers and other colleagues reviewed the written code and text. It was a nice team effort.
The result is a package that exactly meets our requirements. Of course we wrote a quick start manual that should explain the usage of the package. We also wrote instructions on how to migrate from lord/laroute.
What I personal found useful while searching for packages, is a list with alternatives that do something related to the package in question This way it's even more easy to find a package that suits your needs as good as possible.
Another positive result is we were forced to think about how our code could be useful for other people.
Last but not least important outcome was that creating and open sourcing a package appeared to be awesome for our team spirit. So if you're ever in doubt about creating (and open sourcing) a package, just do it!