PackageTrack
Sign in Get early access

ondram/ci-detector

Detect continuous integration environment and provide unified access to properties of current build

4.2.0 59M downloads/mo #444 most downloaded on Packagist OndraM/ci-detector

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Ships unpredictably

gaps range from 9 days to 2.9 years

Most releases are documented

notes for 15 of 19 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

19 releases · first in 2016

0 releases in the last 12 months

see the full history below

Release timeline

18 releases · Jul 2016 to Mar 2024
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 19
  1. 4.2.0 12 Mar 2024
    Release notes
    • Require PHP ^7.4.
    • Deprecate Wercker, which ceased to exist.
    Open source →
  2. 4.1.0 14 Apr 2021
    Release notes
    • Add SourceHut detection support.
    Open source →
  3. 4.0.0 02 Feb 2021
    Release notes

    Added

    • getTargetBranch() method to return the name of the branch where current branch is targeted (aka "base branch").
    • Azure DevOps Pipelines detection support.
    • CiDetectorInterface (extended by CiDetector) to allow simpler extension.

    Fixed

    • Fix build URL detection on Travis (it always reported travis-ci.org URL, even if the build was on travis-ci.com).

    Changed

    • [BC break] Rename methods to make them VCS-agnostic. Use getCommit() instead of getGitCommit() and getBranch() instead of getGitBranch().
    • [BC break] Declare CiDetector constructor final.

    Removed

    • [BC break] Remove Travis::TRAVIS_BASE_URL constant.
    Open source →
  4. 3.5.1 04 Sep 2020
    Release notes
    • Allow PHP 8.
    Open source →
  5. 3.5.0 25 Aug 2020
    Release notes
    • Use more suitable value for "build number" on GitHub Actions.
    • Add Wercker detection support.
    Open source →
  6. 3.4.0 11 May 2020
    Release notes
    • 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).
    Open source →
  7. 3.3.0 06 Mar 2020
    Release notes
    • Allow injecting instance of Env using CiDetector::fromEnvironment() (useful for environment mocking in unit tests).
    Open source →
  8. 3.2.0 18 Feb 2020
    Release notes
    • Add GitHub Actions detection support.
    • Add Buddy detection support.
    • Add getRepositoryName() method to detect repository name (slug) like OndraM/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 a TrinaryLogic 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.
    Open source →
  9. 3.1.1 10 Nov 2019
    Release notes
    • Fix Gitlab 9.0+ support (environment variables were renamed in GitLab 9.0+).
    Open source →
  10. 3.1.0 19 Feb 2018
    Release notes
    • Add continuousphp CI support.
    • Add drone CI support.
    Open source →
  11. 3.0.0 27 Oct 2017
    Release notes
    • Require PHP 7.1, use strict types.
    Open source →
  12. 2.1.0 26 May 2017
    Release notes
    • Add AppVeyor (Windows cloud CI) support.
    Open source →
  13. 2.0.0 07 Jan 2017
    Release notes
    • [BC break] The detect() method of CiDetector 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 of CiInterface and throws CiNotDetectedException if CI environment is not detected.
    Open source →
  14. 1.1.0 06 Jan 2017
    Release notes
    • 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).
    Open source →
  15. 1.0.0 19 Aug 2016
    Release notes
    • Initial release supporting Jenkins, Travis CI, Bamboo, CircleCI, Codeship, GitLab and TeamCity services.
    Open source →
  16. 0.4.0 04 Aug 2016

    Nothing published for this version

  17. 0.3.0 no date

    Nothing published for this version

  18. 0.2.0 29 Jul 2016

    Nothing published for this version

  19. 0.1.0 29 Jul 2016

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive