Miscellaneous Flashcards

1
Q

What are the methods defined by Symfony\Component\Asset\PackageInterface?

A

getVersion(string $path);

getUrl(string $path);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the methods defined by Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface?

A

getVersion(string $path);

applyVersion(string $path);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the default available cache adapters?

A
APCu Cache Adapter
Array Cache Adapter
Chain Cache Adapter
Couchbase Cache Adapter
Doctrine Cache Adapter
Filesystem Cache Adapter
Memcached Cache Adapter
PDO & Doctrine DBAL Cache Adapter
PHP Array Cache Adapter
PHP Files Cache Adapter
Proxy Cache Adapter
Redis Cache Adapter
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What methods does Symfony\Contracts\Cache\TagAwareCacheInterface define?

A

invalidateTags(array $tags);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What Symfony Console commands are responsible for removing cache items?

A

cache: pool:clear
cache: pool:delete
cache: pool:prune

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the methods defined by the Symfony\Component\Config\Loader interface?

A

load($resource, string $type = null);
supports($resource, string $type = null);
getResolver();
setResolver(LoaderResolverInterface $resolver);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What methods does the Symfony\Component\Config\Definition\ConfigurationInterface interface define?

A

getConfigTreeBuilder();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are possible configuration nodes?

A

Symfony\Component\Config\Definition\VariableNode
Symfony\Component\Config\Definition\ScalarNode
Symfony\Component\Config\Definition\BooleanNode
Symfony\Component\Config\Definition\IntegerNode
Symfony\Component\Config\Definition\FloatNode
Symfony\Component\Config\Definition\ArrayNode
Symfony\Component\Config\Definition\EnumNode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the node builders provide the min() and max() methods for defining constraints?

A

Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition
Symfony\Component\Config\Definition\Builder\FloatNodeDefinition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you define allowed values for the enum config node?

A

By using Symfony\Component\Config\Definition\Builder\EnumNodeDefinition::values() method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the possible methods for defining configuration node constraints?

A
defaultValue()
isRequired()
cannotBeEmpty()
defaultNull()
defaultTrue()
defaultFalse()
treatNullLike($value)
treatTrueLike($value)
treatFalseLike($value)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What method should be used to retrieve an instance of Symfony\Component\Config\Definition\Builder\ExprBuilder?

A

Symfony\Component\Config\Definition\Builder\NodeDefinition::validate()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the possible rules defined by Symfony\Component\Config\Definition\Builder\ExprBuilder?

A
ifTrue()
ifString()
ifNull()
ifEmpty() 
ifArray()
ifInArray()
ifNotInArray()
always()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What class is used to process the raw configuration data based on the predefined ConfigTree?

A

Symfony\Component\Config\Definition\Processor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the available contract packages to use?

A
symfony/cache-contracts
symfony/event-dispatcher-contracts
symfony/deprecation-contracts
symfony/http-client-contracts
symfony/service-contracts
symfony/translation-contracts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What methods does Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface define?

A

process(ContainerBuilder $container)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What methods does Symfony\Component\DependencyInjection\Extension\ExtensionInterface define?

A

load(array $configs, ContainerBuilder $container);
getNamespace();
getXsdValidationBasePath();
getAlias();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are possible stages at which compiler passes can be launched?

A

Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION
Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_OPTIMIZE
Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_REMOVING
Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_REMOVE
Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_AFTER_REMOVING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does AST stand for?

A

Abstract Syntax Tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What interface defines expression provider?

A

Symfony\Component\ExpressionLanguage\StringExpressionLanguageProvider

21
Q

What are the escaping rules in expression language?

A

backslash in a string is escaped by four backslashes
backslash in a regex is escaped by eight backslashes
control symbols (\n, \t, etc.) are escaped by one backslash

22
Q

What is the purpose of the inflector component?

A

The component converts English nouns from singular to plural form and vice versa.

23
Q

What are the methods defined by Symfony\Component\Lock\PersistingStoreInterface?

A

save(Key $key);
delete(Key $key);
exists(Key $key);
putOffExpiration(Key $key, float $ttl);

24
Q

What are the methods defined by Symfony\Component\Lock\BlockingStoreInterface?

A

waitAndSave(Key $key);

25
What does MIME stand for?
Multipurpose Internet Mail Extensions
26
What are the main MIME component classes?
Symfony\Component\Mime\Email | Symfony\Component\Mime\Message
27
What methods does the Symfony\Component\Mime\MimeTypeGuesserInterface define?
isGuesserSupported(): bool | guessMimeType(string $path): ?string
28
What does framework.property_info.enabled config do?
Registers Symfony\Component\PropertyInfo\PropertyInfoExtractor as a service.
29
What are possible tags to tag a newly created information extractor?
``` property_info.list_extractor property_info.type_extractor property_info.description_extractor property_info.access_extractor property_info.initializable_extractor ```
30
What is the difference between serializer encoder and serializer normalizer?
Encoders transform arrays to desired representation format(and vice versa) and normalizers transform objects to arrays(and vice versa).
31
What Symfony versions are considered LTS?
3.4, 4.4, 5.4
32
What internationalization format is recommended by Symfony?
XLIFF
33
How is the Symfony's frontend manager called?
Webpack Encore
34
Which HTTP method's data does Request::$request represent?
POST
35
Which HTTP method's data does Request::$query represent?
GET
36
What are three main routing interfaces?
\Symfony\Component\Routing\RouterInterface \Symfony\Component\Routing\Matcher\UrlMatcherInterface \Symfony\Component\Routing\Generator\UrlGeneratorInterface
37
What are the methods defined by \Symfony\Component\Routing\Matcher\UrlMatcherInterface interface?
match(string $pathinfo);
38
What are the methods defined by \Symfony\Component\Routing\Generator\UrlGeneratorInterface interface?
generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH);
39
What are the available route reference types for generated URLs?
\Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_PATH \Symfony\Component\Routing\Generator\UrlGeneratorInterface::RELATIVE_PATH \Symfony\Component\Routing\Generator\UrlGeneratorInterface::NETWORK_PATH
40
What are the methods defined by Symfony\Component\HttpKernel\Controller\ControllerResolverInterface interface?
getController(Request $request);
41
What does ESI stand for?
Edge Side Includes
42
What is Homestead?
Vagrant box for running Symfony applications
43
How many years pass between major Symfony versions?
2
44
What does CGI stand for?
Common Gateway Interface
45
Where can you find Symfony Flex recipies?
https://flex.symfony.com
46
What is symfony.lock file responsible for?
Keeping track of installed Flex recipies
47
Why would you use Request::setTrustedProxies() method?
To configure Symfony to support reverse proxies
48
What should be the type value in Symfony bundle composer.json file?
symfony-bundle
49
What command can be used to dump default configuration values of a bundle?
config:dump-reference