WIP: Upgrade skeleton to symfony 5 #18
23
.env
23
.env
@ -1,7 +1,15 @@
|
|||||||
##
|
# * .env contains default values for the environment variables needed by the app
|
||||||
## Manually dump .env files in .env.local.php with
|
# * .env.local uncommitted file with local overrides
|
||||||
## `$ composer symfony:dump-env prod`
|
# * .env.$APP_ENV committed environment-specific defaults
|
||||||
##
|
# * .env.$APP_ENV.local uncommitted environment-specific overrides
|
||||||
|
#
|
||||||
|
# Real environment variables win over .env files.
|
||||||
|
#
|
||||||
|
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
|
||||||
|
# https://symfony.com/doc/current/configuration/secrets.html
|
||||||
|
#
|
||||||
|
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
||||||
|
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||||
|
|
||||||
## Locale
|
## Locale
|
||||||
LOCALE=fr
|
LOCALE=fr
|
||||||
@ -20,11 +28,8 @@ WOPI_SERVER=http://collabora:9980
|
|||||||
# must be manually set in .env.local
|
# must be manually set in .env.local
|
||||||
# ADMIN_PASSWORD=
|
# ADMIN_PASSWORD=
|
||||||
|
|
||||||
## Symfony/swiftmailer
|
|
||||||
## Mailer
|
|
||||||
###> symfony/mailer ###
|
###> symfony/mailer ###
|
||||||
# MAILER_DSN=smtp://localhost
|
# MAILER_DSN=null://null
|
||||||
MAILER_DSN=
|
|
||||||
###< symfony/mailer ###
|
###< symfony/mailer ###
|
||||||
|
|
||||||
## Notifications
|
## Notifications
|
||||||
@ -69,10 +74,10 @@ SHORT_MESSAGE_DSN=null://null
|
|||||||
|
|
||||||
###> symfony/messenger ###
|
###> symfony/messenger ###
|
||||||
# Choose one of the transports below
|
# Choose one of the transports below
|
||||||
# MESSENGER_TRANSPORT_DSN=doctrine://default
|
|
||||||
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
|
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
|
||||||
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
|
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
|
||||||
MESSENGER_TRANSPORT_DSN=sync://
|
MESSENGER_TRANSPORT_DSN=sync://
|
||||||
|
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
||||||
###< symfony/messenger ###
|
###< symfony/messenger ###
|
||||||
|
|
||||||
###> doctrine/doctrine-bundle ###
|
###> doctrine/doctrine-bundle ###
|
||||||
|
3
.env.dev
3
.env.dev
@ -11,5 +11,8 @@ MAILER_URL=smtp://smtp:1025
|
|||||||
PGADMIN_DEFAULT_EMAIL=admin@chill.social
|
PGADMIN_DEFAULT_EMAIL=admin@chill.social
|
||||||
PGADMIN_DEFAULT_PASSWORD=password
|
PGADMIN_DEFAULT_PASSWORD=password
|
||||||
|
|
||||||
|
|
||||||
|
VAR_DUMPER_SERVER=dumper:9912
|
||||||
|
|
||||||
## Phpstorm IDE project path
|
## Phpstorm IDE project path
|
||||||
PROJECT_DIR=
|
PROJECT_DIR=
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
# define your env variables for the test env here
|
# define your env variables for the test env here
|
||||||
KERNEL_CLASS='App\Kernel'
|
KERNEL_CLASS='App\Kernel'
|
||||||
APP_SECRET='$ecretf0rt3st'
|
APP_SECRET='$ecretf0rt3st'
|
||||||
|
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||||
|
PANTHER_APP_ENV=panther
|
||||||
|
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
||||||
ADMIN_PASSWORD=password
|
ADMIN_PASSWORD=password
|
||||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -63,7 +63,6 @@ yarn-error.log
|
|||||||
###< symfony/webpack-encore-bundle ###
|
###< symfony/webpack-encore-bundle ###
|
||||||
|
|
||||||
###> symfony/phpunit-bridge ###
|
###> symfony/phpunit-bridge ###
|
||||||
.phpunit
|
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
###< symfony/phpunit-bridge ###
|
###< symfony/phpunit-bridge ###
|
||||||
@ -81,3 +80,7 @@ docker-compose.override.yaml
|
|||||||
###> lexik/jwt-authentication-bundle ###
|
###> lexik/jwt-authentication-bundle ###
|
||||||
/config/jwt/*.pem
|
/config/jwt/*.pem
|
||||||
###< lexik/jwt-authentication-bundle ###
|
###< lexik/jwt-authentication-bundle ###
|
||||||
|
|
||||||
|
###> phpstan/phpstan ###
|
||||||
|
phpstan.neon
|
||||||
|
###< phpstan/phpstan ###
|
||||||
|
2
assets/bootstrap.js
vendored
2
assets/bootstrap.js
vendored
@ -4,7 +4,7 @@ import { startStimulusApp } from '@symfony/stimulus-bridge';
|
|||||||
export const app = startStimulusApp(require.context(
|
export const app = startStimulusApp(require.context(
|
||||||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
|
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
|
||||||
true,
|
true,
|
||||||
/\.(j|t)sx?$/
|
/\.[jt]sx?$/
|
||||||
));
|
));
|
||||||
|
|
||||||
// register any custom, 3rd party controllers here
|
// register any custom, 3rd party controllers here
|
||||||
|
39
bin/console
39
bin/console
@ -3,40 +3,15 @@
|
|||||||
|
|
||||||
use App\Kernel;
|
use App\Kernel;
|
||||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||||
use Symfony\Component\Console\Input\ArgvInput;
|
|
||||||
use Symfony\Component\ErrorHandler\Debug;
|
|
||||||
|
|
||||||
if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
|
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
|
||||||
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
|
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
|
||||||
}
|
}
|
||||||
|
|
||||||
set_time_limit(0);
|
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||||
|
|
||||||
require dirname(__DIR__).'/vendor/autoload.php';
|
return function (array $context) {
|
||||||
|
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||||
|
|
||||||
if (!class_exists(Application::class)) {
|
return new Application($kernel);
|
||||||
throw new LogicException('You need to add "symfony/framework-bundle" as a Composer dependency.');
|
};
|
||||||
}
|
|
||||||
|
|
||||||
$input = new ArgvInput();
|
|
||||||
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
|
|
||||||
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($input->hasParameterOption('--no-debug', true)) {
|
|
||||||
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
|
|
||||||
}
|
|
||||||
|
|
||||||
require dirname(__DIR__).'/config/bootstrap.php';
|
|
||||||
|
|
||||||
if ($_SERVER['APP_DEBUG']) {
|
|
||||||
umask(0000);
|
|
||||||
|
|
||||||
if (class_exists(Debug::class)) {
|
|
||||||
Debug::enable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
|
|
||||||
$application = new Application($kernel);
|
|
||||||
$application->run($input);
|
|
||||||
|
@ -15,15 +15,14 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-redis": "*",
|
"ext-redis": "*",
|
||||||
"chill-project/chill-bundles": "2.16.1",
|
"chill-project/chill-bundles": "dev-upgrade-sf5@dev",
|
||||||
"symfony/flex": "^1.9",
|
"symfony/flex": "^1.9",
|
||||||
"symfony/http-client": "^4.4 || ^5",
|
|
||||||
"nelmio/alice": "^3.8",
|
"nelmio/alice": "^3.8",
|
||||||
"phpoffice/phpword": "^0.18.2",
|
"phpoffice/phpword": "^0.18.2",
|
||||||
"phpstan/phpstan": "^1.0",
|
"phpstan/phpstan": "^1.0",
|
||||||
"spomky-labs/base64url": "^2.0",
|
"spomky-labs/base64url": "^2.0",
|
||||||
"twig/string-extra": "^3.3",
|
"twig/string-extra": "^3.3",
|
||||||
"symfony/mailer": "^5.4"
|
"symfony/runtime": "^5.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.13",
|
"fakerphp/faker": "^1.13",
|
||||||
@ -31,8 +30,7 @@
|
|||||||
"symfony/dotenv": "^5.1",
|
"symfony/dotenv": "^5.1",
|
||||||
"symfony/maker-bundle": "^1.20",
|
"symfony/maker-bundle": "^1.20",
|
||||||
"doctrine/doctrine-fixtures-bundle": "^3.3",
|
"doctrine/doctrine-fixtures-bundle": "^3.3",
|
||||||
"symfony/stopwatch": "^5.1",
|
"symfony/stopwatch": "^5.4",
|
||||||
"symfony/twig-bundle": "^4.4",
|
|
||||||
"symfony/web-profiler-bundle": "^5.0",
|
"symfony/web-profiler-bundle": "^5.0",
|
||||||
"symfony/var-dumper": "4.*",
|
"symfony/var-dumper": "4.*",
|
||||||
"symfony/phpunit-bridge": "^5.2",
|
"symfony/phpunit-bridge": "^5.2",
|
||||||
|
2932
composer.lock
generated
2932
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Symfony\Component\Dotenv\Dotenv;
|
|
||||||
|
|
||||||
require dirname(__DIR__).'/vendor/autoload.php';
|
|
||||||
|
|
||||||
if (!class_exists(Dotenv::class)) {
|
|
||||||
throw new LogicException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load cached env vars if the .env.local.php file exists
|
|
||||||
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
|
|
||||||
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
|
|
||||||
(new Dotenv(false))->populate($env);
|
|
||||||
} else {
|
|
||||||
// load all the .env files
|
|
||||||
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SERVER += $_ENV;
|
|
||||||
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
|
|
||||||
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
|
|
||||||
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
|
|
@ -12,10 +12,9 @@ return [
|
|||||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
|
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
||||||
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
|
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
|
||||||
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
|
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
|
||||||
ChampsLibres\AsyncUploaderBundle\ChampsLibresAsyncUploaderBundle::class => ['all' => true],
|
|
||||||
Chill\MainBundle\ChillMainBundle::class => ['all' => true],
|
Chill\MainBundle\ChillMainBundle::class => ['all' => true],
|
||||||
Chill\PersonBundle\ChillPersonBundle::class => ['all' => true],
|
Chill\PersonBundle\ChillPersonBundle::class => ['all' => true],
|
||||||
Chill\CustomFieldsBundle\ChillCustomFieldsBundle::class => ['all' => true],
|
Chill\CustomFieldsBundle\ChillCustomFieldsBundle::class => ['all' => true],
|
||||||
|
14
config/packages/cache_chill.yaml
Normal file
14
config/packages/cache_chill.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
framework:
|
||||||
|
cache:
|
||||||
|
default_redis_provider: '%env(resolve:REDIS_URL)%'
|
||||||
|
pools:
|
||||||
|
cache.user_data:
|
||||||
|
adapter: cache.adapter.redis
|
||||||
|
public: true
|
||||||
|
default_lifetime: 300 # 5 minutes
|
||||||
|
|
||||||
|
# will be used in chill_main.tag_aware_cache service
|
||||||
|
cache.tags:
|
||||||
|
adapter: cache.adapter.redis
|
||||||
|
public: false
|
||||||
|
default_lifetime: 300
|
@ -1,14 +0,0 @@
|
|||||||
champs_libres_async_uploader:
|
|
||||||
openstack:
|
|
||||||
os_username: '%env(resolve:OS_USERNAME)%' # Required
|
|
||||||
os_password: '%env(resolve:OS_PASSWORD)%' # Required
|
|
||||||
os_tenant_id: '%env(resolve:OS_TENANT_ID)%' # Required
|
|
||||||
os_region_name: '%env(resolve:OS_REGION_NAME)%' # Required
|
|
||||||
os_auth_url: '%env(resolve:OS_AUTH_URL)%' # Required
|
|
||||||
temp_url:
|
|
||||||
temp_url_key: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_KEY)%' # Required
|
|
||||||
container: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_CONTAINER)%' # Required
|
|
||||||
temp_url_base_path: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_BASE_PATH)%' # Required. Do not forget a trailing slash
|
|
||||||
max_post_file_size: 15000000 # 15Mo (bytes)
|
|
||||||
max_expires_delay: 180
|
|
||||||
max_submit_delay: 3600
|
|
@ -27,6 +27,12 @@ chill_main:
|
|||||||
y: '%env(float:ADD_ADDRESS_MAP_CENTER_Y)%'
|
y: '%env(float:ADD_ADDRESS_MAP_CENTER_Y)%'
|
||||||
z: '%env(float:ADD_ADDRESS_MAP_CENTER_Z)%'
|
z: '%env(float:ADD_ADDRESS_MAP_CENTER_Z)%'
|
||||||
|
|
||||||
|
when@test:
|
||||||
|
chill_main:
|
||||||
|
available_languages:
|
||||||
|
- 'fr'
|
||||||
|
- 'en'
|
||||||
|
|
||||||
chill_custom_fields:
|
chill_custom_fields:
|
||||||
show_empty_values_in_views: false
|
show_empty_values_in_views: false
|
||||||
|
|
||||||
|
6
config/packages/chill_doc_store.yaml
Normal file
6
config/packages/chill_doc_store.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
chill_doc_store:
|
||||||
|
openstack:
|
||||||
|
temp_url:
|
||||||
|
temp_url_key: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_KEY)%' # Required
|
||||||
|
container: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_CONTAINER)%' # Required
|
||||||
|
temp_url_base_path: '%env(resolve:ASYNC_UPLOAD_TEMP_URL_BASE_PATH)%' # Required
|
@ -1,88 +0,0 @@
|
|||||||
chill_main:
|
|
||||||
cruds:
|
|
||||||
-
|
|
||||||
class: 'App\Entity\VendeePerson'
|
|
||||||
controller: 'App\Controller\VendeePersonController'
|
|
||||||
name: vendeeperson
|
|
||||||
base_path: /vendee/vendeeperson
|
|
||||||
actions:
|
|
||||||
infosociopro_edit:
|
|
||||||
controller_action: 'infosocioproEdit'
|
|
||||||
path: '/{id}/infosociopro/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
infosociopro_view:
|
|
||||||
controller_action: 'infosocioproView'
|
|
||||||
path: '/{id}/infosociopro/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
entourage_edit:
|
|
||||||
controller_action: 'entourageEdit'
|
|
||||||
path: '/{id}/entourage/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
entourage_view:
|
|
||||||
controller_action: 'entourageView'
|
|
||||||
path: '/{id}/entourage/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
infomedicale_edit:
|
|
||||||
controller_action: 'infomedicaleEdit'
|
|
||||||
path: '/{id}/infomedicale/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
infomedicale_view:
|
|
||||||
controller_action: 'infomedicaleView'
|
|
||||||
path: '/{id}/infomedicale/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
infologement_edit:
|
|
||||||
controller_action: 'infologementEdit'
|
|
||||||
path: '/{id}/infologement/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
infologement_view:
|
|
||||||
controller_action: 'infologementView'
|
|
||||||
path: '/{id}/infologement/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
-
|
|
||||||
class: 'App\Entity\VendeePersonMineur'
|
|
||||||
controller: 'App\Controller\VendeePersonMineurController'
|
|
||||||
name: vendeepersonmineur
|
|
||||||
base_path: /vendee/vendeepersonmineur
|
|
||||||
actions:
|
|
||||||
infofamille_edit:
|
|
||||||
controller_action: 'infofamilleEdit'
|
|
||||||
path: '/{id}/infofamille/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
infofamille_view:
|
|
||||||
controller_action: 'infofamilleView'
|
|
||||||
path: '/{id}/infofamille/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
scolarite_edit:
|
|
||||||
controller_action: 'scolariteEdit'
|
|
||||||
path: '/{id}/scolarite/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
scolarite_view:
|
|
||||||
controller_action: 'scolariteView'
|
|
||||||
path: '/{id}/scolarite/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
infomedicale_edit:
|
|
||||||
controller_action: 'infomedicaleEdit'
|
|
||||||
path: '/{id}/infomedicale/edit'
|
|
||||||
role: CHILL_PERSON_EDIT
|
|
||||||
infomedicale_view:
|
|
||||||
controller_action: 'infomedicaleView'
|
|
||||||
path: '/{id}/infomedicale/view'
|
|
||||||
role: CHILL_PERSON_VIEW
|
|
||||||
-
|
|
||||||
class: 'App\Entity\Security\Profile'
|
|
||||||
name: vendee_security_profile
|
|
||||||
base_path: '/admin/vendee/security/profile'
|
|
||||||
base_role: ROLE_ADMIN
|
|
||||||
form_class: 'App\Form\Security\ProfileType'
|
|
||||||
controller: 'App\Controller\SecurityProfileController'
|
|
||||||
actions:
|
|
||||||
index:
|
|
||||||
template: '/Security/Profile/index.html.twig'
|
|
||||||
role: ROLE_ADMIN
|
|
||||||
new:
|
|
||||||
role: ROLE_ADMIN
|
|
||||||
template: '/Security/Profile/new.html.twig'
|
|
||||||
edit:
|
|
||||||
role: ROLE_ADMIN
|
|
||||||
template: '/Security/Profile/edit.html.twig'
|
|
||||||
|
|
5
config/packages/debug.yaml
Normal file
5
config/packages/debug.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
when@dev:
|
||||||
|
debug:
|
||||||
|
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
|
||||||
|
# See the "server:dump" command to start a new server.
|
||||||
|
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
|
@ -1,4 +0,0 @@
|
|||||||
debug:
|
|
||||||
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
|
|
||||||
# See the "server:dump" command to start a new server.
|
|
||||||
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
|
|
@ -1,21 +0,0 @@
|
|||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
||||||
channels: ["!event"]
|
|
||||||
# uncomment to get logging in your browser
|
|
||||||
# you may have to allow bigger header sizes in your Web server configuration
|
|
||||||
#firephp:
|
|
||||||
# type: firephp
|
|
||||||
# level: info
|
|
||||||
#chromephp:
|
|
||||||
# type: chromephp
|
|
||||||
# level: info
|
|
||||||
console:
|
|
||||||
type: console
|
|
||||||
process_psr_3_messages: false
|
|
||||||
channels: ['!event', '!doctrine', '!console']
|
|
||||||
bubble: false
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
nelmio_alice:
|
|
||||||
functions_blacklist:
|
|
||||||
- 'current'
|
|
||||||
- 'shuffle'
|
|
||||||
- 'date'
|
|
||||||
- 'time'
|
|
||||||
- 'file'
|
|
||||||
- 'md5'
|
|
||||||
- 'sha1'
|
|
@ -1,3 +0,0 @@
|
|||||||
twig:
|
|
||||||
globals:
|
|
||||||
responsive_debug: false
|
|
@ -1,6 +0,0 @@
|
|||||||
web_profiler:
|
|
||||||
toolbar: true
|
|
||||||
intercept_redirects: false
|
|
||||||
|
|
||||||
framework:
|
|
||||||
profiler: { only_exceptions: false }
|
|
@ -12,7 +12,8 @@ doctrine:
|
|||||||
geometry: string
|
geometry: string
|
||||||
# IMPORTANT: You MUST configure your server version,
|
# IMPORTANT: You MUST configure your server version,
|
||||||
# either here or in the DATABASE_URL env var (see .env file)
|
# either here or in the DATABASE_URL env var (see .env file)
|
||||||
#server_version: '14'
|
#server_version: '16'
|
||||||
|
use_savepoints: true
|
||||||
orm:
|
orm:
|
||||||
auto_generate_proxy_classes: true
|
auto_generate_proxy_classes: true
|
||||||
naming_strategy: doctrine.orm.naming_strategy.default
|
naming_strategy: doctrine.orm.naming_strategy.default
|
||||||
@ -20,7 +21,32 @@ doctrine:
|
|||||||
mappings:
|
mappings:
|
||||||
App:
|
App:
|
||||||
is_bundle: false
|
is_bundle: false
|
||||||
type: annotation
|
|
||||||
dir: '%kernel.project_dir%/src/Entity'
|
dir: '%kernel.project_dir%/src/Entity'
|
||||||
prefix: 'App\Entity'
|
prefix: 'App\Entity'
|
||||||
alias: App
|
alias: App
|
||||||
|
|
||||||
|
when@test:
|
||||||
|
doctrine:
|
||||||
|
dbal:
|
||||||
|
# "TEST_TOKEN" is typically set by ParaTest
|
||||||
|
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
||||||
|
|
||||||
|
when@prod:
|
||||||
|
doctrine:
|
||||||
|
orm:
|
||||||
|
auto_generate_proxy_classes: false
|
||||||
|
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
||||||
|
query_cache_driver:
|
||||||
|
type: pool
|
||||||
|
pool: doctrine.system_cache_pool
|
||||||
|
result_cache_driver:
|
||||||
|
type: pool
|
||||||
|
pool: doctrine.result_cache_pool
|
||||||
|
|
||||||
|
framework:
|
||||||
|
cache:
|
||||||
|
pools:
|
||||||
|
doctrine.result_cache_pool:
|
||||||
|
adapter: cache.app
|
||||||
|
doctrine.system_cache_pool:
|
||||||
|
adapter: cache.system
|
||||||
|
@ -2,25 +2,9 @@ doctrine_migrations:
|
|||||||
migrations_paths:
|
migrations_paths:
|
||||||
# migrations for custom modules
|
# migrations for custom modules
|
||||||
'Application\Migrations': '%kernel.project_dir%/migrations'
|
'Application\Migrations': '%kernel.project_dir%/migrations'
|
||||||
# migrations for default chill modules
|
|
||||||
'Chill\Migrations\Main': '@ChillMainBundle/migrations'
|
|
||||||
'Chill\Migrations\Activity': '@ChillActivityBundle/migrations'
|
|
||||||
'Chill\Migrations\DocStore': '@ChillDocStoreBundle/migrations'
|
|
||||||
'Chill\Migrations\CustomFields': '@ChillCustomFieldsBundle/migrations'
|
|
||||||
'Chill\Migrations\Event': '@ChillEventBundle/migrations'
|
|
||||||
'Chill\Migrations\Person': '@ChillPersonBundle/migrations'
|
|
||||||
'Chill\Migrations\Task': '@ChillTaskBundle/migrations'
|
|
||||||
'Chill\Migrations\ThirdParty': '@ChillThirdPartyBundle/migrations'
|
|
||||||
'Chill\Migrations\DocGenerator': '@ChillDocGeneratorBundle/migrations'
|
|
||||||
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
|
|
||||||
'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations'
|
|
||||||
'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations'
|
|
||||||
all_or_nothing:
|
all_or_nothing:
|
||||||
true
|
true
|
||||||
|
|
||||||
services:
|
|
||||||
'Doctrine\Migrations\Version\Comparator': 'Chill\MainBundle\Doctrine\Migrations\VersionComparator'
|
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
table_storage:
|
table_storage:
|
||||||
table_name: 'migration_versions'
|
table_name: 'migration_versions'
|
||||||
|
20
config/packages/doctrine_migrations_chill.yaml
Normal file
20
config/packages/doctrine_migrations_chill.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
doctrine_migrations:
|
||||||
|
migrations_paths:
|
||||||
|
# migrations for default chill modules
|
||||||
|
'Chill\Migrations\Main': '@ChillMainBundle/migrations'
|
||||||
|
'Chill\Migrations\Activity': '@ChillActivityBundle/migrations'
|
||||||
|
'Chill\Migrations\DocStore': '@ChillDocStoreBundle/migrations'
|
||||||
|
'Chill\Migrations\CustomFields': '@ChillCustomFieldsBundle/migrations'
|
||||||
|
'Chill\Migrations\Event': '@ChillEventBundle/migrations'
|
||||||
|
'Chill\Migrations\Person': '@ChillPersonBundle/migrations'
|
||||||
|
'Chill\Migrations\Task': '@ChillTaskBundle/migrations'
|
||||||
|
'Chill\Migrations\ThirdParty': '@ChillThirdPartyBundle/migrations'
|
||||||
|
'Chill\Migrations\DocGenerator': '@ChillDocGeneratorBundle/migrations'
|
||||||
|
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
|
||||||
|
'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations'
|
||||||
|
'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations'
|
||||||
|
all_or_nothing:
|
||||||
|
true
|
||||||
|
|
||||||
|
services:
|
||||||
|
'Doctrine\Migrations\Version\Comparator': 'Chill\MainBundle\Doctrine\Migrations\VersionComparator'
|
@ -7,14 +7,12 @@ framework:
|
|||||||
verify_peer: false
|
verify_peer: false
|
||||||
verify_host: false
|
verify_host: false
|
||||||
|
|
||||||
# DIRTY FIX un bug dans symfony4 empêche de récupérer un tableau de variables depuis .env
|
|
||||||
# cfr. https://github.com/symfony/symfony/issues/28599
|
|
||||||
trusted_hosts:
|
trusted_hosts:
|
||||||
- '^(localhost|127.0.0.1|web)$'
|
- '^(localhost|127.0.0.1|web)$'
|
||||||
- '%env(resolve:TRUSTED_HOSTS)%'
|
- '%env(resolve:TRUSTED_HOSTS)%'
|
||||||
|
|
||||||
#csrf_protection: true
|
#csrf_protection: true
|
||||||
#http_method_override: true
|
http_method_override: false
|
||||||
|
|
||||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||||
# Remove or comment this section to explicitly disable session support.
|
# Remove or comment this section to explicitly disable session support.
|
||||||
@ -22,6 +20,7 @@ framework:
|
|||||||
handler_id: null
|
handler_id: null
|
||||||
cookie_secure: auto
|
cookie_secure: auto
|
||||||
cookie_samesite: lax
|
cookie_samesite: lax
|
||||||
|
storage_factory_id: session.storage.factory.native
|
||||||
|
|
||||||
#esi: true
|
#esi: true
|
||||||
#fragments: true
|
#fragments: true
|
||||||
@ -30,6 +29,8 @@ framework:
|
|||||||
|
|
||||||
#error_controller: App\Controller\ErrorController::show
|
#error_controller: App\Controller\ErrorController::show
|
||||||
|
|
||||||
## sf4 check: ou à déplacer dans un chill.yaml
|
when@test:
|
||||||
assets:
|
framework:
|
||||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
test: true
|
||||||
|
session:
|
||||||
|
storage_factory_id: session.storage.factory.mock_file
|
||||||
|
4
config/packages/mailer_chill.yaml
Normal file
4
config/packages/mailer_chill.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
framework:
|
||||||
|
mailer:
|
||||||
|
envelope:
|
||||||
|
sender: '%env(NOTIFICATION_FROM_EMAIL)%'
|
@ -17,11 +17,3 @@ framework:
|
|||||||
routing:
|
routing:
|
||||||
# Route your messages to the transports
|
# Route your messages to the transports
|
||||||
# 'App\Message\YourMessage': async
|
# 'App\Message\YourMessage': async
|
||||||
'Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage': async
|
|
||||||
'Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage': async
|
|
||||||
'Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage': async
|
|
||||||
'Chill\CalendarBundle\Messenger\Message\CalendarMessage': async
|
|
||||||
'Chill\CalendarBundle\Messenger\Message\InviteUpdateMessage': async
|
|
||||||
'Chill\CalendarBundle\Messenger\Message\MSGraphChangeNotificationMessage': async
|
|
||||||
'Chill\MainBundle\Service\ShortMessage\ShortMessage': async
|
|
||||||
'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority
|
|
||||||
|
13
config/packages/messenger_chill.yaml
Normal file
13
config/packages/messenger_chill.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
framework:
|
||||||
|
messenger:
|
||||||
|
routing:
|
||||||
|
# Route your messages to the transports
|
||||||
|
# 'App\Message\YourMessage': async
|
||||||
|
'Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage': async
|
||||||
|
'Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage': async
|
||||||
|
'Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage': async
|
||||||
|
'Chill\CalendarBundle\Messenger\Message\CalendarMessage': async
|
||||||
|
'Chill\CalendarBundle\Messenger\Message\InviteUpdateMessage': async
|
||||||
|
'Chill\CalendarBundle\Messenger\Message\MSGraphChangeNotificationMessage': async
|
||||||
|
'Chill\MainBundle\Service\ShortMessage\ShortMessage': async
|
||||||
|
'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority
|
63
config/packages/monolog.yaml
Normal file
63
config/packages/monolog.yaml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
monolog:
|
||||||
|
channels:
|
||||||
|
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||||
|
|
||||||
|
when@dev:
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: stream
|
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
|
level: debug
|
||||||
|
channels: ["!event"]
|
||||||
|
# uncomment to get logging in your browser
|
||||||
|
# you may have to allow bigger header sizes in your Web server configuration
|
||||||
|
#firephp:
|
||||||
|
# type: firephp
|
||||||
|
# level: info
|
||||||
|
#chromephp:
|
||||||
|
# type: chromephp
|
||||||
|
# level: info
|
||||||
|
console:
|
||||||
|
type: console
|
||||||
|
process_psr_3_messages: false
|
||||||
|
channels: ["!event", "!doctrine", "!console"]
|
||||||
|
|
||||||
|
when@test:
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: fingers_crossed
|
||||||
|
action_level: error
|
||||||
|
handler: nested
|
||||||
|
excluded_http_codes: [404, 405]
|
||||||
|
channels: ["!event"]
|
||||||
|
nested:
|
||||||
|
type: stream
|
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
|
level: debug
|
||||||
|
|
||||||
|
# those comes from the symfony recipe. But this is overriden by the ./prod/monolog.yaml config
|
||||||
|
# when@prod:
|
||||||
|
# monolog:
|
||||||
|
# handlers:
|
||||||
|
# main:
|
||||||
|
# type: fingers_crossed
|
||||||
|
# action_level: error
|
||||||
|
# handler: nested
|
||||||
|
# excluded_http_codes: [404, 405]
|
||||||
|
# buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||||
|
# nested:
|
||||||
|
# type: stream
|
||||||
|
# path: php://stderr
|
||||||
|
# level: debug
|
||||||
|
# formatter: monolog.formatter.json
|
||||||
|
# console:
|
||||||
|
# type: console
|
||||||
|
# process_psr_3_messages: false
|
||||||
|
# channels: ["!event", "!doctrine"]
|
||||||
|
# deprecation:
|
||||||
|
# type: stream
|
||||||
|
# channels: [deprecation]
|
||||||
|
# path: php://stderr
|
||||||
|
# formatter: monolog.formatter.json
|
12
config/packages/nelmio_alice.yaml
Normal file
12
config/packages/nelmio_alice.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
when@dev: &dev
|
||||||
|
nelmio_alice:
|
||||||
|
functions_blacklist:
|
||||||
|
- 'current'
|
||||||
|
- 'shuffle'
|
||||||
|
- 'date'
|
||||||
|
- 'time'
|
||||||
|
- 'file'
|
||||||
|
- 'md5'
|
||||||
|
- 'sha1'
|
||||||
|
|
||||||
|
when@test: *dev
|
@ -7,15 +7,5 @@ services:
|
|||||||
Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory'
|
Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory'
|
||||||
Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory'
|
Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory'
|
||||||
|
|
||||||
# Register nyholm/psr7 services for autowiring with HTTPlug factories
|
|
||||||
Http\Message\MessageFactory: '@nyholm.psr7.httplug_factory'
|
|
||||||
Http\Message\RequestFactory: '@nyholm.psr7.httplug_factory'
|
|
||||||
Http\Message\ResponseFactory: '@nyholm.psr7.httplug_factory'
|
|
||||||
Http\Message\StreamFactory: '@nyholm.psr7.httplug_factory'
|
|
||||||
Http\Message\UriFactory: '@nyholm.psr7.httplug_factory'
|
|
||||||
|
|
||||||
nyholm.psr7.psr17_factory:
|
nyholm.psr7.psr17_factory:
|
||||||
class: Nyholm\Psr7\Factory\Psr17Factory
|
class: Nyholm\Psr7\Factory\Psr17Factory
|
||||||
|
|
||||||
nyholm.psr7.httplug_factory:
|
|
||||||
class: Nyholm\Psr7\Factory\HttplugFactory
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
|
|
||||||
#monolog:
|
|
||||||
# channels: [deprecation]
|
|
||||||
# handlers:
|
|
||||||
# deprecation:
|
|
||||||
# type: stream
|
|
||||||
# channels: [deprecation]
|
|
||||||
# path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
|
|
@ -1,17 +0,0 @@
|
|||||||
doctrine:
|
|
||||||
orm:
|
|
||||||
auto_generate_proxy_classes: false
|
|
||||||
query_cache_driver:
|
|
||||||
type: pool
|
|
||||||
pool: doctrine.system_cache_pool
|
|
||||||
result_cache_driver:
|
|
||||||
type: pool
|
|
||||||
pool: doctrine.result_cache_pool
|
|
||||||
|
|
||||||
framework:
|
|
||||||
cache:
|
|
||||||
pools:
|
|
||||||
doctrine.result_cache_pool:
|
|
||||||
adapter: cache.app
|
|
||||||
doctrine.system_cache_pool:
|
|
||||||
adapter: cache.system
|
|
@ -25,6 +25,7 @@ monolog:
|
|||||||
id: monolog.gelf_handler
|
id: monolog.gelf_handler
|
||||||
level: info
|
level: info
|
||||||
channels: ['!event', '!php']
|
channels: ['!event', '!php']
|
||||||
|
excluded_http_codes: [404, 405]
|
||||||
|
|
||||||
console:
|
console:
|
||||||
type: console
|
type: console
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
framework:
|
|
||||||
router:
|
|
||||||
strict_requirements: null
|
|
@ -1,4 +0,0 @@
|
|||||||
#webpack_encore:
|
|
||||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
|
||||||
# Available in version 1.2
|
|
||||||
#cache: true
|
|
@ -5,3 +5,8 @@ framework:
|
|||||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||||
#default_uri: http://localhost
|
#default_uri: http://localhost
|
||||||
|
|
||||||
|
when@prod:
|
||||||
|
framework:
|
||||||
|
router:
|
||||||
|
strict_requirements: null
|
||||||
|
@ -1,74 +1,40 @@
|
|||||||
security:
|
security:
|
||||||
|
enable_authenticator_manager: true
|
||||||
access_decision_manager:
|
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||||
strategy: unanimous
|
password_hashers:
|
||||||
allow_if_all_abstain: false
|
Chill\MainBundle\Entity\User: 'auto'
|
||||||
|
Symfony\Component\Security\Core\User\User: plaintext
|
||||||
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||||
|
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||||
providers:
|
providers:
|
||||||
|
# providers added by chill-bundles recipes
|
||||||
chain_provider:
|
# those providers are required to make chill working
|
||||||
chain :
|
chill_chain_provider:
|
||||||
providers: [in_memory, users]
|
chain:
|
||||||
in_memory:
|
providers: [chill_in_memory, chill_users]
|
||||||
|
chill_in_memory:
|
||||||
memory:
|
memory:
|
||||||
users:
|
users:
|
||||||
admin: { password: '%env(resolve:ADMIN_PASSWORD)%', roles: ['ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH', 'ROLE_USER'] }
|
admin: { password: '%env(resolve:ADMIN_PASSWORD)%', roles: ['ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH', 'ROLE_USER'] }
|
||||||
users:
|
chill_users:
|
||||||
id: chill.main.user_provider
|
id: chill.main.user_provider
|
||||||
|
# end of providers added by chill-bundles recipes
|
||||||
|
# all other providers might be removed, unless you have specific needs
|
||||||
|
# TODO AFTER CHILL-BUNDLES RECIPES INSTALL: remove the user providers which are not used
|
||||||
|
|
||||||
encoders:
|
|
||||||
|
|
||||||
Chill\MainBundle\Entity\User:
|
|
||||||
algorithm: bcrypt
|
|
||||||
Symfony\Component\Security\Core\User\User: plaintext
|
|
||||||
|
|
||||||
firewalls:
|
|
||||||
|
|
||||||
dev:
|
|
||||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
||||||
security: false
|
|
||||||
|
|
||||||
wopi:
|
|
||||||
pattern: ^/wopi
|
|
||||||
provider: chain_provider
|
|
||||||
stateless: true
|
|
||||||
guard:
|
|
||||||
authenticators:
|
|
||||||
- lexik_jwt_authentication.jwt_token_authenticator
|
|
||||||
|
|
||||||
default:
|
|
||||||
anonymous: ~
|
|
||||||
provider: chain_provider
|
|
||||||
form_login:
|
|
||||||
csrf_parameter: _csrf_token
|
|
||||||
csrf_token_id: authenticate
|
|
||||||
#csrf_provider: security.csrf.token_manager
|
|
||||||
logout_on_user_change: true
|
|
||||||
logout:
|
|
||||||
path: /logout
|
|
||||||
|
|
||||||
# uncomment to enable impersonate mode in Chill
|
|
||||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
|
||||||
switch_user: true
|
|
||||||
|
|
||||||
# activate different ways to authenticate
|
|
||||||
# https://symfony.com/doc/current/security.html#firewalls-authentication
|
|
||||||
|
|
||||||
# Easy way to control access for large sections of your site
|
# Easy way to control access for large sections of your site
|
||||||
# Note: Only the *first* access control that matches will be used
|
# Note: Only the *first* access control that matches will be used
|
||||||
access_control:
|
|
||||||
- { path: ^/saml/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
when@test:
|
||||||
- { path: ^/saml/metadata, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
security:
|
||||||
- { path: ^/(login|logout), roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
password_hashers:
|
||||||
- { path: ^/public, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
# By default, password hashers are resource intensive and take time. This is
|
||||||
- { path: ^/wopi, roles: IS_AUTHENTICATED_FULLY }
|
# important to generate secure password hashes. In tests however, secure hashes
|
||||||
# access for homepage, the homepage redirect admin to admin section
|
# are not important, waste resources and increase test times. The following
|
||||||
- { path: ^/$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
|
# reduces the work factor to the lowest possible values.
|
||||||
- { path: ^/homepage$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
||||||
# idem
|
algorithm: auto
|
||||||
- { path: ^/([a-z]+/)?homepage, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
|
cost: 4 # Lowest possible value for bcrypt
|
||||||
# admin section, only for admin
|
time_cost: 3 # Lowest possible value for argon
|
||||||
- { path: ^/([a-z]+/)?admin, roles: ROLE_ADMIN }
|
memory_cost: 10 # Lowest possible value for argon
|
||||||
# other pages, only for regular user (no admin)
|
|
||||||
- { path: ^/, roles: ROLE_USER }
|
|
||||||
|
50
config/packages/security_chill.yaml
Normal file
50
config/packages/security_chill.yaml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
security:
|
||||||
|
access_decision_manager:
|
||||||
|
strategy: unanimous
|
||||||
|
allow_if_all_abstain: false
|
||||||
|
firewalls:
|
||||||
|
dev:
|
||||||
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||||
|
security: false
|
||||||
|
wopi:
|
||||||
|
pattern: ^/wopi
|
||||||
|
provider: chill_chain_provider
|
||||||
|
stateless: true
|
||||||
|
guard:
|
||||||
|
authenticators:
|
||||||
|
- lexik_jwt_authentication.jwt_token_authenticator
|
||||||
|
chill_main:
|
||||||
|
# remove during upgrade from symfony 4 to symfony 5 TODO check this
|
||||||
|
#anonymous: ~
|
||||||
|
provider: chill_chain_provider
|
||||||
|
form_login:
|
||||||
|
csrf_parameter: _csrf_token
|
||||||
|
csrf_token_id: authenticate
|
||||||
|
#csrf_provider: security.csrf.token_manager
|
||||||
|
# remove during upgrade from symfony 4 to symfony 5 TODO check this
|
||||||
|
# logout_on_user_change: true
|
||||||
|
logout:
|
||||||
|
path: /logout
|
||||||
|
|
||||||
|
# uncomment to enable impersonate mode in Chill
|
||||||
|
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||||
|
switch_user: true
|
||||||
|
|
||||||
|
# activate different ways to authenticate
|
||||||
|
# https://symfony.com/doc/current/security.html#firewalls-authentication
|
||||||
|
|
||||||
|
# Easy way to control access for large sections of your site
|
||||||
|
# Note: Only the *first* access control that matches will be used
|
||||||
|
access_control:
|
||||||
|
- { path: ^/(login|logout), roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||||
|
- { path: ^/public, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||||
|
- { path: ^/wopi, roles: IS_AUTHENTICATED_FULLY }
|
||||||
|
# access for homepage, the homepage redirect admin to admin section
|
||||||
|
- { path: ^/$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
|
||||||
|
- { path: ^/homepage$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
|
||||||
|
# idem
|
||||||
|
- { path: ^/([a-z]+/)?homepage, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
|
||||||
|
# admin section, only for admin
|
||||||
|
- { path: ^/([a-z]+/)?admin, roles: ROLE_ADMIN }
|
||||||
|
# other pages, only for regular user (no admin)
|
||||||
|
- { path: ^/, roles: ROLE_USER }
|
0
config/packages/test/.gitkeep
Normal file
0
config/packages/test/.gitkeep
Normal file
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
chill_main:
|
|
||||||
available_languages:
|
|
||||||
- 'fr'
|
|
||||||
- 'en'
|
|
@ -1,4 +0,0 @@
|
|||||||
doctrine:
|
|
||||||
dbal:
|
|
||||||
# "TEST_TOKEN" is typically set by ParaTest
|
|
||||||
dbname: 'main_test%env(default::TEST_TOKEN)%'
|
|
@ -1,6 +0,0 @@
|
|||||||
framework:
|
|
||||||
test: true
|
|
||||||
session:
|
|
||||||
storage_id: session.storage.mock_file
|
|
||||||
assets:
|
|
||||||
json_manifest_path: NULL
|
|
@ -1,12 +0,0 @@
|
|||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: fingers_crossed
|
|
||||||
action_level: error
|
|
||||||
handler: nested
|
|
||||||
excluded_http_codes: [404, 405]
|
|
||||||
channels: ["!event"]
|
|
||||||
nested:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
@ -1,2 +0,0 @@
|
|||||||
imports:
|
|
||||||
- { resource: ../dev/nelmio_alice.yaml }
|
|
@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
# config/packages/test/security.yaml
|
# config/packages/test/security.yaml
|
||||||
security:
|
security:
|
||||||
firewalls:
|
|
||||||
default:
|
|
||||||
http_basic: ~
|
|
||||||
role_hierarchy:
|
role_hierarchy:
|
||||||
CHILL_MASTER_ROLE: [CHILL_INHERITED_ROLE_1]
|
CHILL_MASTER_ROLE: [CHILL_INHERITED_ROLE_1]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
twig:
|
|
||||||
strict_variables: true
|
|
@ -1,3 +0,0 @@
|
|||||||
framework:
|
|
||||||
validation:
|
|
||||||
not_compromised_password: false
|
|
@ -1,6 +0,0 @@
|
|||||||
web_profiler:
|
|
||||||
toolbar: false
|
|
||||||
intercept_redirects: false
|
|
||||||
|
|
||||||
framework:
|
|
||||||
profiler: { collect: false }
|
|
@ -1,2 +0,0 @@
|
|||||||
webpack_encore:
|
|
||||||
strict_mode: false
|
|
@ -1,7 +1,6 @@
|
|||||||
framework:
|
framework:
|
||||||
|
|
||||||
default_locale: '%env(resolve:LOCALE)%'
|
default_locale: '%env(resolve:LOCALE)%'
|
||||||
|
|
||||||
translator:
|
translator:
|
||||||
default_path: '%kernel.project_dir%/translations'
|
default_path: '%kernel.project_dir%/translations'
|
||||||
fallbacks: [ '%env(resolve:LOCALE)%' ]
|
fallbacks: [ '%env(resolve:LOCALE)%' ]
|
||||||
|
providers:
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
twig:
|
twig:
|
||||||
default_path: '%kernel.project_dir%/templates'
|
default_path: '%kernel.project_dir%/templates'
|
||||||
debug: '%kernel.debug%'
|
when@test:
|
||||||
strict_variables: '%kernel.debug%'
|
twig:
|
||||||
exception_controller: null
|
strict_variables: true
|
||||||
|
|
||||||
## In Symfony 5, bootstrap_5 theme is supported. But not yet in sf4 !!
|
|
||||||
# see sf5 https://symfony.com/doc/current/form/form_themes.html
|
|
||||||
# see sf4 https://symfony.com/doc/4.4/form/form_themes.html
|
|
||||||
#
|
|
||||||
# While waiting for the upgrade, we get the form theme file
|
|
||||||
# (https://github.com/symfony/symfony/tree/5.4/src/Symfony/Bridge/Twig/Resources/views/Form),
|
|
||||||
# put it in ChillMainBundle/Resources/views/Form/bootstrap5/
|
|
||||||
# and adapt it lightly.
|
|
||||||
#
|
|
||||||
form_themes: ['@ChillMain/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig']
|
|
||||||
#form_themes: ['bootstrap_5_horizontal_layout.html.twig']
|
|
||||||
|
16
config/packages/twig_chill.yaml
Normal file
16
config/packages/twig_chill.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
twig:
|
||||||
|
## In Symfony 5, bootstrap_5 theme is supported. But not yet in sf4 !!
|
||||||
|
# see sf5 https://symfony.com/doc/current/form/form_themes.html
|
||||||
|
# see sf4 https://symfony.com/doc/4.4/form/form_themes.html
|
||||||
|
#
|
||||||
|
# While waiting for the upgrade, we get the form theme file
|
||||||
|
# (https://github.com/symfony/symfony/tree/5.4/src/Symfony/Bridge/Twig/Resources/views/Form),
|
||||||
|
# put it in ChillMainBundle/Resources/views/Form/bootstrap5/
|
||||||
|
# and adapt it lightly.
|
||||||
|
#
|
||||||
|
form_themes: ['@ChillMain/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig']
|
||||||
|
|
||||||
|
when@dev:
|
||||||
|
twig:
|
||||||
|
globals:
|
||||||
|
responsive_debug: false
|
@ -6,3 +6,8 @@ framework:
|
|||||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||||
#auto_mapping:
|
#auto_mapping:
|
||||||
# App\Entity\: []
|
# App\Entity\: []
|
||||||
|
|
||||||
|
when@test:
|
||||||
|
framework:
|
||||||
|
validation:
|
||||||
|
not_compromised_password: false
|
||||||
|
15
config/packages/web_profiler.yaml
Normal file
15
config/packages/web_profiler.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
when@dev:
|
||||||
|
web_profiler:
|
||||||
|
toolbar: true
|
||||||
|
intercept_redirects: false
|
||||||
|
|
||||||
|
framework:
|
||||||
|
profiler: { only_exceptions: false }
|
||||||
|
|
||||||
|
when@test:
|
||||||
|
web_profiler:
|
||||||
|
toolbar: false
|
||||||
|
intercept_redirects: false
|
||||||
|
|
||||||
|
framework:
|
||||||
|
profiler: { collect: false }
|
@ -1,16 +1,18 @@
|
|||||||
---
|
|
||||||
webpack_encore:
|
webpack_encore:
|
||||||
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
||||||
output_path: '%kernel.project_dir%/public/build'
|
output_path: '%kernel.project_dir%/public/build'
|
||||||
|
|
||||||
# If multiple builds are defined (as shown below), you can disable the default build:
|
# If multiple builds are defined (as shown below), you can disable the default build:
|
||||||
# output_path: false
|
# output_path: false
|
||||||
|
|
||||||
# Set attributes that will be rendered on all script and link tags
|
# Set attributes that will be rendered on all script and link tags
|
||||||
script_attributes:
|
script_attributes:
|
||||||
defer: true
|
defer: true
|
||||||
|
# Uncomment (also under link_attributes) if using Turbo Drive
|
||||||
|
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
|
||||||
|
# 'data-turbo-track': reload
|
||||||
# link_attributes:
|
# link_attributes:
|
||||||
#
|
# Uncomment if using Turbo Drive
|
||||||
|
# 'data-turbo-track': reload
|
||||||
|
|
||||||
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
|
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
|
||||||
# crossorigin: 'anonymous'
|
# crossorigin: 'anonymous'
|
||||||
@ -23,11 +25,17 @@ webpack_encore:
|
|||||||
|
|
||||||
# If you have multiple builds:
|
# If you have multiple builds:
|
||||||
# builds:
|
# builds:
|
||||||
# pass "frontend" as the 3rg arg to the Twig functions
|
# pass the build name as the 3rd argument to the Twig functions
|
||||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
||||||
|
|
||||||
# frontend: '%kernel.project_dir%/public/frontend/build'
|
# frontend: '%kernel.project_dir%/public/frontend/build'
|
||||||
|
|
||||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
#when@prod:
|
||||||
# Put in config/packages/prod/webpack_encore.yaml
|
# webpack_encore:
|
||||||
# cache: true
|
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||||
|
# # Available in version 1.2
|
||||||
|
# cache: true
|
||||||
|
|
||||||
|
#when@test:
|
||||||
|
# webpack_encore:
|
||||||
|
# strict_mode: false
|
||||||
|
@ -11,6 +11,9 @@ framework:
|
|||||||
fr: 'Suivi'
|
fr: 'Suivi'
|
||||||
support_strategy: Chill\MainBundle\Workflow\RelatedEntityWorkflowSupportsStrategy
|
support_strategy: Chill\MainBundle\Workflow\RelatedEntityWorkflowSupportsStrategy
|
||||||
initial_marking: 'initial'
|
initial_marking: 'initial'
|
||||||
|
marking_store:
|
||||||
|
property: step
|
||||||
|
type: method
|
||||||
places:
|
places:
|
||||||
initial:
|
initial:
|
||||||
metadata:
|
metadata:
|
@ -1,9 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (file_exists(dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php')) {
|
|
||||||
require dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
||||||
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
||||||
}
|
}
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
_errors:
|
|
||||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
|
||||||
prefix: /_error
|
|
@ -1,7 +0,0 @@
|
|||||||
web_profiler_wdt:
|
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
|
||||||
prefix: /_wdt
|
|
||||||
|
|
||||||
web_profiler_profiler:
|
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
|
||||||
prefix: /_profiler
|
|
4
config/routes/framework.yaml
Normal file
4
config/routes/framework.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
when@dev:
|
||||||
|
_errors:
|
||||||
|
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||||
|
prefix: /_error
|
8
config/routes/web_profiler.yaml
Normal file
8
config/routes/web_profiler.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
when@dev:
|
||||||
|
web_profiler_wdt:
|
||||||
|
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
||||||
|
prefix: /_wdt
|
||||||
|
|
||||||
|
web_profiler_profiler:
|
||||||
|
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
||||||
|
prefix: /_profiler
|
@ -2,7 +2,7 @@
|
|||||||
# Files in the packages/ subdirectory configure your dependencies.
|
# Files in the packages/ subdirectory configure your dependencies.
|
||||||
|
|
||||||
# Put parameters here that don't need to change on each machine where the app is deployed
|
# Put parameters here that don't need to change on each machine where the app is deployed
|
||||||
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
||||||
parameters:
|
parameters:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@ -20,12 +20,6 @@ services:
|
|||||||
- '../src/Entity/'
|
- '../src/Entity/'
|
||||||
- '../src/Kernel.php'
|
- '../src/Kernel.php'
|
||||||
|
|
||||||
# controllers are imported separately to make sure services can be injected
|
|
||||||
# as action arguments even if you don't extend any base controller class
|
|
||||||
App\Controller\:
|
|
||||||
resource: '../src/Controller/'
|
|
||||||
tags: ['controller.service_arguments']
|
|
||||||
|
|
||||||
# add more service definitions when explicit configuration is needed
|
# add more service definitions when explicit configuration is needed
|
||||||
# please note that last definitions always *replace* previous ones
|
# please note that last definitions always *replace* previous ones
|
||||||
|
|
||||||
|
@ -22,6 +22,14 @@ services:
|
|||||||
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8
|
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8
|
||||||
links:
|
links:
|
||||||
- smtp
|
- smtp
|
||||||
|
- dumper
|
||||||
|
|
||||||
|
dumper:
|
||||||
|
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:latest
|
||||||
|
entrypoint: ["/usr/bin/env"]
|
||||||
|
command: ["bin/var-dump-server", "--host", "0.0.0.0:9912"]
|
||||||
|
volumes:
|
||||||
|
- .:/var/www/app
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
volumes:
|
volumes:
|
||||||
@ -97,5 +105,5 @@ services:
|
|||||||
# volumes:
|
# volumes:
|
||||||
# - "./docker/pgadmin4/servers.json:/pgadmin4/servers.json:ro"
|
# - "./docker/pgadmin4/servers.json:/pgadmin4/servers.json:ro"
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ if [ "${APP_ENV}" = "prod" ]; then
|
|||||||
php /var/www/app/bin/console doctrine:migrations:status
|
php /var/www/app/bin/console doctrine:migrations:status
|
||||||
php /var/www/app/bin/console doctrine:migrations:migrate -n
|
php /var/www/app/bin/console doctrine:migrations:migrate -n
|
||||||
php /var/www/app/bin/console messenger:setup-transports
|
php /var/www/app/bin/console messenger:setup-transports
|
||||||
|
php /var/www/app/bin/console chill:db:sync-views
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
8
phpstan.dist.neon
Normal file
8
phpstan.dist.neon
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
parameters:
|
||||||
|
level: 6
|
||||||
|
paths:
|
||||||
|
- bin/
|
||||||
|
- config/
|
||||||
|
- public/
|
||||||
|
- src/
|
||||||
|
- tests/
|
@ -6,36 +6,34 @@
|
|||||||
backupGlobals="false"
|
backupGlobals="false"
|
||||||
colors="true"
|
colors="true"
|
||||||
bootstrap="tests/bootstrap.php"
|
bootstrap="tests/bootstrap.php"
|
||||||
|
convertDeprecationsToExceptions="false"
|
||||||
>
|
>
|
||||||
<php>
|
<php>
|
||||||
|
<ini name="display_errors" value="1" />
|
||||||
<ini name="error_reporting" value="-1" />
|
<ini name="error_reporting" value="-1" />
|
||||||
<server name="APP_ENV" value="test" force="true" />
|
<server name="APP_ENV" value="test" force="true" />
|
||||||
<server name="SHELL_VERBOSITY" value="-1" />
|
<server name="SHELL_VERBOSITY" value="-1" />
|
||||||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
|
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
||||||
|
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
<testsuite name="Project Test Suite">
|
||||||
<!--
|
<directory>tests</directory>
|
||||||
Test suites for chill-bundles
|
|
||||||
|
|
||||||
Those test suites are repeated here for convenience for
|
|
||||||
developers
|
|
||||||
-->
|
|
||||||
<testsuite name="MainBundle">
|
|
||||||
<directory suffix="Test.php">vendor/chill-project/chill-bundles/src/Bundle/ChillMainBundle/Tests/</directory>
|
|
||||||
</testsuite>
|
|
||||||
|
|
||||||
<testsuite name="PersonBundle">
|
|
||||||
<directory suffix="Test.php">vendor/chill-project/chill-bundles/src/Bundle/ChillPersonBundle/Tests/</directory>
|
|
||||||
</testsuite>
|
|
||||||
|
|
||||||
<testsuite name="VendeeBundle">
|
|
||||||
<directory suffix="Test.php">tests/</directory>
|
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">src</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
|
||||||
<listeners>
|
<listeners>
|
||||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||||
</listeners>
|
</listeners>
|
||||||
|
|
||||||
|
<!-- Uncomment when adding extensions
|
||||||
|
<extensions>
|
||||||
|
</extensions>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
@ -1,27 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Kernel;
|
use App\Kernel;
|
||||||
use Symfony\Component\ErrorHandler\Debug;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
|
|
||||||
require dirname(__DIR__).'/config/bootstrap.php';
|
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||||
|
|
||||||
if ($_SERVER['APP_DEBUG']) {
|
return function (array $context) {
|
||||||
umask(0000);
|
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||||
|
};
|
||||||
Debug::enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) {
|
|
||||||
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
|
|
||||||
Request::setTrustedHosts([$trustedHosts]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
|
|
||||||
$request = Request::createFromGlobals();
|
|
||||||
$response = $kernel->handle($request);
|
|
||||||
$response->send();
|
|
||||||
$kernel->terminate($request, $response);
|
|
||||||
|
@ -3,52 +3,9 @@
|
|||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
|
||||||
use Symfony\Component\Config\Resource\FileResource;
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
||||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||||
use Symfony\Component\Routing\RouteCollectionBuilder;
|
|
||||||
|
|
||||||
class Kernel extends BaseKernel
|
class Kernel extends BaseKernel
|
||||||
{
|
{
|
||||||
use MicroKernelTrait;
|
use MicroKernelTrait;
|
||||||
|
|
||||||
private const CONFIG_EXTS = '.{php,xml,yaml,yml}';
|
|
||||||
|
|
||||||
public function registerBundles(): iterable
|
|
||||||
{
|
|
||||||
$contents = require $this->getProjectDir().'/config/bundles.php';
|
|
||||||
foreach ($contents as $class => $envs) {
|
|
||||||
if ($envs[$this->environment] ?? $envs['all'] ?? false) {
|
|
||||||
yield new $class();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getProjectDir(): string
|
|
||||||
{
|
|
||||||
return \dirname(__DIR__);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
|
|
||||||
{
|
|
||||||
$container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
|
|
||||||
$container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug);
|
|
||||||
$container->setParameter('container.dumper.inline_factories', true);
|
|
||||||
$confDir = $this->getProjectDir().'/config';
|
|
||||||
|
|
||||||
$loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');
|
|
||||||
$loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob');
|
|
||||||
$loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');
|
|
||||||
$loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function configureRoutes(RouteCollectionBuilder $routes): void
|
|
||||||
{
|
|
||||||
$confDir = $this->getProjectDir().'/config';
|
|
||||||
|
|
||||||
$routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, '/', 'glob');
|
|
||||||
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
|
|
||||||
$routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
215
symfony.lock
215
symfony.lock
@ -2,9 +2,6 @@
|
|||||||
"brick/math": {
|
"brick/math": {
|
||||||
"version": "0.9.3"
|
"version": "0.9.3"
|
||||||
},
|
},
|
||||||
"champs-libres/async-uploader-bundle": {
|
|
||||||
"version": "dev-sf4"
|
|
||||||
},
|
|
||||||
"champs-libres/wopi-bundle": {
|
"champs-libres/wopi-bundle": {
|
||||||
"version": "dev-master"
|
"version": "dev-master"
|
||||||
},
|
},
|
||||||
@ -18,10 +15,10 @@
|
|||||||
"version": "1.11.99.5"
|
"version": "1.11.99.5"
|
||||||
},
|
},
|
||||||
"doctrine/annotations": {
|
"doctrine/annotations": {
|
||||||
"version": "1.0",
|
"version": "1.14",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
|
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
|
||||||
},
|
},
|
||||||
@ -48,40 +45,38 @@
|
|||||||
"version": "v0.5.3"
|
"version": "v0.5.3"
|
||||||
},
|
},
|
||||||
"doctrine/doctrine-bundle": {
|
"doctrine/doctrine-bundle": {
|
||||||
"version": "2.7",
|
"version": "2.11",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"version": "2.3",
|
"version": "2.4",
|
||||||
"ref": "b8ddff356705ad8e704ea75b6872ce89a15d614d"
|
"ref": "cc62b7e9470998c640ee99d284a013a676f1fc5e"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/doctrine.yaml",
|
"config/packages/doctrine.yaml",
|
||||||
"config/packages/prod/doctrine.yaml",
|
|
||||||
"config/packages/test/doctrine.yaml",
|
|
||||||
"src/Entity/.gitignore",
|
"src/Entity/.gitignore",
|
||||||
"src/Repository/.gitignore"
|
"src/Repository/.gitignore"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"doctrine/doctrine-fixtures-bundle": {
|
"doctrine/doctrine-fixtures-bundle": {
|
||||||
"version": "3.0",
|
"version": "3.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "3.0",
|
"version": "3.0",
|
||||||
"ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3"
|
"ref": "1f5514cfa15b947298df4d771e694e578d4c204d"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/DataFixtures/AppFixtures.php"
|
"src/DataFixtures/AppFixtures.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"doctrine/doctrine-migrations-bundle": {
|
"doctrine/doctrine-migrations-bundle": {
|
||||||
"version": "2.2",
|
"version": "3.2",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "2.2",
|
"version": "3.1",
|
||||||
"ref": "baaa439e3e3179e69e3da84b671f0a3e4a2f56ad"
|
"ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/doctrine_migrations.yaml",
|
"config/packages/doctrine_migrations.yaml",
|
||||||
@ -145,15 +140,9 @@
|
|||||||
"guzzlehttp/psr7": {
|
"guzzlehttp/psr7": {
|
||||||
"version": "1.6.1"
|
"version": "1.6.1"
|
||||||
},
|
},
|
||||||
"guzzlehttp/uri-template": {
|
|
||||||
"version": "v0.2.0"
|
|
||||||
},
|
|
||||||
"hslavich/oneloginsaml-bundle": {
|
"hslavich/oneloginsaml-bundle": {
|
||||||
"version": "v1.5.2"
|
"version": "v1.5.2"
|
||||||
},
|
},
|
||||||
"justinrainbow/json-schema": {
|
|
||||||
"version": "5.2.10"
|
|
||||||
},
|
|
||||||
"knplabs/knp-menu": {
|
"knplabs/knp-menu": {
|
||||||
"version": "v3.1.1"
|
"version": "v3.1.1"
|
||||||
},
|
},
|
||||||
@ -185,12 +174,12 @@
|
|||||||
"version": "9.6.2"
|
"version": "9.6.2"
|
||||||
},
|
},
|
||||||
"lexik/jwt-authentication-bundle": {
|
"lexik/jwt-authentication-bundle": {
|
||||||
"version": "2.16",
|
"version": "2.19",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"version": "2.5",
|
"version": "2.5",
|
||||||
"ref": "5b2157bcd5778166a5696e42f552ad36529a07a6"
|
"ref": "e9481b233a11ef7e15fe055a2b21fd3ac1aa2bb7"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/lexik_jwt_authentication.yaml"
|
"config/packages/lexik_jwt_authentication.yaml"
|
||||||
@ -227,28 +216,27 @@
|
|||||||
"version": "1.7.7"
|
"version": "1.7.7"
|
||||||
},
|
},
|
||||||
"nelmio/alice": {
|
"nelmio/alice": {
|
||||||
"version": "3.2",
|
"version": "3.12",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "3.2",
|
"version": "3.3",
|
||||||
"ref": "0b9900ece737bec7752e4155c0164639dd9b0cb0"
|
"ref": "42b52d2065dc3fde27912d502c18ca1926e35ae2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/dev/nelmio_alice.yaml",
|
"config/packages/nelmio_alice.yaml"
|
||||||
"config/packages/test/nelmio_alice.yaml"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"nikic/php-parser": {
|
"nikic/php-parser": {
|
||||||
"version": "v4.7.0"
|
"version": "v4.7.0"
|
||||||
},
|
},
|
||||||
"nyholm/psr7": {
|
"nyholm/psr7": {
|
||||||
"version": "1.0",
|
"version": "1.8",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"ref": "0cd4d2d0e7f646fda75f9944f747a56e6ed13d4c"
|
"ref": "4a8c0345442dcca1d8a2c65633dcf0285dd5a5a2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/nyholm_psr7.yaml"
|
"config/packages/nyholm_psr7.yaml"
|
||||||
@ -281,9 +269,6 @@
|
|||||||
"php-http/message-factory": {
|
"php-http/message-factory": {
|
||||||
"version": "v1.0.2"
|
"version": "v1.0.2"
|
||||||
},
|
},
|
||||||
"php-opencloud/openstack": {
|
|
||||||
"version": "v3.0.7"
|
|
||||||
},
|
|
||||||
"phpdocumentor/reflection-common": {
|
"phpdocumentor/reflection-common": {
|
||||||
"version": "2.2.0"
|
"version": "2.2.0"
|
||||||
},
|
},
|
||||||
@ -306,7 +291,16 @@
|
|||||||
"version": "1.11.1"
|
"version": "1.11.1"
|
||||||
},
|
},
|
||||||
"phpstan/phpstan": {
|
"phpstan/phpstan": {
|
||||||
"version": "1.1.2"
|
"version": "1.10",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes-contrib",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "1.0",
|
||||||
|
"ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"phpstan.dist.neon"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"phpunit/php-code-coverage": {
|
"phpunit/php-code-coverage": {
|
||||||
"version": "6.1.4"
|
"version": "6.1.4"
|
||||||
@ -324,12 +318,12 @@
|
|||||||
"version": "2.1.2"
|
"version": "2.1.2"
|
||||||
},
|
},
|
||||||
"phpunit/phpunit": {
|
"phpunit/phpunit": {
|
||||||
"version": "4.7",
|
"version": "10.3",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.7",
|
"version": "9.6",
|
||||||
"ref": "00fdb38c318774cd39f475a753028a5e8d25d47c"
|
"ref": "7364a21d87e658eb363c5020c072ecfdc12e2326"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
".env.test",
|
".env.test",
|
||||||
@ -424,9 +418,6 @@
|
|||||||
"sebastian/recursion-context": {
|
"sebastian/recursion-context": {
|
||||||
"version": "3.0.0"
|
"version": "3.0.0"
|
||||||
},
|
},
|
||||||
"sebastian/resource-operations": {
|
|
||||||
"version": "2.0.1"
|
|
||||||
},
|
|
||||||
"sebastian/type": {
|
"sebastian/type": {
|
||||||
"version": "3.0.0"
|
"version": "3.0.0"
|
||||||
},
|
},
|
||||||
@ -464,34 +455,30 @@
|
|||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/console": {
|
"symfony/console": {
|
||||||
"version": "4.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.4",
|
"version": "5.3",
|
||||||
"ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c"
|
"ref": "da0c8be8157600ad34f10ff0c9cc91232522e047"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin/console",
|
"bin/console"
|
||||||
"config/bootstrap.php"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/css-selector": {
|
"symfony/css-selector": {
|
||||||
"version": "v5.2.3"
|
"version": "v5.2.3"
|
||||||
},
|
},
|
||||||
"symfony/debug": {
|
|
||||||
"version": "v4.4.11"
|
|
||||||
},
|
|
||||||
"symfony/debug-bundle": {
|
"symfony/debug-bundle": {
|
||||||
"version": "4.1",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.1",
|
"version": "5.3",
|
||||||
"ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea"
|
"ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/dev/debug.yaml"
|
"config/packages/debug.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/dependency-injection": {
|
"symfony/dependency-injection": {
|
||||||
@ -528,12 +515,12 @@
|
|||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/flex": {
|
"symfony/flex": {
|
||||||
"version": "1.0",
|
"version": "1.20",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
|
"ref": "146251ae39e06a95be0fe3d13c807bcf3938b172"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
".env"
|
".env"
|
||||||
@ -543,20 +530,18 @@
|
|||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/framework-bundle": {
|
"symfony/framework-bundle": {
|
||||||
"version": "4.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"version": "4.4",
|
"version": "5.4",
|
||||||
"ref": "24eb45d1355810154890460e6a05c0ca27318fe7"
|
"ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/bootstrap.php",
|
|
||||||
"config/packages/cache.yaml",
|
"config/packages/cache.yaml",
|
||||||
"config/packages/framework.yaml",
|
"config/packages/framework.yaml",
|
||||||
"config/packages/test/framework.yaml",
|
|
||||||
"config/preload.php",
|
"config/preload.php",
|
||||||
"config/routes/dev/framework.yaml",
|
"config/routes/framework.yaml",
|
||||||
"config/services.yaml",
|
"config/services.yaml",
|
||||||
"public/index.php",
|
"public/index.php",
|
||||||
"src/Controller/.gitignore",
|
"src/Controller/.gitignore",
|
||||||
@ -582,9 +567,9 @@
|
|||||||
"version": "5.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.3",
|
"version": "4.3",
|
||||||
"ref": "bbfc7e27257d3a3f12a6fb0a42540a42d9623a37"
|
"ref": "df66ee1f226c46f01e85c29c2f7acce0596ba35a"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/mailer.yaml"
|
"config/packages/mailer.yaml"
|
||||||
@ -605,7 +590,7 @@
|
|||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"version": "5.4",
|
"version": "5.4",
|
||||||
"ref": "dfe610928a5c61619bdfc830cd7fa7f091368023"
|
"ref": "8bd5f27013fb1d7217191c548e340f0bdb11912c"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/messenger.yaml"
|
"config/packages/messenger.yaml"
|
||||||
@ -618,30 +603,27 @@
|
|||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/monolog-bundle": {
|
"symfony/monolog-bundle": {
|
||||||
"version": "3.3",
|
"version": "3.10",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "3.3",
|
"version": "3.7",
|
||||||
"ref": "d7249f7d560f6736115eee1851d02a65826f0a56"
|
"ref": "aff23899c4440dd995907613c1dd709b6f59503f"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/dev/monolog.yaml",
|
"config/packages/monolog.yaml"
|
||||||
"config/packages/prod/deprecations.yaml",
|
|
||||||
"config/packages/prod/monolog.yaml",
|
|
||||||
"config/packages/test/monolog.yaml"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/options-resolver": {
|
"symfony/options-resolver": {
|
||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/phpunit-bridge": {
|
"symfony/phpunit-bridge": {
|
||||||
"version": "5.1",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "5.1",
|
"version": "5.3",
|
||||||
"ref": "bf16921ef8309a81d9f046e9b6369c46bcbd031f"
|
"ref": "07ce01a897311647520b43d4ddddad9537b99ba6"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
".env.test",
|
".env.test",
|
||||||
@ -690,26 +672,25 @@
|
|||||||
"version": "v2.1.1"
|
"version": "v2.1.1"
|
||||||
},
|
},
|
||||||
"symfony/routing": {
|
"symfony/routing": {
|
||||||
"version": "5.1",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "5.1",
|
"version": "5.3",
|
||||||
"ref": "b4f3e7c95e38b606eef467e8a42a8408fc460c43"
|
"ref": "85de1d8ae45b284c3c84b668171d2615049e698f"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/prod/routing.yaml",
|
|
||||||
"config/packages/routing.yaml",
|
"config/packages/routing.yaml",
|
||||||
"config/routes.yaml"
|
"config/routes.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/security-bundle": {
|
"symfony/security-bundle": {
|
||||||
"version": "4.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.4",
|
"version": "5.3",
|
||||||
"ref": "7b4408dc203049666fe23fabed23cbadc6d8440f"
|
"ref": "98f1f2b0d635908c2b40f3675da2d23b1a069d30"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/security.yaml"
|
"config/packages/security.yaml"
|
||||||
@ -740,12 +721,12 @@
|
|||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/translation": {
|
"symfony/translation": {
|
||||||
"version": "3.3",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "3.3",
|
"version": "5.3",
|
||||||
"ref": "2ad9d2545bce8ca1a863e50e92141f0b9d87ffcd"
|
"ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/translation.yaml",
|
"config/packages/translation.yaml",
|
||||||
@ -759,29 +740,27 @@
|
|||||||
"version": "v4.4.11"
|
"version": "v4.4.11"
|
||||||
},
|
},
|
||||||
"symfony/twig-bundle": {
|
"symfony/twig-bundle": {
|
||||||
"version": "4.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.4",
|
"version": "5.4",
|
||||||
"ref": "15a41bbd66a1323d09824a189b485c126bbefa51"
|
"ref": "bb2178c57eee79e6be0b297aa96fc0c0def81387"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/test/twig.yaml",
|
|
||||||
"config/packages/twig.yaml",
|
"config/packages/twig.yaml",
|
||||||
"templates/base.html.twig"
|
"templates/base.html.twig"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/validator": {
|
"symfony/validator": {
|
||||||
"version": "4.3",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.3",
|
"version": "5.3",
|
||||||
"ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
|
"ref": "c32cfd98f714894c4f128bb99aa2530c1227603c"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/test/validator.yaml",
|
|
||||||
"config/packages/validator.yaml"
|
"config/packages/validator.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -792,26 +771,25 @@
|
|||||||
"version": "v5.1.3"
|
"version": "v5.1.3"
|
||||||
},
|
},
|
||||||
"symfony/web-profiler-bundle": {
|
"symfony/web-profiler-bundle": {
|
||||||
"version": "3.3",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "3.3",
|
"version": "5.3",
|
||||||
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
|
"ref": "24bbc3d84ef2f427f82104f766014e799eefcc3e"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/dev/web_profiler.yaml",
|
"config/packages/web_profiler.yaml",
|
||||||
"config/packages/test/web_profiler.yaml",
|
"config/routes/web_profiler.yaml"
|
||||||
"config/routes/dev/web_profiler.yaml"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/webpack-encore-bundle": {
|
"symfony/webpack-encore-bundle": {
|
||||||
"version": "1.9",
|
"version": "1.17",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "1.9",
|
"version": "1.10",
|
||||||
"ref": "9399a0bfc6ee7a0c019f952bca46d6a6045dd451"
|
"ref": "eff2e505d4557c967b6710fe06bd947ba555cae5"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"assets/app.js",
|
"assets/app.js",
|
||||||
@ -819,9 +797,6 @@
|
|||||||
"assets/controllers.json",
|
"assets/controllers.json",
|
||||||
"assets/controllers/hello_controller.js",
|
"assets/controllers/hello_controller.js",
|
||||||
"assets/styles/app.css",
|
"assets/styles/app.css",
|
||||||
"config/packages/assets.yaml",
|
|
||||||
"config/packages/prod/webpack_encore.yaml",
|
|
||||||
"config/packages/test/webpack_encore.yaml",
|
|
||||||
"config/packages/webpack_encore.yaml",
|
"config/packages/webpack_encore.yaml",
|
||||||
"package.json",
|
"package.json",
|
||||||
"webpack.config.js"
|
"webpack.config.js"
|
||||||
|
@ -1,143 +0,0 @@
|
|||||||
{% extends "@ChillMain/layout.html.twig" %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<div class="col-md-10 col-xxl error-page">
|
|
||||||
<h1 class="chill-red">{{ 'Oops, we came across an error!'|trans }}</h1>
|
|
||||||
|
|
||||||
<p>{{ 'Don\'t panick though, we\'ll fix it as soon as possible. To help us out, please send us the information below.'|trans }}</p>
|
|
||||||
|
|
||||||
<div id="error-details" class="flex-table alert alert-warning">
|
|
||||||
<dl>
|
|
||||||
<dt>{{ 'Date and time of error'|trans }}:</dt><dd>{{ "now"|date("d/m/Y H:i:s") }}</dd>
|
|
||||||
<dt>{{ 'Error message'|trans }}:</dt><dd>{{ exception.message }}</dd>
|
|
||||||
<dt>Stacktrace:</dt><dd>{{ exception.traceAsString }}</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
|
||||||
<li>
|
|
||||||
<button data-copy="#error-details" data-done="Error details copied" class="btn btn-warning" id="copy">
|
|
||||||
<i class="fa fa-copy"></i>
|
|
||||||
{{ 'Copy'|trans }}
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="btn btn-success" href="mailto:?subject=Chill Error {{ exception.statusCode }}&body=Datetime:%0D%0A{{ "now"|date("d/m/Y H:i:s") }}%0D%0A%0D%0AError message:%0D%0A{{ exception.message|escape('html_attr') }}%0D%0A%0D%0AStacktrace:%0D%0A{{ exception.traceAsString|escape('html_attr') }}">
|
|
||||||
|
|
||||||
{{ 'Send by email'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
const activeClass = { copy: 'copyactive', paste: 'pasteactive' }
|
|
||||||
const doneMessage = { copy: 'copied', paste: 'pasted' }
|
|
||||||
const doneClass = 'done';
|
|
||||||
|
|
||||||
window && window.addEventListener('DOMContentLoaded', init);
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
|
|
||||||
const body = document && document.body;
|
|
||||||
|
|
||||||
// clipboard API available?
|
|
||||||
if (!body || !navigator.clipboard) return;
|
|
||||||
|
|
||||||
// text copy active
|
|
||||||
if (navigator.clipboard.writeText) body.classList.add(activeClass.copy);
|
|
||||||
|
|
||||||
// text paste active
|
|
||||||
if (navigator.clipboard.readText) body.classList.add(activeClass.paste);
|
|
||||||
|
|
||||||
// copy/paste handler
|
|
||||||
body.addEventListener('click', clipboardHandler);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function clipboardHandler(e) {
|
|
||||||
|
|
||||||
// get clicked element
|
|
||||||
const
|
|
||||||
target = e.target,
|
|
||||||
type = (undefined === target.dataset.paste ? 'copy' : 'paste'),
|
|
||||||
content = target.dataset[type];
|
|
||||||
|
|
||||||
if (undefined === content) return;
|
|
||||||
|
|
||||||
// is CSS selector?
|
|
||||||
let select;
|
|
||||||
try {
|
|
||||||
select = content && document.querySelector(content);
|
|
||||||
}
|
|
||||||
catch (error) {}
|
|
||||||
|
|
||||||
// call copy or paste handler
|
|
||||||
const handler = { copy, paste };
|
|
||||||
if (!await handler[type]( select, content )) return;
|
|
||||||
|
|
||||||
// show success message
|
|
||||||
if (!target.dataset.done) target.dataset.done = doneMessage[type];
|
|
||||||
|
|
||||||
target.addEventListener('animationend', () => target.classList.remove(doneClass), { once: true });
|
|
||||||
target.classList.add(doneClass);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// copy to clipboard
|
|
||||||
async function copy(select, content) {
|
|
||||||
|
|
||||||
// get text
|
|
||||||
const copytext = select ? select.value || select.innerText : content;
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
await navigator.clipboard.writeText(copytext);
|
|
||||||
document.getElementById("copy").innerText = "Copié";
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
console.log('copy error', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// paste handler
|
|
||||||
async function paste(select) {
|
|
||||||
|
|
||||||
if (!select) return;
|
|
||||||
|
|
||||||
// paste from clipboard
|
|
||||||
try {
|
|
||||||
|
|
||||||
const pastetext = await navigator.clipboard.readText();
|
|
||||||
|
|
||||||
if (undefined === select.value) {
|
|
||||||
select.innerText += pastetext;
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
select.value += pastetext;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
console.log('paste error', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
@ -4,8 +4,10 @@ use Symfony\Component\Dotenv\Dotenv;
|
|||||||
|
|
||||||
require dirname(__DIR__).'/vendor/autoload.php';
|
require dirname(__DIR__).'/vendor/autoload.php';
|
||||||
|
|
||||||
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
|
if (method_exists(Dotenv::class, 'bootEnv')) {
|
||||||
require dirname(__DIR__).'/config/bootstrap.php';
|
|
||||||
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
|
|
||||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_SERVER['APP_DEBUG']) {
|
||||||
|
umask(0000);
|
||||||
|
}
|
||||||
|
@ -109,15 +109,30 @@ module.exports = (async () => {
|
|||||||
.autoProvidejQuery()
|
.autoProvidejQuery()
|
||||||
.enableSourceMaps(!Encore.isProduction())
|
.enableSourceMaps(!Encore.isProduction())
|
||||||
.cleanupOutputBeforeBuild()
|
.cleanupOutputBeforeBuild()
|
||||||
|
//.enableBuildNotifications()
|
||||||
.enableVersioning()
|
.enableVersioning()
|
||||||
.enableSingleRuntimeChunk()
|
.enableSingleRuntimeChunk()
|
||||||
.splitEntryChunks()
|
.splitEntryChunks()
|
||||||
|
// added when upgrading to symfony 5.4
|
||||||
|
// enables and configure @babel/preset-env polyfills
|
||||||
|
//.configureBabelPresetEnv((config) => {
|
||||||
|
// config.useBuiltIns = 'usage';
|
||||||
|
// config.corejs = '3.23';
|
||||||
|
//})
|
||||||
//.addLoader({ test: /\.pdf$/, loader: 'file-loader', options: { name: '[name]_[hash].[ext]', outputPath: 'pdf/' } })
|
//.addLoader({ test: /\.pdf$/, loader: 'file-loader', options: { name: '[name]_[hash].[ext]', outputPath: 'pdf/' } })
|
||||||
;
|
;
|
||||||
|
|
||||||
// populate config with chill entries
|
// populate config with chill entries
|
||||||
let chillEntries = [];
|
let chillEntries = [];
|
||||||
await populateConfig(Encore, chillEntries);
|
await populateConfig(Encore, chillEntries);
|
||||||
|
// configure Babel
|
||||||
|
// .configureBabel((config) => {
|
||||||
|
// config.plugins.push('@babel/a-babel-plugin');
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
// enables Sass/SCSS support
|
||||||
|
//.enableSassLoader()
|
||||||
|
|
||||||
// add swagger UI
|
// add swagger UI
|
||||||
if (!Encore.isProduction()) {
|
if (!Encore.isProduction()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user