├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── composer.json └── src └── Example.php /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## Unreleased 8 | 9 | For a full diff see [`1902cc2...main`][1902cc2...main]. 10 | 11 | [1902cc2...main]: https://github.com/ergebnis/php-package-template/compare/1902cc2...main 12 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2025 Andreas Möller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 6 | documentation files (the _Software_), to deal in the Software without restriction, including without limitation the 7 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 8 | persons to whom the Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 11 | Software. 12 | 13 | THE SOFTWARE IS PROVIDED **AS IS**, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 14 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # php-package-template 2 | 3 | [![Integrate](https://github.com/ergebnis/php-package-template/workflows/Integrate/badge.svg)](https://github.com/ergebnis/php-package-template/actions) 4 | [![Merge](https://github.com/ergebnis/php-package-template/workflows/Merge/badge.svg)](https://github.com/ergebnis/php-package-template/actions) 5 | [![Release](https://github.com/ergebnis/php-package-template/workflows/Release/badge.svg)](https://github.com/ergebnis/php-package-template/actions) 6 | [![Renew](https://github.com/ergebnis/php-package-template/workflows/Renew/badge.svg)](https://github.com/ergebnis/php-package-template/actions) 7 | 8 | [![Code Coverage](https://codecov.io/gh/ergebnis/php-package-template/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/php-package-template) 9 | 10 | [![Latest Stable Version](https://poser.pugx.org/ergebnis/php-package-template/v/stable)](https://packagist.org/packages/ergebnis/php-package-template) 11 | [![Total Downloads](https://poser.pugx.org/ergebnis/php-package-template/downloads)](https://packagist.org/packages/ergebnis/php-package-template) 12 | [![Monthly Downloads](http://poser.pugx.org/ergebnis/php-package-template/d/monthly)](https://packagist.org/packages/ergebnis/php-package-template) 13 | 14 | This project provides a [GitHub repository template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for a [`composer`](https://getcomposer.org) package with [GitHub Actions](https://docs.github.com/en/actions) workflows using standard PHP development tools. 15 | 16 | ## Installation 17 | 18 | Run 19 | 20 | ```sh 21 | composer require ergebnis/php-package-template 22 | ``` 23 | 24 | ## Usage 25 | 26 | 💡 This is a great place for showing a few usage examples! 27 | 28 | ## Changelog 29 | 30 | The maintainers of this project record notable changes to this project in a [changelog](CHANGELOG.md). 31 | 32 | ## Contributing 33 | 34 | The maintainers of this project suggest following the [contribution guide](.github/CONTRIBUTING.md). 35 | 36 | ## Code of Conduct 37 | 38 | The maintainers of this project ask contributors to follow the [code of conduct](.github/CODE_OF_CONDUCT.md). 39 | 40 | ## General Support Policy 41 | 42 | The maintainers of this project provide limited support. 43 | 44 | You can support the maintenance of this project by [sponsoring @localheinz](https://github.com/sponsors/localheinz) or [requesting an invoice for services related to this project](mailto:am@localheinz.com?subject=ergebnis/php-package-template:%20Requesting%20invoice%20for%20services). 45 | 46 | ## PHP Version Support Policy 47 | 48 | This project supports PHP versions with [active and security support](https://www.php.net/supported-versions.php). 49 | 50 | The maintainers of this project add support for a PHP version following its initial release and drop support for a PHP version when it has reached the end of security support. 51 | 52 | ## Security Policy 53 | 54 | This project has a [security policy](.github/SECURITY.md). 55 | 56 | ## License 57 | 58 | This project uses the [MIT license](LICENSE.md). 59 | 60 | ## Social 61 | 62 | Follow [@localheinz](https://twitter.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://twitter.com/intent/follow?screen_name=ergebnis) on Twitter. 63 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ergebnis/php-package-template", 3 | "description": "Provides a GitHub repository template for a PHP package with GitHub Actions workflows using standard PHP development tools.", 4 | "license": "MIT", 5 | "type": "library", 6 | "authors": [ 7 | { 8 | "name": "Andreas Möller", 9 | "email": "am@localheinz.com", 10 | "homepage": "https://localheinz.com" 11 | } 12 | ], 13 | "homepage": "https://github.com/ergebnis/php-package-template", 14 | "support": { 15 | "issues": "https://github.com/ergebnis/php-package-template/issues", 16 | "source": "https://github.com/ergebnis/php-package-template", 17 | "security": "https://github.com/ergebnis/php-package-template/blob/main/.github/SECURITY.md" 18 | }, 19 | "require": { 20 | "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" 21 | }, 22 | "require-dev": { 23 | "ergebnis/composer-normalize": "^2.47.0", 24 | "ergebnis/data-provider": "^3.4.0", 25 | "ergebnis/license": "^2.6.0", 26 | "ergebnis/php-cs-fixer-config": "^6.46.0", 27 | "ergebnis/phpstan-rules": "^2.10.2", 28 | "ergebnis/phpunit-slow-test-detector": "^2.19.1", 29 | "fakerphp/faker": "^1.24.1", 30 | "infection/infection": "~0.27.11", 31 | "phpstan/extension-installer": "^1.4.3", 32 | "phpstan/phpstan": "^2.1.17", 33 | "phpstan/phpstan-deprecation-rules": "^2.0.3", 34 | "phpstan/phpstan-phpunit": "^2.0.6", 35 | "phpstan/phpstan-strict-rules": "^2.0.4", 36 | "phpunit/phpunit": "^10.5.45", 37 | "rector/rector": "^2.0.17", 38 | "roave/backward-compatibility-check": "^8.6.0", 39 | "tomasvotruba/type-coverage": "^2.0.2" 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "Ergebnis\\Package\\": "src/" 44 | } 45 | }, 46 | "autoload-dev": { 47 | "psr-4": { 48 | "Ergebnis\\Package\\Test\\": "test/" 49 | } 50 | }, 51 | "config": { 52 | "allow-plugins": { 53 | "composer/package-versions-deprecated": true, 54 | "ergebnis/composer-normalize": true, 55 | "infection/extension-installer": true, 56 | "phpstan/extension-installer": true 57 | }, 58 | "audit": { 59 | "abandoned": "report" 60 | }, 61 | "platform": { 62 | "php": "8.1.26" 63 | }, 64 | "preferred-install": "dist", 65 | "sort-packages": true 66 | }, 67 | "extra": { 68 | "branch-alias": { 69 | "dev-main": "1.0-dev" 70 | }, 71 | "composer-normalize": { 72 | "indent-size": 2, 73 | "indent-style": "space" 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/Example.php: -------------------------------------------------------------------------------- 1 | value; 30 | } 31 | } 32 | --------------------------------------------------------------------------------