ondram/ci-detector
Detects when your PHP app is running in CI. Provides a simple API to identify common CI providers via environment variables, so you can tweak behavior for tests, builds, and deployments without hardcoding provider logic.
getTargetBranch() method to return the name of the branch where current branch is targeted (aka "base branch").CiDetectorInterface (extended by CiDetector) to allow simpler extension.getCommit() instead of getGitCommit() and getBranch() instead of getGitBranch().CiDetector constructor final.Travis::TRAVIS_BASE_URL constant.CiDetector::fromEnvironment() when inheriting the class.Env using CiDetector::fromEnvironment() (useful for environment mocking in unit tests).getRepositoryName() method to detect repository name (slug) like OndraM/ci-detector (not supported on TeamCity, Jenkins and continuousphp).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).detect() method of CiDetector class is no longer static.CiDetector sub-namespace.isCiDetected() method to detect if current environment is CI.detect() method always returns instance of CiInterface and throws CiNotDetectedException if CI environment is not detected.getGitBranch() method to detect Git branch of the build (supported by all CIs except TeamCity).getRepositoryUrl() method to detect repository source URL (not supported Codeship, TeamCity, Travis).How can I help you explore Laravel packages today?