Skip to content

Commit 91df843

Browse files
Update recipes 2025-08-23 (#153)
1 parent 67abf21 commit 91df843

File tree

14 files changed

+175
-0
lines changed

14 files changed

+175
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 4
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[{compose.yaml,compose.*.yaml}]
14+
indent_size = 2
15+
16+
[*.md]
17+
trim_trailing_whitespace = false
Lines changed: 11 additions & 0 deletions
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+
};
Lines changed: 20 additions & 0 deletions
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+
};
Lines changed: 5 additions & 0 deletions
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+
}
Lines changed: 12 additions & 0 deletions
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.php')
10+
->prefix('/_error');
11+
}
12+
};
Lines changed: 15 additions & 0 deletions
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+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
".editorconfig": ".editorconfig"
10+
},
11+
"composer-scripts": {
12+
"cache:clear": "symfony-cmd",
13+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
14+
},
15+
"env": {
16+
"APP_ENV": "dev",
17+
"APP_SECRET": ""
18+
},
19+
"dotenv": {
20+
"dev": {
21+
"APP_SECRET": "%generate(secret)%"
22+
}
23+
},
24+
"gitignore": [
25+
"/.env.local",
26+
"/.env.local.php",
27+
"/.env.*.local",
28+
"/%CONFIG_DIR%/secrets/prod/prod.decrypt.private.php",
29+
"/%PUBLIC_DIR%/bundles/",
30+
"/%VAR_DIR%/",
31+
"/vendor/"
32+
]
33+
}
Lines changed: 6 additions & 0 deletions
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</>
Lines changed: 9 additions & 0 deletions
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+
};

symfony/framework-bundle/7.4/src/Controller/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)