mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-11 15:16:55 +03:00
* Improve JanePHP recipes first-run experience Recipes pointed the generator configs to specification files they never created, hid all generator output behind a NullOutput (so failures showed up as raw PHP fatals and successes printed nothing) and always exited 0, even when generation failed. - document every config key and the spec file prerequisite in config/jane/*.php - render generator output, format thrown errors and propagate exit codes in the recipe bin scripts - reorder post-install steps: placing the specification file now comes before running the generator - explain when/how to uncomment the generated normalizer service in config/packages/jane.yaml Refs: https://github.com/janephp/janephp/issues/860 * Point recipes to the current documentation website jane.readthedocs.io is outdated, jane.jolicode.com/latest/ is the current documentation home. * Re-trigger QA after adding the license header to the PR description
24 lines
782 B
PHP
Executable File
24 lines
782 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use Jane\JsonSchema\Console\Command\GenerateCommand;
|
|
use Jane\JsonSchema\Console\Loader\ConfigLoader;
|
|
use Jane\JsonSchema\Console\Loader\SchemaLoader;
|
|
use Symfony\Component\Console\Application;
|
|
use Symfony\Component\Console\Input\ArrayInput;
|
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
|
|
|
$command = new GenerateCommand(new ConfigLoader(), new SchemaLoader());
|
|
$inputArray = new ArrayInput(['--config-file' => __DIR__ . '/../config/jane/json_schema.php'], $command->getDefinition());
|
|
$output = new ConsoleOutput();
|
|
|
|
try {
|
|
exit($command->execute($inputArray, $output));
|
|
} catch (\Throwable $throwable) {
|
|
(new Application())->renderThrowable($throwable, $output->getErrorOutput());
|
|
|
|
exit(1);
|
|
}
|