1. Go to this page and download the library: Download decodelabs/integra library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
decodelabs / integra example snippets
use DecodeLabs\Integra\Context;
$context = new Context('path/to/project/');
echo Integra::$runDir; // Working directory
echo Integra::$rootDir; // Parent or current dir containing composer.json
echo Integra::$binDir; // Bin dir relative to composer
echo Integra::$composerFile; // Location of composer.json
Integra::run('update'); // composer update
Integra::runGlobal('update'); // composer global update
Integra::runScript('my-script'); // composer run-script my-script
Integra::runBin('phpstan', '--debug'); // composer exec phpstan -- --debug
Integra::runGlobalBin('phpstan', '--debug'); // composer global exec phpstan -- --debug
if(!Integra::hasPackage('package1')) {
Integra::install('package1', 'package2'); // composer