wayofdev/laravel-package-tpl

🚀 Jump-start your Laravel package development with our pre-configured Composer template, designed for seamless integration. This template includes essential tools such as PHPUnit, PHPStan, GitHub Actions, and Docker to streamline your workflow and enhance productivity.

Fund package maintenance!
wayofdev

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 1

Forks: 0

Open Issues: 1

Language:Makefile

v2.7.2 2024-04-28 23:41 UTC

This package is auto-updated.

Last update: 2024-04-28 23:41:17 UTC


README


WayOfDev Logo

Build Status Total Downloads Latest Stable Version Commits since latest release PHP Version Require Codecov Mutation testing badge PHP Stan Level 6 of 9 Codecov Follow on Twitter (X)

Laravel Package Template

This is a template repository designed to kick-start the development of Laravel packages with essential tools and setups pre-configured.


If you like/use this package, please consider ⭐️ starring it. Thanks!

Screenshot

🚀 Features

This template repository includes several features to streamline the development of Laravel packages:

→ Testing

→ Static Analysis

  • PHPStan for static analysis, ensuring code quality and robustness.
  • Larastan for Laravel-specific static analysis.
  • PHPStan strict rules for enforcing strict type checks and standards.
  • Psalm for finding errors in PHP applications through static analysis.
  • PHP Rector for automated code upgrades and refactoring, maintaining modern code standards.

→ Coding Standards

→ Continuous Integration

  • Automated testing with code coverage report generation using PHPUnit and Xdebug, uploaded to Codecov.
  • Automated linting of YAML files using ibiqlik/action-yamllint.
  • Automated PHP code linting to ensure code quality and standards using wayofdev/php-cs-fixer-config.
  • Markdown linting using DavidAnson/markdownlint-cli2.
  • Checks for outdated or insecure dependencies using Composer.
  • Mutation testing with Infection and Stryker Mutator to assess the quality of the test suite.
  • Security checks to identify vulnerabilities in dependencies.
  • Comprehensive static analysis with PHPStan and Psalm.
  • Extensive testing across different setups to ensure compatibility and stability.

→ Development Environment

  • Docker support for consistent development environments.
  • Pre-commit hooks setup to ensure code quality before commits.

→ Issue Templates

  • This package is equipped with a set of ready-to-use issue templates to streamline contributions and issue reporting.

    You can find these templates organized in the .github/ISSUE_TEMPLATE directory.

→ Miscellaneous

  • Support for PHP 8.2+ and Laravel 10.x/11.x.
  • Configured autoload and autoload-dev for optimal namespace management.

💿 Installation

To use this template, clone the repository and install the dependencies:

$ git clone https://github.com/wayofdev/laravel-package-tpl.git
$ cd laravel-package-tpl

$ make env install

### full list of available commands:
$ make help

🧪 Running Tests

→ PHPUnit tests

To run tests, run the following command:

make test

→ Mutation tests

To run mutation tests, using infection/infection:

make infect

→ Static Analysis

Code quality using PHPStan:

make lint-stan

and using Psalm:

make lint-psalm

→ Coding Standards Fixing

Fix code using The PHP Coding Standards Fixer (PHP CS Fixer) to follow our standards:

make lint-php

→ Lint Yaml files

Lint all yaml files in project:

make lint-yaml

→ Lint Markdown files

Lint all yaml files in project:

make lint-md

→ Lint GitHub Actions

Lint all yaml files in project:

make lint-actions

🔒 Security Policy

This project has a security policy.


🙌 Want to Contribute?

Thank you for considering contributing to the wayofdev community! We are open to all kinds of contributions. If you want to:

You are more than welcome. Before contributing, kindly check our contribution guidelines.

Conventional Commits


🫡 Contributors

Contributors Badge

🌐 Social Links


⚖️ License

Licence