Skip to content

Commit

Permalink
chore: user fluent API in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
COil committed Jan 8, 2025
1 parent b0ca124 commit b25edef
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,23 @@
use Symfony\Component\HttpKernel\Kernel;

return static function (ContainerConfigurator $containerConfigurator): void {
// Parameters ——————————————————————————————————————————————————————————————
$parameters = $containerConfigurator->parameters();

// System parameters: https://symfony.com/doc/current/performance.html#dump-the-service-container-into-a-single-file
$parameters->set('.container.dumper.inline_factories', true);

// Application parameters ——————————————————————————————————————————————————
$parameters->set('brand', 'MicroSymfony');
$parameters->set('brand_html', '<b>Micro</b>Symfony 🎶');
$parameters->set('brand_emoji', '🎶️');
$parameters->set('website', 'https://github.com/strangebuzz/MicroSymfony');
$parameters->set('version', '1.0.0');
$sfVersion = substr(Kernel::VERSION, 0, 3); // minor Symfony version
$description = <<<DESCRIPTION
A Symfony <b>$sfVersion</b> application template on steroids, ready to use.
DESCRIPTION;
$parameters->set('description', $description);
$parameters->set('brand', 'MicroSymfony')
->set('brand_html', '<b>Micro</b>Symfony 🎶')
->set('brand_emoji', '🎶️')
->set('website', 'https://github.com/strangebuzz/MicroSymfony')
->set('version', '1.0.0')
->set('description', $description);

// Services ————————————————————————————————————————————————————————————————
$services = $containerConfigurator->services();
Expand Down

0 comments on commit b25edef

Please sign in to comment.