Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use AppBundle\AppBundle;
use CCMBenchmark\TingBundle\TingBundle;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Ekino\NewRelicBundle\EkinoNewRelicBundle;
use EWZ\Bundle\RecaptchaBundle\EWZRecaptchaBundle;
use JMS\SerializerBundle\JMSSerializerBundle;
Expand Down Expand Up @@ -34,6 +35,7 @@ public function registerBundles(): array
new PrestaSitemapBundle(),
new EWZRecaptchaBundle(),
new EkinoNewRelicBundle(),
new DoctrineBundle(),
];

if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
Expand Down
1 change: 1 addition & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ imports:
- { resource: security.yml }
- { resource: services.yml }
- { resource: packages/http_client.yaml }
- { resource: packages/doctrine.yaml }

# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
Expand Down
55 changes: 55 additions & 0 deletions app/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
doctrine:
dbal:
# url: '%env(resolve:DATABASE_URL)%'
url: 'mysql://%database_user%:%database_password%@%database_host%:%database_port%/%database_name%?charset=utf8mb4'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut spécifier la timezone en query param, non ?


# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var
server_version: '5'

profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
orm:
auto_generate_proxy_classes: true
# enable_lazy_ghost_objects: true
# report_fields_where_declared: true
# validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
# identity_generation_preferences:
# Doctrine\DBAL\Platforms\MySqlPlatform: identity
auto_mapping: true
mappings:
AppBundle:
type: annotation
is_bundle: false
dir: '%kernel.project_dir%/../sources/AppBundle'
prefix: 'AppBundle'
alias: AppBundle
controller_resolver:
auto_mapping: false

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
18 changes: 2 additions & 16 deletions app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ services:
db_password: '%database_password%'
lock_mode: !php/const Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::LOCK_NONE


AppBundle\Command\:
resource: '../../sources/AppBundle/Command/*'
autowire: true
Expand Down Expand Up @@ -703,14 +702,6 @@ services:
tags:
- { name: twig.extension }

Doctrine\DBAL\Configuration: ~
Doctrine\DBAL\Connection:
factory: [Doctrine\DBAL\DriverManager, 'getConnection']
arguments:
- {url: 'mysql://%database_user%:%database_password%@%database_host%:%database_port%/%database_name%?charset=utf8mb4'}
- '@Doctrine\DBAL\Configuration'


Symfony\Component\HttpFoundation\Session\SessionInterface:
alias: 'session'
public: true
Expand Down Expand Up @@ -753,14 +744,9 @@ services:
$apiAppPassword: '%bluesky.api.app_password%'

AppBundle\VideoNotifier\HistoryRepository:
arguments:
$connection: '@Doctrine\DBAL\Connection'
autowire: true

AppBundle\VideoNotifier\Engine:
autowire: true
arguments:
$transports: !tagged_iterator app.social_network.transport
$planningRepository: '@AppBundle\Event\Model\Repository\PlanningRepository'
$talkRepository: '@AppBundle\Event\Model\Repository\TalkRepository'
$speakerRepository: '@AppBundle\Event\Model\Repository\SpeakerRepository'
$historyRepository: '@AppBundle\VideoNotifier\HistoryRepository'
$logger: '@logger'
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"cocur/slugify": "^2.3",
"cuyz/valinor": "^0.17.1",
"doctrine/dbal": "^2.5",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/orm": "^2.20",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peut être attendre l'arrivée de PHP 8.1 pour démarrer avec "doctrine/orm": "^3.0", non ?

"ekino/newrelic-bundle": "^2.4",
"erusev/parsedown": "^1.6",
"excelwebzone/recaptcha-bundle": "^1.5",
Expand Down
Loading