mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 10:34:09 +00:00
Create an symfony app's skeleton to ease the development
[WIP] first import of automated recipes [WIP] fix configuration file to be able to compile kernel and serve route [WIP] first build of assets [WIP] Continue working on configuration to load a page [WIP] Reset the bin directory [WIP] remove default migrations files [WIP] fix configuration for running tests [WIP] Installation instructions Fix the default firewall in test login [WIP] fix cs [WIP] update gitlab-ci [WIP] update gitlab-ci [WIP] update gitlab ci [WIP] fix config for running tests [WIP] fix gitlab ci [WIP] try tests/bootstrap php file from symfony bridge instead of phpunit recipe remove kernel.php file fix loading of entrypoint.json in test [wip] increase memory limit for phpstan in test/ci [WIP]: set the correct timezone directly within the phpunit.xml.dist file [WIP]: fix security configuration WIP: fix config for testing
This commit is contained in:
parent
9ef884349a
commit
3e0731f06e
89
.env
89
.env
@ -11,15 +11,9 @@
|
||||
# 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=fr
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
# this should be set in docker-compose.yml file
|
||||
APP_ENV=prod
|
||||
APP_SECRET=ChangeItf2b58287ef7f9976409d3f6c72529e99ChangeIt
|
||||
TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||
TRUSTED_HOSTS='^(localhost|example\.com|nginx)$'
|
||||
APP_SECRET=!ChangeMeInAppEnv!
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
## Wopi server for editing documents online
|
||||
@ -32,51 +26,12 @@ EDITOR_SERVER=http://collabora:9980
|
||||
# MAILER_DSN=null://null
|
||||
###< symfony/mailer ###
|
||||
|
||||
## Notifications
|
||||
NOTIFICATION_HOST=localhost:8001
|
||||
NOTIFICATION_FROM_EMAIL=admin@chill.social
|
||||
NOTIFICATION_FROM_NAME="Chill <admin@chill.social>"
|
||||
|
||||
## Pgadmin credential
|
||||
PGADMIN_DEFAULT_EMAIL=
|
||||
PGADMIN_DEFAULT_PASSWORD=
|
||||
|
||||
## OVH OpenStack Storage Container
|
||||
ASYNC_UPLOAD_TEMP_URL_KEY=
|
||||
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
|
||||
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
|
||||
|
||||
## Redis Cache
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
||||
|
||||
## Twilio
|
||||
TWILIO_SID=~
|
||||
TWILIO_SECRET=~
|
||||
DEFAULT_CARRIER_CODE=BE
|
||||
|
||||
ADD_ADDRESS_DEFAULT_COUNTRY=BE
|
||||
|
||||
ADD_ADDRESS_MAP_CENTER_X=50.8443
|
||||
ADD_ADDRESS_MAP_CENTER_Y=4.3523
|
||||
ADD_ADDRESS_MAP_CENTER_Z=15
|
||||
|
||||
SHORT_MESSAGE_DSN=null://null
|
||||
|
||||
## DOCKER IMAGES REGISTRY
|
||||
#IMAGE_PHP=
|
||||
#IMAGE_NGINX=
|
||||
|
||||
## DOCKER IMAGES TAG
|
||||
#VERSION=test
|
||||
#VERSION=prod
|
||||
|
||||
###> symfony/messenger ###
|
||||
# Choose one of the transports below
|
||||
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/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 ###
|
||||
|
||||
@ -92,3 +47,43 @@ JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
|
||||
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
||||
JWT_PASSPHRASE=2a30f6ba26521a2613821da35f28386e
|
||||
###< lexik/jwt-authentication-bundle ###
|
||||
|
||||
###> chill-project/chill-bundles ###
|
||||
# Generate a password using `symfony console security:hash-password --empty-salt <password> 'Symfony\Component\Security\Core\User\User'` and paste it into .env.local file
|
||||
# ADMIN_PASSWORD=
|
||||
# Add a configuration for sending SMS (before calendar appointments, aka "Rendez-vous"). See https://symfony.com/doc/current/notifier.html#sms-channel
|
||||
# Configuration for using ovh custom notifier
|
||||
# SHORT_MESSAGE_DSN="ovh://user:password@ovh-eu?consumer_key=123456&sender=%2B32475123456&service_name=sms-xx123456-1"
|
||||
SHORT_MESSAGE_DSN=null://null
|
||||
# Default locale for the project
|
||||
LOCALE=fr
|
||||
# Those keys are required to configure the access to store documents
|
||||
ASYNC_UPLOAD_TEMP_URL_KEY=
|
||||
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
|
||||
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
|
||||
# Twilio configuration, to check for the existence of phonenumber in a directory (may be deprecated in a near future)
|
||||
TWILIO_SID=
|
||||
TWILIO_SECRET=
|
||||
# Default carrier code will replace all leading zero by an international code. Set here the country as two letters
|
||||
DEFAULT_CARRIER_CODE=FR
|
||||
# Configuration for the notification emails
|
||||
NOTIFICATION_FROM_EMAIL=chill@instance.com
|
||||
NOTIFICATION_FROM_NAME=Chill
|
||||
# Will set the default host when sending email from command or services (see https://symfony.com/doc/5.x/routing.html#generating-urls-in-commands)
|
||||
NOTIFICATION_HOST=my.chill.social
|
||||
# Variables for relatorio host, which generates documents
|
||||
RELATORIO_HOST=
|
||||
RELATORIO_PORT=
|
||||
# Address for your collabora server
|
||||
#EDITOR_SERVER=https://code.example.com
|
||||
EDITOR_SERVER=https://collabora.champs-libres.be
|
||||
# center address widget when empty
|
||||
ADD_ADDRESS_DEFAULT_COUNTRY=BE
|
||||
ADD_ADDRESS_MAP_CENTER_X=50.8443
|
||||
ADD_ADDRESS_MAP_CENTER_Y=4.3523
|
||||
ADD_ADDRESS_MAP_CENTER_Z=15
|
||||
## Redis Cache & redis database
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
||||
###< chill-project/chill-bundles ###
|
||||
|
16
.env.test
16
.env.test
@ -4,15 +4,8 @@
|
||||
KERNEL_CLASS='App\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
|
||||
TRUSTED_HOSTS=
|
||||
|
||||
ADMIN_PASSWORD=password
|
||||
|
||||
LOCALE=fr
|
||||
REDIS_URL=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
||||
|
||||
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
|
||||
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
||||
JWT_PASSPHRASE=2a30f6ba26521a2613821da35f28386e
|
||||
@ -22,24 +15,25 @@ TWILIO_SECRET=~
|
||||
DEFAULT_CARRIER_CODE=BE
|
||||
|
||||
ADD_ADDRESS_DEFAULT_COUNTRY=BE
|
||||
|
||||
ADD_ADDRESS_MAP_CENTER_X=50.8443
|
||||
ADD_ADDRESS_MAP_CENTER_Y=4.3523
|
||||
ADD_ADDRESS_MAP_CENTER_Z=15
|
||||
|
||||
SHORT_MESSAGE_DSN=null://null
|
||||
MESSENGER_TRANSPORT_DSN=sync://
|
||||
###< symfony/messenger ###
|
||||
|
||||
###> doctrine/doctrine-bundle ###
|
||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
||||
#
|
||||
DATABASE_URL="postgresql://postgres:postgres@db:5432/test?serverVersion=14&charset=utf8"
|
||||
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5454/test?serverVersion=14&charset=utf8"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
ASYNC_UPLOAD_TEMP_URL_KEY=
|
||||
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
|
||||
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
|
||||
|
||||
EDITOR_SERVER=https://localhost:9980
|
||||
MAILER_DSN=null://null
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6363
|
||||
|
22
.gitignore
vendored
22
.gitignore
vendored
@ -3,10 +3,11 @@ composer
|
||||
composer.phar
|
||||
composer.lock
|
||||
docs/build/
|
||||
node_modules/*
|
||||
.php_cs.cache
|
||||
.cache/*
|
||||
|
||||
docker/db/data
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
/.env.local
|
||||
/.env.local.php
|
||||
@ -15,7 +16,6 @@ node_modules/*
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
/bin/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> phpunit/phpunit ###
|
||||
@ -27,4 +27,20 @@ node_modules/*
|
||||
/.idea/
|
||||
/.psalm/
|
||||
|
||||
node_modules/*
|
||||
###> phpstan/phpstan ###
|
||||
phpstan.neon
|
||||
###< phpstan/phpstan ###
|
||||
|
||||
###> lexik/jwt-authentication-bundle ###
|
||||
/config/jwt/*.pem
|
||||
###< lexik/jwt-authentication-bundle ###
|
||||
|
||||
###> symfony/phpunit-bridge ###
|
||||
###< symfony/phpunit-bridge ###
|
||||
|
||||
###> symfony/webpack-encore-bundle ###
|
||||
/node_modules/
|
||||
/public/build/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
###< symfony/webpack-encore-bundle ###
|
||||
|
@ -9,7 +9,7 @@ cache:
|
||||
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
||||
# See http://docs.gitlab.com/ee/ci/services/README.html for examples.
|
||||
services:
|
||||
- name: postgis/postgis:14-3.3-alpine
|
||||
- name: postgis/postgis:17-3.5-alpine
|
||||
alias: db
|
||||
command:
|
||||
- postgres
|
||||
@ -26,7 +26,7 @@ variables:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
# configure database access
|
||||
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8
|
||||
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=17&charset=utf8
|
||||
# fetch the chill-app using git submodules
|
||||
# GIT_SUBMODULE_STRATEGY: recursive
|
||||
REDIS_HOST: redis
|
||||
@ -56,7 +56,6 @@ build:
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- bin
|
||||
- vendor/
|
||||
|
||||
code_style:
|
||||
@ -70,63 +69,56 @@ code_style:
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- bin
|
||||
- vendor/
|
||||
|
||||
phpstan_tests:
|
||||
stage: Tests
|
||||
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
|
||||
variables:
|
||||
COMPOSER_MEMORY_LIMIT: 3G
|
||||
before_script:
|
||||
- bin/console cache:clear --env=dev
|
||||
script:
|
||||
- bin/phpstan analyze --memory-limit=2G
|
||||
- composer exec phpstan -- analyze --memory-limit=3G
|
||||
cache:
|
||||
paths:
|
||||
- .cache/
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- bin
|
||||
- vendor/
|
||||
|
||||
rector_tests:
|
||||
stage: Tests
|
||||
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
|
||||
before_script:
|
||||
- bin/console cache:clear --env=dev
|
||||
script:
|
||||
- tests/console cache:clear
|
||||
- bin/rector process --dry-run
|
||||
- composer exec rector -- process --dry-run
|
||||
cache:
|
||||
paths:
|
||||
- .cache/
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- bin
|
||||
- vendor/
|
||||
|
||||
# psalm_tests:
|
||||
# stage: Tests
|
||||
# image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
|
||||
# script:
|
||||
# - bin/psalm
|
||||
# allow_failure: true
|
||||
# artifacts:
|
||||
# expire_in: 30 min
|
||||
# paths:
|
||||
# - bin
|
||||
# - tests/app/vendor/
|
||||
|
||||
unit_tests:
|
||||
stage: Tests
|
||||
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
|
||||
variables:
|
||||
COMPOSER_MEMORY_LIMIT: 3G
|
||||
before_script:
|
||||
- php bin/console doctrine:database:create -n --env=test
|
||||
- php bin/console doctrine:migrations:migrate -n --env=test
|
||||
- php bin/console chill:db:sync-views --env=test
|
||||
- php bin/console cache:clear --env=test
|
||||
- php bin/console doctrine:fixtures:load -n --env=test
|
||||
script:
|
||||
- php tests/console doctrine:migrations:migrate -n --env=test
|
||||
- php tests/console chill:db:sync-views --env=test
|
||||
- php -d memory_limit=2G tests/console cache:clear --env=test
|
||||
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n --env=test
|
||||
- php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive,openstack-integration,collabora-integration
|
||||
- composer exec phpunit -- --colors=never --exclude-group dbIntensive,openstack-integration
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- bin
|
||||
- vendor/
|
||||
|
||||
release:
|
||||
|
2
.symfony.local.yaml
Normal file
2
.symfony.local.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
workers:
|
||||
docker_compose: ~
|
105
README.md
105
README.md
@ -1,9 +1,106 @@
|
||||
# Chill framework
|
||||
# Main Chill Bundles and Chill framework
|
||||
|
||||
Documentation of the Chill software.
|
||||
Chill is a software for social workers. It allows them to keep track of the social work they do.
|
||||
|
||||
The online documentation can be found at http://docs.chill.social
|
||||
See our website for more information https://www.chill.social
|
||||
|
||||
See the [`docs`][1] directory for more.
|
||||
## Installation
|
||||
|
||||
Chill-bundles is a set of bundles that should be used within a Symfony application.
|
||||
|
||||
A symfony application will help you to customize all the configuration options, change the behaviour of some parts of the usual-way that chill works, … without to have to fork this repository !
|
||||
|
||||
### For a usage in production
|
||||
|
||||
You will create a symfony app, which will then download this bundle as a dependency.
|
||||
|
||||
See the documentation at https://docs.chill.social.
|
||||
|
||||
### For development or testing purpose only
|
||||
|
||||
⚠️ Use this method for development only. ⚠️
|
||||
|
||||
You will need:
|
||||
|
||||
- [Composer](https://getcomposer.org);
|
||||
- [Symfony-cli tool](https://symfony.com/download);
|
||||
- [docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/)
|
||||
- node > 20 and yarn 1.22
|
||||
|
||||
#### First initialization
|
||||
|
||||
1. clone this repository and move to the cloned directory:
|
||||
|
||||
```bash
|
||||
git clone https://gitlab.com/Chill-Projet/chill-bundles.git
|
||||
cd chill-bundles
|
||||
```
|
||||
2. install depencies using composer
|
||||
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
3. Install and compile assets:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
yarn run encore production
|
||||
```
|
||||
|
||||
**note** double check that you have the node version > 20 using the `node --version` command.
|
||||
|
||||
4. configure your project: create a `.env.local` file at the root, and add the admin password:
|
||||
```dotenv
|
||||
# for this installation mode, the environment should always be "dev"
|
||||
APP_ENV=dev
|
||||
ADMIN_PASSWORD=\$2y\$13\$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm
|
||||
# note: if you copy-paste the line above, the password will be "admin".
|
||||
```
|
||||
5. start the stack using `docker compose up -d`, check the status of the start with `docker compose ps`
|
||||
|
||||
6. configure all the needed third-party tools
|
||||
|
||||
```bash
|
||||
# the first start, it may last some seconds, you can check with docker compose ps
|
||||
# run migrations
|
||||
symfony console doctrine:migrations:migrate
|
||||
# setup messenger
|
||||
symfony console messenger:setup-transports
|
||||
# prepare some views
|
||||
symfony console chill:db:sync-views
|
||||
# generate jwt token, required for some api features (webdav access, ...)
|
||||
symfony console lexik:jwt:generate-keypair
|
||||
```
|
||||
7. add some fixtures
|
||||
|
||||
This will truncate all the existing data of the database. But remember, we are in dev mode !
|
||||
|
||||
```bash
|
||||
symfony console doctrine:fixtures:load
|
||||
```
|
||||
|
||||
8. launch symfony dev-server
|
||||
```bash
|
||||
symfony server:start -d
|
||||
```
|
||||
|
||||
And visit the web page it suggest. You can login with user `center a_social` and password `password`, or login `admin` with the password you set.
|
||||
|
||||
#### Stopping the server
|
||||
|
||||
```bash
|
||||
symfony server:stop
|
||||
```
|
||||
|
||||
#### Restart the webserver for subsequent start
|
||||
|
||||
```bash
|
||||
symfony server:start -d
|
||||
# this will automatically starts the full docker compose services
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
The online documentation can be read at https://docs.chill.social, or the [`docs`][1] directory.
|
||||
|
||||
[1]: docs/README.md
|
||||
|
@ -4,6 +4,10 @@
|
||||
use App\Kernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
|
||||
if (!is_dir(dirname(__DIR__).'/vendor')) {
|
||||
throw new LogicException('Dependencies are missing. Try running "composer install".');
|
||||
}
|
||||
|
||||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
|
||||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
|
||||
}
|
26
compose.override.yaml
Normal file
26
compose.override.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
services:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database:
|
||||
ports:
|
||||
- "127.0.0.1:5454:5432"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> symfony/mailer ###
|
||||
mailer:
|
||||
image: axllent/mailpit
|
||||
ports:
|
||||
- "1025"
|
||||
- "8025"
|
||||
environment:
|
||||
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||
###< symfony/mailer ###
|
||||
|
||||
|
||||
redis:
|
||||
ports:
|
||||
- 127.0.0.1:6363:6379
|
||||
relatorio:
|
||||
ports:
|
||||
- 8888
|
||||
|
25
compose.yaml
Normal file
25
compose.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
services:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database:
|
||||
image: postgis/postgis:${POSTGRES_VERSION:-16}-3.4-alpine
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-app}
|
||||
# You should definitely change the password in production
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-app}
|
||||
volumes:
|
||||
# - database_data:/var/lib/postgresql/data:rw
|
||||
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
||||
- ./docker/db/data:/var/lib/postgresql/data:rw
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
relatorio:
|
||||
image: registry.gitlab.com/champs-libres/public/relatorio-tornado/app:latest
|
||||
|
||||
|
||||
volumes:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database_data:
|
||||
###< doctrine/doctrine-bundle ###
|
@ -97,6 +97,7 @@
|
||||
"rector/rector": "^1.1.0",
|
||||
"symfony/debug-bundle": "^5.4",
|
||||
"symfony/dotenv": "^5.4",
|
||||
"symfony/flex": "^2.4",
|
||||
"symfony/maker-bundle": "^1.20",
|
||||
"symfony/phpunit-bridge": "^7.1",
|
||||
"symfony/runtime": "^5.4",
|
||||
@ -129,7 +130,7 @@
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"App\\": "tests/",
|
||||
"App\\": "src/app",
|
||||
"Chill\\DocGeneratorBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
|
||||
"Chill\\WopiBundle\\Tests\\": "src/Bundle/ChillDocGeneratorBundle/tests",
|
||||
"Chill\\Utils\\Rector\\Tests\\": "utils/rector/tests"
|
||||
@ -143,16 +144,22 @@
|
||||
"phpro/grumphp": true,
|
||||
"phpstan/extension-installer": true,
|
||||
"roave/you-are-using-it-wrong": true,
|
||||
"symfony/runtime": true
|
||||
"symfony/runtime": true,
|
||||
"symfony/flex": true
|
||||
},
|
||||
"bin-dir": "bin",
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd"
|
||||
"cache:clear": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
||||
},
|
||||
"php-cs-fixer": "php-cs-fixer fix --config=./.php-cs-fixer.dist.php --show-progress=none"
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"docker": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
loophp\PsrHttpMessageBridgeBundle\PsrHttpMessageBridgeBundle::class => ['all' => true],
|
||||
ChampsLibres\WopiBundle\WopiBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
|
||||
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
|
||||
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
|
||||
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true],
|
||||
Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
|
||||
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
||||
Chill\ActivityBundle\ChillActivityBundle::class => ['all' => true],
|
||||
Chill\AsideActivityBundle\ChillAsideActivityBundle::class => ['all' => true],
|
||||
Chill\CalendarBundle\ChillCalendarBundle::class => ['all' => true],
|
||||
@ -23,24 +34,5 @@ return [
|
||||
Chill\TaskBundle\ChillTaskBundle::class => ['all' => true],
|
||||
Chill\ThirdPartyBundle\ChillThirdPartyBundle::class => ['all' => true],
|
||||
Chill\BudgetBundle\ChillBudgetBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
//Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
|
||||
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
|
||||
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
||||
loophp\PsrHttpMessageBridgeBundle\PsrHttpMessageBridgeBundle::class => ['all' => true],
|
||||
\Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
|
||||
ChampsLibres\WopiBundle\WopiBundle::class => ['all' => true],
|
||||
Chill\WopiBundle\ChillWopiBundle::class => ['all' => true],
|
||||
\Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
|
||||
];
|
@ -17,17 +17,3 @@ framework:
|
||||
# Namespaced pools use the above "app" backend by default
|
||||
#pools:
|
||||
#my.dedicated.cache: null
|
||||
|
||||
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
|
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
|
121
config/packages/chill.yaml
Normal file
121
config/packages/chill.yaml
Normal file
@ -0,0 +1,121 @@
|
||||
chill_main:
|
||||
available_languages: [ '%env(resolve:LOCALE)%', 'en' ]
|
||||
available_countries: ['BE', 'FR']
|
||||
notifications:
|
||||
from_email: '%env(resolve:NOTIFICATION_FROM_EMAIL)%'
|
||||
from_name: '%env(resolve:NOTIFICATION_FROM_NAME)%'
|
||||
host: '%env(resolve:NOTIFICATION_HOST)%'
|
||||
redis:
|
||||
host: '%env(resolve:REDIS_HOST)%'
|
||||
port: '%env(resolve:REDIS_PORT)%'
|
||||
phone_helper:
|
||||
twilio_sid: '%env(resolve:TWILIO_SID)%'
|
||||
twilio_secret: '%env(resolve:TWILIO_SECRET)%'
|
||||
default_carrier_code: '%env(resolve:DEFAULT_CARRIER_CODE)%'
|
||||
short_messages:
|
||||
dsn: '%env(string:SHORT_MESSAGE_DSN)%'
|
||||
acl:
|
||||
form_show_scopes: true
|
||||
form_show_centers: true
|
||||
access_global_history: false
|
||||
access_user_change_password: true
|
||||
access_permissions_group_list: true
|
||||
add_address:
|
||||
default_country: '%env(string:ADD_ADDRESS_DEFAULT_COUNTRY)%'
|
||||
map_center:
|
||||
x: '%env(float:ADD_ADDRESS_MAP_CENTER_X)%'
|
||||
y: '%env(float:ADD_ADDRESS_MAP_CENTER_Y)%'
|
||||
z: '%env(float:ADD_ADDRESS_MAP_CENTER_Z)%'
|
||||
|
||||
when@test:
|
||||
chill_main:
|
||||
available_languages:
|
||||
- 'fr'
|
||||
- 'en'
|
||||
|
||||
chill_custom_fields:
|
||||
show_empty_values_in_views: false
|
||||
|
||||
chill_person:
|
||||
create_person_allowed: false
|
||||
create_parcours_allowed: false
|
||||
allow_multiple_simultaneous_accompanying_periods: true
|
||||
accompanying_periods_fields:
|
||||
user: visible
|
||||
# createdBy, step, origin, intensity, scopes, requestor, anonymous, emergency, confidential : visible(default) | hidden
|
||||
person_fields:
|
||||
acceptEmail: hidden
|
||||
alt_names:
|
||||
- key: jeune_fille
|
||||
labels:
|
||||
lang: fr
|
||||
label: Nom de naissance
|
||||
marital_status: visible
|
||||
civility: visible
|
||||
deathdate: visible
|
||||
validation:
|
||||
center_required: true
|
||||
|
||||
chill_activity:
|
||||
form:
|
||||
time_duration:
|
||||
-
|
||||
label: '5 minutes'
|
||||
seconds: 300
|
||||
-
|
||||
label: '10 minutes'
|
||||
seconds: 600
|
||||
-
|
||||
label: '15 minutes'
|
||||
seconds: 900
|
||||
-
|
||||
label: '20 minutes'
|
||||
seconds: 1200
|
||||
-
|
||||
label: '25 minutes'
|
||||
seconds: 1500
|
||||
-
|
||||
label: '30 minutes'
|
||||
seconds: 1800
|
||||
-
|
||||
label: '45 minutes'
|
||||
seconds: 2700
|
||||
-
|
||||
label: '1 hour'
|
||||
seconds: 3600
|
||||
-
|
||||
label: '1 hour 15'
|
||||
seconds: 4500
|
||||
-
|
||||
label: '1 hour 30'
|
||||
seconds: 5400
|
||||
-
|
||||
label: '1 hour 45'
|
||||
seconds: 6300
|
||||
-
|
||||
label: '2 hours'
|
||||
seconds: 7200
|
||||
-
|
||||
label: '2 hours 15'
|
||||
seconds: 8100
|
||||
-
|
||||
label: '2 hours 30'
|
||||
seconds: 9000
|
||||
-
|
||||
label: '2 hours 45'
|
||||
seconds: 9900
|
||||
-
|
||||
label: '3 hours'
|
||||
seconds: 10800
|
||||
-
|
||||
label: '3 hours 30'
|
||||
seconds: 12600
|
||||
-
|
||||
label: '4 hours'
|
||||
seconds: 14400
|
||||
-
|
||||
label: '4 hours 30'
|
||||
seconds: 16200
|
||||
-
|
||||
label: '5 hours'
|
||||
seconds: 18000
|
85
config/packages/chill_budget.yaml
Normal file
85
config/packages/chill_budget.yaml
Normal file
@ -0,0 +1,85 @@
|
||||
chill_budget:
|
||||
resources:
|
||||
- { key: fixed_contract, labels: [{ lang: fr, label: "Salarié en CDI" }]}
|
||||
- { key: temporary_contract, labels: [{ lang: fr, label: "Salarié en CDD"}]}
|
||||
- { key: interim, labels: [{ lang: fr, label: "Salarié en intérim"}]}
|
||||
- { key: other_revenues, labels: [{ lang: fr, label: "Revenus non salariés, commerçant, artisan,..."}]}
|
||||
- { key: agricultural_activity, labels: [{ lang: fr, label: "Exploitant agricole"}]}
|
||||
- { key: chomage_ass, labels: [{ lang: fr, label: "Allocations chômage ASS"}]}
|
||||
- { key: chomage_are, labels: [{ lang: fr, label: "Allocations chômage ARE"}]}
|
||||
- { key: remuneration_stage, labels: [{ lang: fr, label: "Rémunération de stage, d’apprentissage,..."}]}
|
||||
- { key: daily_allowences, labels: [{ lang: fr, label: "Indemnités journalières"}]}
|
||||
- { key: others, labels: [{ lang: fr, label: "Autres"}]}
|
||||
- { key: pension, labels: [{ lang: fr, label: "Pension de retraite"}]}
|
||||
- { key: invalidity, labels: [{ lang: fr, label: "Pension d'invalidité"}]}
|
||||
- { key: reversion, labels: [{ lang: fr, label: "Pension de réversion"}]}
|
||||
- { key: widowhood, labels: [{ lang: fr, label: "Pension de veuvage"}]}
|
||||
- { key: military, labels: [{ lang: fr, label: "Pension militaire"}]}
|
||||
- { key: food, labels: [{ lang: fr, label: "Pension alimentaire"}]}
|
||||
- { key: compensation, labels: [{ lang: fr, label: "Pension de prestation compensatoire"}]}
|
||||
- { key: allocation_handicap_adult, labels: [{ lang: fr, label: "Allocation aux adultes handicapés"}]}
|
||||
- { key: rsa, labels: [{ lang: fr, label: "RSA"}]}
|
||||
- { key: annuity_accident, labels: [{ lang: fr, label: "Rente accident"}]}
|
||||
- { key: premium_al_pl, labels: [{ lang: fr, label: "Prime d’activité AL/APL au bénéficiaire"}]}
|
||||
- { key: premium_thirdparty, labels: [{ lang: fr, label: "Prime d’activité versé au tiers"}]}
|
||||
- { key: other_income, labels: [{ lang: fr, label: "Autres ressources (ARS, ...)"}]}
|
||||
- { key: allocation_family, labels: [{ lang: fr, label: "Allocations familiales"}]}
|
||||
- { key: allocation_basic, labels: [{ lang: fr, label: "Allocation de base"}]}
|
||||
- { key: free_choice_saving, labels: [{ lang: fr, label: "Complément de libre choix du mode de garde"}]}
|
||||
- { key: shared_benefits_child, labels: [{ lang: fr, label: "Prestation partagée éducation de l’enfant"}]}
|
||||
- { key: complimentary_family, labels: [{ lang: fr, label: "Complément familial"}]}
|
||||
- { key: allocation_family_support, labels: [{ lang: fr, label: "Allocation de soutien familial"}]}
|
||||
- { key: allocation_education_child_handicap, labels: [{ lang: fr, label: "Allocation d’éducation de l’enfant handicapé"}]}
|
||||
|
||||
charges:
|
||||
- { key: rent, labels: [{ lang: fr, label: "Loyer" }]}
|
||||
- { key: home_ownership, labels: [{ lang: fr, label: "Accession à la propriété" }]}
|
||||
- { key: costs_accomodation, labels: [{ lang: fr, label: "Frais d’hébergement" }]}
|
||||
- { key: home_insurance, labels: [{ lang: fr, label: "Assurance habitation" }]}
|
||||
- { key: taxes, labels: [{ lang: fr, label: "Impôts (taxe habitation, taxe foncière, ordures ménagères, redevances incitatives)" }]}
|
||||
- { key: impots, labels: [{lang: fr, label: "Impôts"}]}
|
||||
- { key: electricity, labels: [{ lang: fr, label: "Electricité" }]}
|
||||
- { key: gas, labels: [{ lang: fr, label: "Gaz en bouteille" }]}
|
||||
- { key: heating, labels: [{ lang: fr, label: "Autre moyen de chauffage" }]}
|
||||
- { key: water, labels: [{ lang: fr, label: "Eau" }]}
|
||||
- { key: school_fees, labels: [ { lang: fr, label: "Frais de scolarité"}]}
|
||||
- { key: alimony, labels: [ { lang: fr, label: "Pension alimentaire à reverser"}]}
|
||||
- { key: child_care, labels: [ { lang: fr, label: "Frais de garde (en totalité)"}]}
|
||||
- { key: telecom, labels: [ { lang: fr, label: "Frais de communication fixe"}]}
|
||||
- { key: mobilephone, labels: [ { lang: fr, label: "Frais de communication mobile"}]}
|
||||
- { key: internet, labels: [ { lang: fr, label: "Frais de communication internet"}]}
|
||||
- { key: insurance, labels: [{ lang: fr, label: "Assurances"}]}
|
||||
- { key: debt_commission, labels: [{ lang: fr, label: "Saisine de la commission surendettement"}]}
|
||||
- { key: recovery_plan, labels: [{ lang: fr, label: "Plan de redressement"}]}
|
||||
- { key: rpr, labels: [{ lang: fr, label: "PRP"}]}
|
||||
- { key: moratoire, labels: [{lang: fr, label: "Moratoire"}]}
|
||||
- { key: mutuelle, labels: [{lang: fr, label: "Mutuelle"}]}
|
||||
- { key: transport, labels: [{lang: fr, label: "Frais de transport"}]}
|
||||
- { key: decouvbank, labels: [{lang: fr, label: "Découvert bancaire utilisé"}]}
|
||||
- { key: procsaisie, labels: [{lang: fr, label: "Procédure de saisie"}]}
|
||||
- { key: indus, labels: [{lang: fr, label: "Indus"}]}
|
||||
- { key: apurement, labels: [{lang: fr, label: "Plan d'apurement"}]}
|
||||
- { key: debt_rent, labels: [{lang: fr, label: "Dette de loyer (hors APL)"}]}
|
||||
- { key: debt_property, labels: [{lang: fr, label: "Dette d'accession à la propriété"}]}
|
||||
- { key: debt_lodging, labels: [{lang: fr, label: "Dette de frais d’hébergement"}]}
|
||||
- { key: debt_electricity, labels: [{lang: fr, label: "Dette d'électricité"}]}
|
||||
- { key: debt_water, labels: [{lang: fr, label: "Dette d'eau"}]}
|
||||
- { key: debt_heating, labels: [{lang: fr, label: "Dette d'autre moyen de chauffage"}]}
|
||||
- { key: debt_gas, labels: [{lang: fr, label: "Dette de gaz en bouteille"}]}
|
||||
- { key: debt_house_insurance, labels: [{lang: fr, label: "Dette d'assurance habitation"}]}
|
||||
- { key: debt_housing_taxes, labels: [{lang: fr, label: "Dette d'impôts liées au logement"}]}
|
||||
- { key: debt_taxes, labels: [{lang: fr, label: "Dette d'impôts autres"}]}
|
||||
- { key: debt_school, labels: [{lang: fr, label: "Dette de frais de scolarité (cantine, transport, frais de scolarité, frais de garde)"}]}
|
||||
- { key: debt_alimentation, labels: [{lang: fr, label: "Dette de pension alimentaire à reverser"}]}
|
||||
- { key: debt_childcare, labels: [{lang: fr, label: "Dette de frais de garde (en totalité)"}]}
|
||||
- { key: debt_phone, labels: [{lang: fr, label: "Dette de communication fixe"}]}
|
||||
- { key: debt_mobile, labels: [{lang: fr, label: "Dette de communication portable"}]}
|
||||
- { key: debt_internet, labels: [{lang: fr, label: "Dette de communication internet"}]}
|
||||
- { key: debt_car_insurance, labels: [{lang: fr, label: "Dette d'assurance auto"}]}
|
||||
- { key: debt_mutual, labels: [{lang: fr, label: "Dette de mutuelle"}]}
|
||||
- { key: debt_transport, labels: [{lang: fr, label: "Dette de frais de transport"}]}
|
||||
- { key: debt_bank, labels: [{lang: fr, label: "Dette de découvert bancaire utilisé"}]}
|
||||
- { key: debt_garbage, labels: [{lang: fr, label: "Dette de taxe d’ordures ménagère"}]}
|
||||
- { key: debt_other, labels: [{lang: fr, label: "Dette autre"}]}
|
||||
- { key: autre, labels: [{lang: fr, label: "Autre"}]}
|
||||
|
3
config/packages/chill_calendar.yaml
Normal file
3
config/packages/chill_calendar.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
chill_calendar:
|
||||
remote_calendars_sync:
|
||||
enabled: false
|
5
config/packages/chill_doc_generator.yaml
Normal file
5
config/packages/chill_doc_generator.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
chill_doc_generator:
|
||||
driver:
|
||||
type: relatorio
|
||||
relatorio:
|
||||
url: 'http://%env(RELATORIO_HOST)%:%env(RELATORIO_PORT)%/'
|
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)%"
|
38
config/packages/doctrine.yaml
Normal file
38
config/packages/doctrine.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '16'
|
||||
use_savepoints: true
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.default
|
||||
auto_mapping: true
|
||||
|
||||
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
config/packages/doctrine_migrations.yaml
Normal file
2
config/packages/doctrine_migrations.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
doctrine_migrations:
|
||||
enable_profiler: false
|
@ -7,24 +7,15 @@ doctrine_migrations:
|
||||
'Chill\Migrations\CustomFields': '@ChillCustomFieldsBundle/migrations'
|
||||
'Chill\Migrations\Event': '@ChillEventBundle/migrations'
|
||||
'Chill\Migrations\Person': '@ChillPersonBundle/migrations'
|
||||
'Chill\Migrations\Report': '@ChillReportBundle/migrations'
|
||||
'Chill\Migrations\Task': '@ChillTaskBundle/migrations'
|
||||
'Chill\Migrations\ThirdParty': '@ChillThirdPartyBundle/migrations'
|
||||
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
|
||||
'Chill\Migrations\DocGenerator': '@ChillDocGeneratorBundle/migrations'
|
||||
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
|
||||
'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations'
|
||||
'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations'
|
||||
|
||||
'Chill\Migrations\Report': '@ChillReportBundle/migrations'
|
||||
all_or_nothing:
|
||||
true
|
||||
|
||||
services:
|
||||
'Doctrine\Migrations\Version\Comparator': 'Chill\MainBundle\Doctrine\Migrations\VersionComparator'
|
||||
|
||||
storage:
|
||||
table_storage:
|
||||
table_name: 'migration_versions'
|
||||
version_column_name: 'version'
|
||||
version_column_length: 1024
|
||||
executed_at_column_name: 'executed_at'
|
||||
execution_time_column_name: 'execution_time'
|
@ -1,16 +1,6 @@
|
||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
|
||||
http_client:
|
||||
default_options:
|
||||
verify_peer: false
|
||||
verify_host: false
|
||||
|
||||
trusted_hosts:
|
||||
- '^(localhost|127.0.0.1|web)$'
|
||||
- '%env(resolve:TRUSTED_HOSTS)%'
|
||||
|
||||
#csrf_protection: true
|
||||
http_method_override: false
|
||||
|
||||
@ -27,12 +17,6 @@ framework:
|
||||
php_errors:
|
||||
log: true
|
||||
|
||||
#error_controller: App\Controller\ErrorController::show
|
||||
|
||||
## sf4 check: ou à déplacer dans un chill.yaml
|
||||
assets:
|
||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
@ -1,3 +1,8 @@
|
||||
framework:
|
||||
assets:
|
||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
assets:
|
||||
json_manifest_path: null
|
3
config/packages/knpu_oauth2_client.yaml
Normal file
3
config/packages/knpu_oauth2_client.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
knpu_oauth2_client:
|
||||
clients:
|
||||
# configure your clients as described here: https://github.com/knpuniversity/oauth2-client-bundle#configuration
|
4
config/packages/lexik_jwt_authentication.yaml
Normal file
4
config/packages/lexik_jwt_authentication.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
lexik_jwt_authentication:
|
||||
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
|
||||
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
|
||||
pass_phrase: '%env(JWT_PASSPHRASE)%'
|
9
config/packages/lexik_jwt_authentication_chill.yaml
Normal file
9
config/packages/lexik_jwt_authentication_chill.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
lexik_jwt_authentication:
|
||||
# required for wopi - recommended duration
|
||||
token_ttl: 36000
|
||||
|
||||
# required for wopi - token in parameter access_token
|
||||
token_extractors:
|
||||
query_parameter:
|
||||
enabled: true
|
||||
name: access_token
|
3
config/packages/mailer.yaml
Normal file
3
config/packages/mailer.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
framework:
|
||||
mailer:
|
||||
dsn: '%env(MAILER_DSN)%'
|
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)%'
|
75
config/packages/messenger.yaml
Normal file
75
config/packages/messenger.yaml
Normal file
@ -0,0 +1,75 @@
|
||||
framework:
|
||||
messenger:
|
||||
# reset services after consuming messages
|
||||
reset_on_message: true
|
||||
|
||||
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
|
||||
failure_transport: failed
|
||||
|
||||
transports:
|
||||
# those transports are added by chill-bundles recipes
|
||||
sync: sync://
|
||||
async:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/async'
|
||||
options:
|
||||
exchange:
|
||||
name: async
|
||||
type: fanout
|
||||
queues:
|
||||
async: ~
|
||||
auto_setup: true
|
||||
|
||||
priority: '%env(MESSENGER_TRANSPORT_DSN)%/priority'
|
||||
# end of transports added by chill-bundles recipes
|
||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
||||
failed: 'doctrine://default?queue_name=failed'
|
||||
to_sign_worker:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/to_python_sign'
|
||||
serializer: Chill\DocStoreBundle\Service\Signature\Driver\BaseSigner\RequestPdfSignMessageSerializer
|
||||
options:
|
||||
exchange:
|
||||
name: to_python_sign
|
||||
type: direct
|
||||
queues:
|
||||
to_python_sign: ~
|
||||
signed_docs:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/signed_docs'
|
||||
serializer: Chill\DocStoreBundle\Service\Signature\Driver\BaseSigner\PdfSignedMessageSerializer
|
||||
options:
|
||||
exchange:
|
||||
name: signed_docs
|
||||
type: direct
|
||||
queues:
|
||||
signed_docs:
|
||||
binding_keys: [signed_doc]
|
||||
|
||||
auto_setup: false
|
||||
|
||||
routing:
|
||||
# routes added by chill-bundles recipes
|
||||
'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
|
||||
'Chill\PersonBundle\AccompanyingPeriod\Lifecycle\AccompanyingPeriodStepChangeRequestMessage': async
|
||||
'Chill\DocStoreBundle\Service\Signature\Driver\BaseSigner\RequestPdfSignMessage': to_sign_worker
|
||||
'Chill\DocStoreBundle\Service\StoredObjectCleaner\RemoveOldVersionMessage': async
|
||||
'Chill\MainBundle\Workflow\Messenger\PostSignatureStateChangeMessage': priority
|
||||
'Chill\MainBundle\Workflow\Messenger\PostPublicViewMessage': async
|
||||
'Chill\MainBundle\Service\Workflow\CancelStaleWorkflowMessage': async
|
||||
# end of routes added by chill-bundles recipes
|
||||
# Route your messages to the transports
|
||||
# 'App\Message\YourMessage': async
|
||||
# 'Symfony\Component\Mailer\Messenger\SendEmailMessage': async
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
messenger:
|
||||
transports:
|
||||
async: 'in-memory://'
|
||||
priority: 'in-memory://'
|
||||
signed_docs: 'in-memory://'
|
13
config/packages/misd_phone_number.yaml
Normal file
13
config/packages/misd_phone_number.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
# To persist libphonenumber\PhoneNumber objects, add the Misd\PhoneNumberBundle\Doctrine\DBAL\Types\PhoneNumberType mapping to your application's config.
|
||||
# This requires: doctrine/doctrine-bundle
|
||||
#doctrine:
|
||||
# dbal:
|
||||
# types:
|
||||
# phone_number: Misd\PhoneNumberBundle\Doctrine\DBAL\Types\PhoneNumberType
|
||||
|
||||
#misd_phone_number:
|
||||
# twig: false
|
||||
# form: false
|
||||
# serializer: false
|
||||
# validator:
|
||||
# default_region: GB
|
62
config/packages/monolog.yaml
Normal file
62
config/packages/monolog.yaml
Normal file
@ -0,0 +1,62 @@
|
||||
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
|
||||
|
||||
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\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:
|
||||
class: Nyholm\Psr7\Factory\Psr17Factory
|
||||
|
||||
nyholm.psr7.httplug_factory:
|
||||
class: Nyholm\Psr7\Factory\HttplugFactory
|
@ -5,3 +5,8 @@ framework:
|
||||
# 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
|
||||
#default_uri: http://localhost
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
8
config/packages/routing_chill.yaml
Normal file
8
config/packages/routing_chill.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
parameters:
|
||||
composed_uri: 'https://%env(resolve:NOTIFICATION_HOST)%'
|
||||
|
||||
framework:
|
||||
router:
|
||||
# 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
|
||||
default_uri: '%composed_uri%'
|
@ -1,68 +1,68 @@
|
||||
security:
|
||||
|
||||
access_decision_manager:
|
||||
strategy: unanimous
|
||||
allow_if_all_abstain: false
|
||||
|
||||
enable_authenticator_manager: true
|
||||
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||
providers:
|
||||
|
||||
chain_provider:
|
||||
chain :
|
||||
providers: [in_memory, users]
|
||||
in_memory:
|
||||
# providers added by chill-bundles recipes\n
|
||||
# those providers are required to make chill working
|
||||
chill_chain_provider:
|
||||
chain:
|
||||
providers: [chill_in_memory, chill_users]
|
||||
chill_in_memory:
|
||||
memory:
|
||||
users:
|
||||
admin: { password: '%env(resolve:ADMIN_PASSWORD)%', roles: ['ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH', 'ROLE_USER'] }
|
||||
users:
|
||||
chill_users:
|
||||
id: chill.main.user_provider
|
||||
|
||||
encoders:
|
||||
Chill\MainBundle\Entity\User:
|
||||
algorithm: bcrypt
|
||||
Symfony\Component\Security\Core\User\User: plaintext
|
||||
|
||||
# end of providers added by chill-bundles recipes\n
|
||||
# all other providers might be removed, unless you have specific needs\n
|
||||
firewalls:
|
||||
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
|
||||
# those lines are added by chill-bundles recipe, and are requires to make chill-bundles working
|
||||
# this firewall is in use for wopi endpoint, which requires
|
||||
wopi:
|
||||
pattern: ^/wopi
|
||||
provider: chain_provider
|
||||
provider: chill_chain_provider
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- lexik_jwt_authentication.jwt_token_authenticator
|
||||
|
||||
main:
|
||||
# remove during upgrade from symfony 4 to symfony 5 TODO check this
|
||||
#anonymous: ~
|
||||
provider: chain_provider
|
||||
dav:
|
||||
pattern: ^/dav
|
||||
provider: chill_chain_provider
|
||||
stateless: true
|
||||
guard:
|
||||
authenticators:
|
||||
- Chill\DocStoreBundle\Security\Guard\JWTOnDavUrlAuthenticator
|
||||
# this firewall is the main firewall for chill. It should be the last one in the stack,
|
||||
# unless you have specific needs
|
||||
chill_main:
|
||||
provider: chill_chain_provider
|
||||
entry_point: form_login
|
||||
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
|
||||
|
||||
# end of lines added by chill-bundles recipe
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#firewalls-authentication
|
||||
# https://symfony.com/doc/current/security.html#the-firewall
|
||||
|
||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||
# switch_user: true
|
||||
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
# those lines are added by chill-bundles recipes, and are requires to make chill-bundles working
|
||||
- { path: ^/(login|logout), roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/public, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/wopi, roles: IS_AUTHENTICATED_FULLY }
|
||||
@ -75,6 +75,7 @@ security:
|
||||
- { path: ^/([a-z]+/)?admin, roles: ROLE_ADMIN }
|
||||
# other pages, only for regular user (no admin)
|
||||
- { path: ^/, roles: ROLE_USER }
|
||||
# this is the end of line added by chill-project/chill-bundles recipes
|
||||
|
||||
when@test:
|
||||
security:
|
9
config/packages/security_chill.yaml
Normal file
9
config/packages/security_chill.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
security:
|
||||
access_decision_manager:
|
||||
strategy: unanimous
|
||||
allow_if_all_abstain: false
|
||||
|
||||
when@test:
|
||||
security:
|
||||
role_hierarchy:
|
||||
CHILL_MASTER_ROLE: [ CHILL_INHERITED_ROLE_1 ]
|
7
config/packages/translation.yaml
Normal file
7
config/packages/translation.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
framework:
|
||||
default_locale: en
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
- en
|
||||
providers:
|
4
config/packages/translation_chill.yaml
Normal file
4
config/packages/translation_chill.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
framework:
|
||||
default_locale: '%env(resolve:LOCALE)%'
|
||||
translator:
|
||||
fallbacks: [ '%env(resolve:LOCALE)%' ]
|
6
config/packages/twig.yaml
Normal file
6
config/packages/twig.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
@ -1,9 +1,4 @@
|
||||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
debug: '%kernel.debug%'
|
||||
strict_variables: '%kernel.debug%'
|
||||
exception_controller: null
|
||||
|
||||
## 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
|
||||
@ -14,4 +9,8 @@ twig:
|
||||
# and adapt it lightly.
|
||||
#
|
||||
form_themes: ['@ChillMain/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig']
|
||||
#form_themes: ['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.
|
||||
#auto_mapping:
|
||||
# App\Entity\: []
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
@ -1,16 +1,18 @@
|
||||
---
|
||||
webpack_encore:
|
||||
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
||||
output_path: '%kernel.project_dir%/public/build'
|
||||
|
||||
# If multiple builds are defined (as shown below), you can disable the default build:
|
||||
# output_path: false
|
||||
|
||||
# Set attributes that will be rendered on all script and link tags
|
||||
script_attributes:
|
||||
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:
|
||||
#
|
||||
# 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')
|
||||
# crossorigin: 'anonymous'
|
||||
@ -23,11 +25,17 @@ webpack_encore:
|
||||
|
||||
# If you have multiple builds:
|
||||
# builds:
|
||||
# pass "frontend" as the 3rg arg to the Twig functions
|
||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
||||
|
||||
# frontend: '%kernel.project_dir%/public/frontend/build'
|
||||
|
||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||
# Put in config/packages/prod/webpack_encore.yaml
|
||||
# cache: true
|
||||
# pass the build name as the 3rd argument to the Twig functions
|
||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
||||
|
||||
#when@prod:
|
||||
# webpack_encore:
|
||||
# # 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
|
2
config/packages/wopi.yaml
Normal file
2
config/packages/wopi.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
wopi:
|
||||
server: "%env(resolve:EDITOR_SERVER)%"
|
5
config/preload.php
Normal file
5
config/preload.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
||||
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
||||
}
|
@ -4,5 +4,5 @@
|
||||
|
||||
#load routes for chill bundles
|
||||
chill_routes:
|
||||
resource: .
|
||||
type: chill_routes
|
||||
resource: .
|
||||
type: chill_routes
|
3
config/routes/annotations.yaml
Normal file
3
config/routes/annotations.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
kernel:
|
||||
resource: ../../src/app/Kernel.php
|
||||
type: annotation
|
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
|
@ -2,7 +2,7 @@
|
||||
# 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
|
||||
# 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:
|
||||
|
||||
services:
|
||||
@ -11,5 +11,3 @@ services:
|
||||
autowire: true # Automatically injects dependencies in your services.
|
||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||
|
||||
# add more service definitions when explicit configuration is needed
|
||||
# please note that last definitions always *replace* previous ones
|
@ -1,12 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="tests/bootstrap.php">
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<php>
|
||||
<ini name="display_errors" value="1" />
|
||||
<ini name="error_reporting" value="-1"/>
|
||||
<server name="APP_ENV" value="test" force="true"/>
|
||||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=93&max[indirect]=999999"/>
|
||||
<server name="SHELL_VERBOSITY" value="-1"/>
|
||||
<env name="KERNEL_CLASS" value="\App\Kernel"/>
|
||||
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
||||
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
|
||||
<ini name="date.timezone" value="Europe/Brussels" />
|
||||
</php>
|
||||
<testsuites>
|
||||
<!--
|
||||
|
9
public/index.php
Normal file
9
public/index.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return function (array $context) {
|
||||
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||
};
|
@ -27,7 +27,8 @@ final class LoginControllerTest extends WebTestCase
|
||||
|
||||
// load login page and submit form
|
||||
$crawler = $client->request('GET', '/login');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
self::assertResponseIsSuccessful();
|
||||
|
||||
$buttonCrawlerNode = $crawler->selectButton('login');
|
||||
$form = $buttonCrawlerNode->form();
|
||||
@ -60,7 +61,6 @@ final class LoginControllerTest extends WebTestCase
|
||||
$client->followRedirects(false);
|
||||
$client->click($crawler->selectLink('Se déconnecter')->link());
|
||||
|
||||
$this->assertTrue($client->getResponse()->isRedirect());
|
||||
$this->assertResponseRedirects('http://localhost/');
|
||||
self::assertResponseRedirects('http://localhost/');
|
||||
}
|
||||
}
|
||||
|
20
src/app/Kernel.php
Normal file
20
src/app/Kernel.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
}
|
399
symfony.lock
Normal file
399
symfony.lock
Normal file
@ -0,0 +1,399 @@
|
||||
{
|
||||
"champs-libres/wopi-bundle": {
|
||||
"version": "dev-master"
|
||||
},
|
||||
"doctrine/annotations": {
|
||||
"version": "1.14",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
|
||||
},
|
||||
"files": [
|
||||
"config/routes/annotations.yaml"
|
||||
]
|
||||
},
|
||||
"doctrine/doctrine-bundle": {
|
||||
"version": "2.13",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "2.4",
|
||||
"ref": "91690c0a440faba1a3676256bcca2b4aa9f55b72"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/doctrine.yaml",
|
||||
"src/Entity/.gitignore",
|
||||
"src/Repository/.gitignore"
|
||||
]
|
||||
},
|
||||
"doctrine/doctrine-fixtures-bundle": {
|
||||
"version": "3.6",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.0",
|
||||
"ref": "1f5514cfa15b947298df4d771e694e578d4c204d"
|
||||
},
|
||||
"files": [
|
||||
"src/DataFixtures/AppFixtures.php"
|
||||
]
|
||||
},
|
||||
"doctrine/doctrine-migrations-bundle": {
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.1",
|
||||
"ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/doctrine_migrations.yaml",
|
||||
"migrations/.gitignore"
|
||||
]
|
||||
},
|
||||
"knplabs/knp-menu-bundle": {
|
||||
"version": "v3.4.2"
|
||||
},
|
||||
"knplabs/knp-time-bundle": {
|
||||
"version": "v1.20.0"
|
||||
},
|
||||
"knpuniversity/oauth2-client-bundle": {
|
||||
"version": "2.18",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "1.20",
|
||||
"ref": "1ff300d8c030f55c99219cc55050b97a695af3f6"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/knpu_oauth2_client.yaml"
|
||||
]
|
||||
},
|
||||
"lexik/jwt-authentication-bundle": {
|
||||
"version": "2.21",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "2.5",
|
||||
"ref": "e9481b233a11ef7e15fe055a2b21fd3ac1aa2bb7"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/lexik_jwt_authentication.yaml"
|
||||
]
|
||||
},
|
||||
"loophp/psr-http-message-bridge-bundle": {
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"loophp/psr17": {
|
||||
"version": "1.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "3eba84e2a18dbc40cc5b3516863fe5808c5aa10d"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/loophp_psr17.yaml"
|
||||
]
|
||||
},
|
||||
"nelmio/alice": {
|
||||
"version": "3.12",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.3",
|
||||
"ref": "42b52d2065dc3fde27912d502c18ca1926e35ae2"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/nelmio_alice.yaml"
|
||||
]
|
||||
},
|
||||
"nyholm/psr7": {
|
||||
"version": "1.8",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "4a8c0345442dcca1d8a2c65633dcf0285dd5a5a2"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/nyholm_psr7.yaml"
|
||||
]
|
||||
},
|
||||
"odolbeau/phone-number-bundle": {
|
||||
"version": "3.10",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "3.0",
|
||||
"ref": "0d4442802a90dd2d1d6c18618998b43f69af0d95"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/misd_phone_number.yaml"
|
||||
]
|
||||
},
|
||||
"phpstan/phpstan": {
|
||||
"version": "1.12",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
|
||||
},
|
||||
"files": [
|
||||
"phpstan.dist.neon"
|
||||
]
|
||||
},
|
||||
"phpunit/phpunit": {
|
||||
"version": "10.5",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "9.6",
|
||||
"ref": "7364a21d87e658eb363c5020c072ecfdc12e2326"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"phpunit.xml.dist",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"ramsey/uuid-doctrine": {
|
||||
"version": "1.8",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "1.3",
|
||||
"ref": "471aed0fbf5620b8d7f92b7a5ebbbf6c0945c27a"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/ramsey_uuid_doctrine.yaml"
|
||||
]
|
||||
},
|
||||
"sensio/framework-extra-bundle": {
|
||||
"version": "5.6",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.2",
|
||||
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/sensio_framework_extra.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/console": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461"
|
||||
},
|
||||
"files": [
|
||||
"bin/console"
|
||||
]
|
||||
},
|
||||
"symfony/debug-bundle": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/debug.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/flex": {
|
||||
"version": "2.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "146251ae39e06a95be0fe3d13c807bcf3938b172"
|
||||
},
|
||||
"files": [
|
||||
".env"
|
||||
]
|
||||
},
|
||||
"symfony/framework-bundle": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.4",
|
||||
"ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/cache.yaml",
|
||||
"config/packages/framework.yaml",
|
||||
"config/preload.php",
|
||||
"config/routes/framework.yaml",
|
||||
"config/services.yaml",
|
||||
"public/index.php",
|
||||
"src/Controller/.gitignore",
|
||||
"src/Kernel.php"
|
||||
]
|
||||
},
|
||||
"symfony/mailer": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "4.3",
|
||||
"ref": "09051cfde49476e3c12cd3a0e44289ace1c75a4f"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/mailer.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/maker-bundle": {
|
||||
"version": "1.50",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
|
||||
}
|
||||
},
|
||||
"symfony/messenger": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.4",
|
||||
"ref": "8bd5f27013fb1d7217191c548e340f0bdb11912c"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/messenger.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/monolog-bundle": {
|
||||
"version": "3.10",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.7",
|
||||
"ref": "aff23899c4440dd995907613c1dd709b6f59503f"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/monolog.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/phpunit-bridge": {
|
||||
"version": "7.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "6.3",
|
||||
"ref": "a411a0480041243d97382cac7984f7dce7813c08"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"bin/phpunit",
|
||||
"phpunit.xml.dist",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"symfony/routing": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "85de1d8ae45b284c3c84b668171d2615049e698f"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/routing.yaml",
|
||||
"config/routes.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/security-bundle": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "98f1f2b0d635908c2b40f3675da2d23b1a069d30"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/security.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/translation": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/translation.yaml",
|
||||
"translations/.gitignore"
|
||||
]
|
||||
},
|
||||
"symfony/twig-bundle": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.4",
|
||||
"ref": "bb2178c57eee79e6be0b297aa96fc0c0def81387"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/twig.yaml",
|
||||
"templates/base.html.twig"
|
||||
]
|
||||
},
|
||||
"symfony/validator": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "c32cfd98f714894c4f128bb99aa2530c1227603c"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/validator.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/webpack-encore-bundle": {
|
||||
"version": "1.17",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.10",
|
||||
"ref": "eff2e505d4557c967b6710fe06bd947ba555cae5"
|
||||
},
|
||||
"files": [
|
||||
"assets/app.js",
|
||||
"assets/bootstrap.js",
|
||||
"assets/controllers.json",
|
||||
"assets/controllers/hello_controller.js",
|
||||
"assets/styles/app.css",
|
||||
"config/packages/webpack_encore.yaml",
|
||||
"package.json",
|
||||
"webpack.config.js"
|
||||
]
|
||||
},
|
||||
"symfony/workflow": {
|
||||
"version": "5.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.3",
|
||||
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/workflow.yaml"
|
||||
]
|
||||
},
|
||||
"twig/extra-bundle": {
|
||||
"version": "v3.13.0"
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
use Symfony\Component\Routing\RouteCollectionBuilder;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
class ernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
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';
|
@ -1,23 +0,0 @@
|
||||
chill_main:
|
||||
available_languages: [ '%env(resolve:LOCALE)%' ]
|
||||
notifications:
|
||||
from_email: 'test@yopmail.com'
|
||||
from_name: 'TEST CHILL'
|
||||
host: 'localhost'
|
||||
redis:
|
||||
host: '%env(resolve:REDIS_HOST)%'
|
||||
port: '%env(resolve:REDIS_PORT)%'
|
||||
phone_helper:
|
||||
twilio_sid: '%env(resolve:TWILIO_SID)%'
|
||||
twilio_secret: '%env(resolve:TWILIO_SECRET)%'
|
||||
default_carrier_code: '%env(resolve:DEFAULT_CARRIER_CODE)%'
|
||||
|
||||
chill_custom_fields:
|
||||
show_empty_values_in_views: false
|
||||
|
||||
# Enable/disable specific libraries (css and js)
|
||||
twig:
|
||||
globals:
|
||||
active_bootstrap: false
|
||||
active_forkawesome: true
|
||||
active_ckeditor: false
|
@ -1,14 +0,0 @@
|
||||
#chill_amli_budget:
|
||||
# resources:
|
||||
# - { key: travail-temporaire, labels: [{ lang: fr, label: "Travail temporaire" }]}
|
||||
# - { key: chomage, labels: [{ lang: fr, label: "Allocation de chômage"}]}
|
||||
# - { key: cpas, labels: [{ lang: fr, label: "CPAS"}]}
|
||||
# - { key: mutuelle, labels: [{ lang: fr, label: "Mutuelle"}]}
|
||||
# - { key: pension-alimentaire, labels: [{ lang: fr, label: "Pension alimentaire"}]}
|
||||
# - { key: allocation-fam, labels: [{ lang: fr, label: "Allocations familiales"}]}
|
||||
# charges:
|
||||
# - { key: charge-communes, labels: [{ lang: fr, label: "Charges communes" }]}
|
||||
# - { key: electricity, labels: [{ lang: fr, label: "Électricité" }]}
|
||||
# - { key: gaz, labels: [{ lang: fr, label: "Gaz" }]}
|
||||
# - { key: water, labels: [{ lang: fr, label: "Eau" }]}
|
||||
# - { key: autres, labels: [ { lang: fr, label: "Autres"}]}
|
@ -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,7 +0,0 @@
|
||||
framework:
|
||||
messenger:
|
||||
transports:
|
||||
async: 'in-memory://'
|
||||
sync: 'in-memory://'
|
||||
priority: 'in-memory://'
|
||||
failed: 'in-memory://'
|
@ -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,18 +0,0 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '5.7'
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.default
|
||||
auto_mapping: true
|
||||
#mappings:
|
||||
# App:
|
||||
# is_bundle: false
|
||||
# type: annotation
|
||||
# dir: '%kernel.project_dir%/src/Entity'
|
||||
# prefix: 'App\Entity'
|
||||
# alias: App
|
@ -1,12 +0,0 @@
|
||||
lexik_jwt_authentication:
|
||||
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
|
||||
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
|
||||
pass_phrase: '%env(JWT_PASSPHRASE)%'
|
||||
|
||||
# required for wopi - recommended duration
|
||||
token_ttl: 36000
|
||||
|
||||
token_extractors:
|
||||
query_parameter:
|
||||
enabled: true
|
||||
name: access_token
|
@ -1,32 +0,0 @@
|
||||
framework:
|
||||
messenger:
|
||||
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
|
||||
# failure_transport: failed
|
||||
|
||||
transports:
|
||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
||||
async: '%env(MESSENGER_TRANSPORT_DSN)%'
|
||||
priority:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
||||
failed: 'doctrine://default?queue_name=failed'
|
||||
|
||||
routing:
|
||||
# Route your messages to the transports
|
||||
'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
|
||||
'Chill\PersonBundle\AccompanyingPeriod\Lifecycle\AccompanyingPeriodStepChangeRequestMessage': async
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
messenger:
|
||||
transports:
|
||||
async: 'in-memory://'
|
||||
failed: 'in-memory://'
|
||||
sync: 'in-memory://'
|
||||
priority: 'in-memory://'
|
@ -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,20 +0,0 @@
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
metadata_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
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
|
@ -1,14 +0,0 @@
|
||||
monolog:
|
||||
handlers:
|
||||
graylog:
|
||||
type: gelf
|
||||
publisher:
|
||||
hostname: "%env(resolve:GELF_HOST)%"
|
||||
port: "%env(resolve:GELF_PORT)%"
|
||||
level: warning
|
||||
channels: ['!event']
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ['!event', '!doctrine', '!console']
|
||||
bubble: false
|
@ -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
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
chill_main:
|
||||
available_languages:
|
||||
- 'fr'
|
||||
- 'en'
|
@ -1,5 +0,0 @@
|
||||
framework:
|
||||
mailer:
|
||||
dsn: 'null://null'
|
||||
envelope:
|
||||
sender: 'test@chill.social'
|
@ -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,5 +0,0 @@
|
||||
---
|
||||
# config/packages/test/security.yaml
|
||||
security:
|
||||
role_hierarchy:
|
||||
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,2 +0,0 @@
|
||||
webpack_encore:
|
||||
strict_mode: false
|
@ -1,7 +0,0 @@
|
||||
framework:
|
||||
|
||||
default_locale: '%env(resolve:LOCALE)%'
|
||||
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks: [ '%env(resolve:LOCALE)%' ]
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
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')) {
|
||||
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
kernel:
|
||||
resource: ../../../Kernel.php
|
||||
type: annotation
|
@ -1,3 +0,0 @@
|
||||
_errors:
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
@ -13,8 +13,10 @@ use Symfony\Component\Dotenv\Dotenv;
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
if (file_exists(dirname(__DIR__).'/tests/app/config/bootstrap.php')) {
|
||||
require dirname(__DIR__).'/tests/app/config/bootstrap.php';
|
||||
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
|
||||
if (method_exists(Dotenv::class, 'bootEnv')) {
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||
}
|
||||
|
||||
if ($_SERVER['APP_DEBUG']) {
|
||||
umask(0000);
|
||||
}
|
||||
|
@ -1,31 +1,31 @@
|
||||
{
|
||||
"extends": "@tsconfig/node14/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"ChillMainAssets": ["./src/Bundle/ChillMainBundle/Resources/public"],
|
||||
"ChillDocStoreAssets": ["./src/Bundle/ChillDocStoreBundle/Resources/public"]
|
||||
},
|
||||
"lib": [
|
||||
"es2020",
|
||||
"dom"
|
||||
],
|
||||
"module": "es6",
|
||||
"moduleResolution": "node",
|
||||
"isolatedModules": true,
|
||||
"allowJs": false,
|
||||
"checkJs": false,
|
||||
"importHelpers": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"sourceMap": true
|
||||
},
|
||||
"includes": [
|
||||
"./src/**/*.ts",
|
||||
"./src/**/*.vue"
|
||||
"extends": "@tsconfig/node14/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"ChillMainAssets": ["./src/Bundle/ChillMainBundle/Resources/public"],
|
||||
"ChillDocStoreAssets": ["./src/Bundle/ChillDocStoreBundle/Resources/public"]
|
||||
},
|
||||
"lib": [
|
||||
"es2020",
|
||||
"dom"
|
||||
],
|
||||
"exclude": [
|
||||
"./docs/*",
|
||||
]
|
||||
"module": "es6",
|
||||
"moduleResolution": "node",
|
||||
"isolatedModules": true,
|
||||
"allowJs": false,
|
||||
"checkJs": false,
|
||||
"importHelpers": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"sourceMap": true
|
||||
},
|
||||
"includes": [
|
||||
"./src/**/*.ts",
|
||||
"./src/**/*.vue"
|
||||
],
|
||||
"exclude": [
|
||||
"./docs/*"
|
||||
]
|
||||
}
|
||||
|
125
webpack.config.js
Normal file
125
webpack.config.js
Normal file
@ -0,0 +1,125 @@
|
||||
const Encore = require('@symfony/webpack-encore');
|
||||
const { resolve, parse } = require('path');
|
||||
const { readdir } = require('fs').promises;
|
||||
|
||||
/**
|
||||
* get the file names inside given directory recursively, limiting to
|
||||
* a given depth in the recursion
|
||||
*
|
||||
* @param string dir the directory
|
||||
* @param int depth the maximum depth to look into
|
||||
*/
|
||||
async function* getFiles(dir, depth, ignored) {
|
||||
const dirents = await readdir(dir, { withFileTypes: true });
|
||||
for (const dirent of dirents) {
|
||||
const res = resolve(dir, dirent.name);
|
||||
if (dirent.isDirectory()) {
|
||||
if (depth > 0) {
|
||||
yield* getFiles(res, depth - 1, ignored);
|
||||
}
|
||||
} else if (ignored.includes(res)) {
|
||||
continue;
|
||||
} else {
|
||||
yield res;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* populate the config of encore in directories inside `'./src'` and
|
||||
* `'./vendor'` and letting them to alter the encore config.
|
||||
*
|
||||
* if a file `chill.webpack.config.js` is found, the default function is
|
||||
* imported and executed. This function receive two arguments:
|
||||
*
|
||||
* - `Encore`, the main encore object
|
||||
* - `chillEntries`: the entries which will be appended to the main `chill` module,
|
||||
* resulting in a chill.js and chill.css file.
|
||||
*
|
||||
*/
|
||||
async function populateConfig(Encore, chillEntries) {
|
||||
// chill-main contains some bootstrap that must be loaded first.
|
||||
// we register them first and, then, store this chill.webpack.config.js file
|
||||
// into `toIgnore`, ignoring it when we loop on other folders.
|
||||
let
|
||||
toIgnore = [];
|
||||
|
||||
// loop into chill main
|
||||
for await (const f of getFiles('./src/Bundle/ChillMainBundle/', 1, [])) {
|
||||
let filename = parse(f).base;
|
||||
if (filename === 'chill.webpack.config.js') {
|
||||
configure = require(f);
|
||||
configure(Encore, chillEntries);
|
||||
toIgnore.push(f);
|
||||
}
|
||||
}
|
||||
|
||||
// loop into other chill bundles
|
||||
for await (const f of getFiles('./src/Bundle', 2, toIgnore)) {
|
||||
let filename = parse(f).base;
|
||||
if (filename === 'chill.webpack.config.js') {
|
||||
configure = require(f);
|
||||
configure(Encore, chillEntries);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// export the final configuration
|
||||
module.exports = (async () => {
|
||||
|
||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||
// It's useful when you use tools that rely on webpack.config.js file.
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
}
|
||||
// basic encore configuration
|
||||
Encore
|
||||
.setOutputPath('public/build/')
|
||||
.setPublicPath('/build')
|
||||
.enableSassLoader()
|
||||
.enableVueLoader(() => {}, {
|
||||
version: 3
|
||||
})
|
||||
.enableTypeScriptLoader(function (tsConfig){
|
||||
tsConfig.appendTsSuffixTo = [/\.vue$/];
|
||||
tsConfig.appendTsxSuffixTo = [/\.vue$/];
|
||||
// temporary fix for https://github.com/vuejs/vue-loader/issues/1915 and https://github.com/vuejs/core/issues/2855
|
||||
tsConfig.compilerOptions = {strict: !Encore.isProduction()};
|
||||
tsConfig.silent = false;
|
||||
})
|
||||
//.enableForkedTypeScriptTypesChecking()
|
||||
.autoProvidejQuery()
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
.cleanupOutputBeforeBuild()
|
||||
//.enableBuildNotifications()
|
||||
.enableVersioning()
|
||||
.enableSingleRuntimeChunk()
|
||||
.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/' } })
|
||||
;
|
||||
|
||||
// populate config with chill entries
|
||||
let chillEntries = [];
|
||||
await populateConfig(Encore, chillEntries);
|
||||
// configure Babel
|
||||
// .configureBabel((config) => {
|
||||
// config.plugins.push('@babel/a-babel-plugin');
|
||||
// })
|
||||
|
||||
//getting the encore config and appending chill entries
|
||||
config = Encore.getWebpackConfig();
|
||||
config.entry.chill = chillEntries;
|
||||
|
||||
if (!Encore.isProduction()) {
|
||||
console.log(config);
|
||||
config.devtool = 'eval-source-map';
|
||||
}
|
||||
|
||||
return config;
|
||||
})();
|
Loading…
x
Reference in New Issue
Block a user