Source: medium.com

How to craft a PHP package

Category: PHP, git

In the next lines, I will try to explain how to make a PHP package following some recommended rules. Furthermore, I want someone with the same requirement to have the chance to download and use it in its project.

Concretely, the README file with a small explanation of the package intentions, the CODE_OF_CONDUCT file describing the code of conduct to contribute on the package development community, the LICENSE file, the PULL_REQUEST_TEMPLATE and the Github ISSUE_TEMPLATES defining the workflow for contributors, and at last but not less important the FUNDING file to allow sponsoring the project developers.

This file describes how to autoload classes, the required dependencies, some info about utility and developer, and so on.

At this point, I have to install the package dependencies with Composer to start creating the needed code for the package.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners