Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 1, 2024 via composer
Package summary
Share
0
issues
1
license
1
MIT
Package created
29 Jul 2016
Version published
14 Apr 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ondram/ci-detector@4.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ondram/ci-detector 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ondram/ci-detector do?

The ondram/ci-detector is a powerful PHP library for detecting the environment of different continuous integration (CI) servers and providing a common interface to access build information. This potent tool proves useful when you need to verify if a CLI script or tool is running within an automated environment such as a CI server. Based on this detection, your script can be customized to behave differently. For instance, you can hide information typically relevant only to a real person like a status bar, and so forth. Additionally, you can detect specific details about the current build like build ID, git commit, and branch, and log or publish these values if need be.

How do you use ondram/ci-detector?

Using ondram/ci-detector is straightforward, all thanks to Composer. First, you install it using Composer with the command composer require ondram/ci-detector. The package necessitates PHP 7.1 or above. However, if your PHP version is under 7.1, you can still resort to using the older ci-detector version 2.x. Once installed, you can initiate it in your PHP code using the following snippet.

<?php

$ciDetector = new \OndraM\CiDetector\CiDetector();

if ($ciDetector->isCiDetected()) {  
    //CI server detected! Write your code here.
} else {
    // Not run on CI server.
}

To access specific build information, you can use methods like getCiName(), getBuildNumber(), getBranch(), and more.

Where are the ondram/ci-detector docs?

In-depth documentation regarding ondram/ci-detector is available in the readme on the GitHub page here. The readme serves as an extensive guide, covering what the CI detector is, why it's valuable, and how to use it. It also elaborates on supported CI servers, installation instructions, code usage examples, and available methods of the CiInterface instance. You can also find a description of each CiInterface constant and the various descriptors supported by different CI servers for a comprehensive understanding. If you wish to run tests, automatically fix codestyle violations, or use the CI Detector as a standalone CLI command, the readme has got you covered.