Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wayofdev/laravel-package-tpl
Laravel package skeleton used in WOD projects.
https://github.com/wayofdev/laravel-package-tpl
laravel-package laravel-package-template laravel-template php php8 template
Last synced: 2 months ago
JSON representation
Laravel package skeleton used in WOD projects.
- Host: GitHub
- URL: https://github.com/wayofdev/laravel-package-tpl
- Owner: wayofdev
- License: mit
- Created: 2022-07-15T12:34:10.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T15:04:05.000Z (8 months ago)
- Last Synced: 2024-04-14T09:20:55.987Z (8 months ago)
- Topics: laravel-package, laravel-package-template, laravel-template, php, php8, template
- Language: Makefile
- Homepage: https://wayof.dev
- Size: 1.44 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# 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](.github/assets/screenshot.png)
## ๐ Features
This template repository includes several features to streamline the development of Laravel packages:
### โ Testing
- Configured [PHPUnit](https://phpunit.de/index.html) for unit testing.
- Integrated [Pest PHP](https://pestphp.com) for elegant console support and architecture testing.
- [Orchestra Testbench](https://packages.tools/testbench.html) for Laravel package testing.
- [PHPStan](https://phpstan.org) extensions for PHPUnit and Laravel.
- Infection for mutation testing to ensure quality.
- Mutation test reports are uploaded [Stryker Mutator Dashboard](https://dashboard.stryker-mutator.io).### โ Static Analysis
- [PHPStan](https://phpstan.org) for static analysis, ensuring code quality and robustness.
- [Larastan](https://github.com/larastan/larastan) for Laravel-specific static analysis.
- [PHPStan strict rules](https://github.com/phpstan/phpstan-strict-rules) for enforcing strict type checks and standards.
- [Psalm](https://psalm.dev) for finding errors in PHP applications through static analysis.
- [PHP Rector](https://github.com/rectorphp/rector) for automated code upgrades and refactoring, maintaining modern code standards.### โ Coding Standards
- [PHP CS Fixer Config](https://github.com/wayofdev/php-cs-fixer-config) with custom configuration for consistent code style.
- [Composer Normalize](https://github.com/ergebnis/composer-normalize) to ensure a consistent `composer.json` format.
- [Yamllint](https://github.com/adrienverge/yamllint) for YAML file linting.
- [Actionlint](https://github.com/rhysd/actionlint) for GitHub Actions workflow linting.
- [Markdownlint](https://github.com/DavidAnson/markdownlint-cli2) for Markdown file linting.### โ Continuous Integration
- Automated testing with code coverage report generation using PHPUnit and Xdebug, uploaded to [Codecov](https://about.codecov.io).
- Automated linting of YAML files using [ibiqlik/action-yamllint](https://github.com/ibiqlik/action-yamllint).
- Automated PHP code linting to ensure code quality and standards using [wayofdev/php-cs-fixer-config](https://github.com/wayofdev/php-cs-fixer-config).
- Markdown linting using [DavidAnson/markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2).
- Checks for outdated or insecure dependencies using Composer.
- Mutation testing with [Infection](https://github.com/infection/infection) and [Stryker Mutator](https://stryker-mutator.io) to assess the quality of the test suite.
- Security checks to identify vulnerabilities in dependencies.
- Comprehensive static analysis with [PHPStan](https://phpstan.org) and [Psalm](https://psalm.dev).
- Extensive testing across different setups to ensure compatibility and stability.### โ Development Environment
- Docker support for consistent development environments.
- [Pre-commit](https://pre-commit.com) 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`](.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.
- PHAR dependencies managed using [Phive](https://phar.io/).
## ๐ฟ Installation
To use this template, clone the repository and install the dependencies:
```bash
$ 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:
```bash
make test
```### โ Mutation tests
To run mutation tests, using [`infection/infection`](https://github.com/infection/infection):
```bash
make infect
```### โ Static Analysis
Code quality using PHPStan:
```bash
make lint-stan
```and using Psalm:
```bash
make lint-psalm
```### โ Coding Standards Fixing
Fix code using The PHP Coding Standards Fixer (PHP CS Fixer) to follow our standards:
```bash
make lint-php
```### โ Lint Yaml files
Lint all yaml files in project:
```bash
make lint-yaml
```### โ Lint Markdown files
Lint all yaml files in project:
```bash
make lint-md
```### โ Lint GitHub Actions
Lint all yaml files in project:
```bash
make lint-actions
```
## ๐ Security Policy
This project has a [security policy](.github/SECURITY.md).
## ๐ Want to Contribute?
Thank you for considering contributing to the wayofdev community! We are open to all kinds of contributions. If you want to:
- ๐ค [Suggest a feature](https://github.com/wayofdev/laravel-package-tpl/issues/new?assignees=&labels=type%3A+enhancement&projects=&template=2-feature-request.yml&title=%5BFeature%5D%3A+)
- ๐ [Report an issue](https://github.com/wayofdev/laravel-package-tpl/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=1-bug-report.yml&title=%5BBug%5D%3A+)
- ๐ [Improve documentation](https://github.com/wayofdev/laravel-package-tpl/issues/new?assignees=&labels=type%3A+documentation%2Ctype%3A+maintenance&projects=&template=4-docs-bug-report.yml&title=%5BDocs%5D%3A+)
- ๐จโ๐ป Contribute to the codeYou are more than welcome. Before contributing, kindly check our [contribution guidelines](.github/CONTRIBUTING.md).
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge)](https://conventionalcommits.org)
## ๐ซก Contributors
## ๐ Social Links
- **Twitter:** Follow our organization [@wayofdev](https://twitter.com/intent/follow?screen_name=wayofdev) and the author [@wlotyp](https://twitter.com/intent/follow?screen_name=wlotyp).
- **Discord:** Join our community on [Discord](https://discord.gg/CE3TcCC5vr).
## โ๏ธ License
[![Licence](https://img.shields.io/github/license/wayofdev/laravel-package-tpl?style=for-the-badge&color=blue)](./LICENSE.md)