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);