Miscellaneous Flashcards
What are the methods defined by Symfony\Component\Asset\PackageInterface?
getVersion(string $path);
getUrl(string $path);
What are the methods defined by Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface?
getVersion(string $path);
applyVersion(string $path);
What are the default available cache adapters?
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
What methods does Symfony\Contracts\Cache\TagAwareCacheInterface define?
invalidateTags(array $tags);
What Symfony Console commands are responsible for removing cache items?
cache: pool:clear
cache: pool:delete
cache: pool:prune
What are the methods defined by the Symfony\Component\Config\Loader interface?
load($resource, string $type = null);
supports($resource, string $type = null);
getResolver();
setResolver(LoaderResolverInterface $resolver);
What methods does the Symfony\Component\Config\Definition\ConfigurationInterface interface define?
getConfigTreeBuilder();
What are possible configuration nodes?
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
Which of the node builders provide the min() and max() methods for defining constraints?
Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition
Symfony\Component\Config\Definition\Builder\FloatNodeDefinition
How do you define allowed values for the enum config node?
By using Symfony\Component\Config\Definition\Builder\EnumNodeDefinition::values() method.
What are the possible methods for defining configuration node constraints?
defaultValue() isRequired() cannotBeEmpty() defaultNull() defaultTrue() defaultFalse() treatNullLike($value) treatTrueLike($value) treatFalseLike($value)
What method should be used to retrieve an instance of Symfony\Component\Config\Definition\Builder\ExprBuilder?
Symfony\Component\Config\Definition\Builder\NodeDefinition::validate()
What are the possible rules defined by Symfony\Component\Config\Definition\Builder\ExprBuilder?
ifTrue() ifString() ifNull() ifEmpty() ifArray() ifInArray() ifNotInArray() always()
What class is used to process the raw configuration data based on the predefined ConfigTree?
Symfony\Component\Config\Definition\Processor
What are the available contract packages to use?
symfony/cache-contracts symfony/event-dispatcher-contracts symfony/deprecation-contracts symfony/http-client-contracts symfony/service-contracts symfony/translation-contracts
What methods does Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface define?
process(ContainerBuilder $container)
What methods does Symfony\Component\DependencyInjection\Extension\ExtensionInterface define?
load(array $configs, ContainerBuilder $container);
getNamespace();
getXsdValidationBasePath();
getAlias();
What are possible stages at which compiler passes can be launched?
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
What does AST stand for?
Abstract Syntax Tree
What interface defines expression provider?
Symfony\Component\ExpressionLanguage\StringExpressionLanguageProvider
What are the escaping rules in expression language?
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
What is the purpose of the inflector component?
The component converts English nouns from singular to plural form and vice versa.
What are the methods defined by Symfony\Component\Lock\PersistingStoreInterface?
save(Key $key);
delete(Key $key);
exists(Key $key);
putOffExpiration(Key $key, float $ttl);
What are the methods defined by Symfony\Component\Lock\BlockingStoreInterface?
waitAndSave(Key $key);
What does MIME stand for?
Multipurpose Internet Mail Extensions
What are the main MIME component classes?
Symfony\Component\Mime\Email
Symfony\Component\Mime\Message
What methods does the Symfony\Component\Mime\MimeTypeGuesserInterface define?
isGuesserSupported(): bool
guessMimeType(string $path): ?string
What does framework.property_info.enabled config do?
Registers Symfony\Component\PropertyInfo\PropertyInfoExtractor as a service.
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
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).
What Symfony versions are considered LTS?
3.4, 4.4, 5.4
What internationalization format is recommended by Symfony?
XLIFF
How is the Symfony’s frontend manager called?
Webpack Encore
Which HTTP method’s data does Request::$request represent?
POST
Which HTTP method’s data does Request::$query represent?
GET
What are three main routing interfaces?
\Symfony\Component\Routing\RouterInterface
\Symfony\Component\Routing\Matcher\UrlMatcherInterface
\Symfony\Component\Routing\Generator\UrlGeneratorInterface
What are the methods defined by \Symfony\Component\Routing\Matcher\UrlMatcherInterface interface?
match(string $pathinfo);
What are the methods defined by \Symfony\Component\Routing\Generator\UrlGeneratorInterface interface?
generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH);
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
What are the methods defined by Symfony\Component\HttpKernel\Controller\ControllerResolverInterface interface?
getController(Request $request);
What does ESI stand for?
Edge Side Includes
What is Homestead?
Vagrant box for running Symfony applications
How many years pass between major Symfony versions?
2
What does CGI stand for?
Common Gateway Interface
Where can you find Symfony Flex recipies?
https://flex.symfony.com
What is symfony.lock file responsible for?
Keeping track of installed Flex recipies
Why would you use Request::setTrustedProxies() method?
To configure Symfony to support reverse proxies
What should be the type value in Symfony bundle composer.json file?
symfony-bundle
What command can be used to dump default configuration values of a bundle?
config:dump-reference