PHP 8.2.31
Preview: build.php Size: 905 B
/home/nshryvcy/blissfulnepal.com/wp-content/plugins/tourmaster/include/stripe/build.php

#!/usr/bin/env php
<?php
chdir(dirname(__FILE__));

$autoload = (int)$argv[1];
$returnStatus = null;

if (!$autoload) {
    // Modify composer to not autoload Stripe
    $composer = json_decode(file_get_contents('composer.json'), true);
    unset($composer['autoload']);
    unset($composer['require-dev']['squizlabs/php_codesniffer']);
    file_put_contents('composer.json', json_encode($composer, JSON_PRETTY_PRINT));
}

passthru('composer update', $returnStatus);
if ($returnStatus !== 0) {
    exit(1);
}

if ($autoload) {
    // Only run CS on 1 of the 2 environments
    passthru(
        './vendor/bin/phpcs --standard=PSR2 -n lib tests *.php',
        $returnStatus
    );
    if ($returnStatus !== 0) {
        exit(1);
    }
}

$config = $autoload ? 'phpunit.xml' : 'phpunit.no_autoload.xml';
passthru("./vendor/bin/phpunit -c $config", $returnStatus);
if ($returnStatus !== 0) {
    exit(1);
}

Directory Contents

Dirs: 2 × Files: 4

Name Size Perms Modified Actions
data DIR
- drwxr-xr-x 2024-05-28 15:48:43
Edit Download
lib DIR
- drwxr-xr-x 2024-05-28 15:48:44
Edit Download
905 B lrw-r--r-- 2024-05-28 15:48:43
Edit Download
6.99 KB lrw-r--r-- 2024-05-28 15:48:43
Edit Download
20.21 KB lrw-r--r-- 2024-05-28 15:48:43
Edit Download
407 B lrw-r--r-- 2024-05-28 15:48:43
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).