mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 15:50:03 +01:00
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.
29 lines
936 B
PHP
Executable file
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();
|
|
})();
|