mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-05 20:44:19 +01:00
Refactor YAML and Twig files for consistent indentation and formatting
This commit is contained in:
@@ -33,6 +33,7 @@ indent_size = 4
|
|||||||
|
|
||||||
[*.{yaml,yml}]
|
[*.{yaml,yml}]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[.github/workflows/*.yml]
|
[.github/workflows/*.yml]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -105,3 +105,7 @@ phpstan.neon
|
|||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
###< phpunit/phpunit ###
|
###< phpunit/phpunit ###
|
||||||
|
|
||||||
|
###> vincentlanglet/twig-cs-fixer ###
|
||||||
|
/.twig-cs-fixer.cache
|
||||||
|
###< vincentlanglet/twig-cs-fixer ###
|
||||||
|
|||||||
3
.idea/TijdVoorDeTest.iml
generated
3
.idea/TijdVoorDeTest.iml
generated
@@ -85,7 +85,6 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-grapheme" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-grapheme" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-normalizer" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-normalizer" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php83" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/runtime" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/runtime" />
|
||||||
@@ -133,6 +132,8 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/html-extra" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/html-extra" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/data-fixtures" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/data-fixtures" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/doctrine-fixtures-bundle" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/doctrine-fixtures-bundle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/vincentlanglet/twig-cs-fixer" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
|||||||
3
.idea/php.xml
generated
3
.idea/php.xml
generated
@@ -46,7 +46,6 @@
|
|||||||
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/runtime" />
|
<path value="$PROJECT_DIR$/vendor/symfony/runtime" />
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
|
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php83" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
|
<path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
|
<path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
|
||||||
<path value="$PROJECT_DIR$/vendor/psr/cache" />
|
<path value="$PROJECT_DIR$/vendor/psr/cache" />
|
||||||
@@ -163,6 +162,8 @@
|
|||||||
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
|
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
|
||||||
<path value="$PROJECT_DIR$/vendor/doctrine/data-fixtures" />
|
<path value="$PROJECT_DIR$/vendor/doctrine/data-fixtures" />
|
||||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-fixtures-bundle" />
|
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-fixtures-bundle" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/vincentlanglet/twig-cs-fixer" />
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpInterpreters">
|
<component name="PhpInterpreters">
|
||||||
|
|||||||
10
.idea/phpunit.xml
generated
Normal file
10
.idea/phpunit.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="PHPUnit">
|
||||||
|
<option name="directories">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/tests" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -67,6 +67,8 @@ RUN set -eux; \
|
|||||||
|
|
||||||
COPY --link frankenphp/conf.d/20-app.dev.ini $PHP_INI_DIR/app.conf.d/
|
COPY --link frankenphp/conf.d/20-app.dev.ini $PHP_INI_DIR/app.conf.d/
|
||||||
|
|
||||||
|
RUN git config --global --add safe.directory /app
|
||||||
|
|
||||||
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile", "--watch" ]
|
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile", "--watch" ]
|
||||||
|
|
||||||
# Prod FrankenPHP image
|
# Prod FrankenPHP image
|
||||||
|
|||||||
20
Taskfile.yml
Normal file
20
Taskfile.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
up:
|
||||||
|
cmds:
|
||||||
|
- docker compose up -d
|
||||||
|
down:
|
||||||
|
cmds:
|
||||||
|
- docker compose down
|
||||||
|
stop:
|
||||||
|
cmds:
|
||||||
|
- docker compose stop
|
||||||
|
shell:
|
||||||
|
cmds:
|
||||||
|
- docker compose exec app bash
|
||||||
|
migrate:
|
||||||
|
cmds:
|
||||||
|
- docker compose run php bin/console doctrine:migrations:migrate
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "symfony/skeleton",
|
"name": "MarijnDoeve/TijdVoorDeTest",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "A minimal Symfony project recommended to create bare bones applications",
|
"description": "A minimal Symfony project recommended to create bare bones applications",
|
||||||
@@ -9,16 +9,16 @@
|
|||||||
"php": ">=8.3.15",
|
"php": ">=8.3.15",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
"doctrine/dbal": "^3",
|
"doctrine/dbal": "^4.2.2",
|
||||||
"doctrine/doctrine-bundle": "^2.13",
|
"doctrine/doctrine-bundle": "^2.13.2",
|
||||||
"doctrine/doctrine-migrations-bundle": "^3.3",
|
"doctrine/doctrine-migrations-bundle": "^3.4.1",
|
||||||
"doctrine/orm": "^3.3",
|
"doctrine/orm": "^3.3.2",
|
||||||
"easycorp/easyadmin-bundle": "^4.23",
|
"easycorp/easyadmin-bundle": "^4.24.4",
|
||||||
"runtime/frankenphp-symfony": "^0.2.0",
|
"runtime/frankenphp-symfony": "^0.2.0",
|
||||||
"symfony/asset": "7.2.*",
|
"symfony/asset": "7.2.*",
|
||||||
"symfony/console": "7.2.*",
|
"symfony/console": "7.2.*",
|
||||||
"symfony/dotenv": "7.2.*",
|
"symfony/dotenv": "7.2.*",
|
||||||
"symfony/flex": "^2.4.7",
|
"symfony/flex": "^2.5.0",
|
||||||
"symfony/form": "7.2.*",
|
"symfony/form": "7.2.*",
|
||||||
"symfony/framework-bundle": "7.2.*",
|
"symfony/framework-bundle": "7.2.*",
|
||||||
"symfony/runtime": "7.2.*",
|
"symfony/runtime": "7.2.*",
|
||||||
@@ -29,19 +29,21 @@
|
|||||||
"thecodingmachine/safe": "^2.5"
|
"thecodingmachine/safe": "^2.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"roave/security-advisories": "dev-latest",
|
||||||
"doctrine/doctrine-fixtures-bundle": "^4.0",
|
"doctrine/doctrine-fixtures-bundle": "^4.0",
|
||||||
"friendsofphp/php-cs-fixer": "^3.65",
|
"friendsofphp/php-cs-fixer": "^3.70.2",
|
||||||
"phpstan/extension-installer": "^1.4",
|
"phpstan/extension-installer": "^1.4.3",
|
||||||
"phpstan/phpstan": "^2.0",
|
"phpstan/phpstan": "^2.1.7",
|
||||||
"phpstan/phpstan-doctrine": "^2.0",
|
"phpstan/phpstan-doctrine": "^2.0.2",
|
||||||
"phpstan/phpstan-phpunit": "^2.0",
|
"phpstan/phpstan-phpunit": "^2.0.4",
|
||||||
"phpstan/phpstan-symfony": "^2.0",
|
"phpstan/phpstan-symfony": "^2.0.2",
|
||||||
"phpunit/phpunit": "^11",
|
"phpunit/phpunit": "^11.5.11",
|
||||||
"rector/rector": "^2.0",
|
"rector/rector": "^2.0.10",
|
||||||
"symfony/maker-bundle": "^1.62.1",
|
"symfony/maker-bundle": "^1.62.1",
|
||||||
"symfony/stopwatch": "7.2.*",
|
"symfony/stopwatch": "7.2.*",
|
||||||
"symfony/web-profiler-bundle": "7.2.*",
|
"symfony/web-profiler-bundle": "7.2.*",
|
||||||
"thecodingmachine/phpstan-safe-rule": "^1.3"
|
"thecodingmachine/phpstan-safe-rule": "^1.4",
|
||||||
|
"vincentlanglet/twig-cs-fixer": "^3.5.1"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
@@ -71,7 +73,8 @@
|
|||||||
"symfony/polyfill-php74": "*",
|
"symfony/polyfill-php74": "*",
|
||||||
"symfony/polyfill-php80": "*",
|
"symfony/polyfill-php80": "*",
|
||||||
"symfony/polyfill-php81": "*",
|
"symfony/polyfill-php81": "*",
|
||||||
"symfony/polyfill-php82": "*"
|
"symfony/polyfill-php82": "*",
|
||||||
|
"symfony/polyfill-php83": "*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"auto-scripts": {
|
"auto-scripts": {
|
||||||
|
|||||||
1521
composer.lock
generated
1521
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
# Enable stateless CSRF protection for forms and logins/logouts
|
# Enable stateless CSRF protection for forms and logins/logouts
|
||||||
framework:
|
framework:
|
||||||
form:
|
form:
|
||||||
csrf_protection:
|
|
||||||
token_id: submit
|
|
||||||
|
|
||||||
csrf_protection:
|
csrf_protection:
|
||||||
stateless_token_ids:
|
token_id: submit
|
||||||
- submit
|
|
||||||
- authenticate
|
csrf_protection:
|
||||||
- logout
|
stateless_token_ids:
|
||||||
|
- submit
|
||||||
|
- authenticate
|
||||||
|
- logout
|
||||||
|
|||||||
@@ -1,52 +1,52 @@
|
|||||||
doctrine:
|
doctrine:
|
||||||
dbal:
|
dbal:
|
||||||
url: '%env(resolve:DATABASE_URL)%'
|
url: '%env(resolve:DATABASE_URL)%'
|
||||||
|
|
||||||
# IMPORTANT: You MUST configure your server version,
|
# IMPORTANT: You MUST configure your server version,
|
||||||
# either here or in the DATABASE_URL env var (see .env file)
|
# either here or in the DATABASE_URL env var (see .env file)
|
||||||
#server_version: '16'
|
#server_version: '16'
|
||||||
|
|
||||||
profiling_collect_backtrace: '%kernel.debug%'
|
profiling_collect_backtrace: '%kernel.debug%'
|
||||||
use_savepoints: true
|
use_savepoints: true
|
||||||
orm:
|
orm:
|
||||||
auto_generate_proxy_classes: true
|
auto_generate_proxy_classes: true
|
||||||
enable_lazy_ghost_objects: true
|
enable_lazy_ghost_objects: true
|
||||||
report_fields_where_declared: true
|
report_fields_where_declared: true
|
||||||
validate_xml_mapping: true
|
validate_xml_mapping: true
|
||||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||||
identity_generation_preferences:
|
identity_generation_preferences:
|
||||||
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
|
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
|
||||||
auto_mapping: true
|
auto_mapping: true
|
||||||
mappings:
|
mappings:
|
||||||
App:
|
App:
|
||||||
type: attribute
|
type: attribute
|
||||||
is_bundle: false
|
is_bundle: false
|
||||||
dir: '%kernel.project_dir%/src/Entity'
|
dir: '%kernel.project_dir%/src/Entity'
|
||||||
prefix: 'App\Entity'
|
prefix: 'App\Entity'
|
||||||
alias: App
|
alias: App
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
doctrine:
|
doctrine:
|
||||||
dbal:
|
dbal:
|
||||||
# "TEST_TOKEN" is typically set by ParaTest
|
# "TEST_TOKEN" is typically set by ParaTest
|
||||||
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
||||||
|
|
||||||
when@prod:
|
when@prod:
|
||||||
doctrine:
|
doctrine:
|
||||||
orm:
|
orm:
|
||||||
auto_generate_proxy_classes: false
|
auto_generate_proxy_classes: false
|
||||||
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
||||||
query_cache_driver:
|
query_cache_driver:
|
||||||
type: pool
|
type: pool
|
||||||
pool: doctrine.system_cache_pool
|
pool: doctrine.system_cache_pool
|
||||||
result_cache_driver:
|
result_cache_driver:
|
||||||
type: pool
|
type: pool
|
||||||
pool: doctrine.result_cache_pool
|
pool: doctrine.result_cache_pool
|
||||||
|
|
||||||
framework:
|
framework:
|
||||||
cache:
|
cache:
|
||||||
pools:
|
pools:
|
||||||
doctrine.result_cache_pool:
|
doctrine.result_cache_pool:
|
||||||
adapter: cache.app
|
adapter: cache.app
|
||||||
doctrine.system_cache_pool:
|
doctrine.system_cache_pool:
|
||||||
adapter: cache.system
|
adapter: cache.system
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
doctrine_migrations:
|
doctrine_migrations:
|
||||||
migrations_paths:
|
migrations_paths:
|
||||||
# namespace is arbitrary but should be different from App\Migrations
|
# namespace is arbitrary but should be different from App\Migrations
|
||||||
# as migrations classes should NOT be autoloaded
|
# as migrations classes should NOT be autoloaded
|
||||||
'DoctrineMigrations': '%kernel.project_dir%/migrations'
|
'DoctrineMigrations': '%kernel.project_dir%/migrations'
|
||||||
enable_profiler: false
|
enable_profiler: false
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||||
framework:
|
framework:
|
||||||
secret: '%env(APP_SECRET)%'
|
secret: '%env(APP_SECRET)%'
|
||||||
|
|
||||||
# Note that the session will be started ONLY if you read or write from it.
|
# Note that the session will be started ONLY if you read or write from it.
|
||||||
session: true
|
session: true
|
||||||
|
|
||||||
#esi: true
|
#esi: true
|
||||||
#fragments: true
|
#fragments: true
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
framework:
|
framework:
|
||||||
test: true
|
test: true
|
||||||
session:
|
session:
|
||||||
storage_factory_id: session.storage.factory.mock_file
|
storage_factory_id: session.storage.factory.mock_file
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
framework:
|
framework:
|
||||||
router:
|
router:
|
||||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||||
#default_uri: http://localhost
|
#default_uri: http://localhost
|
||||||
|
|
||||||
when@prod:
|
when@prod:
|
||||||
framework:
|
framework:
|
||||||
router:
|
router:
|
||||||
strict_requirements: null
|
strict_requirements: null
|
||||||
|
|||||||
@@ -1,52 +1,52 @@
|
|||||||
security:
|
security:
|
||||||
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||||
password_hashers:
|
password_hashers:
|
||||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||||
providers:
|
providers:
|
||||||
# used to reload user from session & other features (e.g. switch_user)
|
# used to reload user from session & other features (e.g. switch_user)
|
||||||
app_user_provider:
|
app_user_provider:
|
||||||
entity:
|
entity:
|
||||||
class: App\Entity\User
|
class: App\Entity\User
|
||||||
property: email
|
property: email
|
||||||
# used to reload user from session & other features (e.g. switch_user)
|
# used to reload user from session & other features (e.g. switch_user)
|
||||||
firewalls:
|
firewalls:
|
||||||
dev:
|
dev:
|
||||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||||
security: false
|
security: false
|
||||||
main:
|
main:
|
||||||
lazy: true
|
lazy: true
|
||||||
provider: app_user_provider
|
provider: app_user_provider
|
||||||
form_login:
|
form_login:
|
||||||
login_path: app_login
|
login_path: app_login
|
||||||
check_path: app_login
|
check_path: app_login
|
||||||
enable_csrf: true
|
enable_csrf: true
|
||||||
logout:
|
logout:
|
||||||
path: app_logout
|
path: app_logout
|
||||||
# where to redirect after logout
|
# where to redirect after logout
|
||||||
# target: app_any_route
|
# target: app_any_route
|
||||||
|
|
||||||
# activate different ways to authenticate
|
# activate different ways to authenticate
|
||||||
# https://symfony.com/doc/current/security.html#the-firewall
|
# https://symfony.com/doc/current/security.html#the-firewall
|
||||||
|
|
||||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||||
# switch_user: true
|
# switch_user: true
|
||||||
|
|
||||||
# Easy way to control access for large sections of your site
|
# Easy way to control access for large sections of your site
|
||||||
# Note: Only the *first* access control that matches will be used
|
# Note: Only the *first* access control that matches will be used
|
||||||
access_control:
|
access_control:
|
||||||
# - { path: ^/admin, roles: ROLE_ADMIN }
|
# - { path: ^/admin, roles: ROLE_ADMIN }
|
||||||
# - { path: ^/profile, roles: ROLE_USER }
|
# - { path: ^/profile, roles: ROLE_USER }
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
security:
|
security:
|
||||||
password_hashers:
|
password_hashers:
|
||||||
# By default, password hashers are resource intensive and take time. This is
|
# By default, password hashers are resource intensive and take time. This is
|
||||||
# important to generate secure password hashes. In tests however, secure hashes
|
# important to generate secure password hashes. In tests however, secure hashes
|
||||||
# are not important, waste resources and increase test times. The following
|
# are not important, waste resources and increase test times. The following
|
||||||
# reduces the work factor to the lowest possible values.
|
# reduces the work factor to the lowest possible values.
|
||||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
||||||
algorithm: auto
|
algorithm: auto
|
||||||
cost: 4 # Lowest possible value for bcrypt
|
cost: 4 # Lowest possible value for bcrypt
|
||||||
time_cost: 3 # Lowest possible value for argon
|
time_cost: 3 # Lowest possible value for argon
|
||||||
memory_cost: 10 # Lowest possible value for argon
|
memory_cost: 10 # Lowest possible value for argon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
framework:
|
framework:
|
||||||
default_locale: nl
|
default_locale: nl
|
||||||
translator:
|
translator:
|
||||||
default_path: '%kernel.project_dir%/translations'
|
default_path: '%kernel.project_dir%/translations'
|
||||||
fallbacks:
|
fallbacks:
|
||||||
- en
|
- en
|
||||||
providers:
|
providers:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
twig:
|
twig:
|
||||||
file_name_pattern: '*.twig'
|
file_name_pattern: '*.twig'
|
||||||
form_themes: [ 'bootstrap_5_layout.html.twig' ]
|
form_themes: [ 'bootstrap_5_layout.html.twig' ]
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
twig:
|
twig:
|
||||||
strict_variables: true
|
strict_variables: true
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
twig_component:
|
twig_component:
|
||||||
anonymous_template_directory: 'components/'
|
anonymous_template_directory: 'components/'
|
||||||
defaults:
|
defaults:
|
||||||
# Namespace & directory for components
|
# Namespace & directory for components
|
||||||
App\Twig\Components\: 'components/'
|
App\Twig\Components\: 'components/'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
framework:
|
framework:
|
||||||
uid:
|
uid:
|
||||||
default_uuid_version: 7
|
default_uuid_version: 7
|
||||||
time_based_uuid_version: 7
|
time_based_uuid_version: 7
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
framework:
|
framework:
|
||||||
validation:
|
validation:
|
||||||
# Enables validator auto-mapping support.
|
# Enables validator auto-mapping support.
|
||||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||||
#auto_mapping:
|
#auto_mapping:
|
||||||
# App\Entity\: []
|
# App\Entity\: []
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
framework:
|
framework:
|
||||||
validation:
|
validation:
|
||||||
not_compromised_password: false
|
not_compromised_password: false
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
when@dev:
|
when@dev:
|
||||||
web_profiler:
|
web_profiler:
|
||||||
toolbar: true
|
toolbar: true
|
||||||
intercept_redirects: false
|
intercept_redirects: false
|
||||||
|
|
||||||
framework:
|
framework:
|
||||||
profiler:
|
profiler:
|
||||||
only_exceptions: false
|
only_exceptions: false
|
||||||
collect_serializer_data: true
|
collect_serializer_data: true
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
web_profiler:
|
web_profiler:
|
||||||
toolbar: false
|
toolbar: false
|
||||||
intercept_redirects: false
|
intercept_redirects: false
|
||||||
|
|
||||||
framework:
|
framework:
|
||||||
profiler: { collect: false }
|
profiler: { collect: false }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
controllers:
|
controllers:
|
||||||
resource:
|
resource:
|
||||||
path: ../src/Controller/
|
path: ../src/Controller/
|
||||||
namespace: App\Controller
|
namespace: App\Controller
|
||||||
type: attribute
|
type: attribute
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
easyadmin:
|
easyadmin:
|
||||||
resource: .
|
resource: .
|
||||||
type: easyadmin.routes
|
type: easyadmin.routes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
when@dev:
|
when@dev:
|
||||||
_errors:
|
_errors:
|
||||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||||
prefix: /_error
|
prefix: /_error
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
_security_logout:
|
_security_logout:
|
||||||
resource: security.route_loader.logout
|
resource: security.route_loader.logout
|
||||||
type: service
|
type: service
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
when@dev:
|
when@dev:
|
||||||
web_profiler_wdt:
|
web_profiler_wdt:
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
||||||
prefix: /_wdt
|
prefix: /_wdt
|
||||||
|
|
||||||
web_profiler_profiler:
|
web_profiler_profiler:
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
||||||
prefix: /_profiler
|
prefix: /_profiler
|
||||||
|
|||||||
@@ -6,19 +6,19 @@
|
|||||||
parameters:
|
parameters:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# default configuration for services in *this* file
|
# default configuration for services in *this* file
|
||||||
_defaults:
|
_defaults:
|
||||||
autowire: true # Automatically injects dependencies in your services.
|
autowire: true # Automatically injects dependencies in your services.
|
||||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||||
|
|
||||||
# makes classes in src/ available to be used as services
|
# makes classes in src/ available to be used as services
|
||||||
# this creates a service per class whose id is the fully-qualified class name
|
# this creates a service per class whose id is the fully-qualified class name
|
||||||
App\:
|
App\:
|
||||||
resource: '../src/'
|
resource: '../src/'
|
||||||
exclude:
|
exclude:
|
||||||
- '../src/DependencyInjection/'
|
- '../src/DependencyInjection/'
|
||||||
- '../src/Entity/'
|
- '../src/Entity/'
|
||||||
- '../src/Kernel.php'
|
- '../src/Kernel.php'
|
||||||
|
|
||||||
# add more service definitions when explicit configuration is needed
|
# add more service definitions when explicit configuration is needed
|
||||||
# please note that last definitions always *replace* previous ones
|
# please note that last definitions always *replace* previous ones
|
||||||
|
|||||||
@@ -83,14 +83,14 @@ class QuizController extends AbstractController
|
|||||||
$candidate = $candidateRepository->getCandidateByHash($season, $nameHash);
|
$candidate = $candidateRepository->getCandidateByHash($season, $nameHash);
|
||||||
|
|
||||||
if (!$candidate instanceof Candidate) {
|
if (!$candidate instanceof Candidate) {
|
||||||
if (false === $season->isPreregisterCandidates()) {
|
if (true === $season->isPreregisterCandidates()) {
|
||||||
$candidate = new Candidate(Base64::base64_url_decode($nameHash));
|
|
||||||
$candidateRepository->save($candidate);
|
|
||||||
} else {
|
|
||||||
$this->addFlash(FlashType::Danger, 'Candidate not found');
|
$this->addFlash(FlashType::Danger, 'Candidate not found');
|
||||||
|
|
||||||
return $this->redirectToRoute('enter_name', ['seasonCode' => $season->getSeasonCode()]);
|
return $this->redirectToRoute('enter_name', ['seasonCode' => $season->getSeasonCode()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$candidate = new Candidate(Base64::base64_url_decode($nameHash));
|
||||||
|
$candidateRepository->save($candidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('POST' === $request->getMethod()) {
|
if ('POST' === $request->getMethod()) {
|
||||||
@@ -100,10 +100,9 @@ class QuizController extends AbstractController
|
|||||||
throw new BadRequestException('Invalid Answer ID');
|
throw new BadRequestException('Invalid Answer ID');
|
||||||
}
|
}
|
||||||
|
|
||||||
$givenAnswer = new GivenAnswer();
|
$givenAnswer = (new GivenAnswer())
|
||||||
$givenAnswer->setCandidate($candidate)
|
->setCandidate($candidate)
|
||||||
->setAnswer($answer)
|
->setAnswer($answer);
|
||||||
->setQuiz($answer->getQuestion()->getQuiz());
|
|
||||||
$givenAnswerRepository->save($givenAnswer);
|
$givenAnswerRepository->save($givenAnswer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,6 +114,7 @@ class QuizController extends AbstractController
|
|||||||
return $this->redirectToRoute('enter_name', ['seasonCode' => $season->getSeasonCode()]);
|
return $this->redirectToRoute('enter_name', ['seasonCode' => $season->getSeasonCode()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO One first question record time
|
||||||
return $this->render('quiz/question.twig', ['candidate' => $candidate, 'question' => $question]);
|
return $this->render('quiz/question.twig', ['candidate' => $candidate, 'question' => $question]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class KrtekFixtures extends Fixture
|
|||||||
->addAnswer(new Answer('Met de auto'))
|
->addAnswer(new Answer('Met de auto'))
|
||||||
)
|
)
|
||||||
->addQuestion((new Question())
|
->addQuestion((new Question())
|
||||||
->setQuestion('Met wie keek de Kretek video bij binnenkomst?')
|
->setQuestion('Met wie keek de Krtek video bij binnenkomst?')
|
||||||
->addAnswer(new Answer('Claudia'))
|
->addAnswer(new Answer('Claudia'))
|
||||||
->addAnswer(new Answer('Eelco'))
|
->addAnswer(new Answer('Eelco'))
|
||||||
->addAnswer(new Answer('Elise'))
|
->addAnswer(new Answer('Elise'))
|
||||||
|
|||||||
@@ -250,5 +250,14 @@
|
|||||||
},
|
},
|
||||||
"twig/extra-bundle": {
|
"twig/extra-bundle": {
|
||||||
"version": "v3.18.0"
|
"version": "v3.18.0"
|
||||||
|
},
|
||||||
|
"vincentlanglet/twig-cs-fixer": {
|
||||||
|
"version": "3.5",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes-contrib",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "3.0",
|
||||||
|
"ref": "d42582ae1bce86fd43491d6264c738b0867f8ffe"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{% extends "quiz/base.html.twig" %}
|
{% extends 'quiz/base.html.twig' %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{{ season.name }}
|
{{ season.name }}
|
||||||
{{ form(form) }}
|
{{ form(form) }}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{% extends "quiz/base.html.twig" %}
|
{% extends 'quiz/base.html.twig' %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
Candiadte: {{ candidate.name }}<br/>
|
|
||||||
|
|
||||||
{{ question.question }}<br/>
|
{{ question.question }}<br/>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% for answer in question.answers %}
|
{% for answer in question.answers %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{% extends "quiz/base.html.twig" %}
|
{% extends 'quiz/base.html.twig' %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{{ form(form) }}
|
{{ form(form) }}
|
||||||
{% endblock body %}
|
{% endblock body %}
|
||||||
|
|||||||
Reference in New Issue
Block a user