mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 12:44:20 +01:00
Compare commits
7 Commits
dependabot
...
eb1e6f3de0
| Author | SHA1 | Date | |
|---|---|---|---|
|
eb1e6f3de0
|
|||
|
85c7725289
|
|||
|
456d09f459
|
|||
|
68b019135f
|
|||
|
56f97c77ea
|
|||
|
f886f0f6c2
|
|||
|
e41bedce8d
|
@@ -1,3 +1,4 @@
|
||||
# define your env variables for the test env here
|
||||
KERNEL_CLASS='Tvdt\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||
|
||||
1
.idea/TijdVoorDeTest.iml
generated
1
.idea/TijdVoorDeTest.iml
generated
@@ -165,6 +165,7 @@
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-uuid" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/brevo-mailer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/martin-georgiev/postgresql-for-doctrine" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/brianium/paratest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/dama/doctrine-test-bundle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/gedmo/doctrine-extensions" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/stof/doctrine-extensions-bundle" />
|
||||
|
||||
311
.idea/php.xml
generated
311
.idea/php.xml
generated
@@ -36,169 +36,170 @@
|
||||
</component>
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
|
||||
<path value="$PROJECT_DIR$/vendor/martin-georgiev/postgresql-for-doctrine" />
|
||||
<path value="$PROJECT_DIR$/vendor/dama/doctrine-test-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/staabm/side-effects-detector" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-client" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/container" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/log" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/validator" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/asset" />
|
||||
<path value="$PROJECT_DIR$/vendor/fidry/cpu-core-counter" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/ux-turbo" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/form" />
|
||||
<path value="$PROJECT_DIR$/vendor/vincentlanglet/twig-cs-fixer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dotenv" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/serializer" />
|
||||
<path value="$PROJECT_DIR$/vendor/rector/rector" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpdoc-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/extension-installer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-icu" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfonycasts/sass-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/framework-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfonycasts/verify-email-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-factory" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan-doctrine" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/clock" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan" />
|
||||
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan-phpunit" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan-symfony" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/mailer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/brevo-mailer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/options-resolver" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/runtime" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/phpunit-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-http" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/config" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/asset-mapper" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/uid" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/intl" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-client" />
|
||||
<path value="$PROJECT_DIR$/vendor/friendsofphp/php-cs-fixer" />
|
||||
<path value="$PROJECT_DIR$/vendor/gedmo/doctrine-extensions" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/stopwatch" />
|
||||
<path value="$PROJECT_DIR$/vendor/masterminds/html5" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/twig-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/property-access" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/web-profiler-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-uuid" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/css-selector" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-normalizer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-csrf" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/twig-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/maker-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/doctrine-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/error-handler" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/flex" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/property-info" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-client-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/type-info" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-core" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-kernel" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/string" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/mime" />
|
||||
<path value="$PROJECT_DIR$/vendor/markbaker/matrix" />
|
||||
<path value="$PROJECT_DIR$/vendor/markbaker/complex" />
|
||||
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<path value="$PROJECT_DIR$/vendor/nikic/php-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/process" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/password-hasher" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-grapheme" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/console" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dependency-injection" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/cache-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/clock" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/stimulus-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpoffice/phpspreadsheet" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
|
||||
<path value="$PROJECT_DIR$/vendor/clue/ndjson-react" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/socket" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/dns" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/child-process" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/event-loop" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/promise" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/stream" />
|
||||
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
||||
<path value="$PROJECT_DIR$/vendor/runtime/frankenphp-symfony" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/intl-extra" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfonycasts/sass-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/thecodingmachine/phpstan-safe-rule" />
|
||||
<path value="$PROJECT_DIR$/vendor/thecodingmachine/safe" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/extra-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
|
||||
<path value="$PROJECT_DIR$/vendor/maennchen/zipstream-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/martin-georgiev/postgresql-for-doctrine" />
|
||||
<path value="$PROJECT_DIR$/vendor/vincentlanglet/twig-cs-fixer" />
|
||||
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/type" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/complexity" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/lines-of-code" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfonycasts/verify-email-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/friendsofphp/php-cs-fixer" />
|
||||
<path value="$PROJECT_DIR$/vendor/masterminds/html5" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/nikic/php-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/fidry/cpu-core-counter" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/intl-extra" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/promise" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/stream" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/event-loop" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/log" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-client" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/container" />
|
||||
<path value="$PROJECT_DIR$/vendor/twig/extra-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/clue/ndjson-react" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-factory" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/clock" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
||||
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
||||
<path value="$PROJECT_DIR$/vendor/egulias/email-validator" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan-phpunit" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan-symfony" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan-doctrine" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpstan" />
|
||||
<path value="$PROJECT_DIR$/vendor/jean85/pretty-package-versions" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/child-process" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/socket" />
|
||||
<path value="$PROJECT_DIR$/vendor/react/dns" />
|
||||
<path value="$PROJECT_DIR$/vendor/staabm/side-effects-detector" />
|
||||
<path value="$PROJECT_DIR$/vendor/sentry/sentry" />
|
||||
<path value="$PROJECT_DIR$/vendor/sentry/sentry-symfony" />
|
||||
<path value="$PROJECT_DIR$/vendor/egulias/email-validator" />
|
||||
<path value="$PROJECT_DIR$/vendor/jean85/pretty-package-versions" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/sql-formatter" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/collections" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/deprecations" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-fixtures-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/event-manager" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/orm" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/persistence" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-migrations-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/data-fixtures" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/migrations" />
|
||||
<path value="$PROJECT_DIR$/vendor/evenement/evenement" />
|
||||
<path value="$PROJECT_DIR$/vendor/stof/doctrine-extensions-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php84" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dom-crawler" />
|
||||
<path value="$PROJECT_DIR$/vendor/rector/rector" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/form" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-icu" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/framework-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/runtime/frankenphp-symfony" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/validator" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dotenv" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/serializer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/ux-turbo" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/phpdoc-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpstan/extension-installer" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/asset-mapper" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/uid" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-http" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/brevo-mailer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/phpunit-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/runtime" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/browser-kit" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/asset" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/config" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/intl" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/css-selector" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-normalizer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/web-profiler-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/twig-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/property-access" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dom-crawler" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-csrf" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/options-resolver" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/mailer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-uuid" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/twig-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/maker-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-client-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/event-manager" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/orm" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-fixtures-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/doctrine-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/deprecations" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/type-info" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/sql-formatter" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/property-info" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/collections" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-kernel" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/data-fixtures" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/migrations" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/stopwatch" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/doctrine-migrations-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-client" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/security-core" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/persistence" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/string" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/mime" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
|
||||
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-grapheme" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/complexity" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/console" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/process" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/type" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/lines-of-code" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/cache-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/markbaker/matrix" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/error-handler" />
|
||||
<path value="$PROJECT_DIR$/vendor/markbaker/complex" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/flex" />
|
||||
<path value="$PROJECT_DIR$/vendor/maennchen/zipstream-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
|
||||
<path value="$PROJECT_DIR$/vendor/evenement/evenement" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/password-hasher" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/clock" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/stimulus-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dependency-injection" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpoffice/phpspreadsheet" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php84" />
|
||||
<path value="$PROJECT_DIR$/vendor/brianium/paratest" />
|
||||
<path value="$PROJECT_DIR$/vendor/dama/doctrine-test-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/stof/doctrine-extensions-bundle" />
|
||||
<path value="$PROJECT_DIR$/vendor/gedmo/doctrine-extensions" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpInterpreters">
|
||||
@@ -277,7 +278,7 @@
|
||||
</interpreter>
|
||||
</phpInfoCache>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.5" />
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="8.4" />
|
||||
<component name="PhpStan">
|
||||
<PhpStan_settings>
|
||||
<phpstan_by_interpreter interpreter_id="96512cb2-7b9e-4e1d-bfa2-bf7f3be424c8" tool_path="vendor/bin/phpstan" timeout="60000" />
|
||||
@@ -292,7 +293,7 @@
|
||||
</component>
|
||||
<component name="PhpUnit">
|
||||
<phpunit_settings>
|
||||
<phpunit_by_interpreter interpreter_id="96512cb2-7b9e-4e1d-bfa2-bf7f3be424c8" bootstrap_file_path="./tests/bootstrap.php" configuration_file_path="./phpunit.dist.xml" custom_loader_path="/app/vendor/autoload.php" phpunit_phar_path="" use_bootstrap_file="true" use_configuration_file="true" />
|
||||
<phpunit_by_interpreter interpreter_id="96512cb2-7b9e-4e1d-bfa2-bf7f3be424c8" bootstrap_file_path="./tests/bootstrap.php" configuration_file_path="./phpunit.dist.xml" custom_loader_path="/app/vendor/autoload.php" paratest_path="$PROJECT_DIR$/vendor/bin/paratest_for_phpstorm" phpunit_phar_path="" use_bootstrap_file="true" use_configuration_file="true" />
|
||||
</phpunit_settings>
|
||||
</component>
|
||||
<component name="Psalm">
|
||||
|
||||
@@ -9,7 +9,6 @@ $finder = new Finder()
|
||||
->in(__DIR__)
|
||||
->exclude('var')
|
||||
->exclude('bin')
|
||||
->notPath(['config/reference.php'])
|
||||
;
|
||||
|
||||
return new Config()
|
||||
@@ -25,6 +24,7 @@ return new Config()
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'php_unit_strict' => true,
|
||||
'phpdoc_line_span' => ['const' => 'single', 'method' => 'single', 'property' => 'single'],
|
||||
'phpdoc_order' => true,
|
||||
'single_line_empty_body' => true,
|
||||
@@ -36,5 +36,4 @@ return new Config()
|
||||
])
|
||||
->setRiskyAllowed(true)
|
||||
->setFinder($finder)
|
||||
->setUnsupportedPhpVersionAllowed(true)
|
||||
;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#syntax=docker/dockerfile:1
|
||||
|
||||
# Versions
|
||||
FROM dunglas/frankenphp:1-php8.5 AS frankenphp_upstream
|
||||
FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream
|
||||
|
||||
# The different stages of this Dockerfile are meant to be built into separate images
|
||||
# https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage
|
||||
@@ -72,7 +72,7 @@ RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
RUN set -eux; \
|
||||
install-php-extensions \
|
||||
xdebug/xdebug@3.5.0alpha3 \
|
||||
xdebug \
|
||||
;
|
||||
|
||||
COPY --link frankenphp/conf.d/20-app.dev.ini $PHP_INI_DIR/app.conf.d/
|
||||
|
||||
4
Justfile
4
Justfile
@@ -43,5 +43,5 @@ clean:
|
||||
reload-tests:
|
||||
@docker compose exec php bin/console --env=test doctrine:database:drop --if-exists --force
|
||||
@docker compose exec php bin/console --env=test doctrine:database:create
|
||||
@docker compose exec php bin/console --env=test doctrine:migrations:migrate -n
|
||||
@docker compose exec php bin/console --env=test doctrine:fixtures:load -n --group=test
|
||||
@docker compose exec php bin/console --env=test doctrine:schema:create --quiet
|
||||
@docker compose exec php bin/console --env=test doctrine:fixtures:load --no-interaction --group=test
|
||||
|
||||
@@ -6,68 +6,69 @@
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.5",
|
||||
"php": ">=8.4",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"doctrine/dbal": "^4.3.4",
|
||||
"doctrine/doctrine-bundle": "^3.0",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.7.0",
|
||||
"doctrine/orm": "^3.5.7",
|
||||
"martin-georgiev/postgresql-for-doctrine": "^3.6.2",
|
||||
"phpdocumentor/reflection-docblock": "^5.6.4",
|
||||
"phpoffice/phpspreadsheet": "^5.3",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.5.0",
|
||||
"doctrine/orm": "^3.5.2",
|
||||
"martin-georgiev/postgresql-for-doctrine": "^3.5.1",
|
||||
"phpdocumentor/reflection-docblock": "^5.6.3",
|
||||
"phpoffice/phpspreadsheet": "^5.1",
|
||||
"phpstan/phpdoc-parser": "^2.3",
|
||||
"runtime/frankenphp-symfony": "^0.2.0",
|
||||
"sentry/sentry-symfony": "^5.6",
|
||||
"stof/doctrine-extensions-bundle": "^1.14",
|
||||
"symfony/asset": "7.4.*",
|
||||
"symfony/asset-mapper": "7.4.*",
|
||||
"symfony/brevo-mailer": "7.4.*",
|
||||
"symfony/console": "7.4.*",
|
||||
"symfony/dotenv": "7.4.*",
|
||||
"symfony/flex": "^2.10.0",
|
||||
"symfony/form": "7.4.*",
|
||||
"symfony/framework-bundle": "7.4.*",
|
||||
"symfony/mailer": "7.4.*",
|
||||
"symfony/property-access": "7.4.*",
|
||||
"symfony/property-info": "7.4.*",
|
||||
"symfony/runtime": "7.4.*",
|
||||
"symfony/security-bundle": "7.4.*",
|
||||
"symfony/security-csrf": "7.4.*",
|
||||
"symfony/serializer": "7.4.*",
|
||||
"symfony/translation": "7.4.*",
|
||||
"symfony/twig-bundle": "7.4.*",
|
||||
"symfony/uid": "7.4.*",
|
||||
"symfony/ux-turbo": "^2.31.0",
|
||||
"symfony/validator": "7.4.*",
|
||||
"symfony/yaml": "7.4.*",
|
||||
"symfony/asset": "7.3.*",
|
||||
"symfony/asset-mapper": "7.3.*",
|
||||
"symfony/brevo-mailer": "7.3.*",
|
||||
"symfony/console": "7.3.*",
|
||||
"symfony/dotenv": "7.3.*",
|
||||
"symfony/flex": "^2.8.2",
|
||||
"symfony/form": "7.3.*",
|
||||
"symfony/framework-bundle": "7.3.*",
|
||||
"symfony/mailer": "7.3.*",
|
||||
"symfony/property-access": "7.3.*",
|
||||
"symfony/property-info": "7.3.*",
|
||||
"symfony/runtime": "7.3.*",
|
||||
"symfony/security-bundle": "7.3.*",
|
||||
"symfony/security-csrf": "7.3.*",
|
||||
"symfony/serializer": "7.3.*",
|
||||
"symfony/translation": "7.3.*",
|
||||
"symfony/twig-bundle": "7.3.*",
|
||||
"symfony/uid": "7.3.*",
|
||||
"symfony/ux-turbo": "^2.30.0",
|
||||
"symfony/validator": "7.3.*",
|
||||
"symfony/yaml": "7.3.*",
|
||||
"symfonycasts/sass-bundle": "^0.8.3",
|
||||
"symfonycasts/verify-email-bundle": "^1.17.4",
|
||||
"thecodingmachine/safe": "^3.3.0",
|
||||
"twig/extra-bundle": "^3.22.1",
|
||||
"twig/intl-extra": "^3.22.1",
|
||||
"twig/twig": "^3.22.0"
|
||||
"twig/extra-bundle": "^3.21",
|
||||
"twig/intl-extra": "^3.21",
|
||||
"twig/twig": "^3.21.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"brianium/paratest": "^7.14",
|
||||
"dama/doctrine-test-bundle": "^8.4",
|
||||
"doctrine/doctrine-fixtures-bundle": "^4.3",
|
||||
"friendsofphp/php-cs-fixer": "^3.90.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.89.0",
|
||||
"phpstan/extension-installer": "^1.4.3",
|
||||
"phpstan/phpstan": "^2.1.32",
|
||||
"phpstan/phpstan-doctrine": "^2.0.11",
|
||||
"phpstan/phpstan-phpunit": "^2.0.8",
|
||||
"phpstan/phpstan": "^2.1.31",
|
||||
"phpstan/phpstan-doctrine": "^2.0.10",
|
||||
"phpstan/phpstan-phpunit": "^2.0.7",
|
||||
"phpstan/phpstan-symfony": "^2.0.8",
|
||||
"phpunit/phpunit": "^12.4.4",
|
||||
"rector/rector": "^2.2.9",
|
||||
"phpunit/phpunit": "^12.4.1",
|
||||
"rector/rector": "^2.2.3",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"symfony/browser-kit": "7.4.*",
|
||||
"symfony/css-selector": "7.4.*",
|
||||
"symfony/maker-bundle": "^1.65.1",
|
||||
"symfony/phpunit-bridge": "7.4.*",
|
||||
"symfony/stopwatch": "7.4.*",
|
||||
"symfony/web-profiler-bundle": "7.4.*",
|
||||
"thecodingmachine/phpstan-safe-rule": "^1.4.3",
|
||||
"vincentlanglet/twig-cs-fixer": "^3.11.0"
|
||||
"symfony/browser-kit": "7.3.*",
|
||||
"symfony/css-selector": "7.3.*",
|
||||
"symfony/maker-bundle": "^1.64.0",
|
||||
"symfony/phpunit-bridge": "7.3.*",
|
||||
"symfony/stopwatch": "7.3.*",
|
||||
"symfony/web-profiler-bundle": "7.3.*",
|
||||
"thecodingmachine/phpstan-safe-rule": "^1.4.1",
|
||||
"vincentlanglet/twig-cs-fixer": "^3.10.0"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
@@ -100,8 +101,7 @@
|
||||
"symfony/polyfill-php81": "*",
|
||||
"symfony/polyfill-php82": "*",
|
||||
"symfony/polyfill-php83": "*",
|
||||
"symfony/polyfill-php84": "*",
|
||||
"symfony/polyfill-php85": "*"
|
||||
"symfony/polyfill-php84": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
@@ -122,7 +122,7 @@
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "7.4.*",
|
||||
"require": "7.3.*",
|
||||
"docker": true
|
||||
}
|
||||
}
|
||||
|
||||
2111
composer.lock
generated
2111
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,36 +1,31 @@
|
||||
when@prod:
|
||||
sentry:
|
||||
dsn: '%env(SENTRY_DSN)%'
|
||||
# Add request headers, cookies, IP address and the authenticated user
|
||||
# see https://docs.sentry.io/platforms/php/data-management/data-collected/ for more info
|
||||
# send_default_pii: true
|
||||
|
||||
options:
|
||||
# Add request headers, cookies, IP address and the authenticated user
|
||||
# see https://docs.sentry.io/platforms/php/data-management/data-collected/ for more info
|
||||
# send_default_pii: true
|
||||
traces_sample_rate: 1.0
|
||||
profiles_sample_rate: 1.0
|
||||
ignore_exceptions:
|
||||
- 'Symfony\Component\ErrorHandler\Error\FatalError'
|
||||
- 'Symfony\Component\Debug\Exception\FatalErrorException'
|
||||
#
|
||||
# # If you are using Monolog, you also need this additional configuration to log the errors correctly:
|
||||
# # https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
|
||||
|
||||
# If you are using Monolog, you also need this additional configuration to log the errors correctly:
|
||||
# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
|
||||
# register_error_listener: false
|
||||
# register_error_handler: false
|
||||
#
|
||||
|
||||
# monolog:
|
||||
# handlers:
|
||||
# # Use this only if you don't want to use structured logging and instead receive
|
||||
# # certain log levels as errors.
|
||||
# sentry:
|
||||
# type: sentry
|
||||
# level: !php/const Monolog\Logger::ERROR
|
||||
# hub_id: Sentry\State\HubInterface
|
||||
# fill_extra_context: true # Enables sending monolog context to Sentry
|
||||
# process_psr_3_messages: false # Disables the resolution of PSR-3 placeholders
|
||||
#
|
||||
# # Use this for structured log integration
|
||||
# sentry_logs:
|
||||
# type: service
|
||||
# id: Sentry\SentryBundle\Monolog\LogsHandler
|
||||
#
|
||||
|
||||
# Uncomment these lines to register a log message processor that resolves PSR-3 placeholders
|
||||
# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
|
||||
# services:
|
||||
# Sentry\SentryBundle\Monolog\LogsHandler:
|
||||
# arguments:
|
||||
# - !php/const Monolog\Logger::INFO
|
||||
# Monolog\Processor\PsrLogMessageProcessor:
|
||||
# tags: { name: monolog.processor, handler: sentry }
|
||||
|
||||
1636
config/reference.php
1636
config/reference.php
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,6 @@ return RectorConfig::configure()
|
||||
__DIR__.'/src',
|
||||
__DIR__.'/tests',
|
||||
])
|
||||
->withSkip([__DIR__.'/config/reference.php'])
|
||||
->withSymfonyContainerXml(__DIR__.'/var/cache/dev/Tvdt_KernelDevDebugContainer.xml')
|
||||
->withSymfonyContainerPhp(__DIR__.'/tests/symfony-container.php')
|
||||
->registerService(SymfonyRoutesProvider::class, SymfonyRoutesProviderInterface::class)
|
||||
|
||||
@@ -26,7 +26,6 @@ final class BackofficeController extends AbstractController
|
||||
public function __construct(
|
||||
private readonly SeasonRepository $seasonRepository,
|
||||
private readonly Security $security,
|
||||
private readonly QuizSpreadsheetService $excel,
|
||||
) {}
|
||||
|
||||
#[Route('/backoffice/', name: 'tvdt_backoffice_index')]
|
||||
@@ -69,9 +68,9 @@ final class BackofficeController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route('/backoffice/template', name: 'tvdt_backoffice_template', priority: 10)]
|
||||
public function getTemplate(): StreamedResponse
|
||||
public function getTemplate(QuizSpreadsheetService $excel): Response
|
||||
{
|
||||
$response = new StreamedResponse($this->excel->generateTemplate());
|
||||
$response = new StreamedResponse($excel->generateTemplate());
|
||||
$response->headers->set('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
||||
$response->headers->set('Content-Disposition', 'attachment; filename="template.xlsx"');
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace Tvdt\Controller\Backoffice;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
@@ -18,16 +17,14 @@ use Tvdt\Factory\EliminationFactory;
|
||||
|
||||
final class PrepareEliminationController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EliminationFactory $eliminationFactory) {}
|
||||
|
||||
#[Route(
|
||||
'/backoffice/season/{seasonCode:season}/quiz/{quiz}/elimination/prepare',
|
||||
name: 'tvdt_prepare_elimination',
|
||||
requirements: ['seasonCode' => self::SEASON_CODE_REGEX, 'quiz' => Requirement::UUID],
|
||||
)]
|
||||
public function index(Season $season, Quiz $quiz): RedirectResponse
|
||||
public function index(Season $season, Quiz $quiz, EliminationFactory $eliminationFactory): Response
|
||||
{
|
||||
$elimination = $this->eliminationFactory->createEliminationFromQuiz($quiz);
|
||||
$elimination = $eliminationFactory->createEliminationFromQuiz($quiz);
|
||||
|
||||
return $this->redirectToRoute('tvdt_prepare_elimination_view', ['elimination' => $elimination->id]);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ class QuizController extends AbstractController
|
||||
public function __construct(
|
||||
private readonly QuizRepository $quizRepository,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly QuizCandidateRepository $quizCandidateRepository,
|
||||
) {}
|
||||
|
||||
#[IsGranted(SeasonVoter::EDIT, subject: 'season')]
|
||||
@@ -72,10 +71,10 @@ class QuizController extends AbstractController
|
||||
name: 'tvdt_backoffice_quiz_clear',
|
||||
requirements: ['quiz' => Requirement::UUID],
|
||||
)]
|
||||
public function clearQuiz(Quiz $quiz): RedirectResponse
|
||||
public function clearQuiz(Quiz $quiz, QuizRepository $quizRepository): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->quizRepository->clearQuiz($quiz);
|
||||
$quizRepository->clearQuiz($quiz);
|
||||
$this->addFlash('success', $this->translator->trans('Quiz cleared'));
|
||||
} catch (ErrorClearingQuizException) {
|
||||
$this->addFlash('error', $this->translator->trans('Error clearing quiz'));
|
||||
@@ -90,9 +89,9 @@ class QuizController extends AbstractController
|
||||
name: 'tvdt_backoffice_quiz_delete',
|
||||
requirements: ['quiz' => Requirement::UUID],
|
||||
)]
|
||||
public function deleteQuiz(Quiz $quiz): RedirectResponse
|
||||
public function deleteQuiz(Quiz $quiz, QuizRepository $quizRepository): RedirectResponse
|
||||
{
|
||||
$this->quizRepository->deleteQuiz($quiz);
|
||||
$quizRepository->deleteQuiz($quiz);
|
||||
|
||||
$this->addFlash('success', $this->translator->trans('Quiz deleted'));
|
||||
|
||||
@@ -105,7 +104,7 @@ class QuizController extends AbstractController
|
||||
name: 'tvdt_backoffice_modify_correction',
|
||||
requirements: ['quiz' => Requirement::UUID, 'candidate' => Requirement::UUID],
|
||||
)]
|
||||
public function modifyCorrection(Quiz $quiz, Candidate $candidate, Request $request): RedirectResponse
|
||||
public function modifyCorrection(Quiz $quiz, Candidate $candidate, QuizCandidateRepository $quizCandidateRepository, Request $request): RedirectResponse
|
||||
{
|
||||
if (!$request->isMethod('POST')) {
|
||||
throw new MethodNotAllowedHttpException(['POST']);
|
||||
@@ -113,7 +112,7 @@ class QuizController extends AbstractController
|
||||
|
||||
$corrections = (float) $request->request->get('corrections');
|
||||
|
||||
$this->quizCandidateRepository->setCorrectionsForCandidate($quiz, $candidate, $corrections);
|
||||
$quizCandidateRepository->setCorrectionsForCandidate($quiz, $candidate, $corrections);
|
||||
|
||||
return $this->redirectToRoute('tvdt_backoffice_quiz', ['seasonCode' => $quiz->season->seasonCode, 'quiz' => $quiz->id]);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ class SeasonController extends AbstractController
|
||||
public function __construct(
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly QuizSpreadsheetService $quizSpreadsheet,
|
||||
) {}
|
||||
|
||||
#[IsGranted(SeasonVoter::EDIT, subject: 'season')]
|
||||
@@ -88,7 +87,7 @@ class SeasonController extends AbstractController
|
||||
requirements: ['seasonCode' => self::SEASON_CODE_REGEX],
|
||||
priority: 10,
|
||||
)]
|
||||
public function addQuiz(Request $request, Season $season): Response
|
||||
public function addQuiz(Request $request, Season $season, QuizSpreadsheetService $quizSpreadsheet): Response
|
||||
{
|
||||
$quiz = new Quiz();
|
||||
$form = $this->createForm(UploadQuizFormType::class, $quiz);
|
||||
@@ -99,7 +98,7 @@ class SeasonController extends AbstractController
|
||||
/* @var UploadedFile $sheet */
|
||||
$sheet = $form->get('sheet')->getData();
|
||||
|
||||
$this->quizSpreadsheet->xlsxToQuiz($quiz, $sheet);
|
||||
$quizSpreadsheet->xlsxToQuiz($quiz, $sheet);
|
||||
|
||||
$quiz->season = $season;
|
||||
$this->em->persist($quiz);
|
||||
|
||||
@@ -26,7 +26,7 @@ use function Symfony\Component\Translation\t;
|
||||
#[IsGranted('ROLE_USER')]
|
||||
final class EliminationController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator, private readonly CandidateRepository $candidateRepository) {}
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
#[IsGranted(SeasonVoter::ELIMINATION, 'elimination')]
|
||||
#[Route('/elimination/{elimination}', name: 'tvdt_elimination', requirements: ['elimination' => Requirement::UUID])]
|
||||
@@ -50,9 +50,9 @@ final class EliminationController extends AbstractController
|
||||
|
||||
#[IsGranted(SeasonVoter::ELIMINATION, 'elimination')]
|
||||
#[Route('/elimination/{elimination}/{candidateHash}', name: 'tvdt_elimination_candidate', requirements: ['elimination' => Requirement::UUID, 'candidateHash' => self::CANDIDATE_HASH_REGEX])]
|
||||
public function candidateScreen(Elimination $elimination, string $candidateHash): Response
|
||||
public function candidateScreen(Elimination $elimination, string $candidateHash, CandidateRepository $candidateRepository): Response
|
||||
{
|
||||
$candidate = $this->candidateRepository->getCandidateByHash($elimination->quiz->season, $candidateHash);
|
||||
$candidate = $candidateRepository->getCandidateByHash($elimination->quiz->season, $candidateHash);
|
||||
if (!$candidate instanceof Candidate) {
|
||||
$this->addFlash(FlashType::Warning,
|
||||
t('Cound not find candidate with name %name%', ['%name%' => Base64::base64UrlDecode($candidateHash)])->trans($this->translator),
|
||||
|
||||
@@ -15,17 +15,17 @@ use Tvdt\Enum\FlashType;
|
||||
#[AsController]
|
||||
final class LoginController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly AuthenticationUtils $authenticationUtils, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
#[Route(path: '/login', name: 'tvdt_login_login')]
|
||||
public function login(): Response
|
||||
public function login(AuthenticationUtils $authenticationUtils, TranslatorInterface $translator): Response
|
||||
{
|
||||
// get the login error if there is one
|
||||
$error = $this->authenticationUtils->getLastAuthenticationError();
|
||||
$error = $authenticationUtils->getLastAuthenticationError();
|
||||
|
||||
// last username entered by the user
|
||||
$lastUsername = $this->authenticationUtils->getLastUsername();
|
||||
$lastUsername = $authenticationUtils->getLastUsername();
|
||||
|
||||
if ($error instanceof AuthenticationException) {
|
||||
$this->addFlash(FlashType::Danger, $this->translator->trans($error->getMessageKey(), $error->getMessageData(), 'security'));
|
||||
$this->addFlash(FlashType::Danger, $translator->trans($error->getMessageKey(), $error->getMessageData(), 'security'));
|
||||
}
|
||||
|
||||
return $this->render('backoffice/login/login.html.twig', [
|
||||
|
||||
@@ -30,10 +30,10 @@ use Tvdt\Repository\SeasonRepository;
|
||||
#[AsController]
|
||||
final class QuizController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator, private readonly EntityManagerInterface $entityManager, private readonly SeasonRepository $seasonRepository, private readonly CandidateRepository $candidateRepository, private readonly QuestionRepository $questionRepository, private readonly AnswerRepository $answerRepository, private readonly QuizCandidateRepository $quizCandidateRepository) {}
|
||||
public function __construct(private readonly TranslatorInterface $translator, private readonly EntityManagerInterface $entityManager) {}
|
||||
|
||||
#[Route(path: '/', name: 'tvdt_quiz_select_season', methods: ['GET', 'POST'])]
|
||||
public function selectSeason(Request $request): Response
|
||||
public function selectSeason(Request $request, SeasonRepository $seasonRepository): Response
|
||||
{
|
||||
$form = $this->createForm(SelectSeasonType::class);
|
||||
$form->handleRequest($request);
|
||||
@@ -41,7 +41,7 @@ final class QuizController extends AbstractController
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$seasonCode = $form->get('season_code')->getData();
|
||||
|
||||
if ([] === $this->seasonRepository->findBy(['seasonCode' => $seasonCode])) {
|
||||
if ([] === $seasonRepository->findBy(['seasonCode' => $seasonCode])) {
|
||||
$this->addFlash(FlashType::Warning, $this->translator->trans('Invalid season code'));
|
||||
|
||||
return $this->redirectToRoute('tvdt_quiz_select_season');
|
||||
@@ -80,8 +80,12 @@ final class QuizController extends AbstractController
|
||||
Season $season,
|
||||
string $nameHash,
|
||||
Request $request,
|
||||
CandidateRepository $candidateRepository,
|
||||
QuestionRepository $questionRepository,
|
||||
AnswerRepository $answerRepository,
|
||||
QuizCandidateRepository $quizCandidateRepository,
|
||||
): Response {
|
||||
$candidate = $this->candidateRepository->getCandidateByHash($season, $nameHash);
|
||||
$candidate = $candidateRepository->getCandidateByHash($season, $nameHash);
|
||||
|
||||
if (!$candidate instanceof Candidate) {
|
||||
$this->addFlash(FlashType::Danger, $this->translator->trans('Candidate not found'));
|
||||
@@ -99,12 +103,11 @@ final class QuizController extends AbstractController
|
||||
|
||||
if ('POST' === $request->getMethod()) {
|
||||
// TODO: Extract saving answer logic to a service
|
||||
$answer = $this->answerRepository->findOneBy(['id' => $request->request->get('answer')]);
|
||||
$answer = $answerRepository->findOneBy(['id' => $request->request->get('answer')]);
|
||||
|
||||
if (!$answer instanceof Answer) {
|
||||
throw new BadRequestHttpException('Invalid Answer ID');
|
||||
}
|
||||
|
||||
$givenAnswer = new GivenAnswer($candidate, $answer->question->quiz, $answer);
|
||||
$this->entityManager->persist($givenAnswer);
|
||||
$this->entityManager->flush();
|
||||
@@ -114,7 +117,7 @@ final class QuizController extends AbstractController
|
||||
}
|
||||
|
||||
// TODO: Extract getting next question logic to a service
|
||||
$question = $this->questionRepository->findNextQuestionForCandidate($candidate);
|
||||
$question = $questionRepository->findNextQuestionForCandidate($candidate);
|
||||
|
||||
// Keep creating flash here based on the return type of service call
|
||||
if (!$question instanceof Question) {
|
||||
@@ -123,7 +126,7 @@ final class QuizController extends AbstractController
|
||||
return $this->redirectToRoute('tvdt_quiz_enter_name', ['seasonCode' => $season->seasonCode]);
|
||||
}
|
||||
|
||||
$this->quizCandidateRepository->createIfNotExist($quiz, $candidate);
|
||||
$quizCandidateRepository->createIfNotExist($quiz, $candidate);
|
||||
|
||||
// end of extracting getting next question logic
|
||||
return $this->render('quiz/question.twig', ['candidate' => $candidate, 'question' => $question, 'season' => $season]);
|
||||
|
||||
@@ -9,7 +9,6 @@ use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||
@@ -24,12 +23,15 @@ use Tvdt\Security\EmailVerifier;
|
||||
|
||||
final class RegistrationController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EmailVerifier $emailVerifier, private readonly TranslatorInterface $translator, private readonly UserPasswordHasherInterface $userPasswordHasher, private readonly Security $security, private readonly LoggerInterface $logger, private readonly UserRepository $userRepository) {}
|
||||
public function __construct(private readonly EmailVerifier $emailVerifier, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
#[Route('/register', name: 'tvdt_register')]
|
||||
public function register(
|
||||
Request $request,
|
||||
UserPasswordHasherInterface $userPasswordHasher,
|
||||
Security $security,
|
||||
EntityManagerInterface $entityManager,
|
||||
LoggerInterface $logger,
|
||||
): Response {
|
||||
$user = new User();
|
||||
$form = $this->createForm(RegistrationFormType::class, $user);
|
||||
@@ -39,7 +41,7 @@ final class RegistrationController extends AbstractController
|
||||
/** @var string $plainPassword */
|
||||
$plainPassword = $form->get('plainPassword')->getData();
|
||||
|
||||
$user->password = $this->userPasswordHasher->hashPassword($user, $plainPassword);
|
||||
$user->password = $userPasswordHasher->hashPassword($user, $plainPassword);
|
||||
|
||||
$entityManager->persist($user);
|
||||
$entityManager->flush();
|
||||
@@ -53,10 +55,10 @@ final class RegistrationController extends AbstractController
|
||||
->htmlTemplate('backoffice/registration/confirmation_email.html.twig'),
|
||||
);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
$this->logger->error($e->getMessage());
|
||||
$logger->error($e->getMessage());
|
||||
}
|
||||
|
||||
$response = $this->security->login($user, 'form_login', 'main');
|
||||
$response = $security->login($user, 'form_login', 'main');
|
||||
\assert($response instanceof Response);
|
||||
|
||||
return $response;
|
||||
@@ -68,7 +70,7 @@ final class RegistrationController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route('/verify/email', name: 'tvdt_verify_email')]
|
||||
public function verifyUserEmail(Request $request): RedirectResponse
|
||||
public function verifyUserEmail(Request $request, TranslatorInterface $translator, UserRepository $userRepository): Response
|
||||
{
|
||||
$id = $request->query->get('id');
|
||||
|
||||
@@ -76,7 +78,7 @@ final class RegistrationController extends AbstractController
|
||||
return $this->redirectToRoute('tvdt_register');
|
||||
}
|
||||
|
||||
$user = $this->userRepository->find($id);
|
||||
$user = $userRepository->find($id);
|
||||
|
||||
if (null === $user) {
|
||||
return $this->redirectToRoute('tvdt_register');
|
||||
@@ -86,7 +88,7 @@ final class RegistrationController extends AbstractController
|
||||
try {
|
||||
$this->emailVerifier->handleEmailConfirmation($request, $user);
|
||||
} catch (VerifyEmailExceptionInterface $verifyEmailException) {
|
||||
$this->addFlash('verify_email_error', $this->translator->trans($verifyEmailException->getReason(), [], 'VerifyEmailBundle'));
|
||||
$this->addFlash('verify_email_error', $translator->trans($verifyEmailException->getReason(), [], 'VerifyEmailBundle'));
|
||||
|
||||
return $this->redirectToRoute('tvdt_register');
|
||||
}
|
||||
|
||||
@@ -55,10 +55,6 @@ class Elimination
|
||||
|
||||
public function getScreenColour(?string $name): ?string
|
||||
{
|
||||
if (null === $name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->data[$name] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,18 +7,11 @@ namespace Tvdt\Enum;
|
||||
enum FlashType: string
|
||||
{
|
||||
case Primary = 'primary';
|
||||
|
||||
case Secondary = 'secondary';
|
||||
|
||||
case Success = 'success';
|
||||
|
||||
case Danger = 'danger';
|
||||
|
||||
case Warning = 'warning';
|
||||
|
||||
case Info = 'info';
|
||||
|
||||
case Light = 'light';
|
||||
|
||||
case Dark = 'dark';
|
||||
}
|
||||
|
||||
@@ -49,16 +49,12 @@ class QuizRepository extends ServiceEntityRepository
|
||||
DQL)
|
||||
->setParameter('quiz', $quiz)
|
||||
->execute();
|
||||
}
|
||||
// @codeCoverageIgnoreStart
|
||||
catch (\Throwable $throwable) {
|
||||
} catch (\Throwable $throwable) {
|
||||
$this->logger->error($throwable->getMessage());
|
||||
$em->rollback();
|
||||
throw new ErrorClearingQuizException(previous: $throwable);
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$em->commit();
|
||||
}
|
||||
|
||||
@@ -80,17 +76,17 @@ class QuizRepository extends ServiceEntityRepository
|
||||
c.id,
|
||||
c.name,
|
||||
sum(case when a.isRightAnswer = true then 1 else 0 end) as correct,
|
||||
qd.corrections,
|
||||
qc.corrections,
|
||||
max(ga.created) as end_time,
|
||||
qd.created as start_time,
|
||||
(sum(case when a.isRightAnswer = true then 1 else 0 end) + qd.corrections) as score
|
||||
qc.created as start_time,
|
||||
(sum(case when a.isRightAnswer = true then 1 else 0 end) + qc.corrections) as score
|
||||
from Tvdt\Entity\Candidate c
|
||||
join c.givenAnswers ga
|
||||
join ga.answer a
|
||||
join c.quizData qd
|
||||
where qd.quiz = :quiz and ga.quiz = :quiz
|
||||
group by ga.quiz, c.id, qd.id
|
||||
order by score desc, max(ga.created) - qd.created asc
|
||||
join c.quizData qc
|
||||
where qc.quiz = :quiz and ga.quiz = :quiz
|
||||
group by ga.quiz, c.id, qc.id
|
||||
order by score desc, max(ga.created) - qc.created asc
|
||||
DQL
|
||||
)->setParameter('quiz', $quiz)->getResult();
|
||||
|
||||
@@ -99,7 +95,7 @@ class QuizRepository extends ServiceEntityRepository
|
||||
name: $row['name'],
|
||||
correct: (int) $row['correct'],
|
||||
corrections: $row['corrections'],
|
||||
time: $row['start_time']->diff(new DateTimeImmutable($row['end_time'])),
|
||||
time: new DateTimeImmutable($row['end_time'])->diff($row['start_time']),
|
||||
score: $row['score'],
|
||||
), $result);
|
||||
}
|
||||
|
||||
11
symfony.lock
11
symfony.lock
@@ -84,27 +84,26 @@
|
||||
]
|
||||
},
|
||||
"phpunit/phpunit": {
|
||||
"version": "12.4",
|
||||
"version": "12.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "11.1",
|
||||
"ref": "1117deb12541f35793eec9fff7494d7aa12283fc"
|
||||
"version": "10.0",
|
||||
"ref": "bb22cf8d8c554a623b427d5f3416b538f5525233"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"bin/phpunit",
|
||||
"phpunit.dist.xml",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"sentry/sentry-symfony": {
|
||||
"version": "5.6",
|
||||
"version": "5.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "5.0",
|
||||
"ref": "b6cb4b34429dadecd7187852123be19d628fa37a"
|
||||
"ref": "c3decefe8a11a5da43adaf827a6cd66695586113"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/sentry.yaml"
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tvdt\Tests\Helpers;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Safe\Exceptions\UrlException;
|
||||
use Tvdt\Helpers\Base64;
|
||||
|
||||
final class Base64Test extends TestCase
|
||||
{
|
||||
public function testBase64UrlEncode(): void
|
||||
{
|
||||
$this->assertSame('TWFyaWpu', Base64::base64UrlEncode('Marijn'));
|
||||
$this->assertSame('UGhpbGluZQ', Base64::base64UrlEncode('Philine'));
|
||||
|
||||
$this->assertSame('_g', Base64::base64UrlEncode(\chr(254)));
|
||||
$this->assertSame('-g', Base64::base64UrlEncode(\chr(250)));
|
||||
}
|
||||
|
||||
public function testBase64UrlDecode(): void
|
||||
{
|
||||
$this->assertSame('Marijn', Base64::base64UrlDecode('TWFyaWpu'));
|
||||
$this->assertSame('Philine', Base64::base64UrlDecode('UGhpbGluZQ'));
|
||||
|
||||
$this->assertSame(\chr(254), Base64::base64UrlDecode('_g'));
|
||||
$this->assertSame(\chr(250), Base64::base64UrlDecode('-g'));
|
||||
}
|
||||
|
||||
public function testBase64UrlDecodeCanHandlePadding(): void
|
||||
{
|
||||
$this->assertSame('Philine', Base64::base64UrlDecode('UGhpbGluZQ=='));
|
||||
}
|
||||
|
||||
public function testBase64UrlDecodeThrowsExceptionOnInvalidInput(): void
|
||||
{
|
||||
$this->expectException(UrlException::class);
|
||||
Base64::base64UrlDecode('Philine==');
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ namespace Tvdt\Tests\Repository;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use Symfony\Component\Clock\MockClock;
|
||||
use Tvdt\Entity\Answer;
|
||||
use Tvdt\Entity\GivenAnswer;
|
||||
use Tvdt\Entity\Question;
|
||||
use Tvdt\Entity\Quiz;
|
||||
use Tvdt\Entity\QuizCandidate;
|
||||
use Tvdt\Repository\GivenAnswerRepository;
|
||||
@@ -49,166 +46,20 @@ final class QuizRepositoryTest extends DatabaseTestCase
|
||||
$this->assertCount(1, $krtekSeason->quizzes);
|
||||
}
|
||||
|
||||
public function testTimeForCandidate(): void
|
||||
public function testGetScores(): void
|
||||
{
|
||||
$clock = new MockClock('2025-11-01 16:00:00');
|
||||
self::getContainer()->set(ClockInterface::class, $clock);
|
||||
$krtekSeason = $this->getSeasonByCode('krtek');
|
||||
$candidate = $this->getCandidateBySeasonAndName($krtekSeason, 'Iris');
|
||||
|
||||
$quiz = $krtekSeason->activeQuiz;
|
||||
$this->assertInstanceOf(Quiz::class, $quiz);
|
||||
|
||||
// Start Quiz
|
||||
$qc = new QuizCandidate($quiz, $candidate);
|
||||
$qc = new QuizCandidate($krtekSeason->activeQuiz, $candidate);
|
||||
$this->entityManager->persist($qc);
|
||||
$this->entityManager->flush();
|
||||
|
||||
for ($i = 0; $i < 15; ++$i) {
|
||||
$question = $this->questionRepository->findNextQuestionForCandidate($candidate);
|
||||
$this->assertInstanceOf(Question::class, $question);
|
||||
dump($qc->created);
|
||||
|
||||
$answer = $question->answers->first();
|
||||
$this->assertInstanceOf(Answer::class, $answer);
|
||||
|
||||
$clock->sleep(10 + $i);
|
||||
$qa = new GivenAnswer($candidate, $quiz, $answer);
|
||||
$this->entityManager->persist($qa);
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
$result = $this->quizRepository->getScores($quiz);
|
||||
|
||||
$this->assertSame('Iris', $result[0]->name);
|
||||
$this->assertSame(5, $result[0]->correct);
|
||||
$this->assertEqualsWithDelta(5.0, $result[0]->score, \PHP_FLOAT_EPSILON);
|
||||
|
||||
$this->assertSame(4, $result[0]->time->i);
|
||||
$this->assertSame(15, $result[0]->time->s);
|
||||
}
|
||||
|
||||
public function testScoresAreCalculatedCorrectly(): void
|
||||
{
|
||||
$clock = new MockClock('2025-11-01 16:00:00');
|
||||
self::getContainer()->set(ClockInterface::class, $clock);
|
||||
$krtekSeason = $this->getSeasonByCode('krtek');
|
||||
$candidate1 = $this->getCandidateBySeasonAndName($krtekSeason, 'Iris');
|
||||
$candidate2 = $this->getCandidateBySeasonAndName($krtekSeason, 'Philine');
|
||||
|
||||
$quiz = $krtekSeason->activeQuiz;
|
||||
$this->assertInstanceOf(Quiz::class, $quiz);
|
||||
|
||||
$qc1 = new QuizCandidate($quiz, $candidate1);
|
||||
$qc2 = new QuizCandidate($quiz, $candidate2);
|
||||
$this->entityManager->persist($qc1);
|
||||
$this->entityManager->persist($qc2);
|
||||
$this->entityManager->flush();
|
||||
|
||||
for ($i = 0; $i < 15; ++$i) {
|
||||
$question = $this->questionRepository->findNextQuestionForCandidate($candidate1);
|
||||
$this->assertInstanceOf(Question::class, $question);
|
||||
|
||||
$answer1 = $question->answers->first();
|
||||
$answer2 = $question->answers[intdiv(\count($question->answers), 2)];
|
||||
$this->assertInstanceOf(Answer::class, $answer1);
|
||||
$this->assertInstanceOf(Answer::class, $answer2);
|
||||
|
||||
$clock->sleep(10);
|
||||
|
||||
$qa = new GivenAnswer($candidate1, $quiz, $answer1);
|
||||
$this->entityManager->persist($qa);
|
||||
$qa = new GivenAnswer($candidate2, $quiz, $answer2);
|
||||
$this->entityManager->persist($qa);
|
||||
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
$scores = $this->quizRepository->getScores($quiz);
|
||||
$this->assertCount(2, $scores);
|
||||
$this->assertSame('Iris', $scores[0]->name);
|
||||
$this->assertSame('Philine', $scores[1]->name);
|
||||
$this->assertEqualsWithDelta(5.0, $scores[0]->score, \PHP_FLOAT_EPSILON);
|
||||
$this->assertEqualsWithDelta(4.0, $scores[1]->score, \PHP_FLOAT_EPSILON);
|
||||
}
|
||||
|
||||
public function testCorrectionsCalculatedCorrectly(): void
|
||||
{
|
||||
$clock = new MockClock('2025-11-01 16:00:00');
|
||||
self::getContainer()->set(ClockInterface::class, $clock);
|
||||
$krtekSeason = $this->getSeasonByCode('krtek');
|
||||
$candidate = $this->getCandidateBySeasonAndName($krtekSeason, 'Iris');
|
||||
|
||||
$quiz = $krtekSeason->activeQuiz;
|
||||
$this->assertInstanceOf(Quiz::class, $quiz);
|
||||
|
||||
$qc = new QuizCandidate($quiz, $candidate);
|
||||
$this->entityManager->persist($qc);
|
||||
$this->entityManager->flush();
|
||||
|
||||
for ($i = 0; $i < 15; ++$i) {
|
||||
$question = $this->questionRepository->findNextQuestionForCandidate($candidate);
|
||||
$this->assertInstanceOf(Question::class, $question);
|
||||
|
||||
$answer = $question->answers->first();
|
||||
$this->assertInstanceOf(Answer::class, $answer);
|
||||
|
||||
$clock->sleep(10);
|
||||
$qa = new GivenAnswer($candidate, $quiz, $answer);
|
||||
$this->entityManager->persist($qa);
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
$qc->corrections = 2;
|
||||
$this->entityManager->flush();
|
||||
|
||||
$result = $this->quizRepository->getScores($quiz);
|
||||
|
||||
$this->assertEqualsWithDelta(7.0, $result[0]->score, \PHP_FLOAT_EPSILON);
|
||||
}
|
||||
|
||||
public function testCandidatesWithSameScoreAreSortedCorrectlyByTime(): void
|
||||
{
|
||||
$clock = new MockClock('2025-11-01 16:00:00');
|
||||
self::getContainer()->set(ClockInterface::class, $clock);
|
||||
$krtekSeason = $this->getSeasonByCode('krtek');
|
||||
$candidate1 = $this->getCandidateBySeasonAndName($krtekSeason, 'Iris');
|
||||
$candidate2 = $this->getCandidateBySeasonAndName($krtekSeason, 'Philine');
|
||||
|
||||
$quiz = $krtekSeason->activeQuiz;
|
||||
$this->assertInstanceOf(Quiz::class, $quiz);
|
||||
|
||||
$qc1 = new QuizCandidate($quiz, $candidate1);
|
||||
$this->entityManager->persist($qc1);
|
||||
$clock->sleep(10);
|
||||
$qc2 = new QuizCandidate($quiz, $candidate2);
|
||||
$this->entityManager->persist($qc2);
|
||||
$this->entityManager->flush();
|
||||
|
||||
for ($i = 0; $i < 15; ++$i) {
|
||||
$question = $this->questionRepository->findNextQuestionForCandidate($candidate1);
|
||||
$this->assertInstanceOf(Question::class, $question);
|
||||
|
||||
$answer1 = $question->answers->first();
|
||||
$answer2 = $question->answers->last();
|
||||
$this->assertInstanceOf(Answer::class, $answer1);
|
||||
$this->assertInstanceOf(Answer::class, $answer2);
|
||||
|
||||
$clock->sleep(10);
|
||||
|
||||
$qa = new GivenAnswer($candidate1, $quiz, $answer1);
|
||||
$this->entityManager->persist($qa);
|
||||
|
||||
$qa = new GivenAnswer($candidate2, $quiz, $answer2);
|
||||
$this->entityManager->persist($qa);
|
||||
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
$result = $this->quizRepository->getScores($quiz);
|
||||
|
||||
$this->assertEqualsWithDelta(5.0, $result[0]->score, \PHP_FLOAT_EPSILON);
|
||||
$this->assertEqualsWithDelta(5.0, $result[1]->score, \PHP_FLOAT_EPSILON);
|
||||
$this->assertSame('Philine', $result[0]->name);
|
||||
$this->assertSame('Iris', $result[1]->name);
|
||||
$this->markTestIncomplete('TODO: Make fixtures first and write good test.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,6 @@ final class SeasonVoterTest extends TestCase
|
||||
{
|
||||
$user = new User();
|
||||
$user->roles = ['ROLE_ADMIN'];
|
||||
|
||||
$token = $this->createStub(TokenInterface::class);
|
||||
$token->method('getUser')->willReturn($user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user