Skip to content

Instantly share code, notes, and snippets.

@alphaolomi
Created June 25, 2022 18:08
Show Gist options
  • Save alphaolomi/eb8e7291ffef9ce539f7e991d11be721 to your computer and use it in GitHub Desktop.
Save alphaolomi/eb8e7291ffef9ce539f7e991d11be721 to your computer and use it in GitHub Desktop.
OPINIONATED DEFINITION OF QUALITY

OPINIONATED DEFINITION OF QUALITY for PHP packages

Based on thephpleague Definition

  1. Use a vendor namespace (Alphao in my case) for PSR-4 autoloading. Place code in a src folder.

  2. Adhere to PSR-2 as the coding style guide.

  3. Distribute code using Packagist.

  4. Write unit tests. Aim for at least 80% coverage in version 1. Using Pest is huge bonus

  5. DocBlock all the things that require additional context.

  6. Use Semantic Versioning to manage version numbers.

  7. Keep a Changelog.

  8. Use Github Actions to automatically check coding standards and run tests.

  9. Have an extensive README or dedicated docs.

  10. Exclude non-essential files in .gitattributes.

related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment