Show your project's PHP 7 readiness!
You can show and prove the community that your library, framework or whatever PHP project you maintain is already PHP 7 ready with a poser badge in your project's README
file.
Get the badge
URL
https://php7ready.timesplinter.ch/{github-name}/{repo}/{branch}/badge.svg
Markdown
[![PHP 7 ready](https://php7ready.timesplinter.ch/{github-name}/{repo}/{branch}/badge.svg)](https://travis-ci.org/{your-repository})
To get the "supported" badge you need to specify PHP 7 in your .travis.yml
file:
language: php
php:
- 7.0 # <-- required (7.0 and higher or 'nightly')
- 5.6
# ...
Adding "7.0" makes my build fail
If your code is not yet PHP 7 ready (a.k.a. your PHP 7 job fails) but you want already to prepare it for the PHP 7: supported button just add the following lines at the bottom of your .travis.yml
file:
matrix:
allow_failures:
- php: 7.0 # or 'nightly' - whatever you specified under the php section
This will allow your build to pass even if your PHP 7 job fails. You get the PHP 7: unsupported badge then.
What does this badge approve?
This badge approves that your unit tests run successfully on the latest PHP 7 build used by Travis-CI.
If you cover your code properly with unit tests which run successful on the latest build of PHP 7 the possibility is high that your code masters the PHP 7 runtime environment.
Of course you can run phpunit against zero test cases with zero assertions and get the "PHP 7: Supported" badge. But common!