- Require PHP ^7.4.
- Deprecate Wercker, which ceased to exist.
- Add SourceHut detection support.
getTargetBranch()
method to return the name of the branch where current branch is targeted (aka "base branch").- Azure DevOps Pipelines detection support.
CiDetectorInterface
(extended byCiDetector
) to allow simpler extension.
- Fix build URL detection on Travis (it always reported travis-ci.org URL, even if the build was on travis-ci.com).
- [BC break] Rename methods to make them VCS-agnostic. Use
getCommit()
instead ofgetGitCommit()
andgetBranch()
instead ofgetGitBranch()
. - [BC break] Declare
CiDetector
constructor final.
- [BC break] Remove
Travis::TRAVIS_BASE_URL
constant.
- Allow PHP 8.
- Use more suitable value for "build number" on GitHub Actions.
- Add Wercker detection support.
- Add AWS CodeBuild detection support.
- Add Bitbucket Pipelines support.
- Allow late static binding in
CiDetector::fromEnvironment()
when inheriting the class. - Fix branch detection in PR builds on AppVeyor, Buddy and GitHub Actions (target branch of the PR was returned instead).
- Allow injecting instance of
Env
usingCiDetector::fromEnvironment()
(useful for environment mocking in unit tests).
- Add GitHub Actions detection support.
- Add Buddy detection support.
- Add
getRepositoryName()
method to detect repository name (slug) likeOndraM/ci-detector
(not supported on TeamCity, Jenkins and continuousphp). - Add
isPullRequest()
to detect if current build has been triggered by a pull request (merge request). Be aware that this method returns aTrinaryLogic
object to handle cases when it cannot be detected whether build was triggered by a pull request (like on TeamCity and Jenkins CI). - Change build URL on AppVeyor to use new permalink URL.
- Fix Gitlab 9.0+ support (environment variables were renamed in GitLab 9.0+).
- Add continuousphp CI support.
- Add drone CI support.
- Require PHP 7.1, use strict types.
- Add AppVeyor (Windows cloud CI) support.
- [BC break] The
detect()
method ofCiDetector
class is no longer static. - [BC break] Rearrange namespaces, all classes are now in
CiDetector
sub-namespace. - Added
isCiDetected()
method to detect if current environment is CI. - [BC break]
detect()
method always returns instance ofCiInterface
and throwsCiNotDetectedException
if CI environment is not detected.
- Add
getGitBranch()
method to detect Git branch of the build (supported by all CIs except TeamCity). - Add
getRepositoryUrl()
method to detect repository source URL (not supported Codeship, TeamCity, Travis).
- Initial release supporting Jenkins, Travis CI, Bamboo, CircleCI, Codeship, GitLab and TeamCity services.