Skip to content

Commit e0cf960

Browse files
[symfony/framework-bundle/7.2] Start with an empty APP_SECRET (#1317)
1 parent f20a7f1 commit e0cf960

File tree

10 files changed

+121
-0
lines changed

10 files changed

+121
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
framework:
2+
cache:
3+
# Unique name of your app: used to compute stable namespaces for cache keys.
4+
#prefix_seed: your_vendor_name/app_name
5+
6+
# The "app" cache stores to the filesystem by default.
7+
# The data in this cache should persist between deploys.
8+
# Other options include:
9+
10+
# Redis
11+
#app: cache.adapter.redis
12+
#default_redis_provider: redis://localhost
13+
14+
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
15+
#app: cache.adapter.apcu
16+
17+
# Namespaced pools use the above "app" backend by default
18+
#pools:
19+
#my.dedicated.cache: null
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# see https://symfony.com/doc/current/reference/configuration/framework.html
2+
framework:
3+
secret: '%env(APP_SECRET)%'
4+
#csrf_protection: true
5+
6+
# Note that the session will be started ONLY if you read or write from it.
7+
session: true
8+
9+
#esi: true
10+
#fragments: true
11+
12+
when@test:
13+
framework:
14+
test: true
15+
session:
16+
storage_factory_id: session.storage.factory.mock_file
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
when@dev:
2+
_errors:
3+
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
4+
prefix: /_error
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This file is the entry point to configure your own services.
2+
# Files in the packages/ subdirectory configure your dependencies.
3+
4+
# Put parameters here that don't need to change on each machine where the app is deployed
5+
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
6+
parameters:
7+
8+
services:
9+
# default configuration for services in *this* file
10+
_defaults:
11+
autowire: true # Automatically injects dependencies in your services.
12+
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
13+
14+
# makes classes in src/ available to be used as services
15+
# this creates a service per class whose id is the fully-qualified class name
16+
App\:
17+
resource: '../src/'
18+
exclude:
19+
- '../src/DependencyInjection/'
20+
- '../src/Entity/'
21+
- '../src/Kernel.php'
22+
23+
# add more service definitions when explicit configuration is needed
24+
# please note that last definitions always *replace* previous ones
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
"gitignore": [
19+
"/.env.local",
20+
"/.env.local.php",
21+
"/.env.*.local",
22+
"/%CONFIG_DIR%/secrets/prod/prod.decrypt.private.php",
23+
"/%PUBLIC_DIR%/bundles/",
24+
"/%VAR_DIR%/",
25+
"/vendor/"
26+
]
27+
}
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.2/src/Controller/.gitignore

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
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)