Skip to content

Commit 07dbee3

Browse files
committed
Bump recipe
1 parent b660aec commit 07dbee3

6 files changed

Lines changed: 172 additions & 94 deletions

File tree

api/.env

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
# This file defines all environment variables that the application needs.
2-
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE.
3-
# Use ".env.local" for local overrides during development.
4-
# Use real environment variables when deploying to production.
1+
# In all environments, the following files are loaded if they exist,
2+
# the later taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
#
13+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
514
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
615

716
VARNISH_URL=http://cache-proxy
@@ -26,6 +35,5 @@ CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$
2635

2736
###> symfony/mercure-bundle ###
2837
MERCURE_PUBLISH_URL=http://mercure/hub
29-
MERCURE_SUBSCRIBE_URL=http://localhost:1337/hub
30-
MERCURE_JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InN1YnNjcmliZSI6WyJmb28iLCJiYXIiXSwicHVibGlzaCI6WyJmb28iXX19.LRLvirgONK13JgacQ_VbcjySbVhkSmHy3IznH3tA9PM
38+
MERCURE_JWT_SECRET=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InN1YnNjcmliZSI6WyJmb28iLCJiYXIiXSwicHVibGlzaCI6WyJmb28iXX19.LRLvirgONK13JgacQ_VbcjySbVhkSmHy3IznH3tA9PM
3139
###< symfony/mercure-bundle ###

api/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
###> symfony/framework-bundle ###
44
/.env.local
5+
/.env.local.php
56
/.env.*.local
67
/public/bundles/
78
/var/
89
/vendor/
910
###< symfony/framework-bundle ###
1011

1112
###> friendsofphp/php-cs-fixer ###
12-
.php_cs
13-
.php_cs.cache
13+
/.php_cs
14+
/.php_cs.cache
1415
###< friendsofphp/php-cs-fixer ###
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
framework:
2+
router:
3+
strict_requirements: true

api/src/Kernel.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class Kernel extends BaseKernel
1313
{
1414
use MicroKernelTrait;
1515

16-
const CONFIG_EXTS = '.{php,xml,yaml,yml}';
16+
private const CONFIG_EXTS = '.{php,xml,yaml,yml}';
1717

18-
public function registerBundles()
18+
public function registerBundles(): iterable
1919
{
2020
$contents = require $this->getProjectDir().'/config/bundles.php';
2121
foreach ($contents as $class => $envs) {
@@ -25,7 +25,7 @@ public function registerBundles()
2525
}
2626
}
2727

28-
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
28+
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
2929
{
3030
$container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
3131
$container->setParameter('container.dumper.inline_class_loader', true);
@@ -37,12 +37,12 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
3737
$loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
3838
}
3939

40-
protected function configureRoutes(RouteCollectionBuilder $routes)
40+
protected function configureRoutes(RouteCollectionBuilder $routes): void
4141
{
4242
$confDir = $this->getProjectDir().'/config';
4343

44-
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
4544
$routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
45+
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
4646
$routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
4747
}
4848
}

0 commit comments

Comments
 (0)