mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 07:00:14 +02:00
281462fab8
* Added Gedmo stuff, fix translations * Add CSRF token validation across backoffice forms - Added CSRF validations to candidate correction, penalty, answer saving, and elimination forms. - Updated corresponding Twig templates to include CSRF token inputs. - Adjusted column count in `tab_result` template to maintain layout consistency. * Add unique index constraint for `quiz_candidate` with soft delete support - Updated migration to include a unique index on `quiz_candidate` table that excludes soft-deleted records. - Adjusted `QuizCandidate` entity to reflect the new unique constraint with `deleted_at` condition. * Add CSRF token validation for quiz-related actions - Added CSRF validation to `enableQuiz`, `clearQuiz`, `deleteQuiz`, `toggleCandidate`, and `prepareElimination` actions. - Updated Twig templates to replace links with POST forms to include CSRF tokens. - Set HTTP method restrictions for related endpoints to `POST`. * Fix unique index condition for `quiz_candidate` with soft deletes - Updated condition in unique index definition of `quiz_candidate` to add parentheses for clarity. - Adjusted related migration to reflect the revised condition. * Remove if for post an use methods in Route instead * Refactor CSRF token validation in backoffice controllers - Applied `#[IsCsrfTokenValid]` attribute for CSRF checks to simplify and standardize validation. - Removed manual `isCsrfTokenValid` calls and associated exception throwing. - Updated method signatures across affected endpoints to remove unnecessary `Request` dependency. - Ensured consistency in route HTTP method restrictions where applicable. * Add rector and phpstan * Add validation for answering incorrect quiz question - Added logic to prevent candidates from answering questions out of sequence in `QuizController`. - Updated Dutch translations to include the new error message. * Things
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
doctrine:
|
|
dbal:
|
|
url: '%env(resolve:DATABASE_URL)%'
|
|
|
|
profiling_collect_backtrace: '%kernel.debug%'
|
|
types:
|
|
# JSON types
|
|
jsonb: MartinGeorgiev\Doctrine\DBAL\Types\Jsonb
|
|
'jsonb[]': MartinGeorgiev\Doctrine\DBAL\Types\JsonbArray
|
|
tsrange: MartinGeorgiev\Doctrine\DBAL\Types\TsRange
|
|
mapping_types:
|
|
# JSON type mappings
|
|
jsonb: jsonb
|
|
'jsonb[]': 'jsonb[]'
|
|
_jsonb: 'jsonb[]'
|
|
tsrange: tsrange
|
|
|
|
|
|
orm:
|
|
validate_xml_mapping: true
|
|
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
|
identity_generation_preferences:
|
|
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
|
|
auto_mapping: true
|
|
filters:
|
|
softdeleteable:
|
|
class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
|
|
enabled: true
|
|
mappings:
|
|
Tvdt:
|
|
type: attribute
|
|
is_bundle: false
|
|
dir: '%kernel.project_dir%/src/Entity'
|
|
prefix: 'Tvdt\Entity'
|
|
alias: Tvdt
|
|
|
|
when@test:
|
|
doctrine:
|
|
dbal:
|
|
# "TEST_TOKEN" is typically set by ParaTest
|
|
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
|
|
|
when@prod:
|
|
doctrine:
|
|
orm:
|
|
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
|