Summary
In this chapter, we worked on the tasks you will need to handle if you want to create your own Composer-based package or library that can be shared with your other projects, or even with the wider world of PHP developers via Packagist.
First, we covered the metadata configuration in the composer.json
file that needs to be sorted so that Packagist or other systems can work correctly. Then we had a quick review of namespaces and source folders and the relevant configuration in composer.json
. After this, we looked at how you can configure your package to offer an executable file that will be set up as a symlink when your package is installed. Then we looked again at SemVer and how you should carefully create new releases following a SemVer versioning system so that users of your package (including your own projects) can safely require the versions that they need without getting any unwanted or unexpected breaking changes. With the package complete, we then looked at ways you...