CoreFiles by mySites.guru
yaml-lint45 lines, 1,145 bytes, from Joomla_4.0.0-beta5-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta4
md5
3188705a1b35d8fa6c1148125c990535
sha1
c4485caa18f2db27f19d83ce05bea38811e53e62
sha256
9aecc217f392b8302e73e54a01cdf7b9bf8ce182cee31a6c9e084de65147559d
#!/usr/bin/env php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * Runs the Yaml lint command.
 *
 * @author Jan Schädlich <[email protected]>
 */

use Symfony\Component\Console\Application;
use Symfony\Component\Yaml\Command\LintCommand;

function includeIfExists(string $file): bool
{
    return file_exists($file) && include $file;
}

if (
    !includeIfExists(__DIR__ . '/../../../../autoload.php') &&
    !includeIfExists(__DIR__ . '/../../vendor/autoload.php') &&
    !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php')
) {
    fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL);
    exit(1);
}

if (!class_exists(Application::class)) {
    fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL);
    exit(1);
}

(new Application())->add($command = new LintCommand())
    ->getApplication()
    ->setDefaultCommand($command->getName(), true)
    ->run()
;

The same content is in 4 releases, Joomla 4.0.0-beta4 to 4.0.0-beta7. See them all, or every version of this file.