-
Notifications
You must be signed in to change notification settings - Fork 6
/
components.yaml
290 lines (290 loc) · 15.8 KB
/
components.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
questions:
-
uuid: 1eebf878-8ba3-6c58-917f-99d84c92580c
question: 'Which of the following are Symfony Core bundles?'
answers:
- { value: CoreBundle, correct: false }
- { value: DebugBundle, correct: true }
- { value: TwigBundle, correct: true }
- { value: WebProfilerBundle, correct: true }
- { value: AuthenticationBundle, correct: false }
help: 'https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle'
-
uuid: 1eebf878-8ba4-68c4-890d-99d84c92580c
question: 'Could the master request be retrieved from the request stack?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/HttpFoundation/RequestStack.php#L57'
-
uuid: 1eebf878-8ba4-69dc-90ca-99d84c92580c
question: 'How to make a route matching only a specific host ?'
answers:
- { value: 'By adding domain key in the requirements section of a route definition', correct: false }
- { value: "it's not possible", correct: false }
- { value: 'By adding domain key in the route definition', correct: false }
- { value: 'By adding a host key in the requirements section of a route definition', correct: false }
- { value: 'By adding a host key in the route definition', correct: true }
help: 'https://symfony.com/doc/current/routing/hostname_pattern.html'
-
uuid: 1eebf878-8ba4-6d74-85f7-99d84c92580c
question: 'Which variables types this $validator object can validate ?$validator = Validation::createValidator();'
answers:
- { value: objects, correct: false }
- { value: arrays, correct: true }
- { value: numbers, correct: true }
- { value: strings, correct: true }
help: 'https://symfony.com/doc/current/components/validator.html#retrieving-a-validator-instance'
-
uuid: 1eebf878-8ba5-61b6-8363-99d84c92580c
question: 'What is the type of the $result ? $result = $kernel->handle($request);'
answers:
- { value: 'A Symfony\Component\HttpFoundation\Response instance.', correct: true }
- { value: 'A string.', correct: false }
- { value: 'A Symfony\Component\BrowserKit\Request instance.', correct: false }
- { value: 'A Symfony\Component\BrowserKit\Response instance.', correct: false }
- { value: 'An array.', correct: false }
- { value: 'A Symfony\Component\HttpFoundation\Request instance.', correct: false }
help: 'https://symfony.com/doc/current/components/http_kernel/introduction.html'
-
uuid: 1eebf878-8ba6-6610-a019-99d84c92580c
question: 'Could an Expression be configured using ContainerConfigurator?'
answers:
- { value: 'No', correct: false }
- { value: 'Yes', correct: true }
help: 'https://github.com/symfony/dependency-injection/blob/3.4/Loader/Configurator/ContainerConfigurator.php#L125'
-
uuid: 1eebf878-8ba6-6908-890e-99d84c92580c
question: 'Is the following code valid? $parsed = Yaml::parse("!custom_tag { foo: bar }", Yaml::PARSE_CUSTOM_TAGS);'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://symfony.com/doc/current/components/yaml.html#parsing-and-dumping-custom-tags'
-
uuid: 1eebf878-8ba6-6d90-8dec-99d84c92580c
question: 'What class of exception can be thrown by Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider''s authenticate() method?'
answers:
- { value: WrongPasswordException, correct: false }
- { value: AuthenticationServiceException, correct: false }
- { value: AuthenticationFailureException, correct: false }
- { value: UserNotFoundException, correct: false }
- { value: BadCredentialsException, correct: true }
- { value: UsernameNotFoundException, correct: true }
help: 'https//github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php#L55'
-
uuid: 1eebf878-8ba7-68bc-874c-99d84c92580c
question: 'When you want to use a translation in another domain than the default domain, you must specify the domain as:'
answers:
- { value: 'second argument of trans()', correct: false }
- { value: 'fourth argument of trans()', correct: false }
- { value: 'first argument of trans()', correct: false }
- { value: 'third argument of trans()', correct: true }
help: 'https://github.com/symfony/symfony/blob/0baa58d4e4bb006c4ae68f75833b586bd3cb6e6f/src/Symfony/Component/Translation/Translator.php#L169'
-
uuid: 1eebf878-8ba7-6952-8382-99d84c92580c
question: 'What component must be installed in order to use the ObjectNormalizer?'
answers:
- { value: Config, correct: false }
- { value: DependencyInjection, correct: false }
- { value: PropertyAccess, correct: true }
- { value: EventDispatcher, correct: false }
help: 'https://symfony.com/doc/current/components/serializer.html#installation'
-
uuid: 1eebf878-8ba7-6b64-abc4-99d84c92580c
question: 'Sometimes you may prefer to not save the objects immediately in order to increase the application performance. Which method would you call to mark cache items as ready to be persisted and then call to commit() method when you are ready to persist them all?'
answers:
- { value: save(), correct: false }
- { value: defer(), correct: false }
- { value: saveDeferred(), correct: true }
- { value: persistDeferred(), correct: false }
help: 'https://symfony.com/doc/current/components/cache/cache_pools.html#saving-cache-items'
-
uuid: 1eebf878-8ba9-6662-bd4b-99d84c92580c
question: 'Which types are not valid Node Types ?'
answers:
- { value: variable, correct: false }
- { value: date, correct: true }
- { value: scalar, correct: false }
- { value: integer, correct: false }
- { value: float, correct: false }
- { value: decimal, correct: true }
- { value: int, correct: true }
- { value: enum, correct: false }
help: 'https://symfony.com/doc/current/components/config/definition.html#node-type'
-
uuid: 1eebf878-8ba9-66b2-95e5-99d84c92580c
question: 'What is the purpose of Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::fixXmlConfig ?'
answers:
- { value: 'It always applies a custom function to an XML element', correct: false }
- { value: 'It ensures that single XML elements are turned into an array', correct: true }
- { value: 'It normalizes XML element name (e.g. pluralizing the key used in XML)', correct: false }
- { value: 'It applies a custom function to an XML element if an error occurs', correct: false }
help: 'https://symfony.com/doc/current/components/config/definition.html#normalization'
-
uuid: 1eebf878-8ba9-6748-82fb-99d84c92580c
question: 'Which exception is thrown when a service is not defined while using ContainerInterface::get()?'
answers:
- { value: ServiceNotFoundException, correct: true }
- { value: ServiceUndefinedException, correct: false }
- { value: UndefinedServiceException, correct: false }
- { value: ServiceGetException, correct: false }
- { value: ServiceUnavailableException, correct: false }
help: 'https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/DependencyInjection/Container.php#L221'
-
uuid: 1eebf878-8ba9-682e-9a05-99d84c92580c
question: 'What''s true about the addListener()''s $priority value from Symfony\Component\EventDispatcher\EventDIspatcherInterface?'
answers:
- { value: 'Defaults to 0', correct: true }
- { value: 'The higher this value, the later an event listener will be triggered in the chain', correct: false }
- { value: 'Defaults to 100', correct: false }
- { value: 'The higher this value, the earlier an event listener will be triggered in the chain', correct: true }
- { value: 'Defaults to 1', correct: false }
help: 'https://symfony.com/doc/current/components/event_dispatcher.html#connecting-listeners'
-
uuid: 1eebf878-8ba9-69b4-97bd-99d84c92580c
question: 'What are the arguments of the Symfony\Component\HttpKernel\Kernel constructor?'
answers:
- { value: 'The environment name of the application.', correct: true }
- { value: 'The name of the application.', correct: false }
- { value: 'Whether to enable caching or not.', correct: false }
- { value: 'Whether to enable logging or not.', correct: false }
- { value: 'Whether to enable debugging or not.', correct: true }
help: 'https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/HttpKernel/Kernel.php'
-
uuid: 1eebf878-8ba9-69fa-9583-99d84c92580c
question: 'Could a controller be defined using \Closure?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://symfony.com/doc/current/controller.html'
-
uuid: 1eebf878-8ba9-6aea-8517-99d84c92580c
question: 'Which of the following value resolvers are shipped with the HttpKernel component?'
answers:
- { value: RequestAttributeValueResolver, correct: true }
- { value: VariadicValueResolver, correct: true }
- { value: RequestValueResolver, correct: true }
- { value: UserValueResolver, correct: false }
- { value: ServiceValueResolver, correct: true }
- { value: DefaultValueResolver, correct: true }
- { value: SessionValueResolver, correct: true }
help: 'https://symfony.com/doc/current/controller/argument_value_resolver.html#built-in-value-resolvers'
-
uuid: 1eebf878-8ba9-6b30-8746-99d84c92580c
question: 'Could a service definition be hidden using setPrivate()?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/DependencyInjection/Definition.php#L614'
-
uuid: 1eebf878-8ba9-6b80-8916-99d84c92580c
question: 'Given the context where a single request is stored in the RequestStack, could the current request be removed from the request stack?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/HttpFoundation/RequestStack.php'
-
uuid: 1eebf878-8ba9-6bd0-b7bf-99d84c92580c
question: 'It is possible to change the class of a service using the ContainerBuilder?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://symfony.com/doc/current/components/dependency_injection/definitions.html'
-
uuid: 1eebf878-8ba9-6c16-ab08-99d84c92580c
question: 'What is a Dumper?'
answers:
- { value: 'A dumper is responsible for outputting a string representation of a PHP variable.', correct: true }
- { value: 'A dumper is responsible for getting each property values of PHP object.', correct: false }
- { value: 'A dumper is responsible for creating a var_export of any PHP variable.', correct: false }
- { value: 'A dumper is responsible for creating a var_dump of any PHP variable.', correct: false }
help: 'https://symfony.com/doc/current/components/var_dumper.html#advanced-usage'
-
uuid: 1eebf878-8baa-609e-9284-99d84c92580c
question: 'If no methods are specified for a route, what methods will be matched?'
answers:
- { value: 'Any methods', correct: true }
- { value: GET, correct: false }
- { value: 'Safe methods: GET or HEAD', correct: false }
- { value: 'GET or POST', correct: false }
help: 'https://symfony.com/doc/current/routing.html#matching-http-methods'
-
uuid: 1eebf878-8baa-60e4-b36f-99d84c92580c
question: 'How does a cache differ from a key / value store?'
answers:
- { value: 'It is safe to store data in it.', correct: false }
- { value: 'It should not be used to persist data.', correct: true }
- { value: 'It can be deleted without making the application crash.', correct: true }
help: 'https://www.aerospike.com/what-is-a-key-value-store/'
-
uuid: 1eebf878-8baa-65b2-a9be-99d84c92580c
question: 'Could the parent request be retrieved from the request stack?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/HttpFoundation/RequestStack.php'
-
uuid: 1eebf878-8baa-6602-b7f4-99d84c92580c
question: 'What class should be used to make a caching backend taggable?'
answers:
- { value: Symfony\Component\Cache\Adapter\TagAwareAdapter, correct: true }
- { value: Symfony\Component\Cache\Adapter\TaggerAdapter, correct: false }
- { value: Symfony\Component\Cache\Adapter\TagAdapter, correct: false }
- { value: Symfony\Component\Cache\Adapter\TaggingAdapter, correct: false }
help: 'https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php'
-
uuid: 1eebf878-8baa-6698-bb00-99d84c92580c
question: 'Which variables can be used in the ExpressionLanguage expression when using the condition option on a Route?'
answers:
- { value: this, correct: false }
- { value: params, correct: true }
- { value: container, correct: false }
- { value: context, correct: true }
- { value: service, correct: false }
- { value: user, correct: false }
- { value: request, correct: true }
help: 'https://symfony.com/doc/7.2/routing.html'
-
uuid: 1eed5768-e3b6-667a-8f78-21c4c4321b85
question: 'What is the main purpose of the eraseCredentials() method from the UserInterface?'
answers:
- { value: "Reset user's credentials from database", correct: false }
- { value: "Disable user's account", correct: false }
- { value: 'Remove sensitive data from the user', correct: true }
- { value: 'Reload user from database', correct: false }
help: 'https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Security/Core/User/UserInterface.php#L49-L55'
-
uuid: 1eed5770-8031-6462-93b0-97021e8fc25e
question: 'If I want to allow the client to specify CLI option --force, what am I going to add to the definition?'
answers:
- { value: 'An option InputOption.', correct: true }
- { value: 'A parameter InputParameter.', correct: false }
- { value: 'A choice InputChoice.', correct: false }
- { value: 'An argument InputArgument.', correct: false }
help: 'https://symfony.com/doc/current/components/console/introduction.html#creating-a-basic-command'
-
uuid: 1eed57c6-96bb-6e02-9dd6-0f984cdae948
question: 'What is the way to always get a new instance of a service?'
answers:
- { value: 'By passing an instance of the CompilerPass to the pushCompilerPass of a ContainerBuilder.', correct: false }
- { value: 'Setting the option shared to false.', correct: true }
- { value: 'Setting the option scope to request.', correct: false }
- { value: 'Setting the option singleton to false.', correct: false }
- { value: 'Setting the option scope to prototype.', correct: false }
help: 'https://symfony.com/doc/current/cookbook/service_container/shared.html'
-
uuid: 1eee76d6-b14d-69de-9026-09e122b17670
question: 'Given the context where the ProxyManager bridge is not installed, could lazy services be used?'
answers:
- { value: 'Yes', correct: false }
- { value: 'No', correct: true }
help: 'https://symfony.com/doc/current/service_container/lazy_services.html#configuration'
-
uuid: 1ef95dac-0509-64da-b985-cbe419d634ee
question: 'What are valid ways to inject a service in Symfony ?'
answers:
- { value: 'Constructor Injection', correct: true }
- { value: 'Setter Injection', correct: true }
- { value: 'Dispatcher Injection', correct: false }
- { value: 'Property Injection', correct: true }
help: 'https://symfony.com/doc/7.0/service_container/injection_types.html'