respect-validation/bin/console
Henrique Moody 7892a7c902
Port Bash scripts to PHP
It makes more sense to use PHP to generate PHP code than to use Bash. I
love writing Bash scripts, but I know it's not for everyone, and they
can become quite complex. Porting them to PHP code also lowers the
barrier for people to change them.

While I was making those changes, I also noticed a problem with how we
save the domain suffixes. We're converting all of them to ASCII, so we
are not preserving languages such as Chinese, Thai, and Hebrew, which
use non-ASCII characters.
2026-01-06 10:06:22 +01:00

29 lines
936 B
PHP
Executable file

#!/usr/bin/env php
<?php
/*
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
* SPDX-License-Identifier: MIT
*/
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
use Respect\Dev\Commands\CreateMixinCommand;
use Respect\Dev\Commands\UpdateDocLinksCommand;
use Respect\Dev\Commands\UpdateDomainSuffixesCommand;
use Respect\Dev\Commands\UpdateDomainToplevelCommand;
use Respect\Dev\Commands\UpdatePostalCodesCommand;
use Symfony\Component\Console\Application;
return (static function () {
$application = new Application('Respect/Validation', '3.0');
$application->addCommand(new CreateMixinCommand());
$application->addCommand(new UpdateDocLinksCommand());
$application->addCommand(new UpdateDomainSuffixesCommand());
$application->addCommand(new UpdateDomainToplevelCommand());
$application->addCommand(new UpdatePostalCodesCommand());
return $application->run();
})();