tfarla / composer-template
A template for creating composer libraries
Requires
- php: ~7.1
Requires (Dev)
- johnkary/phpunit-speedtrap: ^3.0
- php-coveralls/php-coveralls: ^2.0
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.9.2
- phpunit/phpunit: ^7.0
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2024-11-08 05:01:57 UTC
README
Making development of composer libraries easy with this cloneable template which includes:
- continuous integration (travis ci)
- code coverage (coveralls)
- static analysis (phpstan)
- mess detector (phpmd)
- testing framework (phpunit)
- php code sniffer which enforces the psr-2 standard (phpcs)
- composer configuration with psr-4 autoloading
- a changelog
- MIT license (not sure about what license you need? https://choosealicense.com/)
- documentation using sphinx
- issue and pull request template
- badges from http://shields.io/
Requirements
- php 7.1 or greater (supported versions)
- python & pip to create documentation
- composer
Installation
The following command will clone this template and place it in the my-library
directory
composer create-project tfarla/composer-template my-library
Composer's create-project will also install all dependencies in this template:
Installing tfarla/composer-template (dev-master d3249c7ffef021c39e33a4323be4d70899d4d28b)
- Installing tfarla/composer-template (dev-master master): Cloning master from cache
Created project in my-library
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Once the download is done you will get the choice to remove the .git
directory which you should do if you want your own repository.
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? y
Usage
In order to use this template you'll need to change a few things:
- Change the content in this README file to reflect your library
- Change the content in the
docs/
directory to reflect your library - Setup travis-ci (should be plug & play)
- Setup readthedocs (should be plug & play)
- Setup coveralls (should be plug & play)
- Pick a license https://choosealicense.com/ (MIT is good enough for most open source project, but you might want to look at the other options)
Documentation
While this README should be enough to get started. Please read the full documentation for more details.
Contributing
Thanks for reading this far into the README and considering contributing to this project. If you have any questions or suggestions feel free to create an issue.
If you want to modify the code then please follow these steps:
- Fork it (https://github.com/TFarla/composer-template)
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request