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
Q

What does MIME stand for?

A

Multipurpose Internet Mail Extensions

26
Q

What are the main MIME component classes?

A

Symfony\Component\Mime\Email

Symfony\Component\Mime\Message

27
Q

What methods does the Symfony\Component\Mime\MimeTypeGuesserInterface define?

A

isGuesserSupported(): bool

guessMimeType(string $path): ?string

28
Q

What does framework.property_info.enabled config do?

A

Registers Symfony\Component\PropertyInfo\PropertyInfoExtractor as a service.

29
Q

What are possible tags to tag a newly created information extractor?

A
property_info.list_extractor
property_info.type_extractor
property_info.description_extractor
property_info.access_extractor
property_info.initializable_extractor
30
Q

What is the difference between serializer encoder and serializer normalizer?

A

Encoders transform arrays to desired representation format(and vice versa) and normalizers transform objects to arrays(and vice versa).

31
Q

What Symfony versions are considered LTS?

A

3.4, 4.4, 5.4

32
Q

What internationalization format is recommended by Symfony?

A

XLIFF

33
Q

How is the Symfony’s frontend manager called?

A

Webpack Encore

34
Q

Which HTTP method’s data does Request::$request represent?

A

POST

35
Q

Which HTTP method’s data does Request::$query represent?

A

GET

36
Q

What are three main routing interfaces?

A

\Symfony\Component\Routing\RouterInterface
\Symfony\Component\Routing\Matcher\UrlMatcherInterface
\Symfony\Component\Routing\Generator\UrlGeneratorInterface

37
Q

What are the methods defined by \Symfony\Component\Routing\Matcher\UrlMatcherInterface interface?

A

match(string $pathinfo);

38
Q

What are the methods defined by \Symfony\Component\Routing\Generator\UrlGeneratorInterface interface?

A

generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH);

39
Q

What are the available route reference types for generated URLs?

A

\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
Q

What are the methods defined by Symfony\Component\HttpKernel\Controller\ControllerResolverInterface interface?

A

getController(Request $request);

41
Q

What does ESI stand for?

A

Edge Side Includes

42
Q

What is Homestead?

A

Vagrant box for running Symfony applications

43
Q

How many years pass between major Symfony versions?

A

2

44
Q

What does CGI stand for?

A

Common Gateway Interface

45
Q

Where can you find Symfony Flex recipies?

A

https://flex.symfony.com

46
Q

What is symfony.lock file responsible for?

A

Keeping track of installed Flex recipies

47
Q

Why would you use Request::setTrustedProxies() method?

A

To configure Symfony to support reverse proxies

48
Q

What should be the type value in Symfony bundle composer.json file?

A

symfony-bundle

49
Q

What command can be used to dump default configuration values of a bundle?

A

config:dump-reference