[
  {
    "path": ".gitignore",
    "content": "/vendor/\ncomposer.lock"
  },
  {
    "path": ".travis.yml",
    "content": "language: php\n\nphp:\n  - 7.0\n\nbefore_script:\n  - composer install --prefer-source\n\nscript: vendor/bin/yaml-linter ./data/\n\nnotifications:\n  email:\n    - andrieu.travail@gmail.com"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing\n============\n\n# Important notes\n\nHere are some important notes before you contribute to Certificationy Symfony Pack:\n\n* For legal reasons, you *MUST* have never passed the Symfony certification yet,\n* All questions existing in Certificationy are not copied from a certification exam,\n* You are not allowed to use the questions from the [Unofficial self-study guide](https://leanpub.com/symfony-selfstudy).\n\n# Add questions\n\nThe official SensioLabs Symfony Certification contains 75 randomly chosen questions and is 90 minutes long. The examination covers the following topics:\n\n* PHP\n* HTTP\n* Architecture\n* Standardization\n* Bundles\n* Controllers\n* Routing\n* Twig\n* Forms\n* Validation\n* Dependency Injection\n* Security\n* HTTP Caching\n* Command Line Interface\n* Automated testing\n* Miscellaneous (error handling, code debugging)\n\nfrom [Official Symfony certification](https://certification.symfony.com/).\n\nYou can add questions to each category. There are three types of questions:\n\n* True/false questions\n* Single answer questions\n* Multiple answers questions\n\n*There are no open questions or any lines of code to write.*\n\nTo contribute to the Symfony Pack, you can add questions in each category in YAML:\n\n```yaml\n-\n    question: 'What is the prefix of environment variables used by Symfony?'\n    answers:\n        - {value: \"SYMFONY__\", correct: true}\n        - {value: \"SF__\",      correct: false}\n        - {value: \"SYMFONY-\",  correct: false}\n        - {value: \"SF-\",       correct: false}\n```\n\nCheck if the question is not present, to avoid duplications.\n\nFinally, validate your YAML files: you can use the built-in command of Symfony:\n\n```bash\n$ php app/console lint:yaml /path/to/your/yaml/file.yaml\n```\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2013-2014 Vincent Composieux <vincent.composieux@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"certificationy/symfony-pack\",\n    \"type\": \"certificationy-pack\",\n    \"description\": \"A series of questions to prepare for the certification Symfony2\",\n    \"keywords\": [\"symfony\", \"certification\", \"test\", \"exam\"],\n    \"homepage\": \"http://github.com/certificationy/symfony-pack\",\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"Mickaël Andrieu\",\n            \"email\": \"andrieu.travail@gmail.com\"\n        }\n    ],\n    \"require-dev\": {\n        \"certificationy/yaml-linter\": \"v1.0.1\"\n    }\n}\n\n"
  },
  {
    "path": "data/architecture.yml",
    "content": "category: Architecture\nquestions:\n    -\n        question: 'What is the path to set session cookie_lifetime parameter in a project configuration?'\n        answers:\n            - {value: framework.session.cookie_lifetime,    correct: true}\n            - {value: framework.session.cookie.lifetime,    correct: false}\n            - {value: framework.parameters.cookie_lifetime, correct: false}\n            - {value: framework.cookie_lifetime,            correct: false}\n        help: |\n            'https://symfony.com/doc/current/reference/configuration/framework.html'\n    -\n        question: 'Which design pattern implements the EventDispatcher component?'\n        answers:\n            - {value: Adapter,     correct: false}\n            - {value: Decorator,   correct: false}\n            - {value: Observer,    correct: true}\n            - {value: Mediator,    correct: true}\n        help: |\n            'https://symfony.com/doc/current/components/event_dispatcher.html#introduction'\n    -\n        question: 'What is the right parameter path to set a version number for assets?'\n        answers:\n            - {value: \"framework.assets.version: v2\",        correct: true}\n            - {value: \"framework.assets.version_number: v2\",        correct: false}\n            - {value: \"framework.templating.version: v2\", correct: false}\n            - {value: \"framework.templating.version_number: v2\", correct: false}\n            - {value: \"framework.twig.version: v2\",              correct: false}\n            - {value: \"framework.twig.version_number: v2\",              correct: false}\n        help: |\n             'https://symfony.com/doc/current/reference/configuration/framework.html#version'\n    -\n        question: 'Which method from EventSubscriberInterface return array of events that subscriber wants to listen to?'\n        answers:\n            - {value: \"getEvents()\",                     correct: false}\n            - {value: \"getSubscribedEvents()\",           correct: true}\n            - {value: \"getSubscribed()\",                 correct: false}\n            - {value: \"getSubscribedEventsList()\",       correct: false}\n        help: |\n            'https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-subscriber'\n\n    -\n        question: 'Which method from Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface forwarding an event to all registered listeners?'\n        answers:\n            - {value: \"dispatch(object $event, string $eventName = null): object\",          correct: true}\n            - {value: \"send(object $event, string $eventName = null): object\",              correct: false}\n            - {value: \"fire(object $event, string $eventName = null): object\",              correct: false}\n            - {value: \"sendOff(object $event, string $eventName = null): object\",           correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/event_dispatcher.html#dispatch-the-event'\n    -\n        question: 'Which method of the Symfony\\Component\\EventDispatcher\\EventDispatcherInterface belongs to its parent Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface'\n        answers:\n            - {value: 'dispatch(object $event, string $eventName = null): object', correct: true}\n            - {value: 'addListener(string $eventName, $listener, int $priority = 0)', correct: false}\n            - {value: 'hasListeners(string $eventName = null)', correct: false}\n            - {value: 'removeListener(string $eventName, $listener)', correct: false}\n        help: |\n            'source file vendor/symfony/event-dispatcher(-contracts)/EventDispatcherInterface.php'\n    -\n        question: 'Which method allows to prevent any other Event listeners from being called?'\n        answers:\n            - {value: \"stopPropagation()\",   correct: true}\n            - {value: \"preventDefault()\",    correct: false}\n            - {value: \"stop()\",              correct: false}\n            - {value: \"off()\",               correct: false}\n        help: |\n              'https://symfony.com/doc/current/components/event_dispatcher.html#stopping-event-flow-propagation'\n    -\n        question: 'Is it possible to detect if an Event was stopped during runtime?'\n        answers:\n            - {value: \"no\",                  correct: false}\n            - {value: \"yes\",                 correct: true}\n            - {value: \"yes, but not always\", correct: false}\n            - {value: \"yes, but only once\",  correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/event_dispatcher.html#stopping-event-flow-propagation'\n    -\n        question: 'Using FrameworkBundle configuration, what is the correct path to fill proxies IP?'\n        answers:\n            - {value: \"trusted_proxies\", correct: true}\n            - {value: \"proxies_trusted\", correct: false}\n            - {value: \"proxies\",         correct: false}\n            - {value: \"proxies_list\",    correct: false}\n        help: |\n            'trusted_proxies was removed in 3.3, method setTrustedProxies now used https://symfony.com/doc/current/reference/configuration/framework.html#trusted-proxies'\n    -\n        question: 'Using FrameworkBundle configuration, what is the default framework.assets.version_format value?'\n        answers:\n            - {value: \"%%s?%%s\", correct: true}\n            - {value: \"%s?%s\",   correct: false}\n            - {value: \"?%%s\",    correct: false}\n            - {value: \"?%s\",     correct: false}\n        help: |\n             'https://symfony.com/doc/current/reference/configuration/framework.html#version-format'\n    -\n        question: 'Instantiating a new Symfony\\Component\\HttpKernel\\Kernel, what is the correct arguments order?'\n        answers:\n            - {value: \"public function __construct(string $environment, bool $debug)\",               correct: true}\n            - {value: \"public function __construct(bool $debug, string $environment)\",               correct: false}\n            - {value: \"public function __construct(string $name, string $environment, bool $debug)\",        correct: false}\n            - {value: \"public function __construct(string $environment, bool $debug, string $name = null)\", correct: false}\n        help: |\n            'https://github.com/symfony/symfony/blob/4.2/src/Symfony/Component/HttpKernel/Kernel.php'\n\n    -\n        question: 'What is the prefix of environment variables used by Symfony?'\n        answers:\n            - {value: \"APP__\", correct: true}\n            - {value: \"APP--\", correct: false}\n            - {value: \"SYMFONY__\", correct: false}\n            - {value: \"SF__\",      correct: false}\n            - {value: \"SYMFONY-\",  correct: false}\n            - {value: \"SF-\",       correct: false}\n        help: |\n            'no answer found, however, for symfonycloud, the prefix is SYMFONY_ https://symfony.com/doc/current/cloud/cookbooks/env.html#symfonycloud-environment-variables'\n             in Symfony 5, this is achieved by using env vars https://symfony.com/doc/current/configuration.html#configuration-based-on-environment-variables'\n    -\n        question: 'According to Symfony best practices, ____ is/are located in _____ file/folder.'\n        answers:\n            - {value: \"templates, /\",                                      correct: true}\n            - {value: \"Controller, src/\",                                  correct: true}\n            - {value: \"services, config/services.yaml\",                    correct: true}\n            - {value: \"routes, config/routes.yaml\",                        correct: true}\n            - {value: \"templates, src/\",                                   correct: false}\n            - {value: \"assets, public/\",                                   correct: false}\n            - {value: \"services, src/Resources/services.yaml\",             correct: false}\n            - {value: \"translations, Resources/translations/\",             correct: false}\n        help: |\n            'https://symfony.com/doc/current/best_practices.html#use-the-default-directory-structure\n             however, routes are recommended to be defined as annotations and assets are stored in public/build folder'\n    -\n        question: 'Where can you find the file `form_table_layout.html.twig` ?'\n        answers:\n            - {value: \"In Twig Bundle\",                                         correct: false}\n            - {value: \"In Twig Bridge\",                                         correct: true}\n            - {value: \"In FrameworkExtraBundle\",                                correct: false}\n        help: |\n            'https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig'\n    -\n        question: 'If you pass 0 (zero) as third parameter (int $indent) in \\Symfony\\Component\\Yaml\\Yaml::dump, the generated YAML string will be indented with tabs'\n        answers:\n            - {value: \"True\", correct: false}\n            - {value: \"False\", correct: true}\n        help:\n            'tabs are not allowed in yaml https://yaml.org/faq.html'\n\n    -\n        question: 'Symfony is released under which license ?'\n        answers:\n            - {value: \"GNU General Public License (GPL)\", correct: false}\n            - {value: \"ISC License\", correct: false}\n            - {value: \"BSD license\", correct: false}\n            - {value: \"MIT license\", correct: true}\n        help: |\n            'https://symfony.com/doc/current/contributing/code/license.html'\n    -\n        question: 'Which kernel event exist ?'\n        answers:\n            - {value: \"kernel.request\", correct: true}\n            - {value: \"kernel.controller\", correct: true}\n            - {value: \"kernel.template\", correct: false}\n            - {value: \"kernel.view\", correct: true}\n            - {value: \"kernel.response\", correct: true}\n            - {value: \"kernel.answer\", correct: false}\n            - {value: \"kernel.finish_request\", correct: true}\n            - {value: \"kernel.start_request\", correct: false}\n            - {value: \"kernel.terminate\", correct: true}\n            - {value: \"kernel.start\", correct: false}\n            - {value: \"kernel.exception\", correct: true}\n        help: |\n            'https://symfony.com/doc/current/components/http_kernel.html#creating-an-event-listener'\n    -\n        question: 'Arguments are resolved before calling the Controller ?'\n        answers:\n            - {value: \"yes\", correct: true}\n            - {value: \"no\", correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/http_kernel.html#the-workflow-of-a-request'\n    -\n        question: 'How do you detect if an Event was stopped during runtime?'\n        answers:\n            - {value: \"$event->isPropagationStopped()\", correct: true}\n            - {value: \"$event->isStopped()\", correct: false}\n            - {value: \"$event->isPropagationStop()\", correct: false}\n            - {value: \"$event->isStop()\", correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/event_dispatcher.html#stopping-event-flow-propagation'\n\n    -\n        question: 'What is/are the recommended way to create a new Symfony web application'\n        answers:\n            - {value: \"Symfony installer\", correct: false}\n            - {value: \"composer create-project symfony/skeleton my_project_name\", correct: true}\n            - {value: \"composer new-project symfony/skeleton my_project_name\", correct: false}\n            - {value: \"php bin/console new-project my_project_name\", correct: false}\n            - {value: \"symfony new my_project_name --full\", correct: true}\n        help: |\n            'https://symfony.com/doc/4.0/setup/flex.html#using-symfony-flex-in-new-applications'\n\n    -\n        question: 'Using Flex is mandatory since Symfony 4.0'\n        answers:\n            - {value: \"False\", correct: true}\n            - {value: \"True\", correct: false}\n        help: |\n            'https://symfony.com/doc/4.0/setup/flex.html#upgrading-existing-applications-to-flex'\n\n    -\n        question: 'Which file should be edited in order to customize the default server error page ?'\n        answers:\n            - {value: \"templates/bundles/TwigBundle/Exception/error.html.twig\", correct: true}\n            - {value: \"templates/bundles/TwigBundle/Exception/error500.html.twig\", correct: false}\n            - {value: \"src/Controller/ExceptionController\", correct: false}\n        help: |\n            'https://symfony.com/doc/current/controller/error_pages.html#overriding-the-default-error-templates'\n\n#    -\n#        question: ''\n#        answers:\n#            - {value: \"\", correct: }\n#            - {value: \"\", correct: }\n#            - {value: \"\", correct: }\n#            - {value: \"\", correct: }\n#            - {value: \"\", correct: }\n#        help: |\n#            ''\n\n"
  },
  {
    "path": "data/automated-tests.yml",
    "content": "category: Automated tests\nquestions:\n    -\n        question: 'Using PHPUnit, which method names are used to share test setup code?'\n        answers:\n            - {value: setUp(),       correct: true}\n            - {value: __construct(), correct: false}\n            - {value: shutdown(),    correct: false}\n            - {value: tearDown(),    correct: true}\n        help: |\n            'https://www.w3resource.com/php/PHPUnit/fixtures.php'\n\n    -\n        question: 'How to disable constructor when mocking an object?'\n        answers:\n            - {value: $this->getMock('My\\Class')->disableOriginalConstructor()->getMock(),        correct: false}\n            - {value: $this->disableOriginalConstructor('My\\Class'),                              correct: false}\n            - {value: $this->getMockBuilder('My\\Class')->disableOriginalConstructor()->getMock(), correct: true}\n            - {value: $this->getMockBuilder('My\\Class')->getMock()->disableConstructor(),         correct: false}\n        help: |\n            'https://phpunit.de/manual/6.5/en/test-doubles.html#test-doubles.stubs.examples.StubTest2.php'\n    -\n        question: 'Which Symfony class offers method to test commands?'\n        answers:\n            - {value: Symfony\\Component\\Console\\Tester\\Command,           correct: false}\n            - {value: Symfony\\Component\\Console\\Tester\\CommandTester,     correct: true}\n            - {value: Symfony\\Component\\Console\\Tester\\CommandUnitTester, correct: false}\n            - {value: Symfony\\Component\\Console\\Tester\\CommandUnit,       correct: false}\n        help: |\n            'https://symfony.com/doc/current/console.html#testing-commands'\n    -\n        question: 'Using PHPUnit, which method allows to specify a mock response on second call?'\n        answers:\n            - {value: $mock->expects($this->at(1)),      correct: true}\n            - {value: $mock->expects($this->at(2)),      correct: false}\n            - {value: $mock->expects($this->exactly(2)), correct: false}\n            - {value: $mock->expects($this->on(2)),      correct: false}\n        help: |\n            'https://phpunit.de/manual/6.5/en/test-doubles.html'\n    -\n        question: 'Using PHPUnit, which method allows you to expect an exception to be thrown?'\n        answers:\n            - {value: $this->setExpectedException('MyException'), correct: false}\n            - {value: $this->setExceptionExpected('MyException'), correct: false}\n            - {value: $this->expectException('MyException'),      correct: true}\n            - {value: $this->setExpected('MyException'),          correct: false}\n        help: |\n            'https://phpunit.de/manual/6.5/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.exceptions'\n\n    -\n        question: 'What command used for run all of your application tests by default?'\n        answers:\n            - {value: phpunit -c app/,  correct: false}\n            - {value: phpunit app/,     correct: false}\n            - {value: phpunit -c,       correct: false}\n            - {value: phpunit,          correct: true}\n        help: |\n            'https://symfony.com/doc/current/testing.html#unit-tests'\n    -\n        question: 'Where live functional tests in Symfony (inside a project structure)?'\n        answers:\n            - {value: Tests/,               correct: false}\n            - {value: Tests/Controller/,    correct: true}\n            - {value: Tests/Functional/,    correct: false}\n            - {value: Tests/Functional/Controller,    correct: false}\n            - {value: Tests/Functional/Controllers,    correct: false}\n            - {value: Tests/Controllers/,   correct: false}\n            - {value: Controller/,          correct: false}\n        help: |\n            'https://symfony.com/doc/current/testing.html#your-first-functional-test'\n    -\n        question: 'Using Symfony\\Component\\BrowserKit\\Client which of these methods can be called?'\n        answers:\n            - {value: back(),     correct: true}\n            - {value: forward(),  correct: true}\n            - {value: insulate(), correct: true}\n            - {value: restart(),  correct: true}\n            - {value: followRedirect(),  correct: true}\n            - {value: reload(),  correct: true}\n            - {value: next(),     correct: false}\n        help: |\n            'https://github.com/symfony/browser-kit/blob/master/AbstractBrowser.php'\n    -\n        question: 'Using Swiftmailer, which of these configuration allows to disable email delivery?'\n        answers:\n            - {value: 'swiftmailer.disable_delivery: true', correct: true}\n            - {value: 'swiftmailer.delivery: false',        correct: false}\n            - {value: 'swiftmailer.delivery_disable: false',        correct: false}\n            - {value: 'framework.mailer.dsn: null://null',        correct: false}\n            - {value: 'framework.mailer.dsn: null',        correct: false}\n            - {value: 'framework.mailer.dsn: false',        correct: false}\n        help: |\n            'https://symfony.com/doc/current/email.html#disabling-sending'\n\n    -\n        question: 'Using the Crawler client, how to follow a redirection ?'\n        answers:\n            - {value: $client->redirect(),          correct: false}\n            - {value: $client->followRedirect(),    correct: true}\n            - {value: $client->followRedirects(),   correct: true}\n            - {value: $client->redirectAll(),       correct: false}\n        help: |\n            'followRedirects() is tricky as it will follow ALL redirections. https://symfony.com/doc/current/testing.html#redirecting'\n"
  },
  {
    "path": "data/cache-http.yml",
    "content": "category: HTTP Cache\nquestions:\n    -\n        question: 'What is the correct way to render a ESI tag using HTML?'\n        answers:\n            - {value: <include:esi src=\"http://...\" />, correct: false}\n            - {value: <esi:include src=\"http://...\" />, correct: true}\n            - {value: <include src=\"http://...\" />,     correct: false}\n            - {value: <esi src=\"http://...\" />,         correct: false}\n        help: |\n            'https://symfony.com/doc/current/http_cache/esi.html'\n\n    -\n        question: 'What is the Twig function to render an ESI?'\n        answers:\n            - {value: cache_esi(),  correct: false}\n            - {value: esi_cache(),  correct: false}\n            - {value: esi_render(), correct: false}\n            - {value: render_esi(), correct: true}\n        help: |\n            'https://symfony.com/doc/current/http_cache/esi.html'\n\n    -\n        question: 'Which HTTP headers belongs to expiration cache model?'\n        answers:\n            - {value: Expires,       correct: true}\n            - {value: Last-Modified, correct: false}\n            - {value: ETag,          correct: false}\n            - {value: Cache-Control, correct: true}\n            - {value: Cookie,        correct: false}\n        help: |\n            'https://symfony.com/doc/current/http_cache/expiration.html'\n    -\n        question: 'Which HTTP headers belongs to validation cache model?'\n        answers:\n            - {value: Expires,       correct: false}\n            - {value: Last-Modified, correct: true}\n            - {value: ETag,          correct: true}\n            - {value: Cache-Control, correct: false}\n            - {value: Cookie,        correct: false}\n        help: |\n            'https://symfony.com/doc/current/http_cache/validation.html'\n    -\n        question: 'Which HTTP status code must be returned if the cache is still valid ?'\n        answers:\n            - {value: '304', correct: true}\n            - {value: '200', correct: false}\n            - {value: '202', correct: false}\n            - {value: '300', correct: false}\n            - {value: '305', correct: false}\n    -\n        question: 'True or False ? ESI need to be activated in configuration.'\n        answers:\n            - {value: \"True\",     correct: true}\n            - {value: \"False\",    correct: false}\n        help: |\n            'https://symfony.com/doc/current/http_cache/esi.html'\n    -\n        question: 'According to HTTP/1.1 what is the max value for Expires ?'\n        answers:\n            - {value: \"one year\", correct: true}\n            - {value: \"one month\", correct: false}\n            - {value: \"one week\", correct: false}\n            - {value: \"There is not limit\", correct: false}\n        help:\n            'https://symfony.com/doc/current/http_cache/expiration.html#expiration-with-the-expires-header'\n    -\n        question: 'True or False ? You can use both validation and expiration within the same Response.'\n        answers:\n            - {value: \"True\",     correct: true}\n            - {value: \"False\",    correct: false}\n        help: |\n            'https://symfony.com/doc/current/http_cache/expiration.html'\n    -\n        question: 'True or False ? Using ETag saves CPU cycles.'\n        answers:\n            - {value: \"True\",     correct: false}\n            - {value: \"False\",    correct: true}\n        help: |\n            'https://symfony.com/doc/current/http_cache/validation.html#validation-with-the-etag-header'\n"
  },
  {
    "path": "data/command-line.yml",
    "content": "category: The Command Line\nquestions:\n    -\n        question: 'Which helper is not available in the Console component?'\n        answers:\n            - {value: QuestionHelper, correct: false}\n            - {value: Table,    correct: false}\n            - {value: FormatterHelper,    correct: false}\n            - {value: ProcessHelper,    correct: false}\n            - {value: Progress Bar,    correct: false}\n            - {value: Debug formatter helper,    correct: false}\n            - {value: FileHelper,     correct: true}\n            - {value: DialogHelper,   correct: true}\n            - {value: InformationHelper,   correct: true}\n        help: |\n            'https://symfony.com/doc/current/components/console/helpers/index.html'\n    -\n        question: 'Which event is not available in the Console Component?'\n        answers:\n            - {value: ConsoleEvents::COMMAND,   correct: false}\n            - {value: ConsoleEvents::TERMINATE, correct: false}\n            - {value: ConsoleEvents::ERROR, correct: false}\n            - {value: ConsoleEvents::LAUNCH,    correct: true}\n            - {value: ConsoleEvents::START,    correct: true}\n            - {value: ConsoleEvents::BEGIN,    correct: true}\n            - {value: ConsoleEvents::END,    correct: true}\n            - {value: ConsoleEvents::EXCEPTION,    correct: true}\n        help: |\n            'https://symfony.com/doc/current/components/console/events.html'\n    -\n        question: 'Using Console component, which of these class allows to create custom output styles?'\n        answers:\n            - {value: Symfony\\Component\\Console\\OutputFormatterStyle, correct: true}\n            - {value: Symfony\\Component\\Console\\OutputStyleFormatter, correct: false}\n            - {value: Symfony\\Component\\Console\\OutputStyle,          correct: false}\n            - {value: Symfony\\Component\\Console\\OutputFormatter,      correct: false}\n        help: |\n            'https://symfony.com/doc/current/console/coloring.html#using-color-styles'\n    -\n        question: 'Which argument can be passed to the debug:router command?'\n        answers:\n            - {value: An argument can be omitted, correct: true}\n            - {value: A regexp search filter,     correct: false}\n            - {value: A route limit,              correct: false}\n            - {value: The route URL,              correct: false}\n            - {value: A route name,               correct: true}\n        help: |\n            'https://symfony.com/doc/current/routing.html#debugging-routes'\n\n    -\n        question: 'Which argument can be passed to the router:match command?'\n        answers:\n            - {value: An argument can be omitted, correct: false}\n            - {value: A regexp search filter,     correct: false}\n            - {value: A route limit,              correct: false}\n            - {value: The route URL,              correct: true}\n            - {value: A route name,               correct: false}\n        help: |\n            'https://symfony.com/doc/current/routing.html#debugging-routes'\n    -\n        question: 'What is the command to check the syntax of a Twig template?'\n        answers:\n            - {value: php bin/console lint:twig,     correct: true}\n            - {value: php bin/console twig:lint,     correct: false}\n            - {value: php bin/console twig:validate, correct: false}\n            - {value: php bin/console twig:syntax,   correct: false}\n        help: |\n            'https://symfony.com/doc/current/templates.html#linting-twig-templates'\n    -\n        question: 'What is the console command to clear cache?'\n        answers:\n            - {value: php bin/console cache:clear,      correct: true}\n            - {value: php bin/console clear:cache,      correct: false}\n            - {value: php bin/console cache:clean,      correct: false}\n            - {value: php bin/console cache:invalidate, correct: false}\n        help: |\n            'https://symfony.com/doc/current/cache.html#clearing-the-cache'\n    -\n        question: 'Which tag name you should use when you register command as service?'\n        answers:\n            - {value: command.console,      correct: false}\n            - {value: console.command,      correct: true}\n            - {value: console.console_command,              correct: false}\n            - {value: command,              correct: false}\n            - {value: console,              correct: false}\n        help: |\n            'https://symfony.com/doc/current/console/commands_as_services.html'\n    -\n        question: 'What is the command line to list all known entities by doctrine 2 in your project ?'\n        answers:\n            - {value: 'php bin/console doctrine:mapping:info',         correct: true}\n            - {value: 'php bin/console doctrine:mapping:import',       correct: false}\n            - {value: 'php bin/console doctrine:mapping:info --all',   correct: false}\n            - {value: 'php bin/console doctrine:mapping:import --all', correct: false}\n        help:\n            'http://assets.andreiabohner.org/symfony/sf42-console-cheat-sheet.pdf'\n    -\n        # CHECKME this has been removed for symfony 5 docs but console still support it, is it obsolete ?\n        question: 'What is the command line to validate the doctrine mapping files ?'\n        answers:\n            - {value: 'php bin/console doctrine:schema:validate',          correct: true}\n            - {value: 'php bin/console doctrine:schema:validation',          correct: false}\n            - {value: 'php bin/console doctrine:schema:update --dump-sql', correct: false}\n            - {value: 'php bin/console doctrine:schema:update --force',    correct: false}\n            - {value: 'php bin/console doctrine:mapping:convert',          correct: false}\n            - {value: 'php bin/console doctrine:mapping:import',           correct: false}\n        help: |\n            'https://symfony.com/doc/3.3/doctrine.html#add-mapping-information'\n    -\n        # FIXED calling config:dump-reference work both with extension alias and bundle name; config:dump is an alias for config:dump-reference (tested but not documented => remove from answers?)\n        # debug:config will work to display config of a bundle WITH a bundle name or alias as param \n        question: \"How do you display complete configuration of a bundle ?\"\n        answers:\n            - {value: \"php bin/console dump:config acme\",                   correct: false}\n            - {value: \"php bin/console config:dump-reference acme\",         correct: true}\n            - {value: \"php bin/console config:dump AcmeBundle\",             correct: true}\n            - {value: \"php bin/console config:dump-reference AcmeBundle\",   correct: true}\n            - {value: \"php bin/console debug:config\",   correct: false}\n        help: |\n            'https://symfony.com/doc/current/bundles/configuration.html#dump-the-configuration https://symfony.com/doc/current/reference/configuration/debug.html'\n    -\n        # FIXME ambiguous question. descriptors are methods, NOT objects. also there is no mention of the term 'descriptor' in the doc \n        question: 'Descriptors are objects to render documentation on Symfony Console Apps?'\n        answers:\n            - {value: 'Yes', correct: true}\n            - {value: 'No',  correct: false}\n        help: |\n            'https://symfony.com/doc/current/console.html#configuring-the-command'\n    -\n        question: 'Does the Symfony Console component needs PHP globals internals variables to work?'\n        answers:\n            - {value: 'Yes', correct: false}\n            - {value: 'No',  correct: true}\n        help: |\n            'https://symfony.com/doc/current/components/console.html#installation'\n    -\n        question: 'What is the console command to create a new entity?'\n        answers:\n            - {value: php bin/console doctrine:generate:entity, correct: false}\n            - {value: php bin/console generate:entity,          correct: false}\n            - {value: php bin/console database:create:entity,   correct: false}\n            - {value: php bin/console doctrine:create:entity,   correct: false}\n            - {value: php bin/console make:entity,   correct: true}\n            - {value: php bin/console entity:make,   correct: false}\n        help: |\n            'https://symfony.com/doc/current/doctrine.html#creating-an-entity-class'\n    -\n        question: 'What is the command to update the database from entities?'\n        answers:\n            - {value: php bin/console doctrine:schema:update,   correct: false}\n            - {value: php bin/console doctrine:entity:update,   correct: false}\n            - {value: php bin/console doctrine:entity --create, correct: false}\n            - {value: php bin/console doctrine:schema:create,   correct: false}\n            - {value: php bin/console make:migration; php bin/console doctrine:migrations:migrate,   correct: true}\n        help: |\n            'https://symfony.com/doc/current/doctrine.html#migrations-creating-the-database-tables-schema'\n    -\n        question: 'What is the right command name to load Doctrine fixtures?'\n        answers:\n            - {value: php bin/console doctrine:fixtures:load,   correct: true}\n            - {value: php bin/console doctrine:load:fixtures,   correct: false}\n            - {value: php bin/console doctrine:fixtures,        correct: false}\n            - {value: php bin/console doctrine:fixtures:import, correct: false}\n        help: |\n            'https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html#loading-fixtures'\n    -\n        question: 'Symfony Console: which one(s) are valid verbosity levels ?'\n        answers:\n            - {value: OutputInterface::VERBOSITY_QUIET,           correct: true}\n            - {value: OutputInterface::VERBOSITY_NORMAL,          correct: true}\n            - {value: OutputInterface::VERBOSITY_VERBOSE,         correct: true}\n            - {value: OutputInterface::VERBOSITY_VERY_VERBOSE,    correct: true}\n            - {value: OutputInterface::VERBOSITY_DEBUG,           correct: true}\n            - {value: OutputInterface::VERBOSITY_VERY_VERY_VERBOSE,   correct: false}\n            - {value: OutputInterface::VERBOSITY_ALERT,   correct: false}\n        help: |\n            'https://symfony.com/doc/current/console/verbosity.html'\n    -\n        question: 'Symfony Console: InputArgument::REQUIRED, InputArgument::OPTIONAL and ... ?'\n        answers:\n            - {value: InputArgument::DEFAULT,    correct: false}\n            - {value: InputArgument::IS_ARRAY,   correct: true}\n            - {value: InputArgument::LIST,       correct: false}\n            - {value: InputArgument::ENUM,       correct: false}\n        help: |\n            'https://symfony.com/doc/current/console/input.html#using-command-arguments'\n    -\n        question: 'Symfony Console: which of the following sentences are true?'\n        answers:\n            - {value: 'initialize() and configure() are invoked before the ConsoleEvents::COMMAND', correct: false}\n            - {value: 'ConsoleEvents::TERMINATE is dispatched even when an exception is thrown' ,   correct: true}\n            - {value: 'initialize has InputInterface, OutputInterface parameters',                  correct: true}\n            - {value: 'Events can disable the command',                                              correct: true}\n        help: |\n            'https://symfony.com/doc/current/components/console/events.html \n             https://symfony.com/doc/current/components/console/events.html#disable-commands-inside-listeners\n             https://github.com/symfony/console/blob/master/Command/Command.php'\n    -\n        # CHECKME source file https://github.com/symfony/console/blob/master/Command/Command.php says only execute() is mandatory; \n        # besides, doc doesnt say configure is mandatory \n        question: 'Which function are mandatory to your command class ?'\n        answers:\n            - {value: \"configure()\", correct: true}\n            - {value: \"execute(InputInterface $input, OutputInterface $output)\", correct: true}\n            - {value: \"interact()\", correct: false}\n            - {value: \"initialize()\", correct: false}\n        help: |\n            'https://symfony.com/doc/current/console.html#creating-a-command'\n    -\n        question: 'Which Question class are available ?'\n        answers:\n            - {value: \"Symfony\\\\Component\\\\Console\\\\Question\\\\Question\", correct: true}\n            - {value: \"Symfony\\\\Component\\\\Console\\\\Question\\\\ChoiceQuestion\", correct: true}\n            - {value: \"Symfony\\\\Component\\\\Console\\\\Question\\\\ConfirmationQuestion\", correct: true}\n            - {value: \"Symfony\\\\Component\\\\Console\\\\Question\\\\SelectQuestion\", correct: false}\n            - {value: \"Symfony\\\\Component\\\\Console\\\\Question\\\\ValidQuestion\", correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/console/helpers/questionhelper.html'\n    -\n        question: 'How to Call Other Commands in a command ?'\n        answers:\n            - {value: \"$command->execute($input, $output);\", correct: false}\n            - {value: \"$command->run($input, $output);\", correct: true}\n            - {value: \"$command->call($input, $output);\", correct: false}\n            - {value: \"$command->forward($input, $output);\", correct: false}\n        help: |\n            'https://symfony.com/doc/current/console/calling_commands.html'\n"
  },
  {
    "path": "data/config.yml",
    "content": "category: Config\nquestions:\n    -\n        question: 'Which of these configuration node types are available?'\n        answers:\n            - {value: scalar, correct: true}\n            - {value: array,  correct: true}\n            - {value: enum,   correct: true}\n            - {value: string, correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/config/definition.html#node-type'\n    -\n        question: 'Which of these methods are existing?'\n        answers:\n            - {value: useAttributeAsKey(), correct: true}\n            - {value: isRequired(),        correct: true}\n            - {value: cannotBeEmpty(),        correct: true}\n            - {value: setDefaultValue(),   correct: false}\n            - {value: setValidation(),     correct: false}\n        help:\n            'https://symfony.com/doc/current/components/config/definition.html'\n    -\n        question: 'Which class is used to define hierarchy of configuration values?'\n        answers:\n            - {value: Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder,      correct: true}\n            - {value: Symfony\\Component\\Config\\Definition\\Builder\\HierarchyBuilder, correct: false}\n            - {value: Symfony\\Component\\Config\\Definition\\Builder\\NodeBuilder,      correct: false}\n            - {value: Symfony\\Component\\Config\\Definition\\Builder\\Builder,          correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/config/definition.html#defining-a-hierarchy-of-configuration-values-using-the-treebuilder'\n"
  },
  {
    "path": "data/controllers.yml",
    "content": "category: Controllers\nquestions:\n    -\n        question: 'How to perform a redirection on example.org in a controller?'\n        answers:\n            - {value: return $this->redirect($this->generateUrl('http://www.example.org')), correct: false}\n            - {value: return $this->redirectUrl('http://www.example.org'),                  correct: false}\n            - {value: return $this->redirect('http://www.example.org'),                     correct: true}\n            - {value: return $this->generateUrl('http://www.example.org'),                  correct: false}\n        help: |\n            'https://symfony.com/doc/current/controller.html#redirecting'\n    -\n        question: 'Which class may be extended by your controllers?'\n        answers:\n            - {value: Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController,    correct: true}\n            - {value: Symfony\\Component\\FrameworkBundle\\Controller\\AbstractController, correct: false}\n            - {value: Symfony\\Bundle\\HttpBundle\\Controller\\AbstractController,         correct: false}\n            - {value: Symfony\\Component\\MvcBundle\\Controller\\AbstractController,       correct: false}\n        help: |\n            'https://symfony.com/doc/current/controller.html#the-base-controller-classes-services'\n    -\n        question: 'Which of these annotations can be used in a controller?'\n        answers:\n            - {value: '@Cache',          correct: true}\n            - {value: '@ParamConverter', correct: true}\n            - {value: '@Security',       correct: true}\n            - {value: '@Template',       correct: true}\n            - {value: '@Method',         correct: false}\n            - {value: '@Post',           correct: false}\n            - {value: '@CatchException',           correct: false}\n        help: |\n            'https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html#annotations-for-controllers'\n    -\n        question: 'Which of these response objects does not exists?'\n        answers:\n            - {value: XmlResponse,        correct: true}\n            - {value: FileResponse,        correct: true}\n            - {value: TwigResponse,        correct: true}\n            - {value: JsonResponse,       correct: false}\n            - {value: BinaryFileResponse, correct: false}\n            - {value: RedirectResponse,   correct: false}\n            - {value: StreamedResponse,   correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/http_foundation.html#response'\n    -\n        question: 'Which class will you use to convert an action parameter?'\n        answers:\n            - {value: Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ParamConverter,     correct: true}\n            - {value: Sensio\\Bundle\\FrameworkExtraBundle\\Controller\\ParamConverter, correct: false}\n            - {value: Symfony\\Bundle\\FrameworkBundle\\Configuration\\ParamConverter,          correct: false}\n            - {value: Symfony\\Bundle\\FrameworkBundle\\Controller\\ParamConverter,    correct: false}\n        help: |\n            'https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html'\n    -\n        question: 'Which controller/action allows to render a template without a specific controller?'\n        answers:\n            - {value: Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController, correct: true}\n            - {value: Sensio\\Bundle\\FrameworkExtraBundle\\Controller\\TemplateController,     correct: false}\n            - {value: Symfony\\Bundle\\FrameworkBundle\\Controller\\TwigController,     correct: false}\n            - {value: Sensio\\Bundle\\FrameworkExtraBundle\\Controller\\TwigController,   correct: false}\n        help: |\n            'https://symfony.com/doc/current/templates.html#rendering-a-template-directly-from-a-route'\n    -\n        question: |\n            According to this action :\n\n            /**\n             * @Route(\"/comment/{postSlug}/new\", name = \"comment_new\")\n             *\n             */\n            public function newAction(Request $request, Post $post)\n            {\n                // ...\n            }\n\n\n            How my ParamConverter should be configured to match \"postSlug\" params with \"slug\" in Post ?\n        answers:\n            - {value: '@ParamConverter(\"post\", options={\"mapping\": {\"postSlug\": \"slug\"}})', correct: true}\n            - {value: '@ParamConverter(\"post\", options={\"mapping\": {\"slug\": \"postSlug\"}})', correct: false}\n            - {value: '@ParamConverter(\"post\", options={\"mapping\": {\"field\": \"slug\"}})', correct: false}\n            - {value: '@ParamConverter(\"post\", options={\"mapping\": {\"Post\": \"slug\"}})', correct: false}\n            - {value: 'It is not possible, params and fields must match', correct: false}\n        help: |\n            'https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html#doctrineconverter-options'\n"
  },
  {
    "path": "data/dependency-injection.yml",
    "content": "category: Dependency Injection\nquestions:\n    -\n        question: 'When setting up the container with configuratio XML files and Config component, how to inject my.custome.service ?'\n        help: https://symfony.com/doc/current/service_container/injection_types.html#constructor-injection\n        answers:\n            - {value: <argument id=\"my.custom.service\" />,                 correct: false}\n            - {value: <argument type=\"argument\" id=\"my.custom.service\" />, correct: false}\n            - {value: <argument type=\"service\" id=\"my.custom.service\" />,  correct: true}\n            - {value: <service id=\"my.custom.service\" />,                  correct: false}\n        help: |\n            https://symfony.com/doc/current/service_container.html#choose-a-specific-service\n    -\n        question: 'Which types of injection are available in the component?'\n        help: https://symfony.com/doc/current/service_container/injection_types.html\n        answers:\n            - {value: constructor, correct: true}\n            - {value: property,    correct: true}\n            - {value: setter,      correct: true}\n            - {value: immutable-property, correct: false}\n            - {value: immutable-setter, correct: true}\n            - {value: constant,    correct: false}\n            - {value: getter,    correct: false}\n        help: |\n            https://symfony.com/doc/current/service_container/injection_types.html\n    -\n        question: 'Using XML, which of these lines are correct to inject a service?'\n        help: https://symfony.com/doc/current/service_container/injection_types.html\n        answers:\n            - {value: <service id=\"my.service\" />,                                                      correct: false}\n            - {value: <argument type=\"service\" id=\"my.service\" />,                                      correct: true}\n            - {value: <call method=\"withMyService\" returns-clone=\"true\"><argument type=\"service\" id=\"my.service\"/></call>, correct: true}\n            - {value: <method setter=\"setService\"><argument type=\"service\" id=\"my.service\" /></method>, correct: false}\n            - {value: <call method=\"setService\"><argument type=\"service\" id=\"my.service\" /></call>,     correct: true}\n        help: |\n            https://symfony.com/doc/current/service_container/injection_types.html\n    -\n        question: 'Using YML, which line allows to inject proxy of exceptionnaly large services when working with symfony/proxy-manager-bridge ?'\n        help: https://symfony.com/doc/current/service_container/lazy_services.html\n        answers:\n            - {value: \"proxy_service: true\", correct: false}\n            - {value: \"lazy: true\",          correct: true}\n            - {value: \"proxy: enabled\",      correct: false}\n            - {value: \"proxy: true\",         correct: false}\n        help: |\n            https://symfony.com/doc/current/service_container/lazy_services.html#configuration\n    -\n        question: 'When implementing Command pattern, the use of Service Subscriber is another lazy loading implementation. Which of the following statement is true ?'\n        help: https://symfony.com/doc/current/service_container/service_subscribers_locators.html#defining-a-service-subscriber\n        answers:\n            - {value: \"Your implementation must implement ServiceSubscriberInterface\", correct: true}\n            - {value: \"Static method getSubscribedServices shall be implemented and listed services can be indexed with your own keys\", correct: true}\n            - {value: \"Static method getSubscribedServices shall be implemented and listed services canot be indexed with your own keys\", correct: false}\n            - {value: \"ContainerInterface must be injected in your implementation\", correct: true}\n            - {value: \"Service locator is a subset of service container\", correct: true}\n    -\n        question: 'Which of the following statements are true about autowiring ?'\n        help: https://symfony.com/doc/current/service_container/autowiring.html\n        answers:\n            - {value: \"Symfony basic configuration comes with autowire set to true\", correct: true}\n            - {value: \"Type-hinting is used to map the correct services from the service container, using type-hinting as service id\", correct: true}\n            - {value: \"Autowiring can be used in the __construct() method as well as in all other methods of the service\", correct: true}\n            - {value: \"Autowiring can only be used in the __construct() method of the service\", correct: false}\n    -\n        question: |\n            Using autowire, interfaces can be used instead of services implementation. In order to autowire implementation, you can setup an alias with the interface id.\n            App\\MyInterface: '@App\\MyServiceImplementation'\n            In case of multiple implementation of your interface, you can use the argument name to determine which service will be injected.\n            App\\MyInterface $serviceA: '@App\\MyServiceImplementationA'\n            App\\MyInterface: '@App\\MyServiceImplementationB'\n        help: https://symfony.com/doc/current/service_container/autowiring.html#dealing-with-multiple-implementations-of-the-same-type\n        answers: \n            - {value: \"true\", correct: true}\n            - {value: \"false\", correct: false}\n    -\n        question: 'Which of the following factory design pattern are available for service container defintion ?'\n        help: https://symfony.com/doc/current/service_container/factories.html\n        answers:\n            - {value: 'Static factories', correct: true}\n            - {value: 'Non-Static factories', correct: true}\n            - {value: 'Dynamic factories', correct: false}\n            - {value: 'Invokable factories', correct: true}\n            - {value: 'Clonable factories', correct: false}\n    -\n        question: 'In order to create a App\\Email\\NewsletterManager using createNewsletterManager static method from NewsletterManagerStaticFactory or createNewsletterManager method from NewsletterManagerFactory, which of the following service YAML definition for App\\Email\\NewsletterManager can you use ?'\n        help: https://symfony.com/doc/current/service_container/factories.html#static-factories\n        answers:\n            - {value: 'factory: [\"App\\Email\\NewsletterManagerStaticFactory\", \"createNewsletterManager\"]', correct: true}\n            - {value: 'factory: [\"@App\\Email\\NewsletterManagerFactory\", \"createNewsletterManager\"]', correct: true}\n            - {value: 'factory: [\"@App\\Email\\NewsletterManagerStaticFactory\", \"createNewsletterManager\"]', correct: false}\n            - {value: 'factory: [\"App\\Email\\NewsletterManagerFactory\", \"createNewsletterManager\"]', correct: false}\n            - {value: 'call: [\"App\\Email\\NewsletterManagerStaticFactory\", \"createNewsletterManager\"]', correct: false}\n            - {value: 'service: [\"App\\Email\\NewsletterManagerStaticFactory\", \"createNewsletterManager\"]', correct: false}\n    -\n        question: 'Using Dependency Injection, what is the correct way to override a service class using ContainerBuilder class?'\n        answers:\n            - {value: \"$container->getDefinition('my.service')->setClass('My\\\\Service\\\\Class')\",   correct: true}\n            - {value: \"$container->getService('my.service')->setDefinition('My\\\\Service\\\\Class')\", correct: false}\n            - {value: \"$container->getDefinition('my.service')->setService('My\\\\Service\\\\Class')\", correct: false}\n            - {value: \"$container->getService('my.service')->setClass('My\\\\Service\\\\Class')\",      correct: false}\n        help: |\n            https://symfony.com/doc/current/service_container/definitions.html\n    -\n        question: 'Using a compiler pass, how do you check the existence of service ?'\n        help: https://symfony.com/doc/current/service_container/definitions.html#getting-and-setting-service-definitions\n        answers:\n            - {value: \"$container->hasDefinition('my.service')\",        correct: true}\n            - {value: \"$container->has('my.service')\",        correct: true}\n            - {value: \"$container->contains('my.service')\",   correct: false}\n            - {value: \"$container->getService('my.service')\",           correct: false}\n    -\n        question: 'Using a compiler pass, how do you retrieve a definition of service ?'\n        help: https://symfony.com/doc/current/service_container/definitions.html#getting-and-setting-service-definitions\n        answers:\n            - {value: \"$container->getDefinition('my.service')\",        correct: true}\n            - {value: \"$container->findDefinition('my.service')\",       correct: true}\n            - {value: \"$container->retrieveDefinition('my.service')\",   correct: false}\n            - {value: \"$container->getService('my.service')\",           correct: false}\n        help: |\n            https://github.com/symfony/dependency-injection/blob/master/ContainerBuilder.php\n    -\n        question: 'What are existing compiler pass order ?'\n        help: https://symfony.com/doc/current/components/dependency_injection/compilation.html#controlling-the-pass-ordering\n        answers:\n            - {value: \"PassConfig::TYPE_BEFORE_OPTIMIZATION\", correct: true}\n            - {value: \"PassConfig::TYPE_OPTIMIZE\",            correct: true}\n            - {value: \"PassConfig::TYPE_AFTER_OPTIMIZATION\",  correct: false}\n            - {value: \"PassConfig::TYPE_BEFORE_REMOVING\",     correct: true}\n            - {value: \"PassConfig::TYPE_REMOVE\",              correct: true}\n            - {value: \"PassConfig::TYPE_AFTER_REMOVING\",        correct: true}\n            - {value: \"PassConfig::TYPE_AFTER_COMPILING\",     correct: false}\n            - {value: \"PassConfig::TYPE_COMPILE\",              correct: false}\n            - {value: \"PassConfig::TYPE_BEFORE_COMPILING\",     correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/dependency_injection/compilation.html#controlling-the-pass-ordering'\n\n    -\n        # FIXME unclear question text and contradictory answers \n        # ls -al => App_KernelDevDebugContainer.php (symfony 5)\n        # <> Symfony doc => appDevDebugProjectContainer.php (symfony 5)\n        # <> certificationy => srcApp_KernelDevDebugContainer.php (symfony ?) \n        question: \"As dev environment, what is the name of dumped container ?\"\n        answers:\n            - {value: \"srcApp_KernelDevDebugContainer.php\",    correct: false}\n            - {value: \"App_KernelDevDebugContainer.php\",    correct: true}\n            - {value: \"appDevDebugProjectContainer.php\",    correct: false}\n            - {value: \"appDevProjectContainer.php\",         correct: false}\n            - {value: \"appDevDebugProjectServiceContainer\", correct: false}\n            - {value: \"srcApp_DevDebugContainer.php\",               correct: false}\n        help: |\n            '# ls -al var/cache/dev\n             https://symfony.com/doc/current/configuration/front_controllers_and_kernel.html#environments-and-the-cache-directory'\n    -\n        question: \"True or false, parameters can also contain array values ?\"\n        answers:\n            - {value: \"true\", correct: true}\n            - {value: \"false\", correct: false}\n        help: |\n            https://symfony.com/doc/current/configuration.html#configuration-parameters\n    -\n        question: \"What is the correct syntax to inject a service app.mailer ?\"\n        answers:\n            - {value: \"arguments: ['@app.mailer']\", correct: true}\n            - {value: \"arguments: ['%app.mailer%']\", correct: false}\n            - {value: \"arguments: ['app.mailer']\", correct: false}\n        help: |\n            https://symfony.com/doc/current/service_container.html#service-parameters\n    -\n        question: \"What is the correct syntax to inject a parameter mailer.transport ?\"\n        answers:\n            - {value: \"arguments: ['@mailer.transport']\", correct: false}\n            - {value: \"arguments: ['%mailer.transport%']\", correct: true}\n            - {value: \"arguments: ['mailer.transport']\", correct: false}\n        help: |\n            https://symfony.com/doc/current/configuration.html#configuration-parameters\n    -\n        question: \"How to define a service as private ?\"\n        answers:\n            - {value: \"type: private\", correct: false}\n            - {value: \"scope: private\", correct: false}\n            - {value: \"public: false\", correct: true}\n            - {value: \"private: true\", correct: false}\n        help: |\n            'Services are private by default. https://symfony.com/doc/current/service_container.html#public-versus-private-services'\n    -\n        question: \"True or False, With default configuration each time you retrieve the service, you'll get the same instance ?\"\n        answers:\n            - {value: \"true\", correct: true}\n            - {value: \"false\", correct: false}\n        help: |\n            https://symfony.com/doc/current/service_container.html#creating-configuring-services-in-the-container\n\n    -\n        question: 'What is the correct load() method definition in Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface?'\n        answers:\n            - {value: \"public function load(array $configs, ContainerBuilder $container)\", correct: true}\n            - {value: \"public function load(array $config, ContainerBuilder $container)\",  correct: false}\n            - {value: \"public function load(ContainerBuilder $container, array $configs)\", correct: false}\n            - {value: \"public function load(ContainerBuilder $container, array $config)\",  correct: false}\n        help: |\n            https://symfony.com/doc/current/components/dependency_injection/compilation.html#managing-configuration-with-extensions\n    -\n        question: 'Service parameters can be set at runtime'\n        answers:\n            - {value: \"true\", correct: false}\n            - {value: \"false\", correct: true}\n        help: |\n            https://symfony.com/doc/current/service_container.html#service-parameters\n    -\n        question: \"The lint:container command checks that the arguments injected into services match their type declarations\"\n        help: https://symfony.com/doc/current/service_container.html#linting-service-definitions\n        answers:\n            - {value: \"true\", correct: true}\n            - {value: \"false\", correct: false}\n    -\n        question: \"Decorating services can be done in YAML using the decorates key. This prevent original service override and autowire decorated class name with decorator instance\"\n        help: https://symfony.com/doc/current/service_container/service_decoration.html\n        answers:\n            - {value: \"true\", correct: true}\n            - {value: \"false\", correct: false}\n"
  },
  {
    "path": "data/forms.yml",
    "content": "category: Forms\nquestions:\n    -\n        question: 'Inside a form type, how to render a DateType field in an text input field?'\n        answers:\n            - {value: Add an option 'render' => 'input',       correct: false}\n            - {value: Add an option 'widget' => 'text',        correct: false}\n            - {value: Add an option 'widget' => 'single_text', correct: true}\n            - {value: Add an option 'widget' => 'input',       correct: false}\n        help: |\n            https://symfony.com/doc/current/reference/forms/types/date.html#widget\n    -\n        question: 'Which method allows you to handle the request on a form instance?'\n        answers:\n            - {value: $form->bindRequest($request),   correct: false}\n            - {value: $form->handleRequest($request), correct: true}\n            - {value: $form->handle($request),        correct: false}\n            - {value: $form->request($request),       correct: false}\n        help: |\n            https://symfony.com/doc/current/forms.html#processing-forms\n    -\n        question: 'From a Form instance, which method can you call to obtain a FormView instance?'\n        answers:\n            - {value: $form->getView(),    correct: false}\n            - {value: $form->renderView(), correct: false}\n            - {value: $form->view(),       correct: false}\n            - {value: $form->createView(), correct: true}\n        help: |\n            https://symfony.com/doc/current/forms.html#processing-forms\n    -\n        question: 'In a Twig template, which function render a form field?'\n        answers:\n            - {value: \"{{ form_item(form.field) }}\",   correct: false}\n            - {value: \"{{ form_render(form.field) }}\", correct: false}\n            - {value: \"{{ form_widget(form.field) }}\", correct: true}\n            - {value: \"{{ form_view(form.field) }}\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/form/form_customization.html#form-widget-form-view-variables\n    -\n        question: 'Using Form factory, how to define a CSRF provider?'\n        answers:\n            - {value: $formFactory->addExtension(new CsrfExtension($csrfManager));,     correct: true}\n            - {value: $formFactory->setExtension(new CsrfExtension($csrfManager));,     correct: false}\n            - {value: $formFactory->addCsrfExtension(new CsrfExtension($csrfManager));, correct: false}\n            - {value: $formFactory->addExtension(new Csrf($csrfManager));,              correct: false}\n        help: |\n            https://symfony.com/doc/current/components/form.html#csrf-protection\n    -\n        # FIXME setDefaultOptions now deprecated in favor of configureOptions https://github.com/symfony/symfony/pull/12891\n        question: 'Using Form component, which option can you use into configureOptions() method to define CSRF field name?'\n        answers:\n            - {value: csrf_field_name, correct: true}\n            - {value: csrf_fieldname,  correct: false}\n            - {value: csrf_field,      correct: false}\n            - {value: csrf_name,       correct: false}\n            - {value: csrf_protection, correct: false}\n        help: |\n            https://symfony.com/doc/current/security/csrf.html#csrf-protection-in-symfony-forms\n    -\n        question: 'Using Form component, which option can you use into configureOptions() method to enable CSRF protection?'\n        answers:\n            - {value: '\"csrf_protection\" => true', correct: true}\n            - {value: '\"csrf_field\" => true', correct: false}\n            - {value: '\"csrf\" => \"enabled\"', correct: false}\n            - {value: '\"csrf\" => true', correct: false}\n        help: |\n            https://symfony.com/doc/current/security/csrf.html#csrf-protection-in-symfony-forms\n    -\n        question: 'Using Form component, option csrf_error_message can be used in configureOptions() to define a custom CSRF error message?'\n        answers:\n            - {value: Yes, correct: false}\n            - {value: No,  correct: true}\n        help: |\n            https://symfony.com/doc/current/security/csrf.html#csrf-protection-in-symfony-forms\n\n    -\n        question: 'Using Form component, which option will allow you to specify groups used for validation?'\n        answers:\n            - {value: validation_groups, correct: true}\n            - {value: groups_validation, correct: false}\n            - {value: validator_groups,  correct: false}\n            - {value: groups_validator,  correct: false}\n        help: |\n            https://symfony.com/doc/current/form/validation_groups.html#validation-groups\n    -\n        question: 'Which form event exist?'\n        answers:\n            - {value: \"FormEvents::PRE_SET_DATA\",   correct: true}\n            - {value: \"FormEvents::SET_DATA\",   correct: false}\n            - {value: \"FormEvents::POST_SET_DATA\",   correct: true}\n            - {value: \"FormEvents::PRE_SUBMIT\",         correct: true}\n            - {value: \"FormEvents::SUBMIT\",         correct: true}\n            - {value: \"FormEvents::POST_SUBMIT\",         correct: true}\n            - {value: \"FormEvents::POST_REQUEST\",   correct: false}\n            - {value: \"FormEvents::REQUEST\",   correct: false}\n            - {value: \"FormEvents::PRE_REQUEST\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/form/events.html\n    -\n        question: 'What data is inside FormEvent object at FormEvents::PRE_SET_DATA?'\n        answers:\n            - {value: \"Model data\",      correct: true}\n            - {value: \"Normalized data\", correct: false}\n            - {value: \"Request data\",    correct: false}\n            - {value: \"View data\",       correct: false}\n        help: |\n            https://symfony.com/doc/current/form/events.html#registering-event-listeners-or-event-subscribers\n    -\n        question: 'What data is inside FormEvent object at FormEvents::PRE_SUBMIT?'\n        answers:\n            - {value: \"Model data\",      correct: false}\n            - {value: \"Normalized data\", correct: false}\n            - {value: \"Request data\",    correct: true}\n            - {value: \"View data\",       correct: false}\n        help: |\n            https://symfony.com/doc/current/form/events.html#registering-event-listeners-or-event-subscribers\n    -\n        question: 'What data is inside FormEvent object at FormEvents::POST_SET_DATA?'\n        answers:\n            - {value: \"Model data\",      correct: true}\n            - {value: \"Normalized data\", correct: false}\n            - {value: \"Request data\",    correct: false}\n            - {value: \"View data\",       correct: false}\n        help: |\n            https://symfony.com/doc/current/form/events.html#registering-event-listeners-or-event-subscribers\n    -\n        question: 'What data is inside FormEvent object at FormEvents::SUBMIT?'\n        answers:\n            - {value: \"Model data\",      correct: false}\n            - {value: \"Normalized data\", correct: true}\n            - {value: \"Request data\",    correct: false}\n            - {value: \"View data\",       correct: false}\n        help: |\n            https://symfony.com/doc/current/form/events.html#registering-event-listeners-or-event-subscribers\n    -\n        question: 'What data is inside FormEvent object at FormEvents::POST_SUBMIT?'\n        answers:\n            - {value: \"Model data\",      correct: false}\n            - {value: \"Normalized data\", correct: false}\n            - {value: \"Request data\",    correct: false}\n            - {value: \"View data\",       correct: true}\n        help: |\n            https://symfony.com/doc/current/form/events.html#registering-event-listeners-or-event-subscribers\n    -\n        # FIXME all non numeric text fields extend from TextType. \n        # Looking from the source they extend AbstractType but their getParent method return TextType and doc says they extend TextType\n        question: 'Which one of these types extends from TextType?'\n        answers:\n            - {value: \"MoneyType\",    correct: false}\n            - {value: \"CurrencyType\", correct: false}\n            - {value: \"TextareaType\", correct: true}\n            - {value: \"UrlType\",  correct: true}\n            - {value: \"Password\",  correct: true}\n            - {value: \"EmailType\",  correct: true}\n        help: |\n            https://symfony.com/doc/current/reference/forms/types.html#text-fields\n            https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Form/Extension/Core/Type\n    -\n        question: 'Which date type exist?'\n        answers:\n            - {value: \"date\",       correct: true}\n            - {value: \"datetime\",   correct: true}\n            - {value: \"time\",       correct: true}\n            - {value: \"timestamp\",  correct: false}\n        help: |\n            https://symfony.com/doc/current/reference/forms/types.html#date-and-time-fields\n    -\n        question: 'How do you bind a constraint to a form field?'\n        answers:\n            - {value: \"Using option 'constraints' in $formBuilder->add()\",          correct: true}\n            - {value: \"Passing constraint instance in $this->createFormBuilder()\",  correct: false}\n            - {value: \"Invoke $formBuilder->setConstraints() method\",               correct: false}\n            - {value: \"Add an annotation in model\",                                 correct: true}\n        help: |\n            https://symfony.com/doc/current/forms.html#validating-forms\n            https://symfony.com/doc/current/components/form.html#component-form-intro-validation\n    -\n        question: 'Using form component, option \"error_bubbling\" will include error in current field.'\n        answers:\n            - {value: \"True\",  correct: false}\n            - {value: \"False\", correct: true}\n        help: |\n            https://symfony.com/doc/current/reference/forms/types/text.html#error-bubbling\n    -\n        question: 'How do you set default value?'\n        answers:\n            - {value: \"$this->createFormBuilder($defaultEntityOrArray)\",                correct: true}\n            - {value: \"$this->createFormBuilder(null, $defaultEntityOrArray)\",          correct: false}\n            - {value: \"$this->createFormBuilder()->setDefaults($defaultEntityOrArray)\", correct: false}\n            - {value: \"$this->createFormBuilder()->addDefaults($defaultEntityOrArray)\", correct: false}\n        help: |\n            https://symfony.com/doc/current/components/form.html#setting-default-values\n    -\n        question: 'Your Form class must extends ____ '\n        answers:\n            - {value: Symfony\\Component\\Form\\FormType,                      correct: false}\n            - {value: Symfony\\Component\\Form\\AbstractType,                  correct: true}\n            - {value: Symfony\\Component\\Form\\AbstractFormType,              correct: false}\n        help: |\n            https://symfony.com/doc/current/forms.html#creating-form-classes\n    -\n        # TESTME is the first answer really correct ?\n        question: 'How to add an extra field `extra` with the form ?'\n        answers:\n            - {value: \"$builder->add('extra', null, ['mapped' => false])\",    correct: true}\n            - {value: \"$builder->add('extra', 'hidden', ['mapped' => false])\",  correct: true}\n            - {value: \"$builder->add('extra', null, ['validation' => false]\", correct: false}\n        help: |\n            https://symfony.com/doc/current/forms.html#unmapped-fields\n    -\n        question: 'How do you render all the form fields in twig ?'\n        answers:\n            - {value: \"form_widget(form)\", correct: true}\n            - {value: \"form_render(form)\", correct: false}\n            - {value: \"form_fields(form)\", correct: false}\n            - {value: \"render_form(form)\", correct: false}\n        help: |\n            https://symfony.com/doc/current/form/form_customization.html#form-widget-form-view-variables\n    -\n        question: 'If you use form_widget() on a single fields, which parts are render ?'\n        answers:\n            - {value: \"label\", correct: false}\n            - {value: \"input\", correct: true}\n            - {value: \"error\", correct: false}\n            - {value: \"label and input\", correct: false}\n            - {value: \"error, label and input\", correct: false}\n        help: |\n            https://symfony.com/doc/current/form/form_customization.html#form-rendering-functions\n    -\n        question: 'According to Symfony best practices, where you should add buttons ?'\n        answers:\n            - {value: \"Template\", correct: true}\n            - {value: \"Form\", correct: false}\n            - {value: \"Controller\", correct: false}\n        help: |\n            https://symfony.com/doc/current/best_practices.html#add-form-buttons-in-templates\n    -\n        question: 'Which Field type exist?'\n        answers:\n            - {value: \"HiddenType\", correct: true}\n            - {value: \"SearchType\", correct: true}\n            - {value: \"BirthdayType\", correct: true}\n            - {value: \"PasswordType\", correct: true}\n            - {value: \"SelectType\",  correct: false}\n            - {value: \"FloatType\",  correct: false}\n            - {value: \"BooleanType\",  correct: false}\n        help: |\n            https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Form/Extension/Core/Type\n    -\n        question: 'How to Disable the Validation of Submitted Data'\n        answers:\n            - {value: \"set the validation_groups option to false\", correct: true}\n            - {value: \"set the validation_enable option to false\", correct: false}\n            - {value: \"set the enable_validation option to false\", correct: false}\n            - {value: \"$this->createFormBuilder()->isValidated(false)\", correct: false}\n            - {value: \"By using false as third parameter for createFormBuilder\", correct: false}\n        help: |\n            https://symfony.com/doc/current/form/disabling_validation.html\n    -\n        question: 'Which form event dont exist?'\n        answers:\n            - {value: \"FormEvents::PRE_SET_DATA\", correct: false}\n            - {value: \"FormEvents::SUBMIT\", correct: false}\n            - {value: \"FormEvents::POST_SUBMIT\", correct: false}\n            - {value: \"FormEvents::SET_DATA\", correct: true}\n        help: |\n            https://symfony.com/doc/current/form/events.html\n    -\n        question: 'How do you upload a UploadedFile ?'\n        answers:\n            - {value: \"$file->move(string $directory, string $name = null)\", correct: true}\n            - {value: \"$file->upload(string $directory, string $name = null)\", correct: false}\n            - {value: \"$file->uploadFile(string $directory, string $name = null)\", correct: false}\n            - {value: \"$file->save(string $directory, string $name = null)\",  correct: false}\n        help: |\n              https://symfony.com/doc/current/controller/upload_file.html#creating-an-uploader-service\n    -\n        question: 'How to Use Data Transformers ?'\n        answers:\n            - {value: \"$builder->get('tags')->addModelTransformer(...);\", correct: true}\n            - {value: \"$builder->add($builder->create('tags', TextType::class)->addModelTransformer(...));\", correct: true}\n            - {value: \"$builder->add('tags', TextType::class)->addModelTransformer(...);\", correct: false}\n        help: |\n            https://symfony.com/doc/current/form/data_transformers.html\n"
  },
  {
    "path": "data/http.yml",
    "content": "category: HTTP\nquestions:\n    -\n        question: 'Which of these HTTP headers does not exist?'\n        answers:\n            - {value: Control-Cache,  correct: true}\n            - {value: Cache-Modifier, correct: true}\n            - {value: Expires,        correct: false}\n            - {value: Last-Modified,  correct: false}\n            - {value: Cache-Control,  correct: false}\n        help: |\n            https://github.com/for-GET/know-your-http-well/blob/master/headers.md\n    -\n        question: 'Which one of these Response methods check if cache must be revalidated?'\n        answers:\n            - {value: $response->mustRevalidate(),    correct: true}\n            - {value: $response->isRevalidated(),     correct: false}\n            - {value: $response->getRevalidated(),    correct: false}\n            - {value: $response->mustBeRevalidated(), correct: false}\n        help: |\n            https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/HttpFoundation/Response.php\n    -\n        question: 'Using a Response instance, which of these methods are available to check status code?'\n        answers:\n            - {value: $response->isInformational(), correct: true}\n            - {value: $response->isSuccessful(),    correct: true}\n            - {value: $response->isRedirection(),   correct: true}\n            - {value: $response->isInvalid(),       correct: true}\n            - {value: $response->isError(),         correct: false}\n        help: |\n            https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/HttpFoundation/Response.php\n    -\n        question: 'How to access the `foo` GET parameter from Request object $request ?'\n        answers:\n            - {value: \"$request->query->get('foo');\",     correct: true}\n            - {value: \"$request->request->get('foo');\",   correct: false}\n            - {value: \"{$request->query->all()}['foo'];\", correct: true}\n            - {value: \"$request->get('foo');\",            correct: true}\n        help: |\n            https://symfony.com/doc/current/components/http_foundation.html#accessing-request-data\n    -\n        question: 'How to access the `bar` POST parameter from Request object $request ?'\n        answers:\n            - {value: \"$request->query->get('bar');\",     correct: false}\n            - {value: \"$request->request->get('bar');\",   correct: true}\n            - {value: \"{$request->query->all()}['baz'];\", correct: false}\n            - {value: \"$request->post('bar');\",           correct: false}\n        help: |\n            https://symfony.com/doc/current/components/http_foundation.html#accessing-request-data\n    -\n        question: 'The method getLanguages() from Request object:'\n        answers:\n            - {value: 'return the value of the metadata lang',                   correct: false}\n            - {value: 'return an array of languages available in translations',  correct: false}\n            - {value: 'return an array of languages the client accepts',         correct: true}\n            - {value: 'does not exists',                                         correct: false}\n        help: |\n            https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php#L1653\n    -\n        question: 'How to get the Content Type from Request ?'\n        answers:\n            - {value: \"$request->headers->get('content_type');\", correct: true}\n            - {value: \"$request->headers->get('content-type');\", correct: true}\n            - {value: \"$request->headers->get('Content-Type');\", correct: true}\n            - {value: \"$request->getContentType();\",             correct: true}\n        help: |\n            'headers are not case sensitive https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2\n             underscore are legals but with issues https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/?highlight=disappearing%20http%20headers#missing-disappearing-http-headers\n             getContentType() exist https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/HttpFoundation/Request.php'\n    -\n        question: 'How to check if a request has been sent using AJAX ?'\n        answers:\n            - {value: $request->isXmlHttpRequest();,                                   correct: true}\n            - {value: $request->isAJAX();,                                             correct: false}\n            - {value: \"$this->headers->get('X-Requested-With') === 'XMLHttpRequest';\", correct: true}\n        help: |\n            https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/HttpFoundation/Request.php\n    -\n        question: 'Which Response subclasses are available?'\n        answers:\n            - {value: JsonResponse,       correct: true}\n            - {value: StreamResponse,     correct: false}\n            - {value: BinaryFileResponse, correct: true}\n            - {value: XmlResponse,        correct: false}\n        help: |\n            'https://symfony.com/doc/current/components/http_foundation.html#response'\n    -\n        question: 'Which HTTP status code should be used for a resource that moved temporarily ?'\n        answers:\n            - {value: 301, correct: false}\n            - {value: 302, correct: true}\n            - {value: 201, correct: false}\n            - {value: 204, correct: false}\n        help: |\n            https://github.com/for-GET/know-your-http-well/blob/master/status-codes.md\n    -\n        question: 'Which HTTP status code should be used for a resource that moved permanently ?'\n        answers:\n            - {value: 301, correct: true}\n            - {value: 302, correct: false}\n            - {value: 201, correct: false}\n            - {value: 204, correct: false}\n        help: |\n            https://tools.ietf.org/html/rfc2616#section-10.3.2\n    -\n        question: 'True or False ? Server returns an  status code when you are not allowed to access a resource'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            https://github.com/for-GET/know-your-http-well/blob/master/status-codes.md\n    -\n        question: 'Which method exist in Symfony\\Component\\HttpFoundation\\Request ?'\n        answers:\n            - {value: \"getPathInfo\",    correct: true}\n            - {value: \"getMethod\",   correct: true}\n            - {value: \"getLanguages\",   correct: true}\n            - {value: \"getHeaders\",   correct: false}\n            - {value: \"getHttpHost\",   correct: true}\n            - {value: \"getUrl\",   correct: false}\n            - {value: \"getUri\",   correct: true}\n        help: |\n           https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/HttpFoundation/Request.php\n    -\n        question: 'How can you set status code of Symfony\\Component\\HttpFoundation\\Response'\n        answers:\n            - {value: \"By you pass the value as second parameter of new Response()\",    correct: true}\n            - {value: \"By using setStatusCode()\",   correct: true}\n            - {value: \"By using setCodeStatus()\",   correct: false}\n            - {value: \"By using setHttpCode()\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/components/http_foundation.html#response\n    -\n        question: 'To override the 404 error template for HTML page, how should you name the template ?'\n        answers:\n            - {value: \"error404.html.twig\",    correct: true}\n            - {value: \"404.html.twig\",   correct: false}\n            - {value: \"twig.404.html.twig\",   correct: false}\n        help: |\n            'https://symfony.com/doc/current/controller/error_pages.html#overriding-the-default-error-templates'\n    -\n        question: 'Which of the following HTTP headers can be used by the server to the client to exchange informations about cookies ?'\n        answers:\n            - {value: 'Cookie', correct: false}\n            - {value: 'Set-Cookie', correct: true}\n            - {value: 'Delete-Cookie', correct: false}\n        help: |\n            https://en.wikipedia.org/wiki/List_of_HTTP_header_fields\n            https://developer.mozilla.org/fr/docs/Web/HTTP/Cookies\n    -\n        question: 'Which of the following HTTP headers can be used by the server to the client to exchange informations about content negotiation ?'\n        answers:\n            - {value: 'Accept-Charset', correct: false}\n            - {value: 'Content-Encoding', correct: true}\n            - {value: 'Content-Language', correct: true}\n            - {value: 'Accept', correct: false}\n            - {value: 'Content-Type', correct: true}\n        help: |\n            https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation\n    -\n        question: 'Which of the following HTTP headers can be used by the client to the server to exchange informations about content negotiation ?'\n        answers:\n            - {value: 'Accept-Charset', correct: true}\n            - {value: 'Content-Encoding', correct: false}\n            - {value: 'Content-Language', correct: false}\n            - {value: 'Accept', correct: true}\n            - {value: 'Content-Type', correct: false}\n        help: |\n            https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation\n    -\n        question: 'Which of the following HTTP methods are safe ?'\n        answers:\n            - {value: 'HEAD', correct: true}\n            - {value: 'POST', correct: false}\n            - {value: 'GET', correct: true}\n            - {value: 'PUT', correct: false}\n            - {value: 'DELETE', correct: false}\n            - {value: 'TRACE', correct: true}\n            - {value: 'OPTIONS', correct: true}\n            - {value: 'PATCH', correct: false}\n        help: |\n            https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html\n            https://tools.ietf.org/html/rfc7231#section-4.2.1\n    -\n        question: 'Which of the following HTTP methods are idempotent ?'\n        answers:\n            - {value: 'HEAD', correct: true}\n            - {value: 'POST', correct: false}\n            - {value: 'GET', correct: true}\n            - {value: 'PUT', correct: true}\n            - {value: 'DELETE', correct: true}\n            - {value: 'OPTIONS', correct: true}\n            - {value: 'PATCH', correct: false}\n            - {value: 'TRACE', correct: true}\n        help: |\n            https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html\n            https://tools.ietf.org/html/rfc7231#section-4.2.2\n"
  },
  {
    "path": "data/misc.yml",
    "content": "category: Miscellaneous\nquestions:\n    -\n        question: 'Which controller/action allows to render a template without a specific controller?'\n        answers:\n            -\n                value: |\n                    acme_privacy:\n                           path:         /privacy\n                           controller:   Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController\n                           defaults:\n                               action: static/privacy.html.twig\n                correct: false\n            -\n                value: |\n                    acme_privacy:\n                           path:         /privacy\n                           controller:   Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController\n                           defaults:\n                               render: static/privacy.html.twig\n                correct: false\n            -\n                value: |\n                   acme_privacy:\n                           path:         /privacy\n                           controller:   Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController\n                           defaults:\n                               template: static/privacy.html.twig\n                correct: true\n        help: |\n            https://symfony.com/doc/current/templates.html#rendering-a-template-directly-from-a-route\n    -\n        question: 'What is the LoggerInterface correct namespace?'\n        answers:\n            - {value: Psr\\LoggerInterface,                        correct: false}\n            - {value: Psr\\Log\\LoggerInterface,                    correct: true}\n            - {value: Symfony\\Bridge\\Monolog\\LoggerInterface,     correct: false}\n            - {value: Symfony\\Bridge\\Monolog\\Log\\LoggerInterface, correct: false}\n        help: |\n            https://symfony.com/doc/current/logging.html#logging-a-message\n\n        # FIXME this question is obsolete, sym 5 seems to have url_generating_routes.php but could not locate doc\n#   -\n#       question: 'Using a dev environment, what is the correct cached file name of the generated configuration routes?'        \n#       answers:\n#           - {value: \"appDevUrlGenerator.php\", correct: false}\n#           - {value: \"appDevGeneratorUrl.php\", correct: false}\n#           - {value: \"appDevUrlDump.php\",      correct: false}\n#           - {value: \"UrlGenerator.php\",    correct: true}\n#       help:\n #           https://symfony.com/doc/4.1/configuration/environments.html#environments-and-the-cache-directory           \n    -\n        # https://github.com/symfony/error-handler/blob/master/Debug.php is not in the Debug NS anymore, now in Component/ErrorHandler\n        question: 'Using Symfony\\Component\\ErrorHandler\\Debug static class, what is the only method available?'\n        answers:\n            - {value: \"public static function enable()\", correct: true}\n            - {value: \"public static function create()\", correct: false}\n            - {value: \"public static function load()\",   correct: false}\n            - {value: \"public static function start()\",  correct: false}\n            - {value: \"public static function register()\",  correct: false}\n        help: |\n            https://github.com/symfony/symfony/blob/master/src/Symfony/Component/ErrorHandler/Debug.php\n    \n        # https://github.com/symfony/error-handler/blob/master/ErrorHandler.php is not in the Debug NS anymore, now in Component/ErrorHandler\n        # also, register() doesnt seem to be the only method available ? \n    -\n        question: 'Using Symfony\\Component\\ErrorHandler\\ErrorHandler static class, what is the only method available?'\n        answers:\n            - {value: \"public static function enable(self $handler = null, bool $replace = true)\", correct: false}\n            - {value: \"public static function create(self $handler = null, bool $replace = true)\", correct: false}\n            - {value: \"public static function load(self $handler = null, bool $replace = true)\",   correct: false}\n            - {value: \"public static function start(self $handler = null, bool $replace = true)\",  correct: false}\n            - {value: \"public static function register(self $handler = null, bool $replace = true)\",  correct: true}\n        help: |\n            https://github.com/symfony/error-handler\n    -\n        question: 'In order to be able to use render_hinclude(url(...)), we need to add this configuration in ``framework` section:'\n        answers:\n            - {value: 'hinclude: enabled',             correct: false}\n            -\n                value: |\n                    fragments:\n                        {path:/_fragment}\n                correct: false\n            - {value: 'none of the above',             correct: true}\n        help: |\n            https://symfony.com/doc/current/templating/hinclude.html\n    -\n        question: 'What is the correct CssSelector class namespace?'\n        answers:\n            - {value: Symfony\\Component\\CssSelector\\CssSelector,  correct: true}\n            - {value: Symfony\\Component\\BrowserKit\\CssSelector,   correct: false}\n            - {value: Symfony\\Component\\DomCrawler\\CssSelector,   correct: false}\n            - {value: Symfony\\Bundle\\FrameworkBundle\\CssSelector, correct: false}\n        help: |\n            https://symfony.com/doc/current/components/css_selector.html#id1\n    -\n        question: 'Event Listeners is use to Regrouping multiple listeners inside a single class ?'\n        answers:\n            - {value: \"False\",  correct: true}\n            - {value: \"True\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-listener\n"
  },
  {
    "path": "data/php.yml",
    "content": "category: PHP\nquestions:\n    -\n        question: 'What is the short open tag for PHP?'\n        answers:\n            - {value: \"<!\",  correct: false}\n            - {value: \"<%\",  correct: false}\n            - {value: \"<?\",  correct: true}\n            - {value: \"<?=\", correct: false}\n        help: |\n            https://www.php.net/manual/en/language.basic-syntax.phptags.php\n    -\n        question: 'Which of these operators is non-associative?'\n        answers:\n            - {value: \"!\",   correct: false}\n            - {value: \"**\",  correct: false}\n            - {value: \"<\",   correct: true}\n            - {value: \"and\", correct: false}\n        help: |\n            https://www.php.net/manual/en/language.operators.precedence.php\n    -\n        question: 'Since PHP 5.6+, if function foo() is defined in the namespace Myapp\\Utils\\Bar and your code is in namespace Myapp, what is the correct way to import the foo() function?'\n        answers:\n            - {value: \"use function foo;\",                    correct: false}\n            - {value: \"use Myapp\\\\Utils\\\\Bar\\\\foo;\",          correct: false}\n            - {value: \"use function Myapp\\\\Utils\\\\Bar\\\\foo;\", correct: true}\n            - {value: \"use Utils\\\\Bar\\\\Foo;\",                 correct: false}\n        help: |\n            https://www.php.net/manual/en/language.namespaces.importing.php\n    -\n        question: 'True or False? It is possible to import all classes from a namespace in PHP.'\n        answers:\n            - {value: \"True\",  correct: false}\n            - {value: \"False\", correct: true}\n        help: |\n             https://www.php.net/manual/en/language.namespaces.importing.php\n    -\n        question: 'Which web services are supported natively in PHP?'\n        answers:\n            - {value: \"SOAP and XML-RPC\",  correct: true}\n            - {value: \"REST and SOAP\",     correct: false}\n            - {value: \"Corba and XML-RPC\", correct: false}\n            - {value: \"XML-RPC and REST\",  correct: false}\n        help: |\n            https://www.php.net/manual/en/refs.webservice.php\n    -\n        question: 'Variable names and function names are, respectively:'\n        answers:\n            - {value: \"case insensitive and case sensitive\",   correct: false}\n            - {value: \"case sensitive and case sensitive\",     correct: false}\n            - {value: \"case sensitive and case insensitive\",   correct: true}\n            - {value: \"case insensitive and case insensitive\", correct: false}\n        help: |\n            https://tutorialsclass.com/faq/is-php-a-case-sensitive-language/\n    -\n        question: 'Does PHP support function overloading?'\n        answers:\n            - {value: \"Yes, in all cases\",                            correct: false}\n            - {value: \"No, in all cases\",                             correct: true}\n            - {value: \"Yes, but it depends on the function scope\",    correct: false}\n            - {value: \"Yes, except when it is an anonymous function\", correct: false}\n        help: |\n            https://www.php.net/manual/en/language.oop5.overloading.php\n    -\n        question: 'Which of the following statements is not true?'\n        answers:\n            - {value: \"In PHP>=5.6 argument lists may include the ... token to denote that the function accepts a variable number of arguments\",               correct: false}\n            - {value: \"A function name, as other labels in PHP, must match the following regular expression: [a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*\",        correct: false}\n            - {value: \"Variable functions work with language constructs such as echo, print, unset(), isset(), empty(), include or require\",                   correct: true}\n            - {value: \"Assigning a closure (anonymous function) to a variable uses the same syntax as any other assignment, including the trailing semicolon\", correct: false}\n        help: |\n            https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list\n            https://www.php.net/manual/en/functions.user-defined.php\n            https://www.php.net/manual/en/functions.anonymous.php\n            https://www.php.net/manual/en/functions.variable-functions.php\n    -\n        question: 'Which of the following function declarations must be used to return a reference?'\n        answers:\n            - {value: \"function &foo() {...}\",    correct: true}\n            - {value: \"function $foo() {...}\",    correct: false}\n            - {value: \"function %foo() {...}\",    correct: false}\n            - {value: \"function $$foo() {...}\",   correct: false}\n        help: |\n            https://www.php.net/manual/en/language.references.return.php\n    -\n        question: 'The ______ keyword is used to indicate an incomplete class or method, which must be further extended and/or implemented in order to be used.'\n        answers:\n            - {value: \"abstract\",   correct: true}\n            - {value: \"final\",      correct: false}\n            - {value: \"protected\",  correct: false}\n            - {value: \"incomplete\", correct: false}\n            - {value: \"implements\", correct: false}\n        help: |\n            https://www.php.net/manual/en/language.oop5.abstract.php\n    -\n        question: 'According to the PHP Framework Interoperability Group, which PSRs concern best coding practices ?'\n        answers:\n            - {value: \"PSR-0\", correct: false}\n            - {value: \"PSR-1\", correct: true}\n            - {value: \"PSR-2\", correct: true}\n            - {value: \"PSR-3\", correct: false}\n            - {value: \"PSR-4\", correct: false}\n        help: |\n            https://www.php-fig.org/psr/\n    -\n        question: 'Since PHP 5.4, which functionality allows horizontal composition of behavior ?'\n        answers:\n            - {value: \"Traits\",           correct: true}\n            - {value: \"Object Cloning\",   correct: false}\n            - {value: \"ReflectionClass\",  correct: false}\n            - {value: \"Inheritance\",      correct: false}\n        help: |\n            https://www.php.net/manual/en/language.oop5.traits.php\n    -\n        question: 'True or False ? A closure is a lambda function that is aware of its surrounding context.'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            http://fabien.potencier.org/on-php-5-3-lambda-functions-and-closures.html\n            https://www.php.net/manual/en/functions.anonymous.php\n    -\n        question: 'True or False ? A lambda function is a named PHP function that can be stored in a variable.'\n        answers:\n            - {value: \"True\",    correct: false}\n            - {value: \"False\",   correct: true}\n        help: |\n            http://fabien.potencier.org/on-php-5-3-lambda-functions-and-closures.html\n            https://www.php.net/manual/en/functions.anonymous.php\n    -\n        question: 'True or False ? An object is always used by reference ?'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            http://php.net/manual/en/oop5.intro.php\n    -\n        question: |\n            $instance = new SimpleClass();\n            $assigned   =  $instance;\n            $instance = null;\n            var_dump($assigned);\n            True or false ? The code above display \"null\" ?\n        answers:\n            - {value: \"True\",    correct: false}\n            - {value: \"False\",   correct: true}\n        help: |\n            http://php.net/manual/en/language.oop5.basic.php#example-179\n    -\n        question: 'In a class, \"public $var4 = self::myStaticMethod();\" is a valid property declaration ?'\n        answers:\n            - {value: \"True\",    correct: false}\n            - {value: \"False\",   correct: true}\n        help: |\n            http://php.net/manual/en/language.oop5.properties.php#example-186\n    -\n        question: 'True or False ? Is it possible to declare constant in an interface ?'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            http://php.net/manual/en/language.oop5.interfaces.php#language.oop5.interfaces.constants\n    -\n        question: 'True or False ? Declaring class properties or methods as static makes them accessible without needing an instantiation of the class ?'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            http://php.net/manual/en/language.oop5.static.php\n    -\n        question: 'Which keyword permit to use the late static binding ?'\n        answers:\n            - {value: \"self\",    correct: false}\n            - {value: \"static\",   correct: true}\n            - {value: \"parent\",   correct: false}\n        help: |\n            http://php.net/manual/en/language.oop5.late-static-bindings.php\n"
  },
  {
    "path": "data/process.yml",
    "content": "category: Process\nquestions:\n    -\n        question: 'What is the default signal sent by Process component to stop a process ?'\n        answers:\n            - {value: 'SIGINT',         correct: false}\n            - {value: 'SIGKILL',        correct: true}\n            - {value: 'Process::STOP',  correct: false}\n            - {value: '9',              correct: true}\n        help: |\n            https://symfony.com/doc/current/components/process.html#stopping-a-process\n            https://www.computerhope.com/unix/signals.htm#system-specific\n"
  },
  {
    "path": "data/psr.yml",
    "content": "category: PHP Standards Recommendations\nquestions:\n    -\n        question: 'Psr-3 LoggerInterface exposes eight methods to write logs to the eight RFC 5424 levels, which level does not exist ?'\n        answers:\n            - {value: debug,   correct: false}\n            - {value: alert,   correct: false}\n            - {value: severe,  correct: true}\n            - {value: warning, correct: false}\n        help: |\n            https://www.php-fig.org/psr/psr-3/#5-psrlogloglevel\n    -\n        question: \"Which methods is not in Psr-3\"\n        answers:\n            - {value: log,   correct: false}\n            - {value: set,   correct: true}\n            - {value: dump,  correct: true}\n            - {value: print, correct: true}\n        help: |\n            https://www.php-fig.org/psr/psr-3/#3-psrlogloggerinterface\n    -\n        question: 'In Psr-3 what delimiter is used for placeholder names ?'\n        answers:\n            - {value: '( name )',   correct: false}\n            - {value: '[ name ]',   correct: false}\n            - {value: '{{ name }}', correct: false}\n            - {value: '{ name }',   correct: true}\n        help: |\n            https://www.php-fig.org/psr/psr-3/#12-message\n    -\n        question: 'Which Psr is about autoloading ?'\n        answers:\n            - {value: Psr-0,   correct: true}\n            - {value: Psr-11,  correct: false}\n            - {value: Psr-4,   correct: true}\n            - {value: Psr-6,   correct: false}                \n        help: |\n            https://www.php-fig.org/psr/\n\n    -\n        question: 'According to Psr-2, Which code is correct ?'\n        answers:\n            - {value: '$foo->bar($arg1);',  correct: true}\n            - {value: '$Foo->bar($arg1);',  correct: false}\n            - {value: 'class Foo extends Bar implements FooInterface',   correct: true}\n            - {value: 'class foo extends Bar implements FooInterface',   correct: false}                       \n        help: |\n            https://www.php-fig.org/psr/psr-1/#1-overview    \n    -\n        question: 'According to Psr-1 methods have to be declared like ?'\n        answers:\n            - {value: 'myMethod();',   correct: true}\n            - {value: 'MyMethod();',   correct: false}\n            - {value: 'my_method();',  correct: false}\n            - {value: 'My_Method();',  correct: false}                \n        help: |\n            https://www.php-fig.org/psr/psr-1/\n    -\n        question: 'Which Psr is about caching ?'\n        answers:\n            - {value: 'Psr-0',   correct: false}\n            - {value: 'Psr-6',   correct: true}\n            - {value: 'Psr-16',  correct: true}\n            - {value: 'Psr-1',   correct: false}               \n            - {value: 'Psr-2',   correct: false}       \n        help: |\n            https://www.php-fig.org/psr/\n    -\n        question: 'Which Psr is deprecated now ?'\n        answers:\n            - {value: 'Psr-1 (Basic Coding Standard)', correct: false}\n            - {value: 'Psr-6 (Caching Interface)',     correct: false}\n            - {value: 'Psr-0 (Autoloading Standard)',  correct: true}\n            - {value: 'Psr-11 (Container Interface)',  correct: false}\n        help: |\n            https://www.php-fig.org/psr/#deprecated                                    \n"
  },
  {
    "path": "data/routing.yml",
    "content": "category: Routing\nquestions:\n    -\n        question: 'Using XML or YAML, how to declare a route for a specific domain/host?'\n        answers:\n            - {value: Add a \"domain\" attribute,    correct: false}\n            - {value: Add a \"host\" attribute,      correct: true}\n            - {value: Add a \"path\" attribute,      correct: false}\n            - {value: Add a \"subdomain\" attribute, correct: false}\n        help: |\n            https://symfony.com/doc/current/routing.html#sub-domain-routing\n    -\n        question: 'What variable can be used as controller argument to get the name of the route name?'\n        answers:\n            - {value: $_route,            correct: true}\n            - {value: $_controller,       correct: false}\n            - {value: $_method,           correct: false}\n            - {value: $_action,           correct: false}\n        help: |\n            https://symfony.com/doc/current/routing.html#getting-the-route-name-and-parameters\n    -\n        question: 'Using XML, how to ensure that a route is accessed via HTTPS?'\n        answers:\n            - {value: schemes=\"https\",  correct: true}\n            - {value: https=\"true\",     correct: false}\n            - {value: protocol=\"https\", correct: false}\n            - {value: ensure=\"https\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/routing.html#forcing-https-on-generated-urls\n    -\n        question: 'Which special routing parameters are available in Symfony:'\n        answers:\n            - {value: \"_controller\",      correct: true}\n            - {value: \"_format\",      correct: true}\n            - {value: \"_fragment\",      correct: true}\n            - {value: \"_locale\",      correct: true}\n            - {value: \"_route\",      correct: false}\n        help: |\n            https://symfony.com/doc/current/routing.html#special-parameters\n    -\n        question: 'How to generate absolute URL for a given route in controller ?'\n        answers:\n            - {value: \"By using UrlGeneratorInterface::ABSOLUTE_URL as third parameter for generateUrl\", correct: true}\n            - {value: \"generateUrl generate absolute URL by default\", correct: false}\n            - {value: \"$this->generateAbsoluteUrl()\", correct: false}\n        help: |\n            https://symfony.com/doc/current/routing.html#generating-urls-in-controllers\n"
  },
  {
    "path": "data/security.yml",
    "content": "category: Security\nquestions:\n    -\n        question: 'Which line is correct to add a security.access_control line?'\n        answers:\n            - {value: \"- { path: ^/admin, roles: ROLE_ADMIN }\", correct: true}\n            - {value: \"- { path: ^/admin, acl: ROLE_ADMIN }\",   correct: false}\n            - {value: \"- { url: ^/admin, roles: ROLE_ADMIN }\",  correct: false}\n            - {value: \"- { url: ^/admin, acl: ROLE_ADMIN }\",    correct: false}\n        help: |\n            https://symfony.com/doc/current/security/access_control.html#matching-options\n    -\n        question: 'After a login success, what is the parameter name to redirect on referer URL?'\n        answers:\n            - {value: security.firewalls.<name>.form_login.use_referer,         correct: true}\n            - {value: security.firewalls.<name>.form_login.after_login_referer, correct: false}\n            - {value: security.firewalls.<name>.form_login.referer,             correct: false}\n            - {value: security.firewalls.<name>.form_login.success_referer,     correct: false}\n        help: |\n            https://symfony.com/doc/current/security/form_login.html#using-the-referring-url\n    -\n        question: 'In Symfony Security component:'\n        answers:\n            - {value: 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext services are publicly created that correspond to each context you create under your security.yml, a context is called an authenticator', correct: false}\n            - {value: 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext services are privately created that correspond to each context you create under your security.yml, a context is also known as per each firewall', correct: false}\n            - {value: 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext services are synthetically created that correspond to each context you create under your security.yml, each context is linked to an authenticator', correct: false}\n            - {value: 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext services are publicly created that correspond to each context you create under your security.yml, a context is related to each FirewallContext directly but is overall handled by a generic Symfony\\Bundle\\SecurityBundle\\Security\\Firewall object', correct: true}\n        help: |\n            https://symfony.com/doc/current/reference/configuration/security.html#firewalls\n    -\n        question: 'Is user authenticated in all of security firewalls after a successful login:'\n        answers:\n            - {value: 'Yes, it happens automatically', correct: false}\n            - {value: 'Yes, if firewalls have the same value of the `context` option', correct: true}\n            - {value: 'Yes, if option `shared` is set to true', correct: false}\n            - {value: 'No, it is not possible, firewalls are independent from each other', correct: false}\n        help: |\n            https://symfony.com/doc/current/security.html#frequently-asked-questions\n            https://symfony.com/doc/current/reference/configuration/security.html#reference-security-firewall-context\n    -\n        question: 'How to force a secure area to use the HTTPS protocol in the security config?'\n        answers:\n            - {value: 'access_control: { path: ^/secure, requires_channel: https }', correct: true}\n            - {value: 'access_control: { path: ^/secure, use_https: true }', correct: false}\n            - {value: 'access_control: { path: ^/secure, always_use_https: true }', correct: false}\n            - {value: 'access_control: { path: ^/secure, schemes: [https] }', correct: false}\n    -\n        question: 'What is the purpose of security encoders in security.yml?'\n        answers:\n            - {value: 'Encode user passwords using given algorithm', correct: true}\n            - {value: 'Encrypt a HTTP response', correct: false}\n            - {value: 'Encode all data in the application database', correct: false}\n        help: |\n            https://symfony.com/doc/current/reference/configuration/security.html#encoders\n\n    -\n        question: 'Which authentication events exist in the Security component?'\n        answers:\n            - {value: 'security.authentication.success', correct: true}\n            - {value: 'security.authentication.failure', correct: true}\n            - {value: 'security.interactive_login', correct: true}\n            - {value: 'security.login', correct: false}\n            - {value: 'security.switch_user', correct: true}\n            - {value: 'security.logout_on_change', correct: true}\n            - {value: 'security.authentication.start', correct: false}\n            - {value: 'security.remember_me_login', correct: false}\n        help: |\n            https://symfony.com/doc/current/components/security/authentication.html#authentication-events\n    -\n        question: 'What does the default strategy `affirmative` of the access decision manager mean?'\n        answers:\n            - {value: 'Access is granted as soon as there is one voter granting access', correct: true}\n            - {value: 'Access is granted if there are more voters granting access than denying', correct: false}\n            - {value: 'Access is granted if all voters grant acces', correct: false}\n            - {value: 'Access is granted if no voters throw an exception', correct: false}\n        help: |\n            https://symfony.com/doc/current/components/security/authorization.html#access-decision-manager\n    -\n        question: 'What does the strategy `consensus` of the access decision manager mean?'\n        answers:\n            - {value: 'Access is granted as soon as there is one voter granting access', correct: false}\n            - {value: 'Access is granted if there are more voters granting access than denying', correct: true}\n            - {value: 'Access is granted if all voters grant acces', correct: false}\n            - {value: 'Access is granted if no voters throw an exception', correct: false}\n        help: |\n            https://symfony.com/doc/current/components/security/authorization.html#access-decision-manager\n    -\n        question: 'What does the strategy `unanimous` of the access decision manager mean?'\n        answers:\n            - {value: 'Access is granted as soon as there is one voter granting access', correct: false}\n            - {value: 'Access is granted if there are more voters granting access than denying', correct: false}\n            - {value: 'Access is granted if there is no voter denying access', correct: true}\n            - {value: 'Access is granted if no voters throw an exception', correct: false}\n        help: |\n            https://symfony.com/doc/current/components/security/authorization.html#access-decision-manager\n    -\n        question: 'What decision strategy exist ?'\n        answers:\n            - {value: 'affirmative', correct: true}\n            - {value: 'consensus', correct: true}\n            - {value: 'unanimous', correct: true}\n            - {value: 'positive', correct: false}\n            - {value: 'negative', correct: false}\n        help: |\n            https://symfony.com/doc/current/components/security/authorization.html#access-decision-manager\n    -\n        question: 'How to Restrict Firewalls to a Specific Request Pattern ?'\n        answers:\n            - {value: 'pattern: ^/(myurl)/', correct: true}\n            - {value: 'route: ^/(myurl)/', correct: false}\n            - {value: 'url: ^/(myurl)/', correct: false}\n            - {value: 'path: ^/(myurl)/', correct: false}\n        help: |\n            https://symfony.com/doc/current/security/firewall_restriction.html#restricting-by-path\n    -\n        \n        #CHECKME obsolete answers ?\n        #@Security(has_roles() -> @Security(is_granted() symfony 5\n        question: 'Which annotation is valid to check role ?'\n        answers:\n#            - {value: '@Security(\"has_role(\"ROLE_ADMIN\")\")', correct: true}\n            - {value: '@Security(\"is_granted(\"ROLE_ADMIN\")\")', correct: true}\n            - {value: '@IsGranted(\"ROLE_ADMIN\")', correct: true}\n            - {value: '@Security(\"restrict_for(\"ROLE_ADMIN\")\")', correct: false}\n            - {value: '@Security(\"role(\"ROLE_ADMIN\")\")', correct: false}\n    -\n        question: 'Which default role exist ?'\n        answers:\n            - {value: 'IS_AUTHENTICATED_REMEMBERED', correct: true}\n            - {value: 'IS_AUTHENTICATED_FULLY', correct: true}\n            - {value: 'IS_AUTHENTICATED_ANONYMOUSLY', correct: true}\n            - {value: 'IS_NOT_AUTHENTICATED', correct: false}\n        help: |\n            https://symfony.com/doc/current/components/security/authorization.html#authenticatedvoter\n    -\n        #CHECKME obsolete answers ?\n        #@Security(has_roles() -> @Security(is_granted() symfony 5\n        # security.authorization_checker > gone from doc\n        question: 'How can you deny access to user in your controller ?'\n        answers:\n            - {value: \"$this->denyAccessUnlessGranted('ROLE_ADMIN')\", correct: true}\n            - {value: '@Security(\"is_granted(\"ROLE_ADMIN\")\")', correct: true}\n        #    - {value: \"if (!$this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')) { throw $this->createAccessDeniedException(); }\", correct: true}\n            - {value: \"$this->user->denyAccessUnlessGranted('ROLE_ADMIN')\", correct: false}\n    -\n        question: 'For implements Symfony\\Component\\Security\\Core\\User\\UserInterface which method you have to define ?'\n        answers:\n            - {value: \"getRoles()\", correct: true}\n            - {value: \"getSalt()\", correct: true}\n            - {value: \"getUsername()\", correct: true}\n            - {value: \"eraseCredentials()\", correct: true}\n            - {value: \"getCredentials()\", correct: false}\n            - {value: \"getHash()\", correct: false}\n            - {value: \"getId()\", correct: false}\n        help: |\n            https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/User/UserInterface.php\n    -\n        question: 'For implements Symfony\\Component\\Security\\Core\\User\\UserProviderInterface which method you have to define ?'\n        answers:\n            - {value: \"loadUserByUsername($username)\", correct: true}\n            - {value: \"loadUser($username)\", correct: false}\n            - {value: \"refreshUser(UserInterface $user)\", correct: true}\n            - {value: \"getUser($username)\", correct: false}\n            - {value: \"supports($class)\", correct: false}\n            - {value: \"supportsClass($class)\", correct: true}\n        help: |\n            https://symfony.com/doc/current/security/user_provider.html#creating-a-custom-user-provider\n"
  },
  {
    "path": "data/standardization.yml",
    "content": "category: Standardization\nquestions:\n    -\n        # FIXME didnt find relevant doc to answer\n        question: 'Using Console, what is the correct filename for a command?'\n        answers:\n            - {value: \"MyTestCommand.php\",        correct: true}\n            - {value: \"CommandMyTest.php\",        correct: false}\n            - {value: \"MyTestConsoleCommand.php\", correct: true}\n            - {value: \"MyTestCommandConsole.php\", correct: false}\n"
  },
  {
    "path": "data/validation.yml",
    "content": "category: Validation\nquestions:\n    -\n        question: 'In order to use validation group, which interface will you implement on your object?'\n        answers:\n            - {value: Symfony\\Component\\Validator\\GroupValidationInterface,         correct: false}\n            - {value: Symfony\\Component\\Validator\\GroupValidationProviderInterface, correct: false}\n            - {value: Symfony\\Component\\Validator\\GroupProviderInterface,           correct: false}\n            - {value: Symfony\\Component\\Validator\\GroupSequenceProviderInterface,   correct: true}\n        help: |\n           https://symfony.com/doc/current/validation/sequence_provider.html#group-sequence-providers\n    -\n        question: 'Using Validator component, which method is used to validate a value against a constraint?'\n        answers:\n            - {value: \"$validator->validate($object, $constraint)\",      correct: true}\n            - {value: \"$validator->validateValue($object, $constraint)\", correct: false}\n            - {value: \"$validator->isValid($object, $constraint)\",       correct: false}\n            - {value: \"$validator->validation($object, $constraint)\",    correct: false}\n        help: |\n            https://symfony.com/doc/current/components/validator.html#installation\n    -\n        question: 'True or False ? All entities have at least 2 validation groups.'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/validation/groups.html\n    -\n        question: 'True or False ? We can also apply constraints on class getters with ``addPropertyConstraint()``'\n        answers:\n            - {value: \"True\",    correct: false}\n            - {value: \"False\",   correct: true}\n        help: |\n            https://symfony.com/doc/current/components/validator/metadata.html\n    -\n        question: 'True or False ? We can also apply constraints on class getters with ``addGetterConstraint()``'\n        answers:\n            - {value: \"True\",    correct: true}\n            - {value: \"False\",   correct: false}\n        help: |\n            https://symfony.com/doc/current/components/validator/metadata.html\n    -\n        question: 'Which of these sentences is true ? In Symfony:'\n        answers:\n            - {value: \"Annotations mapping are enabled by default\",                correct: false}\n            - {value: \"UniqueEntity is provided by Doctrine Bundle\",               correct: false}\n            - {value: \"We can validate partial object with @Assert\\\\GroupSequence\", correct: true}\n            - {value: \"All assertions above are valid\",                            correct: false}\n        help: |\n            https://symfony.com/doc/current/reference/constraints/UniqueEntity.html\n            https://symfony.com/doc/current/validation/sequence_provider.html\n            https://symfony.com/doc/current/validation.html#configuration\n    -\n        question: 'Which constraints exist?'\n        answers:\n            - {value: \"Blank\", correct: true}\n            - {value: \"IdenticalTo\", correct: true}\n            - {value: \"EqualTo\", correct: true}\n            - {value: \"SameAs\", correct: false}\n        help: |\n            https://symfony.com/doc/current/reference/constraints.html\n    -\n        question: 'Which annotation are valid ?'\n        answers:\n            - {value: '@Assert\\Choice({\"male\", \"female\", \"other\"})', correct: true}\n            - {value: '@Assert\\Choice(choices = {\"male\", \"female\", \"other\"})', correct: true}\n            - {value: '@Assert\\Choices({\"male\", \"female\", \"other\"})', correct: false}\n            - {value: '@Assert\\Choices(choices = {\"male\", \"female\", \"other\"})', correct: false}\n        help: |\n            https://symfony.com/doc/current/reference/constraints/Choice.html#basic-usage\n    -\n        question: 'How to tell the validator to use a specific group ?'\n        answers:\n            - {value: 'pass one or more group names as the third argument of $validator->validate()', correct: true}\n            - {value: 'pass one or more group names as the second argument of $validator->validate()', correct: false}\n            - {value: 'use $validator->setValidationGroups(array)', correct: false}\n        help: |\n            https://symfony.com/doc/current/validation/groups.html\n"
  },
  {
    "path": "data/yaml.yml",
    "content": "category: Yaml\nquestions:\n    -\n        question: |\n            What can be placed in ????? to be valid?\n\n              use Symfony\\Component\\Yaml\\Yaml;\n\n              $value = Yaml::parse(?????);\n        answers:\n            - {value: '\"/path/to/file.yml\"',                    correct: false}\n            - {value: 'file_get_contents(\"/path/to/file.yml\")', correct: true}\n            - {value: 'Both are valid',                         correct: false}\n        help: |\n            https://symfony.com/doc/current/components/yaml.html#reading-yaml-contents\n"
  }
]