Skip to content

Commit a1523a6

Browse files
Update recipes 2025-03-18 (#138)
1 parent c8c45d9 commit a1523a6

File tree

10 files changed

+121
-0
lines changed

10 files changed

+121
-0
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6+
7+
return static function (ContainerConfigurator $containerConfigurator): void {
8+
$containerConfigurator->extension('framework', [
9+
'cache' => null,
10+
]);
11+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6+
7+
return static function (ContainerConfigurator $containerConfigurator): void {
8+
$containerConfigurator->extension('framework', [
9+
'secret' => '%env(APP_SECRET)%',
10+
'session' => true,
11+
]);
12+
if ($containerConfigurator->env() === 'test') {
13+
$containerConfigurator->extension('framework', [
14+
'test' => true,
15+
'session' => [
16+
'storage_factory_id' => 'session.storage.factory.mock_file',
17+
],
18+
]);
19+
}
20+
};

Diff for: symfony/framework-bundle/7.3/config/preload.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
4+
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
5+
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
6+
7+
return static function (RoutingConfigurator $routingConfigurator): void {
8+
if ($routingConfigurator->env() === 'dev') {
9+
$routingConfigurator->import('@FrameworkBundle/Resources/config/routing/errors.xml')
10+
->prefix('/_error');
11+
}
12+
};

Diff for: symfony/framework-bundle/7.3/config/services.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6+
7+
return static function (ContainerConfigurator $containerConfigurator): void {
8+
$services = $containerConfigurator->services();
9+
10+
$services->defaults()
11+
->autowire()
12+
->autoconfigure();
13+
14+
$services->load('App\\', __DIR__.'/../src/');
15+
};

Diff for: symfony/framework-bundle/7.3/manifest.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"bundles": {
3+
"Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle": ["all"]
4+
},
5+
"copy-from-recipe": {
6+
"config/": "%CONFIG_DIR%/",
7+
"public/": "%PUBLIC_DIR%/",
8+
"src/": "%SRC_DIR%/"
9+
},
10+
"composer-scripts": {
11+
"cache:clear": "symfony-cmd",
12+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
13+
},
14+
"env": {
15+
"APP_ENV": "dev",
16+
"APP_SECRET": ""
17+
},
18+
"dotenv": {
19+
"dev": {
20+
"APP_SECRET": "%generate(secret)%"
21+
}
22+
},
23+
"gitignore": [
24+
"/.env.local",
25+
"/.env.local.php",
26+
"/.env.*.local",
27+
"/%CONFIG_DIR%/secrets/prod/prod.decrypt.private.php",
28+
"/%PUBLIC_DIR%/bundles/",
29+
"/%VAR_DIR%/",
30+
"/vendor/"
31+
]
32+
}

Diff for: symfony/framework-bundle/7.3/post-install.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* <fg=blue>Run</> your application:
2+
1. Go to the project directory
3+
2. Create your code repository with the <comment>git init</comment> command
4+
3. Download the Symfony CLI at <comment>https://symfony.com/download</> to install a development web server
5+
6+
* <fg=blue>Read</> the documentation at <comment>https://symfony.com/doc</>

Diff for: symfony/framework-bundle/7.3/public/index.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
use App\Kernel;
4+
5+
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
6+
7+
return function (array $context) {
8+
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
9+
};

Diff for: symfony/framework-bundle/7.3/src/Controller/.gitignore

Whitespace-only changes.

Diff for: symfony/framework-bundle/7.3/src/Kernel.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App;
4+
5+
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
6+
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
7+
8+
class Kernel extends BaseKernel
9+
{
10+
use MicroKernelTrait;
11+
}

0 commit comments

Comments
 (0)