Skip to content

Commit d5faaca

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #892
2 parents b7bf608 + 20ce9cf commit d5faaca

File tree

11 files changed

+176
-0
lines changed

11 files changed

+176
-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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# see https://symfony.com/doc/current/reference/configuration/framework.html
2+
framework:
3+
secret: '%env(APP_SECRET)%'
4+
#csrf_protection: true
5+
http_method_override: false
6+
7+
# Enables session support. Note that the session will ONLY be started if you read or write from it.
8+
# Remove or comment this section to explicitly disable session support.
9+
session:
10+
handler_id: null
11+
cookie_secure: auto
12+
cookie_samesite: lax
13+
14+
#esi: true
15+
#fragments: true
16+
php_errors:
17+
log: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
framework:
2+
test: true
3+
session:
4+
storage_id: session.storage.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_errors:
2+
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
3+
prefix: /_error
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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/configuration.html#application-related-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+
- '../src/Tests/'
23+
24+
# controllers are imported separately to make sure services can be injected
25+
# as action arguments even if you don't extend any base controller class
26+
App\Controller\:
27+
resource: '../src/Controller/'
28+
tags: ['controller.service_arguments']
29+
30+
# add more service definitions when explicit configuration is needed
31+
# 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": "%generate(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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<bg=blue;fg=white> </>
2+
<bg=blue;fg=white> What's next? </>
3+
<bg=blue;fg=white> </>
4+
5+
* <fg=blue>Run</> your application:
6+
1. Go to the project directory
7+
2. Create your code repository with the <comment>git init</comment> command
8+
3. Download the Symfony CLI at <comment>https://symfony.com/download</> to install a development web server
9+
10+
* <fg=blue>Read</> the documentation at <comment>https://symfony.com/doc</>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
use App\Kernel;
4+
use Symfony\Component\Dotenv\Dotenv;
5+
use Symfony\Component\ErrorHandler\Debug;
6+
use Symfony\Component\HttpFoundation\Request;
7+
8+
require dirname(__DIR__).'/vendor/autoload.php';
9+
10+
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
11+
12+
if ($_SERVER['APP_DEBUG']) {
13+
umask(0000);
14+
15+
Debug::enable();
16+
}
17+
18+
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
19+
$request = Request::createFromGlobals();
20+
$response = $kernel->handle($request);
21+
$response->send();
22+
$kernel->terminate($request, $response);

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

Whitespace-only changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
namespace App;
4+
5+
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
6+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
7+
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
8+
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
9+
10+
class Kernel extends BaseKernel
11+
{
12+
use MicroKernelTrait;
13+
14+
protected function configureContainer(ContainerConfigurator $container): void
15+
{
16+
$container->import('../config/{packages}/*.yaml');
17+
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
18+
19+
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
20+
$container->import('../config/services.yaml');
21+
$container->import('../config/{services}_'.$this->environment.'.yaml');
22+
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
23+
(require $path)($container->withPath($path), $this);
24+
}
25+
}
26+
27+
protected function configureRoutes(RoutingConfigurator $routes): void
28+
{
29+
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
30+
$routes->import('../config/{routes}/*.yaml');
31+
32+
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
33+
$routes->import('../config/routes.yaml');
34+
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
35+
(require $path)($routes->withPath($path), $this);
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)