aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/symfony
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-07-27 10:05:23 +0200
commit5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch)
tree39a1a4629749056191c05dfd899f931701b7acf3 /srcs/phpmyadmin/vendor/symfony
parent5afd237bbd22028b85532b8c0b3fcead49a00764 (diff)
downloadft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.gz
ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.bz2
ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.zip
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/phpmyadmin/vendor/symfony')
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheInterface.php57
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheTrait.php76
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/CallbackInterface.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/ItemInterface.php65
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/README.md9
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/TagAwareCacheInterface.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache-contracts/composer.json34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php203
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php323
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/AdapterInterface.php46
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ApcuAdapter.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ArrayAdapter.php171
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ChainAdapter.php332
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/DoctrineAdapter.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemAdapter.php29
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php239
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/MemcachedAdapter.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/NullAdapter.php156
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/PdoAdapter.php54
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpArrayAdapter.php332
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpFilesAdapter.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/ProxyAdapter.php269
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/Psr16Adapter.php86
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisAdapter.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php292
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapter.php429
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php33
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableAdapter.php302
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/CHANGELOG.md73
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/CacheItem.php202
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DataCollector/CacheDataCollector.php194
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php72
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php48
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPass.php222
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php60
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/DoctrineProvider.php114
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Exception/CacheException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Exception/InvalidArgumentException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Exception/LogicException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/LockRegistry.php154
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DefaultMarshaller.php99
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DeflateMarshaller.php53
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/MarshallerInterface.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php89
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/PruneableInterface.php23
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Psr16Cache.php277
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/README.md18
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/ResettableInterface.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/AbstractCache.php199
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/ApcuCache.php31
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/ArrayCache.php167
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/ChainCache.php271
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/DoctrineCache.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/FilesystemCache.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/MemcachedCache.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/NullCache.php104
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/PdoCache.php59
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpArrayCache.php256
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpFilesCache.php45
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/Psr6Cache.php23
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/RedisCache.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Simple/TraceableCache.php257
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractAdapterTrait.php155
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractTrait.php295
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ApcuTrait.php121
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ArrayTrait.php183
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ContractsTrait.php97
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/DoctrineTrait.php98
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemCommonTrait.php183
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemTrait.php124
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/MemcachedTrait.php325
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/PdoTrait.php445
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpArrayTrait.php169
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpFilesTrait.php313
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/ProxyTrait.php43
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisClusterProxy.php63
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisProxy.php65
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisTrait.php511
-rw-r--r--srcs/phpmyadmin/vendor/symfony/cache/composer.json59
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/CHANGELOG.md108
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ConfigCache.php62
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactory.php51
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactoryInterface.php32
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ConfigCacheInterface.php49
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/ArrayNode.php416
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/BaseNode.php559
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/BooleanNode.php55
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php548
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php53
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php56
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ExprBuilder.php248
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php32
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php32
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/MergeBuilder.php67
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeBuilder.php238
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeDefinition.php373
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeParentInterface.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php60
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php73
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php46
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php32
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/TreeBuilder.php106
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ValidationBuilder.php44
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php65
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/ConfigurationInterface.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php302
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php242
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/EnumNode.php62
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php22
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/Exception.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php22
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php49
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidTypeException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/TreeWithoutRootNodeException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/UnsetKeyException.php22
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/FloatNode.php51
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/IntegerNode.php46
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/NodeInterface.php100
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/NumericNode.php64
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/Processor.php97
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypeNodeInterface.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypedArrayNode.php375
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/ScalarNode.php67
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Definition/VariableNode.php143
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderLoadException.php111
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Exception/LoaderLoadException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/FileLocator.php94
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/FileLocatorInterface.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/DelegatingLoader.php50
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/FileLoader.php186
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/GlobFileLoader.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/Loader.php78
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderInterface.php52
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolver.php68
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolverInterface.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/README.md15
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/ClassExistenceResource.php231
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/ComposerResource.php70
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/DirectoryResource.php108
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/FileExistenceResource.php62
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/FileResource.php67
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/GlobResource.php233
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/ReflectionClassResource.php221
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/ResourceInterface.php33
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCache.php188
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php48
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerInterface.php45
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Util/Exception/InvalidXmlException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Util/Exception/XmlParsingException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/Util/XmlUtils.php269
-rw-r--r--srcs/phpmyadmin/vendor/symfony/config/composer.json48
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Alias.php137
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/BoundArgument.php62
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/IteratorArgument.php22
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php54
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php46
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php50
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocator.php50
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php44
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php73
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/CHANGELOG.md236
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ChildDefinition.php124
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php228
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php192
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php41
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowirePass.php475
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php84
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php87
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php78
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php90
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php88
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php43
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php245
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/Compiler.php119
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php89
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php56
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php231
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php220
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PassConfig.php269
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php138
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php75
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php66
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php122
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php33
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php39
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php98
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php83
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php94
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php227
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php190
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php44
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php71
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php168
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php136
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php112
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php87
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php80
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php52
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php135
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php98
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php99
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php118
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php120
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php50
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php52
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Container.php456
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareInterface.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareTrait.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerBuilder.php1672
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerInterface.php101
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Definition.php940
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Dumper.php29
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/DumperInterface.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php251
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/PhpDumper.php2062
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Preloader.php100
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/XmlDumper.php374
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/YamlDumper.php349
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessor.php280
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php72
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php24
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php26
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php100
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php41
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php67
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguage.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php50
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/Extension.php141
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php52
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php22
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php33
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php46
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php48
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php56
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/ClosureLoader.php48
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php87
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php93
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php144
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php69
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php49
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php51
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php84
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php69
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php72
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php147
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php28
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php42
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php47
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php29
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php33
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php32
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php50
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php28
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php39
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php54
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/FileLoader.php227
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/IniFileLoader.php97
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php80
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php728
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php880
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd305
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Parameter.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php51
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php57
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php173
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php68
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php289
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php115
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/README.md14
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Reference.php47
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ResettableContainerInterface.php35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ReverseContainer.php85
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceLocator.php145
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceSubscriberInterface.php23
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/TaggedContainerInterface.php29
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/TypedReference.php74
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Variable.php43
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/composer.json57
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/CHANGELOG.md20
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Compiler.php148
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Expression.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunction.php98
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunctionProviderInterface.php23
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionLanguage.php166
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Lexer.php103
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArgumentsNode.php40
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArrayNode.php118
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/BinaryNode.php170
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConditionalNode.php56
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConstantNode.php81
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/FunctionNode.php67
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/GetAttrNode.php114
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/NameNode.php45
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/Node.php113
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Node/UnaryNode.php66
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/ParsedExpression.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Parser.php379
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/README.md15
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/SerializedParsedExpression.php37
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/SyntaxError.php41
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/Token.php66
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/TokenStream.php91
-rw-r--r--srcs/phpmyadmin/vendor/symfony/expression-language/composer.json35
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/CHANGELOG.md70
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/Exception/ExceptionInterface.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/Exception/FileNotFoundException.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOException.php39
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOExceptionInterface.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/Exception/InvalidArgumentException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/Filesystem.php769
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/README.md13
-rw-r--r--srcs/phpmyadmin/vendor/symfony/filesystem/composer.json34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-ctype/Ctype.php227
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-ctype/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-ctype/README.md12
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-ctype/bootstrap.php26
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-ctype/composer.json34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Mbstring.php840
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/README.md13
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php1096
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php5
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php1104
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/bootstrap.php62
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/composer.json34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-php56/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-php56/Php56.php138
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-php56/README.md15
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-php56/bootstrap.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-php56/composer.json32
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/Binary.php22
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryNoFuncOverload.php65
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php67
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/README.md13
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListener.php28
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV5.php89
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV6.php95
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV7.php96
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerTrait.php125
-rw-r--r--srcs/phpmyadmin/vendor/symfony/polyfill-util/composer.json30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/README.md9
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/ResetInterface.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceLocatorTrait.php122
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceProviderInterface.php36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberInterface.php53
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberTrait.php63
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php92
-rw-r--r--srcs/phpmyadmin/vendor/symfony/service-contracts/composer.json34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/CHANGELOG.md7
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php20
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ExceptionInterface.php16
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php20
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Instantiator.php94
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Exporter.php407
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Hydrator.php151
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Reference.php30
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Registry.php136
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Values.php27
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/README.md38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/VarExporter.php114
-rw-r--r--srcs/phpmyadmin/vendor/symfony/var-exporter/composer.json36
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/CHANGELOG.md196
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Command/LintCommand.php255
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Dumper.php125
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Escaper.php101
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Exception/DumpException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Exception/ExceptionInterface.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Exception/ParseException.php139
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Exception/RuntimeException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Inline.php753
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/LICENSE19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Parser.php1245
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/README.md13
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Tag/TaggedValue.php38
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Unescaper.php138
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/Yaml.php102
-rw-r--r--srcs/phpmyadmin/vendor/symfony/yaml/composer.json43
427 files changed, 0 insertions, 50353 deletions
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheInterface.php b/srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheInterface.php
deleted file mode 100644
index 4b1686b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheInterface.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Cache;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\InvalidArgumentException;
-
-/**
- * Covers most simple to advanced caching needs.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface CacheInterface
-{
- /**
- * Fetches a value from the pool or computes it if not found.
- *
- * On cache misses, a callback is called that should return the missing value.
- * This callback is given a PSR-6 CacheItemInterface instance corresponding to the
- * requested key, that could be used e.g. for expiration control. It could also
- * be an ItemInterface instance when its additional features are needed.
- *
- * @param string $key The key of the item to retrieve from the cache
- * @param callable|CallbackInterface $callback Should return the computed value for the given key/item
- * @param float|null $beta A float that, as it grows, controls the likeliness of triggering
- * early expiration. 0 disables it, INF forces immediate expiration.
- * The default (or providing null) is implementation dependent but should
- * typically be 1.0, which should provide optimal stampede protection.
- * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration
- * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()}
- *
- * @return mixed The value corresponding to the provided key
- *
- * @throws InvalidArgumentException When $key is not valid or when $beta is negative
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null);
-
- /**
- * Removes an item from the pool.
- *
- * @param string $key The key to delete
- *
- * @throws InvalidArgumentException When $key is not valid
- *
- * @return bool True if the item was successfully removed, false if there was any error
- */
- public function delete(string $key): bool;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheTrait.php b/srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheTrait.php
deleted file mode 100644
index 355ea29..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/CacheTrait.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Cache;
-
-use Psr\Cache\CacheItemPoolInterface;
-use Psr\Cache\InvalidArgumentException;
-use Psr\Log\LoggerInterface;
-
-/**
- * An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-trait CacheTrait
-{
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- return $this->doGet($this, $key, $callback, $beta, $metadata);
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete(string $key): bool
- {
- return $this->deleteItem($key);
- }
-
- private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null)
- {
- if (0 > $beta = $beta ?? 1.0) {
- throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', \get_class($this), $beta)) extends \InvalidArgumentException implements InvalidArgumentException {
- };
- }
-
- $item = $pool->getItem($key);
- $recompute = !$item->isHit() || INF === $beta;
- $metadata = $item instanceof ItemInterface ? $item->getMetadata() : [];
-
- if (!$recompute && $metadata) {
- $expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false;
- $ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false;
-
- if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, PHP_INT_MAX) / PHP_INT_MAX)) {
- // force applying defaultLifetime to expiry
- $item->expiresAt(null);
- $logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
- 'key' => $key,
- 'delta' => sprintf('%.1f', $expiry - $now),
- ]);
- }
- }
-
- if ($recompute) {
- $save = true;
- $item->set($callback($item, $save));
- if ($save) {
- $pool->save($item);
- }
- }
-
- return $item->get();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/CallbackInterface.php b/srcs/phpmyadmin/vendor/symfony/cache-contracts/CallbackInterface.php
deleted file mode 100644
index 7dae2aa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/CallbackInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Cache;
-
-use Psr\Cache\CacheItemInterface;
-
-/**
- * Computes and returns the cached value of an item.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface CallbackInterface
-{
- /**
- * @param CacheItemInterface|ItemInterface $item The item to compute the value for
- * @param bool &$save Should be set to false when the value should not be saved in the pool
- *
- * @return mixed The computed value for the passed item
- */
- public function __invoke(CacheItemInterface $item, bool &$save);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/ItemInterface.php b/srcs/phpmyadmin/vendor/symfony/cache-contracts/ItemInterface.php
deleted file mode 100644
index cbd7226..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/ItemInterface.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Cache;
-
-use Psr\Cache\CacheException;
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\InvalidArgumentException;
-
-/**
- * Augments PSR-6's CacheItemInterface with support for tags and metadata.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface ItemInterface extends CacheItemInterface
-{
- /**
- * References the Unix timestamp stating when the item will expire.
- */
- const METADATA_EXPIRY = 'expiry';
-
- /**
- * References the time the item took to be created, in milliseconds.
- */
- const METADATA_CTIME = 'ctime';
-
- /**
- * References the list of tags that were assigned to the item, as string[].
- */
- const METADATA_TAGS = 'tags';
-
- /**
- * Reserved characters that cannot be used in a key or tag.
- */
- const RESERVED_CHARACTERS = '{}()/\@:';
-
- /**
- * Adds a tag to a cache item.
- *
- * Tags are strings that follow the same validation rules as keys.
- *
- * @param string|string[] $tags A tag or array of tags
- *
- * @return $this
- *
- * @throws InvalidArgumentException When $tag is not valid
- * @throws CacheException When the item comes from a pool that is not tag-aware
- */
- public function tag($tags): self;
-
- /**
- * Returns a list of metadata info that were saved alongside with the cached value.
- *
- * See ItemInterface::METADATA_* consts for keys potentially found in the returned array.
- */
- public function getMetadata(): array;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/LICENSE b/srcs/phpmyadmin/vendor/symfony/cache-contracts/LICENSE
deleted file mode 100644
index 3f853aa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/README.md b/srcs/phpmyadmin/vendor/symfony/cache-contracts/README.md
deleted file mode 100644
index 58c589e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-Symfony Cache Contracts
-=======================
-
-A set of abstractions extracted out of the Symfony components.
-
-Can be used to build on semantics that the Symfony components proved useful - and
-that already have battle tested implementations.
-
-See https://github.com/symfony/contracts/blob/master/README.md for more information.
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/TagAwareCacheInterface.php b/srcs/phpmyadmin/vendor/symfony/cache-contracts/TagAwareCacheInterface.php
deleted file mode 100644
index 7c4cf11..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/TagAwareCacheInterface.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Cache;
-
-use Psr\Cache\InvalidArgumentException;
-
-/**
- * Allows invalidating cached items using tags.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface TagAwareCacheInterface extends CacheInterface
-{
- /**
- * Invalidates cached items using tags.
- *
- * When implemented on a PSR-6 pool, invalidation should not apply
- * to deferred items. Instead, they should be committed as usual.
- * This allows replacing old tagged values by new ones without
- * race conditions.
- *
- * @param string[] $tags An array of tags to invalidate
- *
- * @return bool True on success
- *
- * @throws InvalidArgumentException When $tags is not valid
- */
- public function invalidateTags(array $tags);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache-contracts/composer.json b/srcs/phpmyadmin/vendor/symfony/cache-contracts/composer.json
deleted file mode 100644
index 4e0bd1a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache-contracts/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "symfony/cache-contracts",
- "type": "library",
- "description": "Generic abstractions related to caching",
- "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "psr/cache": "^1.0"
- },
- "suggest": {
- "symfony/cache-implementation": ""
- },
- "autoload": {
- "psr-4": { "Symfony\\Contracts\\Cache\\": "" }
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php
deleted file mode 100644
index 98b42a4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractAdapter.php
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Log\LoggerAwareInterface;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\AbstractAdapterTrait;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-abstract class AbstractAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface
-{
- /**
- * @internal
- */
- protected const NS_SEPARATOR = ':';
-
- use AbstractAdapterTrait;
- use ContractsTrait;
-
- private static $apcuSupported;
- private static $phpFilesSupported;
-
- protected function __construct(string $namespace = '', int $defaultLifetime = 0)
- {
- $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).static::NS_SEPARATOR;
- if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
- throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, \strlen($namespace), $namespace));
- }
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, $isHit) use ($defaultLifetime) {
- $item = new CacheItem();
- $item->key = $key;
- $item->value = $v = $value;
- $item->isHit = $isHit;
- $item->defaultLifetime = $defaultLifetime;
- // Detect wrapped values that encode for their expiry and creation duration
- // For compactness, these values are packed in the key of an array using
- // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
- if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = key($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) {
- $item->value = $v[$k];
- $v = unpack('Ve/Nc', substr($k, 1, -1));
- $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET;
- $item->metadata[CacheItem::METADATA_CTIME] = $v['c'];
- }
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $getId = \Closure::fromCallable([$this, 'getId']);
- $this->mergeByLifetime = \Closure::bind(
- static function ($deferred, $namespace, &$expiredIds) use ($getId) {
- $byLifetime = [];
- $now = microtime(true);
- $expiredIds = [];
-
- foreach ($deferred as $key => $item) {
- $key = (string) $key;
- if (null === $item->expiry) {
- $ttl = 0 < $item->defaultLifetime ? $item->defaultLifetime : 0;
- } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) {
- $expiredIds[] = $getId($key);
- continue;
- }
- if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) {
- unset($metadata[CacheItem::METADATA_TAGS]);
- }
- // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators
- $byLifetime[$ttl][$getId($key)] = $metadata ? ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item->value] : $item->value;
- }
-
- return $byLifetime;
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * Returns the best possible adapter that your runtime supports.
- *
- * Using ApcuAdapter makes system caches compatible with read-only filesystems.
- *
- * @param string $namespace
- * @param int $defaultLifetime
- * @param string $version
- * @param string $directory
- *
- * @return AdapterInterface
- */
- public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null)
- {
- $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true);
- if (null !== $logger) {
- $opcache->setLogger($logger);
- }
-
- if (!self::$apcuSupported = self::$apcuSupported ?? ApcuAdapter::isSupported()) {
- return $opcache;
- }
-
- $apcu = new ApcuAdapter($namespace, (int) $defaultLifetime / 5, $version);
- if ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {
- $apcu->setLogger(new NullLogger());
- } elseif (null !== $logger) {
- $apcu->setLogger($logger);
- }
-
- return new ChainAdapter([$apcu, $opcache]);
- }
-
- public static function createConnection($dsn, array $options = [])
- {
- if (!\is_string($dsn)) {
- throw new InvalidArgumentException(sprintf('The %s() method expect argument #1 to be string, %s given.', __METHOD__, \gettype($dsn)));
- }
- if (0 === strpos($dsn, 'redis:') || 0 === strpos($dsn, 'rediss:')) {
- return RedisAdapter::createConnection($dsn, $options);
- }
- if (0 === strpos($dsn, 'memcached:')) {
- return MemcachedAdapter::createConnection($dsn, $options);
- }
-
- throw new InvalidArgumentException(sprintf('Unsupported DSN: %s.', $dsn));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- $ok = true;
- $byLifetime = $this->mergeByLifetime;
- $byLifetime = $byLifetime($this->deferred, $this->namespace, $expiredIds);
- $retry = $this->deferred = [];
-
- if ($expiredIds) {
- $this->doDelete($expiredIds);
- }
- foreach ($byLifetime as $lifetime => $values) {
- try {
- $e = $this->doSave($values, $lifetime);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- continue;
- }
- if (\is_array($e) || 1 === \count($values)) {
- foreach (\is_array($e) ? $e : array_keys($values) as $id) {
- $ok = false;
- $v = $values[$id];
- $type = \is_object($v) ? \get_class($v) : \gettype($v);
- $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null]);
- }
- } else {
- foreach ($values as $id => $v) {
- $retry[$lifetime][] = $id;
- }
- }
- }
-
- // When bulk-save failed, retry each item individually
- foreach ($retry as $lifetime => $ids) {
- foreach ($ids as $id) {
- try {
- $v = $byLifetime[$lifetime][$id];
- $e = $this->doSave([$id => $v], $lifetime);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- continue;
- }
- $ok = false;
- $type = \is_object($v) ? \get_class($v) : \gettype($v);
- $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null]);
- }
- }
-
- return $ok;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php
deleted file mode 100644
index 10aca3b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php
+++ /dev/null
@@ -1,323 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Log\LoggerAwareInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\AbstractAdapterTrait;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Contracts\Cache\TagAwareCacheInterface;
-
-/**
- * Abstract for native TagAware adapters.
- *
- * To keep info on tags, the tags are both serialized as part of cache value and provided as tag ids
- * to Adapters on operations when needed for storage to doSave(), doDelete() & doInvalidate().
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author André Rømcke <andre.romcke+symfony@gmail.com>
- *
- * @internal
- */
-abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, LoggerAwareInterface, ResettableInterface
-{
- use AbstractAdapterTrait;
- use ContractsTrait;
-
- private const TAGS_PREFIX = "\0tags\0";
-
- protected function __construct(string $namespace = '', int $defaultLifetime = 0)
- {
- $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':';
- if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
- throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, \strlen($namespace), $namespace));
- }
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, $isHit) use ($defaultLifetime) {
- $item = new CacheItem();
- $item->key = $key;
- $item->defaultLifetime = $defaultLifetime;
- $item->isTaggable = true;
- // If structure does not match what we expect return item as is (no value and not a hit)
- if (!\is_array($value) || !\array_key_exists('value', $value)) {
- return $item;
- }
- $item->isHit = $isHit;
- // Extract value, tags and meta data from the cache value
- $item->value = $value['value'];
- $item->metadata[CacheItem::METADATA_TAGS] = $value['tags'] ?? [];
- if (isset($value['meta'])) {
- // For compactness these values are packed, & expiry is offset to reduce size
- $v = unpack('Ve/Nc', $value['meta']);
- $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET;
- $item->metadata[CacheItem::METADATA_CTIME] = $v['c'];
- }
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $getId = \Closure::fromCallable([$this, 'getId']);
- $tagPrefix = self::TAGS_PREFIX;
- $this->mergeByLifetime = \Closure::bind(
- static function ($deferred, &$expiredIds) use ($getId, $tagPrefix) {
- $byLifetime = [];
- $now = microtime(true);
- $expiredIds = [];
-
- foreach ($deferred as $key => $item) {
- $key = (string) $key;
- if (null === $item->expiry) {
- $ttl = 0 < $item->defaultLifetime ? $item->defaultLifetime : 0;
- } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) {
- $expiredIds[] = $getId($key);
- continue;
- }
- // Store Value and Tags on the cache value
- if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) {
- $value = ['value' => $item->value, 'tags' => $metadata[CacheItem::METADATA_TAGS]];
- unset($metadata[CacheItem::METADATA_TAGS]);
- } else {
- $value = ['value' => $item->value, 'tags' => []];
- }
-
- if ($metadata) {
- // For compactness, expiry and creation duration are packed, using magic numbers as separators
- $value['meta'] = pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME]);
- }
-
- // Extract tag changes, these should be removed from values in doSave()
- $value['tag-operations'] = ['add' => [], 'remove' => []];
- $oldTags = $item->metadata[CacheItem::METADATA_TAGS] ?? [];
- foreach (array_diff($value['tags'], $oldTags) as $addedTag) {
- $value['tag-operations']['add'][] = $getId($tagPrefix.$addedTag);
- }
- foreach (array_diff($oldTags, $value['tags']) as $removedTag) {
- $value['tag-operations']['remove'][] = $getId($tagPrefix.$removedTag);
- }
-
- $byLifetime[$ttl][$getId($key)] = $value;
- }
-
- return $byLifetime;
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * Persists several cache items immediately.
- *
- * @param array $values The values to cache, indexed by their cache identifier
- * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning
- * @param array[] $addTagData Hash where key is tag id, and array value is list of cache id's to add to tag
- * @param array[] $removeTagData Hash where key is tag id, and array value is list of cache id's to remove to tag
- *
- * @return array The identifiers that failed to be cached or a boolean stating if caching succeeded or not
- */
- abstract protected function doSave(array $values, ?int $lifetime, array $addTagData = [], array $removeTagData = []): array;
-
- /**
- * Removes multiple items from the pool and their corresponding tags.
- *
- * @param array $ids An array of identifiers that should be removed from the pool
- *
- * @return bool True if the items were successfully removed, false otherwise
- */
- abstract protected function doDelete(array $ids);
-
- /**
- * Removes relations between tags and deleted items.
- *
- * @param array $tagData Array of tag => key identifiers that should be removed from the pool
- */
- abstract protected function doDeleteTagRelations(array $tagData): bool;
-
- /**
- * Invalidates cached items using tags.
- *
- * @param string[] $tagIds An array of tags to invalidate, key is tag and value is tag id
- *
- * @return bool True on success
- */
- abstract protected function doInvalidate(array $tagIds): bool;
-
- /**
- * Delete items and yields the tags they were bound to.
- */
- protected function doDeleteYieldTags(array $ids): iterable
- {
- foreach ($this->doFetch($ids) as $id => $value) {
- yield $id => \is_array($value) && \is_array($value['tags'] ?? null) ? $value['tags'] : [];
- }
-
- $this->doDelete($ids);
- }
-
- /**
- * {@inheritdoc}
- */
- public function commit(): bool
- {
- $ok = true;
- $byLifetime = $this->mergeByLifetime;
- $byLifetime = $byLifetime($this->deferred, $expiredIds);
- $retry = $this->deferred = [];
-
- if ($expiredIds) {
- // Tags are not cleaned up in this case, however that is done on invalidateTags().
- $this->doDelete($expiredIds);
- }
- foreach ($byLifetime as $lifetime => $values) {
- try {
- $values = $this->extractTagData($values, $addTagData, $removeTagData);
- $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- continue;
- }
- if (\is_array($e) || 1 === \count($values)) {
- foreach (\is_array($e) ? $e : array_keys($values) as $id) {
- $ok = false;
- $v = $values[$id];
- $type = \is_object($v) ? \get_class($v) : \gettype($v);
- $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null]);
- }
- } else {
- foreach ($values as $id => $v) {
- $retry[$lifetime][] = $id;
- }
- }
- }
-
- // When bulk-save failed, retry each item individually
- foreach ($retry as $lifetime => $ids) {
- foreach ($ids as $id) {
- try {
- $v = $byLifetime[$lifetime][$id];
- $values = $this->extractTagData([$id => $v], $addTagData, $removeTagData);
- $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- continue;
- }
- $ok = false;
- $type = \is_object($v) ? \get_class($v) : \gettype($v);
- $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null]);
- }
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- public function deleteItems(array $keys): bool
- {
- if (!$keys) {
- return true;
- }
-
- $ok = true;
- $ids = [];
- $tagData = [];
-
- foreach ($keys as $key) {
- $ids[$key] = $this->getId($key);
- unset($this->deferred[$key]);
- }
-
- try {
- foreach ($this->doDeleteYieldTags(array_values($ids)) as $id => $tags) {
- foreach ($tags as $tag) {
- $tagData[$this->getId(self::TAGS_PREFIX.$tag)][] = $id;
- }
- }
- } catch (\Exception $e) {
- $ok = false;
- }
-
- try {
- if ((!$tagData || $this->doDeleteTagRelations($tagData)) && $ok) {
- return true;
- }
- } catch (\Exception $e) {
- }
-
- // When bulk-delete failed, retry each item individually
- foreach ($ids as $key => $id) {
- try {
- $e = null;
- if ($this->doDelete([$id])) {
- continue;
- }
- } catch (\Exception $e) {
- }
- $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e]);
- $ok = false;
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- public function invalidateTags(array $tags)
- {
- if (empty($tags)) {
- return false;
- }
-
- $tagIds = [];
- foreach (array_unique($tags) as $tag) {
- $tagIds[] = $this->getId(self::TAGS_PREFIX.$tag);
- }
-
- if ($this->doInvalidate($tagIds)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Extracts tags operation data from $values set in mergeByLifetime, and returns values without it.
- */
- private function extractTagData(array $values, ?array &$addTagData, ?array &$removeTagData): array
- {
- $addTagData = $removeTagData = [];
- foreach ($values as $id => $value) {
- foreach ($value['tag-operations']['add'] as $tag => $tagId) {
- $addTagData[$tagId][] = $id;
- }
-
- foreach ($value['tag-operations']['remove'] as $tag => $tagId) {
- $removeTagData[$tagId][] = $id;
- }
-
- unset($values[$id]['tag-operations']);
- }
-
- return $values;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AdapterInterface.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AdapterInterface.php
deleted file mode 100644
index c40ae42..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/AdapterInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\Cache\CacheItem;
-
-/**
- * Interface for adapters managing instances of Symfony's CacheItem.
- *
- * @author Kévin Dunglas <dunglas@gmail.com>
- */
-interface AdapterInterface extends CacheItemPoolInterface
-{
- /**
- * {@inheritdoc}
- *
- * @return CacheItem
- */
- public function getItem($key);
-
- /**
- * {@inheritdoc}
- *
- * @return \Traversable|CacheItem[]
- */
- public function getItems(array $keys = []);
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ApcuAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ApcuAdapter.php
deleted file mode 100644
index 7db3956..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ApcuAdapter.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Component\Cache\Traits\ApcuTrait;
-
-class ApcuAdapter extends AbstractAdapter
-{
- use ApcuTrait;
-
- /**
- * @throws CacheException if APCu is not enabled
- */
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null)
- {
- $this->init($namespace, $defaultLifetime, $version);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ArrayAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ArrayAdapter.php
deleted file mode 100644
index d93dcbd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ArrayAdapter.php
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Log\LoggerAwareInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ArrayTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface
-{
- use ArrayTrait;
-
- private $createCacheItem;
-
- /**
- * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise
- */
- public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true)
- {
- $this->storeSerialized = $storeSerialized;
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, $isHit) use ($defaultLifetime) {
- $item = new CacheItem();
- $item->key = $key;
- $item->value = $value;
- $item->isHit = $isHit;
- $item->defaultLifetime = $defaultLifetime;
-
- return $item;
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- $item = $this->getItem($key);
- $metadata = $item->getMetadata();
-
- // ArrayAdapter works in memory, we don't care about stampede protection
- if (INF === $beta || !$item->isHit()) {
- $save = true;
- $this->save($item->set($callback($item, $save)));
- }
-
- return $item->get();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- if (!$isHit = $this->hasItem($key)) {
- $this->values[$key] = $value = null;
- } else {
- $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key];
- }
- $f = $this->createCacheItem;
-
- return $f($key, $value, $isHit);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- foreach ($keys as $key) {
- if (!\is_string($key) || !isset($this->expiries[$key])) {
- CacheItem::validateKey($key);
- }
- }
-
- return $this->generateItems($keys, microtime(true), $this->createCacheItem);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- foreach ($keys as $key) {
- $this->deleteItem($key);
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- if (!$item instanceof CacheItem) {
- return false;
- }
- $item = (array) $item;
- $key = $item["\0*\0key"];
- $value = $item["\0*\0value"];
- $expiry = $item["\0*\0expiry"];
-
- if (null !== $expiry && $expiry <= microtime(true)) {
- $this->deleteItem($key);
-
- return true;
- }
- if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) {
- return false;
- }
- if (null === $expiry && 0 < $item["\0*\0defaultLifetime"]) {
- $expiry = microtime(true) + $item["\0*\0defaultLifetime"];
- }
-
- $this->values[$key] = $value;
- $this->expiries[$key] = null !== $expiry ? $expiry : PHP_INT_MAX;
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- return $this->save($item);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete(string $key): bool
- {
- return $this->deleteItem($key);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ChainAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ChainAdapter.php
deleted file mode 100644
index 63e97a8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ChainAdapter.php
+++ /dev/null
@@ -1,332 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * Chains several adapters together.
- *
- * Cached items are fetched from the first adapter having them in its data store.
- * They are saved and deleted in all adapters at once.
- *
- * @author Kévin Dunglas <dunglas@gmail.com>
- */
-class ChainAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
-{
- use ContractsTrait;
-
- private $adapters = [];
- private $adapterCount;
- private $syncItem;
-
- /**
- * @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items
- * @param int $defaultLifetime The default lifetime of items propagated from lower adapters to upper ones
- */
- public function __construct(array $adapters, int $defaultLifetime = 0)
- {
- if (!$adapters) {
- throw new InvalidArgumentException('At least one adapter must be specified.');
- }
-
- foreach ($adapters as $adapter) {
- if (!$adapter instanceof CacheItemPoolInterface) {
- throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', \get_class($adapter), CacheItemPoolInterface::class));
- }
-
- if ($adapter instanceof AdapterInterface) {
- $this->adapters[] = $adapter;
- } else {
- $this->adapters[] = new ProxyAdapter($adapter);
- }
- }
- $this->adapterCount = \count($this->adapters);
-
- $this->syncItem = \Closure::bind(
- static function ($sourceItem, $item, $sourceMetadata = null) use ($defaultLifetime) {
- $sourceItem->isTaggable = false;
- $sourceMetadata = $sourceMetadata ?? $sourceItem->metadata;
- unset($sourceMetadata[CacheItem::METADATA_TAGS]);
-
- $item->value = $sourceItem->value;
- $item->expiry = $sourceMetadata[CacheItem::METADATA_EXPIRY] ?? $sourceItem->expiry;
- $item->isHit = $sourceItem->isHit;
- $item->metadata = $item->newMetadata = $sourceItem->metadata = $sourceMetadata;
-
- if (0 < $sourceItem->defaultLifetime && $sourceItem->defaultLifetime < $defaultLifetime) {
- $defaultLifetime = $sourceItem->defaultLifetime;
- }
- if (0 < $defaultLifetime && ($item->defaultLifetime <= 0 || $defaultLifetime < $item->defaultLifetime)) {
- $item->defaultLifetime = $defaultLifetime;
- }
-
- return $item;
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- $lastItem = null;
- $i = 0;
- $wrap = function (CacheItem $item = null) use ($key, $callback, $beta, &$wrap, &$i, &$lastItem, &$metadata) {
- $adapter = $this->adapters[$i];
- if (isset($this->adapters[++$i])) {
- $callback = $wrap;
- $beta = INF === $beta ? INF : 0;
- }
- if ($adapter instanceof CacheInterface) {
- $value = $adapter->get($key, $callback, $beta, $metadata);
- } else {
- $value = $this->doGet($adapter, $key, $callback, $beta, $metadata);
- }
- if (null !== $item) {
- ($this->syncItem)($lastItem = $lastItem ?? $item, $item, $metadata);
- }
-
- return $value;
- };
-
- return $wrap();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- $syncItem = $this->syncItem;
- $misses = [];
-
- foreach ($this->adapters as $i => $adapter) {
- $item = $adapter->getItem($key);
-
- if ($item->isHit()) {
- while (0 <= --$i) {
- $this->adapters[$i]->save($syncItem($item, $misses[$i]));
- }
-
- return $item;
- }
-
- $misses[$i] = $item;
- }
-
- return $item;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- return $this->generateItems($this->adapters[0]->getItems($keys), 0);
- }
-
- private function generateItems(iterable $items, int $adapterIndex)
- {
- $missing = [];
- $misses = [];
- $nextAdapterIndex = $adapterIndex + 1;
- $nextAdapter = isset($this->adapters[$nextAdapterIndex]) ? $this->adapters[$nextAdapterIndex] : null;
-
- foreach ($items as $k => $item) {
- if (!$nextAdapter || $item->isHit()) {
- yield $k => $item;
- } else {
- $missing[] = $k;
- $misses[$k] = $item;
- }
- }
-
- if ($missing) {
- $syncItem = $this->syncItem;
- $adapter = $this->adapters[$adapterIndex];
- $items = $this->generateItems($nextAdapter->getItems($missing), $nextAdapterIndex);
-
- foreach ($items as $k => $item) {
- if ($item->isHit()) {
- $adapter->save($syncItem($item, $misses[$k]));
- }
-
- yield $k => $item;
- }
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- foreach ($this->adapters as $adapter) {
- if ($adapter->hasItem($key)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
- $cleared = true;
- $i = $this->adapterCount;
-
- while ($i--) {
- if ($this->adapters[$i] instanceof AdapterInterface) {
- $cleared = $this->adapters[$i]->clear($prefix) && $cleared;
- } else {
- $cleared = $this->adapters[$i]->clear() && $cleared;
- }
- }
-
- return $cleared;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- $deleted = true;
- $i = $this->adapterCount;
-
- while ($i--) {
- $deleted = $this->adapters[$i]->deleteItem($key) && $deleted;
- }
-
- return $deleted;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- $deleted = true;
- $i = $this->adapterCount;
-
- while ($i--) {
- $deleted = $this->adapters[$i]->deleteItems($keys) && $deleted;
- }
-
- return $deleted;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- $saved = true;
- $i = $this->adapterCount;
-
- while ($i--) {
- $saved = $this->adapters[$i]->save($item) && $saved;
- }
-
- return $saved;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- $saved = true;
- $i = $this->adapterCount;
-
- while ($i--) {
- $saved = $this->adapters[$i]->saveDeferred($item) && $saved;
- }
-
- return $saved;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- $committed = true;
- $i = $this->adapterCount;
-
- while ($i--) {
- $committed = $this->adapters[$i]->commit() && $committed;
- }
-
- return $committed;
- }
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- $pruned = true;
-
- foreach ($this->adapters as $adapter) {
- if ($adapter instanceof PruneableInterface) {
- $pruned = $adapter->prune() && $pruned;
- }
- }
-
- return $pruned;
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- foreach ($this->adapters as $adapter) {
- if ($adapter instanceof ResetInterface) {
- $adapter->reset();
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/DoctrineAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/DoctrineAdapter.php
deleted file mode 100644
index 75ae4cb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/DoctrineAdapter.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Doctrine\Common\Cache\CacheProvider;
-use Symfony\Component\Cache\Traits\DoctrineTrait;
-
-class DoctrineAdapter extends AbstractAdapter
-{
- use DoctrineTrait;
-
- public function __construct(CacheProvider $provider, string $namespace = '', int $defaultLifetime = 0)
- {
- parent::__construct('', $defaultLifetime);
- $this->provider = $provider;
- $provider->setNamespace($namespace);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemAdapter.php
deleted file mode 100644
index 7185dd4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemAdapter.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\FilesystemTrait;
-
-class FilesystemAdapter extends AbstractAdapter implements PruneableInterface
-{
- use FilesystemTrait;
-
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null)
- {
- $this->marshaller = $marshaller ?? new DefaultMarshaller();
- parent::__construct('', $defaultLifetime);
- $this->init($namespace, $directory);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php
deleted file mode 100644
index d9a1ad3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php
+++ /dev/null
@@ -1,239 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\Marshaller\TagAwareMarshaller;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\FilesystemTrait;
-
-/**
- * Stores tag id <> cache id relationship as a symlink, and lookup on invalidation calls.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author André Rømcke <andre.romcke+symfony@gmail.com>
- */
-class FilesystemTagAwareAdapter extends AbstractTagAwareAdapter implements PruneableInterface
-{
- use FilesystemTrait {
- doClear as private doClearCache;
- doSave as private doSaveCache;
- }
-
- /**
- * Folder used for tag symlinks.
- */
- private const TAG_FOLDER = 'tags';
-
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null)
- {
- $this->marshaller = new TagAwareMarshaller($marshaller);
- parent::__construct('', $defaultLifetime);
- $this->init($namespace, $directory);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- $ok = $this->doClearCache($namespace);
-
- if ('' !== $namespace) {
- return $ok;
- }
-
- set_error_handler(static function () {});
- $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
-
- try {
- foreach ($this->scanHashDir($this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR) as $dir) {
- if (rename($dir, $renamed = substr_replace($dir, bin2hex(random_bytes(4)), -8))) {
- $dir = $renamed.\DIRECTORY_SEPARATOR;
- } else {
- $dir .= \DIRECTORY_SEPARATOR;
- $renamed = null;
- }
-
- for ($i = 0; $i < 38; ++$i) {
- if (!file_exists($dir.$chars[$i])) {
- continue;
- }
- for ($j = 0; $j < 38; ++$j) {
- if (!file_exists($d = $dir.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) {
- continue;
- }
- foreach (scandir($d, SCANDIR_SORT_NONE) ?: [] as $link) {
- if ('.' !== $link && '..' !== $link && (null !== $renamed || !realpath($d.\DIRECTORY_SEPARATOR.$link))) {
- unlink($d.\DIRECTORY_SEPARATOR.$link);
- }
- }
- null === $renamed ?: rmdir($d);
- }
- null === $renamed ?: rmdir($dir.$chars[$i]);
- }
- null === $renamed ?: rmdir($renamed);
- }
- } finally {
- restore_error_handler();
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, ?int $lifetime, array $addTagData = [], array $removeTagData = []): array
- {
- $failed = $this->doSaveCache($values, $lifetime);
-
- // Add Tags as symlinks
- foreach ($addTagData as $tagId => $ids) {
- $tagFolder = $this->getTagFolder($tagId);
- foreach ($ids as $id) {
- if ($failed && \in_array($id, $failed, true)) {
- continue;
- }
-
- $file = $this->getFile($id);
-
- if (!@symlink($file, $this->getFile($id, true, $tagFolder))) {
- @unlink($file);
- $failed[] = $id;
- }
- }
- }
-
- // Unlink removed Tags
- foreach ($removeTagData as $tagId => $ids) {
- $tagFolder = $this->getTagFolder($tagId);
- foreach ($ids as $id) {
- if ($failed && \in_array($id, $failed, true)) {
- continue;
- }
-
- @unlink($this->getFile($id, false, $tagFolder));
- }
- }
-
- return $failed;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDeleteYieldTags(array $ids): iterable
- {
- foreach ($ids as $id) {
- $file = $this->getFile($id);
- if (!file_exists($file) || !$h = @fopen($file, 'rb')) {
- continue;
- }
-
- if ((\PHP_VERSION_ID >= 70300 || '\\' !== \DIRECTORY_SEPARATOR) && !@unlink($file)) {
- fclose($h);
- continue;
- }
-
- $meta = explode("\n", fread($h, 4096), 3)[2] ?? '';
-
- // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
- if (13 < \strlen($meta) && "\x9D" === $meta[0] && "\0" === $meta[5] && "\x5F" === $meta[9]) {
- $meta[9] = "\0";
- $tagLen = unpack('Nlen', $meta, 9)['len'];
- $meta = substr($meta, 13, $tagLen);
-
- if (0 < $tagLen -= \strlen($meta)) {
- $meta .= fread($h, $tagLen);
- }
-
- try {
- yield $id => '' === $meta ? [] : $this->marshaller->unmarshall($meta);
- } catch (\Exception $e) {
- yield $id => [];
- }
- }
-
- fclose($h);
-
- if (\PHP_VERSION_ID < 70300 && '\\' === \DIRECTORY_SEPARATOR) {
- @unlink($file);
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDeleteTagRelations(array $tagData): bool
- {
- foreach ($tagData as $tagId => $idList) {
- $tagFolder = $this->getTagFolder($tagId);
- foreach ($idList as $id) {
- @unlink($this->getFile($id, false, $tagFolder));
- }
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doInvalidate(array $tagIds): bool
- {
- foreach ($tagIds as $tagId) {
- if (!file_exists($tagFolder = $this->getTagFolder($tagId))) {
- continue;
- }
-
- set_error_handler(static function () {});
-
- try {
- if (rename($tagFolder, $renamed = substr_replace($tagFolder, bin2hex(random_bytes(4)), -9))) {
- $tagFolder = $renamed.\DIRECTORY_SEPARATOR;
- } else {
- $renamed = null;
- }
-
- foreach ($this->scanHashDir($tagFolder) as $itemLink) {
- unlink(realpath($itemLink) ?: $itemLink);
- unlink($itemLink);
- }
-
- if (null === $renamed) {
- continue;
- }
-
- $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
-
- for ($i = 0; $i < 38; ++$i) {
- for ($j = 0; $j < 38; ++$j) {
- rmdir($tagFolder.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j]);
- }
- rmdir($tagFolder.$chars[$i]);
- }
- rmdir($renamed);
- } finally {
- restore_error_handler();
- }
- }
-
- return true;
- }
-
- private function getTagFolder(string $tagId): string
- {
- return $this->getFile($tagId, false, $this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/MemcachedAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/MemcachedAdapter.php
deleted file mode 100644
index b678bb5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/MemcachedAdapter.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\Traits\MemcachedTrait;
-
-class MemcachedAdapter extends AbstractAdapter
-{
- use MemcachedTrait;
-
- protected $maxIdLength = 250;
-
- /**
- * Using a MemcachedAdapter with a TagAwareAdapter for storing tags is discouraged.
- * Using a RedisAdapter is recommended instead. If you cannot do otherwise, be aware that:
- * - the Memcached::OPT_BINARY_PROTOCOL must be enabled
- * (that's the default when using MemcachedAdapter::createConnection());
- * - tags eviction by Memcached's LRU algorithm will break by-tags invalidation;
- * your Memcached memory should be large enough to never trigger LRU.
- *
- * Using a MemcachedAdapter as a pure items store is fine.
- */
- public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
- {
- $this->init($client, $namespace, $defaultLifetime, $marshaller);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/NullAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/NullAdapter.php
deleted file mode 100644
index a2fdd36..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/NullAdapter.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Contracts\Cache\CacheInterface;
-
-/**
- * @author Titouan Galopin <galopintitouan@gmail.com>
- */
-class NullAdapter implements AdapterInterface, CacheInterface
-{
- private $createCacheItem;
-
- public function __construct()
- {
- $this->createCacheItem = \Closure::bind(
- function ($key) {
- $item = new CacheItem();
- $item->key = $key;
- $item->isHit = false;
-
- return $item;
- },
- $this,
- CacheItem::class
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- $save = true;
-
- return $callback(($this->createCacheItem)($key), $save);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- $f = $this->createCacheItem;
-
- return $f($key);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- return $this->generateItems($keys);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete(string $key): bool
- {
- return $this->deleteItem($key);
- }
-
- private function generateItems(array $keys)
- {
- $f = $this->createCacheItem;
-
- foreach ($keys as $key) {
- yield $key => $f($key);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PdoAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PdoAdapter.php
deleted file mode 100644
index d118736..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PdoAdapter.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Doctrine\DBAL\Connection;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\PdoTrait;
-
-class PdoAdapter extends AbstractAdapter implements PruneableInterface
-{
- use PdoTrait;
-
- protected $maxIdLength = 255;
-
- /**
- * You can either pass an existing database connection as PDO instance or
- * a Doctrine DBAL Connection or a DSN string that will be used to
- * lazy-connect to the database when the cache is actually used.
- *
- * When a Doctrine DBAL Connection is passed, the cache table is created
- * automatically when possible. Otherwise, use the createTable() method.
- *
- * List of available options:
- * * db_table: The name of the table [default: cache_items]
- * * db_id_col: The column where to store the cache id [default: item_id]
- * * db_data_col: The column where to store the cache data [default: item_data]
- * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime]
- * * db_time_col: The column where to store the timestamp [default: item_time]
- * * db_username: The username when lazy-connect [default: '']
- * * db_password: The password when lazy-connect [default: '']
- * * db_connection_options: An array of driver-specific connection options [default: []]
- *
- * @param \PDO|Connection|string $connOrDsn a \PDO or Connection instance or DSN string or null
- *
- * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string
- * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION
- * @throws InvalidArgumentException When namespace contains invalid characters
- */
- public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], MarshallerInterface $marshaller = null)
- {
- $this->init($connOrDsn, $namespace, $defaultLifetime, $options, $marshaller);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpArrayAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpArrayAdapter.php
deleted file mode 100644
index b4f13d1..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpArrayAdapter.php
+++ /dev/null
@@ -1,332 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Component\Cache\Traits\PhpArrayTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-/**
- * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0.
- * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter.
- *
- * @author Titouan Galopin <galopintitouan@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
-{
- use PhpArrayTrait;
- use ContractsTrait;
-
- private $createCacheItem;
-
- /**
- * @param string $file The PHP file were values are cached
- * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit
- */
- public function __construct(string $file, AdapterInterface $fallbackPool)
- {
- $this->file = $file;
- $this->pool = $fallbackPool;
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, $isHit) {
- $item = new CacheItem();
- $item->key = $key;
- $item->value = $value;
- $item->isHit = $isHit;
-
- return $item;
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * This adapter takes advantage of how PHP stores arrays in its latest versions.
- *
- * @param string $file The PHP file were values are cached
- * @param CacheItemPoolInterface $fallbackPool A pool to fallback on when an item is not hit
- *
- * @return CacheItemPoolInterface
- */
- public static function create($file, CacheItemPoolInterface $fallbackPool)
- {
- if (!$fallbackPool instanceof AdapterInterface) {
- $fallbackPool = new ProxyAdapter($fallbackPool);
- }
-
- return new static($file, $fallbackPool);
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- if (null === $this->values) {
- $this->initialize();
- }
- if (!isset($this->keys[$key])) {
- get_from_pool:
- if ($this->pool instanceof CacheInterface) {
- return $this->pool->get($key, $callback, $beta, $metadata);
- }
-
- return $this->doGet($this->pool, $key, $callback, $beta, $metadata);
- }
- $value = $this->values[$this->keys[$key]];
-
- if ('N;' === $value) {
- return null;
- }
- try {
- if ($value instanceof \Closure) {
- return $value();
- }
- } catch (\Throwable $e) {
- unset($this->keys[$key]);
- goto get_from_pool;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
- if (!isset($this->keys[$key])) {
- return $this->pool->getItem($key);
- }
-
- $value = $this->values[$this->keys[$key]];
- $isHit = true;
-
- if ('N;' === $value) {
- $value = null;
- } elseif ($value instanceof \Closure) {
- try {
- $value = $value();
- } catch (\Throwable $e) {
- $value = null;
- $isHit = false;
- }
- }
-
- $f = $this->createCacheItem;
-
- return $f($key, $value, $isHit);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- foreach ($keys as $key) {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return $this->generateItems($keys);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return isset($this->keys[$key]) || $this->pool->hasItem($key);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return !isset($this->keys[$key]) && $this->pool->deleteItem($key);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- $deleted = true;
- $fallbackKeys = [];
-
- foreach ($keys as $key) {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
-
- if (isset($this->keys[$key])) {
- $deleted = false;
- } else {
- $fallbackKeys[] = $key;
- }
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- if ($fallbackKeys) {
- $deleted = $this->pool->deleteItems($fallbackKeys) && $deleted;
- }
-
- return $deleted;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- if (null === $this->values) {
- $this->initialize();
- }
-
- return !isset($this->keys[$item->getKey()]) && $this->pool->save($item);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- if (null === $this->values) {
- $this->initialize();
- }
-
- return !isset($this->keys[$item->getKey()]) && $this->pool->saveDeferred($item);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- return $this->pool->commit();
- }
-
- private function generateItems(array $keys): \Generator
- {
- $f = $this->createCacheItem;
- $fallbackKeys = [];
-
- foreach ($keys as $key) {
- if (isset($this->keys[$key])) {
- $value = $this->values[$this->keys[$key]];
-
- if ('N;' === $value) {
- yield $key => $f($key, null, true);
- } elseif ($value instanceof \Closure) {
- try {
- yield $key => $f($key, $value(), true);
- } catch (\Throwable $e) {
- yield $key => $f($key, null, false);
- }
- } else {
- yield $key => $f($key, $value, true);
- }
- } else {
- $fallbackKeys[] = $key;
- }
- }
-
- if ($fallbackKeys) {
- yield from $this->pool->getItems($fallbackKeys);
- }
- }
-
- /**
- * @throws \ReflectionException When $class is not found and is required
- *
- * @internal to be removed in Symfony 5.0
- */
- public static function throwOnRequiredClass($class)
- {
- $e = new \ReflectionException("Class $class does not exist");
- $trace = debug_backtrace();
- $autoloadFrame = [
- 'function' => 'spl_autoload_call',
- 'args' => [$class],
- ];
- $i = 1 + array_search($autoloadFrame, $trace, true);
-
- if (isset($trace[$i]['function']) && !isset($trace[$i]['class'])) {
- switch ($trace[$i]['function']) {
- case 'get_class_methods':
- case 'get_class_vars':
- case 'get_parent_class':
- case 'is_a':
- case 'is_subclass_of':
- case 'class_exists':
- case 'class_implements':
- case 'class_parents':
- case 'trait_exists':
- case 'defined':
- case 'interface_exists':
- case 'method_exists':
- case 'property_exists':
- case 'is_callable':
- return;
- }
- }
-
- throw $e;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpFilesAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpFilesAdapter.php
deleted file mode 100644
index 10938a0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/PhpFilesAdapter.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Component\Cache\Exception\CacheException;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\PhpFilesTrait;
-
-class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface
-{
- use PhpFilesTrait;
-
- /**
- * @param $appendOnly Set to `true` to gain extra performance when the items stored in this pool never expire.
- * Doing so is encouraged because it fits perfectly OPcache's memory model.
- *
- * @throws CacheException if OPcache is not enabled
- */
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, bool $appendOnly = false)
- {
- $this->appendOnly = $appendOnly;
- self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time();
- parent::__construct('', $defaultLifetime);
- $this->init($namespace, $directory);
- $this->includeHandler = static function ($type, $msg, $file, $line) {
- throw new \ErrorException($msg, 0, $type, $file, $line);
- };
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ProxyAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ProxyAdapter.php
deleted file mode 100644
index bccafb3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/ProxyAdapter.php
+++ /dev/null
@@ -1,269 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Component\Cache\Traits\ProxyTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ProxyAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
-{
- use ProxyTrait;
- use ContractsTrait;
-
- private $namespace;
- private $namespaceLen;
- private $createCacheItem;
- private $setInnerItem;
- private $poolHash;
-
- public function __construct(CacheItemPoolInterface $pool, string $namespace = '', int $defaultLifetime = 0)
- {
- $this->pool = $pool;
- $this->poolHash = $poolHash = spl_object_hash($pool);
- $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace);
- $this->namespaceLen = \strlen($namespace);
- $this->createCacheItem = \Closure::bind(
- static function ($key, $innerItem) use ($defaultLifetime, $poolHash) {
- $item = new CacheItem();
- $item->key = $key;
-
- if (null === $innerItem) {
- return $item;
- }
-
- $item->value = $v = $innerItem->get();
- $item->isHit = $innerItem->isHit();
- $item->innerItem = $innerItem;
- $item->defaultLifetime = $defaultLifetime;
- $item->poolHash = $poolHash;
-
- // Detect wrapped values that encode for their expiry and creation duration
- // For compactness, these values are packed in the key of an array using
- // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
- if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = key($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) {
- $item->value = $v[$k];
- $v = unpack('Ve/Nc', substr($k, 1, -1));
- $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET;
- $item->metadata[CacheItem::METADATA_CTIME] = $v['c'];
- } elseif ($innerItem instanceof CacheItem) {
- $item->metadata = $innerItem->metadata;
- }
- $innerItem->set(null);
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $this->setInnerItem = \Closure::bind(
- /**
- * @param array $item A CacheItem cast to (array); accessing protected properties requires adding the "\0*\0" PHP prefix
- */
- static function (CacheItemInterface $innerItem, array $item) {
- // Tags are stored separately, no need to account for them when considering this item's newly set metadata
- if (isset(($metadata = $item["\0*\0newMetadata"])[CacheItem::METADATA_TAGS])) {
- unset($metadata[CacheItem::METADATA_TAGS]);
- }
- if ($metadata) {
- // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators
- $item["\0*\0value"] = ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item["\0*\0value"]];
- }
- $innerItem->set($item["\0*\0value"]);
- $innerItem->expiresAt(null !== $item["\0*\0expiry"] ? \DateTime::createFromFormat('U.u', sprintf('%.6f', $item["\0*\0expiry"])) : null);
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- if (!$this->pool instanceof CacheInterface) {
- return $this->doGet($this, $key, $callback, $beta, $metadata);
- }
-
- return $this->pool->get($this->getId($key), function ($innerItem, bool &$save) use ($key, $callback) {
- $item = ($this->createCacheItem)($key, $innerItem);
- $item->set($value = $callback($item, $save));
- ($this->setInnerItem)($innerItem, (array) $item);
-
- return $value;
- }, $beta, $metadata);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- $f = $this->createCacheItem;
- $item = $this->pool->getItem($this->getId($key));
-
- return $f($key, $item);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- if ($this->namespaceLen) {
- foreach ($keys as $i => $key) {
- $keys[$i] = $this->getId($key);
- }
- }
-
- return $this->generateItems($this->pool->getItems($keys));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- return $this->pool->hasItem($this->getId($key));
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
-
- if ($this->pool instanceof AdapterInterface) {
- return $this->pool->clear($this->namespace.$prefix);
- }
-
- return $this->pool->clear();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- return $this->pool->deleteItem($this->getId($key));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- if ($this->namespaceLen) {
- foreach ($keys as $i => $key) {
- $keys[$i] = $this->getId($key);
- }
- }
-
- return $this->pool->deleteItems($keys);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- return $this->doSave($item, __FUNCTION__);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- return $this->doSave($item, __FUNCTION__);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- return $this->pool->commit();
- }
-
- private function doSave(CacheItemInterface $item, string $method)
- {
- if (!$item instanceof CacheItem) {
- return false;
- }
- $item = (array) $item;
- if (null === $item["\0*\0expiry"] && 0 < $item["\0*\0defaultLifetime"]) {
- $item["\0*\0expiry"] = microtime(true) + $item["\0*\0defaultLifetime"];
- }
-
- if ($item["\0*\0poolHash"] === $this->poolHash && $item["\0*\0innerItem"]) {
- $innerItem = $item["\0*\0innerItem"];
- } elseif ($this->pool instanceof AdapterInterface) {
- // this is an optimization specific for AdapterInterface implementations
- // so we can save a round-trip to the backend by just creating a new item
- $f = $this->createCacheItem;
- $innerItem = $f($this->namespace.$item["\0*\0key"], null);
- } else {
- $innerItem = $this->pool->getItem($this->namespace.$item["\0*\0key"]);
- }
-
- ($this->setInnerItem)($innerItem, $item);
-
- return $this->pool->$method($innerItem);
- }
-
- private function generateItems(iterable $items)
- {
- $f = $this->createCacheItem;
-
- foreach ($items as $key => $item) {
- if ($this->namespaceLen) {
- $key = substr($key, $this->namespaceLen);
- }
-
- yield $key => $f($key, $item);
- }
- }
-
- private function getId($key): string
- {
- CacheItem::validateKey($key);
-
- return $this->namespace.$key;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/Psr16Adapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/Psr16Adapter.php
deleted file mode 100644
index bb38871..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/Psr16Adapter.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\SimpleCache\CacheInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ProxyTrait;
-
-/**
- * Turns a PSR-16 cache into a PSR-6 one.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class Psr16Adapter extends AbstractAdapter implements PruneableInterface, ResettableInterface
-{
- /**
- * @internal
- */
- protected const NS_SEPARATOR = '_';
-
- use ProxyTrait;
-
- private $miss;
-
- public function __construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime = 0)
- {
- parent::__construct($namespace, $defaultLifetime);
-
- $this->pool = $pool;
- $this->miss = new \stdClass();
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) {
- if ($this->miss !== $value) {
- yield $key => $value;
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- return $this->pool->has($id);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- return $this->pool->clear();
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- return $this->pool->deleteMultiple($ids);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisAdapter.php
deleted file mode 100644
index 5c49f7a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisAdapter.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\Traits\RedisTrait;
-
-class RedisAdapter extends AbstractAdapter
-{
- use RedisTrait;
-
- /**
- * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redisClient The redis client
- * @param string $namespace The default namespace
- * @param int $defaultLifetime The default lifetime
- */
- public function __construct($redisClient, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
- {
- $this->init($redisClient, $namespace, $defaultLifetime, $marshaller);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php
deleted file mode 100644
index 1dbce4b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php
+++ /dev/null
@@ -1,292 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Predis\Connection\Aggregate\ClusterInterface;
-use Predis\Connection\Aggregate\PredisCluster;
-use Predis\Response\Status;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Marshaller\DeflateMarshaller;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\Marshaller\TagAwareMarshaller;
-use Symfony\Component\Cache\Traits\RedisTrait;
-
-/**
- * Stores tag id <> cache id relationship as a Redis Set, lookup on invalidation using RENAME+SMEMBERS.
- *
- * Set (tag relation info) is stored without expiry (non-volatile), while cache always gets an expiry (volatile) even
- * if not set by caller. Thus if you configure redis with the right eviction policy you can be safe this tag <> cache
- * relationship survives eviction (cache cleanup when Redis runs out of memory).
- *
- * Requirements:
- * - Client: PHP Redis or Predis
- * Note: Due to lack of RENAME support it is NOT recommended to use Cluster on Predis, instead use phpredis.
- * - Server: Redis 2.8+
- * Configured with any `volatile-*` eviction policy, OR `noeviction` if it will NEVER fill up memory
- *
- * Design limitations:
- * - Max 4 billion cache keys per cache tag as limited by Redis Set datatype.
- * E.g. If you use a "all" items tag for expiry instead of clear(), that limits you to 4 billion cache items also.
- *
- * @see https://redis.io/topics/lru-cache#eviction-policies Documentation for Redis eviction policies.
- * @see https://redis.io/topics/data-types#sets Documentation for Redis Set datatype.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author André Rømcke <andre.romcke+symfony@gmail.com>
- */
-class RedisTagAwareAdapter extends AbstractTagAwareAdapter
-{
- use RedisTrait;
-
- /**
- * Limits for how many keys are deleted in batch.
- */
- private const BULK_DELETE_LIMIT = 10000;
-
- /**
- * On cache items without a lifetime set, we set it to 100 days. This is to make sure cache items are
- * preferred to be evicted over tag Sets, if eviction policy is configured according to requirements.
- */
- private const DEFAULT_CACHE_TTL = 8640000;
-
- /**
- * @var string|null detected eviction policy used on Redis server
- */
- private $redisEvictionPolicy;
-
- /**
- * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redisClient The redis client
- * @param string $namespace The default namespace
- * @param int $defaultLifetime The default lifetime
- */
- public function __construct($redisClient, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
- {
- if ($redisClient instanceof \Predis\ClientInterface && $redisClient->getConnection() instanceof ClusterInterface && !$redisClient->getConnection() instanceof PredisCluster) {
- throw new InvalidArgumentException(sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, \get_class($redisClient->getConnection())));
- }
-
- if (\defined('Redis::OPT_COMPRESSION') && ($redisClient instanceof \Redis || $redisClient instanceof \RedisArray || $redisClient instanceof \RedisCluster)) {
- $compression = $redisClient->getOption(\Redis::OPT_COMPRESSION);
-
- foreach (\is_array($compression) ? $compression : [$compression] as $c) {
- if (\Redis::COMPRESSION_NONE !== $c) {
- throw new InvalidArgumentException(sprintf('phpredis compression must be disabled when using "%s", use "%s" instead.', \get_class($this), DeflateMarshaller::class));
- }
- }
- }
-
- $this->init($redisClient, $namespace, $defaultLifetime, new TagAwareMarshaller($marshaller));
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, ?int $lifetime, array $addTagData = [], array $delTagData = []): array
- {
- $eviction = $this->getRedisEvictionPolicy();
- if ('noeviction' !== $eviction && 0 !== strpos($eviction, 'volatile-')) {
- CacheItem::log($this->logger, sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies', $eviction));
-
- return false;
- }
-
- // serialize values
- if (!$serialized = $this->marshaller->marshall($values, $failed)) {
- return $failed;
- }
-
- // While pipeline isn't supported on RedisCluster, other setups will at least benefit from doing this in one op
- $results = $this->pipeline(static function () use ($serialized, $lifetime, $addTagData, $delTagData, $failed) {
- // Store cache items, force a ttl if none is set, as there is no MSETEX we need to set each one
- foreach ($serialized as $id => $value) {
- yield 'setEx' => [
- $id,
- 0 >= $lifetime ? self::DEFAULT_CACHE_TTL : $lifetime,
- $value,
- ];
- }
-
- // Add and Remove Tags
- foreach ($addTagData as $tagId => $ids) {
- if (!$failed || $ids = array_diff($ids, $failed)) {
- yield 'sAdd' => array_merge([$tagId], $ids);
- }
- }
-
- foreach ($delTagData as $tagId => $ids) {
- if (!$failed || $ids = array_diff($ids, $failed)) {
- yield 'sRem' => array_merge([$tagId], $ids);
- }
- }
- });
-
- foreach ($results as $id => $result) {
- // Skip results of SADD/SREM operations, they'll be 1 or 0 depending on if set value already existed or not
- if (is_numeric($result)) {
- continue;
- }
- // setEx results
- if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) {
- $failed[] = $id;
- }
- }
-
- return $failed;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDeleteYieldTags(array $ids): iterable
- {
- $lua = <<<'EOLUA'
- local v = redis.call('GET', KEYS[1])
- redis.call('DEL', KEYS[1])
-
- if not v or v:len() <= 13 or v:byte(1) ~= 0x9D or v:byte(6) ~= 0 or v:byte(10) ~= 0x5F then
- return ''
- end
-
- return v:sub(14, 13 + v:byte(13) + v:byte(12) * 256 + v:byte(11) * 65536)
-EOLUA;
-
- if ($this->redis instanceof \Predis\ClientInterface) {
- $evalArgs = [$lua, 1, &$id];
- } else {
- $evalArgs = [$lua, [&$id], 1];
- }
-
- $results = $this->pipeline(function () use ($ids, &$id, $evalArgs) {
- foreach ($ids as $id) {
- yield 'eval' => $evalArgs;
- }
- });
-
- foreach ($results as $id => $result) {
- try {
- yield $id => !\is_string($result) || '' === $result ? [] : $this->marshaller->unmarshall($result);
- } catch (\Exception $e) {
- yield $id => [];
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDeleteTagRelations(array $tagData): bool
- {
- $this->pipeline(static function () use ($tagData) {
- foreach ($tagData as $tagId => $idList) {
- array_unshift($idList, $tagId);
- yield 'sRem' => $idList;
- }
- })->rewind();
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doInvalidate(array $tagIds): bool
- {
- if (!$this->redis instanceof \Predis\ClientInterface || !$this->redis->getConnection() instanceof PredisCluster) {
- $movedTagSetIds = $this->renameKeys($this->redis, $tagIds);
- } else {
- $clusterConnection = $this->redis->getConnection();
- $tagIdsByConnection = new \SplObjectStorage();
- $movedTagSetIds = [];
-
- foreach ($tagIds as $id) {
- $connection = $clusterConnection->getConnectionByKey($id);
- $slot = $tagIdsByConnection[$connection] ?? $tagIdsByConnection[$connection] = new \ArrayObject();
- $slot[] = $id;
- }
-
- foreach ($tagIdsByConnection as $connection) {
- $slot = $tagIdsByConnection[$connection];
- $movedTagSetIds = array_merge($movedTagSetIds, $this->renameKeys(new $this->redis($connection, $this->redis->getOptions()), $slot->getArrayCopy()));
- }
- }
-
- // No Sets found
- if (!$movedTagSetIds) {
- return false;
- }
-
- // Now safely take the time to read the keys in each set and collect ids we need to delete
- $tagIdSets = $this->pipeline(static function () use ($movedTagSetIds) {
- foreach ($movedTagSetIds as $movedTagId) {
- yield 'sMembers' => [$movedTagId];
- }
- });
-
- // Return combination of the temporary Tag Set ids and their values (cache ids)
- $ids = array_merge($movedTagSetIds, ...iterator_to_array($tagIdSets, false));
-
- // Delete cache in chunks to avoid overloading the connection
- foreach (array_chunk(array_unique($ids), self::BULK_DELETE_LIMIT) as $chunkIds) {
- $this->doDelete($chunkIds);
- }
-
- return true;
- }
-
- /**
- * Renames several keys in order to be able to operate on them without risk of race conditions.
- *
- * Filters out keys that do not exist before returning new keys.
- *
- * @see https://redis.io/commands/rename
- * @see https://redis.io/topics/cluster-spec#keys-hash-tags
- *
- * @return array Filtered list of the valid moved keys (only those that existed)
- */
- private function renameKeys($redis, array $ids): array
- {
- $newIds = [];
- $uniqueToken = bin2hex(random_bytes(10));
-
- $results = $this->pipeline(static function () use ($ids, $uniqueToken) {
- foreach ($ids as $id) {
- yield 'rename' => [$id, '{'.$id.'}'.$uniqueToken];
- }
- }, $redis);
-
- foreach ($results as $id => $result) {
- if (true === $result || ($result instanceof Status && Status::get('OK') === $result)) {
- // Only take into account if ok (key existed), will be false on phpredis if it did not exist
- $newIds[] = '{'.$id.'}'.$uniqueToken;
- }
- }
-
- return $newIds;
- }
-
- private function getRedisEvictionPolicy(): string
- {
- if (null !== $this->redisEvictionPolicy) {
- return $this->redisEvictionPolicy;
- }
-
- foreach ($this->getHosts() as $host) {
- $info = $host->info('Memory');
- $info = isset($info['Memory']) ? $info['Memory'] : $info;
-
- return $this->redisEvictionPolicy = $info['maxmemory_policy'];
- }
-
- return $this->redisEvictionPolicy = '';
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php
deleted file mode 100644
index d0d42e5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/SimpleCacheAdapter.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-@trigger_error(sprintf('The "%s" class is @deprecated since Symfony 4.3, use "Psr16Adapter" instead.', SimpleCacheAdapter::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use Psr16Adapter instead.
- */
-class SimpleCacheAdapter extends Psr16Adapter
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapter.php
deleted file mode 100644
index 7c0ee30..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapter.php
+++ /dev/null
@@ -1,429 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\InvalidArgumentException;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ContractsTrait;
-use Symfony\Component\Cache\Traits\ProxyTrait;
-use Symfony\Contracts\Cache\TagAwareCacheInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface
-{
- const TAGS_PREFIX = "\0tags\0";
-
- use ProxyTrait;
- use ContractsTrait;
-
- private $deferred = [];
- private $createCacheItem;
- private $setCacheItemTags;
- private $getTagsByKey;
- private $invalidateTags;
- private $tags;
- private $knownTagVersions = [];
- private $knownTagVersionsTtl;
-
- public function __construct(AdapterInterface $itemsPool, AdapterInterface $tagsPool = null, float $knownTagVersionsTtl = 0.15)
- {
- $this->pool = $itemsPool;
- $this->tags = $tagsPool ?: $itemsPool;
- $this->knownTagVersionsTtl = $knownTagVersionsTtl;
- $this->createCacheItem = \Closure::bind(
- static function ($key, $value, CacheItem $protoItem) {
- $item = new CacheItem();
- $item->key = $key;
- $item->value = $value;
- $item->defaultLifetime = $protoItem->defaultLifetime;
- $item->expiry = $protoItem->expiry;
- $item->poolHash = $protoItem->poolHash;
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $this->setCacheItemTags = \Closure::bind(
- static function (CacheItem $item, $key, array &$itemTags) {
- $item->isTaggable = true;
- if (!$item->isHit) {
- return $item;
- }
- if (isset($itemTags[$key])) {
- foreach ($itemTags[$key] as $tag => $version) {
- $item->metadata[CacheItem::METADATA_TAGS][$tag] = $tag;
- }
- unset($itemTags[$key]);
- } else {
- $item->value = null;
- $item->isHit = false;
- }
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $this->getTagsByKey = \Closure::bind(
- static function ($deferred) {
- $tagsByKey = [];
- foreach ($deferred as $key => $item) {
- $tagsByKey[$key] = $item->newMetadata[CacheItem::METADATA_TAGS] ?? [];
- }
-
- return $tagsByKey;
- },
- null,
- CacheItem::class
- );
- $this->invalidateTags = \Closure::bind(
- static function (AdapterInterface $tagsAdapter, array $tags) {
- foreach ($tags as $v) {
- $v->defaultLifetime = 0;
- $v->expiry = null;
- $tagsAdapter->saveDeferred($v);
- }
-
- return $tagsAdapter->commit();
- },
- null,
- CacheItem::class
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function invalidateTags(array $tags)
- {
- $ok = true;
- $tagsByKey = [];
- $invalidatedTags = [];
- foreach ($tags as $tag) {
- CacheItem::validateKey($tag);
- $invalidatedTags[$tag] = 0;
- }
-
- if ($this->deferred) {
- $items = $this->deferred;
- foreach ($items as $key => $item) {
- if (!$this->pool->saveDeferred($item)) {
- unset($this->deferred[$key]);
- $ok = false;
- }
- }
-
- $f = $this->getTagsByKey;
- $tagsByKey = $f($items);
- $this->deferred = [];
- }
-
- $tagVersions = $this->getTagVersions($tagsByKey, $invalidatedTags);
- $f = $this->createCacheItem;
-
- foreach ($tagsByKey as $key => $tags) {
- $this->pool->saveDeferred($f(static::TAGS_PREFIX.$key, array_intersect_key($tagVersions, $tags), $items[$key]));
- }
- $ok = $this->pool->commit() && $ok;
-
- if ($invalidatedTags) {
- $f = $this->invalidateTags;
- $ok = $f($this->tags, $invalidatedTags) && $ok;
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- if ($this->deferred) {
- $this->commit();
- }
- if (!$this->pool->hasItem($key)) {
- return false;
- }
-
- $itemTags = $this->pool->getItem(static::TAGS_PREFIX.$key);
-
- if (!$itemTags->isHit()) {
- return false;
- }
-
- if (!$itemTags = $itemTags->get()) {
- return true;
- }
-
- foreach ($this->getTagVersions([$itemTags]) as $tag => $version) {
- if ($itemTags[$tag] !== $version && 1 !== $itemTags[$tag] - $version) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- foreach ($this->getItems([$key]) as $item) {
- return $item;
- }
-
- return null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- if ($this->deferred) {
- $this->commit();
- }
- $tagKeys = [];
-
- foreach ($keys as $key) {
- if ('' !== $key && \is_string($key)) {
- $key = static::TAGS_PREFIX.$key;
- $tagKeys[$key] = $key;
- }
- }
-
- try {
- $items = $this->pool->getItems($tagKeys + $keys);
- } catch (InvalidArgumentException $e) {
- $this->pool->getItems($keys); // Should throw an exception
-
- throw $e;
- }
-
- return $this->generateItems($items, $tagKeys);
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
-
- if ('' !== $prefix) {
- foreach ($this->deferred as $key => $item) {
- if (0 === strpos($key, $prefix)) {
- unset($this->deferred[$key]);
- }
- }
- } else {
- $this->deferred = [];
- }
-
- if ($this->pool instanceof AdapterInterface) {
- return $this->pool->clear($prefix);
- }
-
- return $this->pool->clear();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- return $this->deleteItems([$key]);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- foreach ($keys as $key) {
- if ('' !== $key && \is_string($key)) {
- $keys[] = static::TAGS_PREFIX.$key;
- }
- }
-
- return $this->pool->deleteItems($keys);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- if (!$item instanceof CacheItem) {
- return false;
- }
- $this->deferred[$item->getKey()] = $item;
-
- return $this->commit();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- if (!$item instanceof CacheItem) {
- return false;
- }
- $this->deferred[$item->getKey()] = $item;
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- return $this->invalidateTags([]);
- }
-
- public function __sleep()
- {
- throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
- }
-
- public function __wakeup()
- {
- throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
- }
-
- public function __destruct()
- {
- $this->commit();
- }
-
- private function generateItems(iterable $items, array $tagKeys)
- {
- $bufferedItems = $itemTags = [];
- $f = $this->setCacheItemTags;
-
- foreach ($items as $key => $item) {
- if (!$tagKeys) {
- yield $key => $f($item, static::TAGS_PREFIX.$key, $itemTags);
- continue;
- }
- if (!isset($tagKeys[$key])) {
- $bufferedItems[$key] = $item;
- continue;
- }
-
- unset($tagKeys[$key]);
-
- if ($item->isHit()) {
- $itemTags[$key] = $item->get() ?: [];
- }
-
- if (!$tagKeys) {
- $tagVersions = $this->getTagVersions($itemTags);
-
- foreach ($itemTags as $key => $tags) {
- foreach ($tags as $tag => $version) {
- if ($tagVersions[$tag] !== $version && 1 !== $version - $tagVersions[$tag]) {
- unset($itemTags[$key]);
- continue 2;
- }
- }
- }
- $tagVersions = $tagKeys = null;
-
- foreach ($bufferedItems as $key => $item) {
- yield $key => $f($item, static::TAGS_PREFIX.$key, $itemTags);
- }
- $bufferedItems = null;
- }
- }
- }
-
- private function getTagVersions(array $tagsByKey, array &$invalidatedTags = [])
- {
- $tagVersions = $invalidatedTags;
-
- foreach ($tagsByKey as $tags) {
- $tagVersions += $tags;
- }
-
- if (!$tagVersions) {
- return [];
- }
-
- if (!$fetchTagVersions = 1 !== \func_num_args()) {
- foreach ($tagsByKey as $tags) {
- foreach ($tags as $tag => $version) {
- if ($tagVersions[$tag] > $version) {
- $tagVersions[$tag] = $version;
- }
- }
- }
- }
-
- $now = microtime(true);
- $tags = [];
- foreach ($tagVersions as $tag => $version) {
- $tags[$tag.static::TAGS_PREFIX] = $tag;
- if ($fetchTagVersions || !isset($this->knownTagVersions[$tag])) {
- $fetchTagVersions = true;
- continue;
- }
- $version -= $this->knownTagVersions[$tag][1];
- if ((0 !== $version && 1 !== $version) || $now - $this->knownTagVersions[$tag][0] >= $this->knownTagVersionsTtl) {
- // reuse previously fetched tag versions up to the ttl, unless we are storing items or a potential miss arises
- $fetchTagVersions = true;
- } else {
- $this->knownTagVersions[$tag][1] += $version;
- }
- }
-
- if (!$fetchTagVersions) {
- return $tagVersions;
- }
-
- foreach ($this->tags->getItems(array_keys($tags)) as $tag => $version) {
- $tagVersions[$tag = $tags[$tag]] = $version->get() ?: 0;
- if (isset($invalidatedTags[$tag])) {
- $invalidatedTags[$tag] = $version->set(++$tagVersions[$tag]);
- }
- $this->knownTagVersions[$tag] = [$now, $tagVersions[$tag]];
- }
-
- return $tagVersions;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php
deleted file mode 100644
index 340048c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\InvalidArgumentException;
-
-/**
- * Interface for invalidating cached items using tags.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface TagAwareAdapterInterface extends AdapterInterface
-{
- /**
- * Invalidates cached items using tags.
- *
- * @param string[] $tags An array of tags to invalidate
- *
- * @return bool True on success
- *
- * @throws InvalidArgumentException When $tags is not valid
- */
- public function invalidateTags(array $tags);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableAdapter.php
deleted file mode 100644
index 7e9dac8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableAdapter.php
+++ /dev/null
@@ -1,302 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Psr\Cache\CacheItemInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Contracts\Cache\CacheInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * An adapter that collects data about all cache calls.
- *
- * @author Aaron Scherer <aequasi@gmail.com>
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
-{
- protected $pool;
- private $calls = [];
-
- public function __construct(AdapterInterface $pool)
- {
- $this->pool = $pool;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
- {
- if (!$this->pool instanceof CacheInterface) {
- throw new \BadMethodCallException(sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', \get_class($this->pool), CacheInterface::class));
- }
-
- $isHit = true;
- $callback = function (CacheItem $item, bool &$save) use ($callback, &$isHit) {
- $isHit = $item->isHit();
-
- return $callback($item, $save);
- };
-
- $event = $this->start(__FUNCTION__);
- try {
- $value = $this->pool->get($key, $callback, $beta, $metadata);
- $event->result[$key] = \is_object($value) ? \get_class($value) : \gettype($value);
- } finally {
- $event->end = microtime(true);
- }
- if ($isHit) {
- ++$event->hits;
- } else {
- ++$event->misses;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- $event = $this->start(__FUNCTION__);
- try {
- $item = $this->pool->getItem($key);
- } finally {
- $event->end = microtime(true);
- }
- if ($event->result[$key] = $item->isHit()) {
- ++$event->hits;
- } else {
- ++$event->misses;
- }
-
- return $item;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$key] = $this->pool->hasItem($key);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$key] = $this->pool->deleteItem($key);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$item->getKey()] = $this->pool->save($item);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$item->getKey()] = $this->pool->saveDeferred($item);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- $event = $this->start(__FUNCTION__);
- try {
- $result = $this->pool->getItems($keys);
- } finally {
- $event->end = microtime(true);
- }
- $f = function () use ($result, $event) {
- $event->result = [];
- foreach ($result as $key => $item) {
- if ($event->result[$key] = $item->isHit()) {
- ++$event->hits;
- } else {
- ++$event->misses;
- }
- yield $key => $item;
- }
- };
-
- return $f();
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
- $event = $this->start(__FUNCTION__);
- try {
- if ($this->pool instanceof AdapterInterface) {
- return $event->result = $this->pool->clear($prefix);
- }
-
- return $event->result = $this->pool->clear();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- $event = $this->start(__FUNCTION__);
- $event->result['keys'] = $keys;
- try {
- return $event->result['result'] = $this->pool->deleteItems($keys);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function commit()
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result = $this->pool->commit();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- if (!$this->pool instanceof PruneableInterface) {
- return false;
- }
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result = $this->pool->prune();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- if (!$this->pool instanceof ResetInterface) {
- return;
- }
- $event = $this->start(__FUNCTION__);
- try {
- $this->pool->reset();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete(string $key): bool
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$key] = $this->pool->deleteItem($key);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- public function getCalls()
- {
- return $this->calls;
- }
-
- public function clearCalls()
- {
- $this->calls = [];
- }
-
- protected function start($name)
- {
- $this->calls[] = $event = new TraceableAdapterEvent();
- $event->name = $name;
- $event->start = microtime(true);
-
- return $event;
- }
-}
-
-class TraceableAdapterEvent
-{
- public $name;
- public $start;
- public $end;
- public $result;
- public $hits = 0;
- public $misses = 0;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php b/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php
deleted file mode 100644
index 69461b8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Adapter;
-
-use Symfony\Contracts\Cache\TagAwareCacheInterface;
-
-/**
- * @author Robin Chalas <robin.chalas@gmail.com>
- */
-class TraceableTagAwareAdapter extends TraceableAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface
-{
- public function __construct(TagAwareAdapterInterface $pool)
- {
- parent::__construct($pool);
- }
-
- /**
- * {@inheritdoc}
- */
- public function invalidateTags(array $tags)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result = $this->pool->invalidateTags($tags);
- } finally {
- $event->end = microtime(true);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/cache/CHANGELOG.md
deleted file mode 100644
index 435eaf3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/CHANGELOG.md
+++ /dev/null
@@ -1,73 +0,0 @@
-CHANGELOG
-=========
-
-4.4.0
------
-
- * added support for connecting to Redis Sentinel clusters
- * added argument `$prefix` to `AdapterInterface::clear()`
- * improved `RedisTagAwareAdapter` to support Redis server >= 2.8 and up to 4B items per tag
- * added `TagAwareMarshaller` for optimized data storage when using `AbstractTagAwareAdapter`
- * added `DeflateMarshaller` to compress serialized values
- * removed support for phpredis 4 `compression`
- * [BC BREAK] `RedisTagAwareAdapter` is not compatible with `RedisCluster` from `Predis` anymore, use `phpredis` instead
- * Marked the `CacheDataCollector` class as `@final`.
-
-4.3.0
------
-
- * removed `psr/simple-cache` dependency, run `composer require psr/simple-cache` if you need it
- * deprecated all PSR-16 adapters, use `Psr16Cache` or `Symfony\Contracts\Cache\CacheInterface` implementations instead
- * deprecated `SimpleCacheAdapter`, use `Psr16Adapter` instead
-
-4.2.0
------
-
- * added support for connecting to Redis clusters via DSN
- * added support for configuring multiple Memcached servers via DSN
- * added `MarshallerInterface` and `DefaultMarshaller` to allow changing the serializer and provide one that automatically uses igbinary when available
- * implemented `CacheInterface`, which provides stampede protection via probabilistic early expiration and should become the preferred way to use a cache
- * added sub-second expiry accuracy for backends that support it
- * added support for phpredis 4 `compression` and `tcp_keepalive` options
- * added automatic table creation when using Doctrine DBAL with PDO-based backends
- * throw `LogicException` when `CacheItem::tag()` is called on an item coming from a non tag-aware pool
- * deprecated `CacheItem::getPreviousTags()`, use `CacheItem::getMetadata()` instead
- * deprecated the `AbstractAdapter::unserialize()` and `AbstractCache::unserialize()` methods
- * added `CacheCollectorPass` (originally in `FrameworkBundle`)
- * added `CachePoolClearerPass` (originally in `FrameworkBundle`)
- * added `CachePoolPass` (originally in `FrameworkBundle`)
- * added `CachePoolPrunerPass` (originally in `FrameworkBundle`)
-
-3.4.0
------
-
- * added using options from Memcached DSN
- * added PruneableInterface so PSR-6 or PSR-16 cache implementations can declare support for manual stale cache pruning
- * added prune logic to FilesystemTrait, PhpFilesTrait, PdoTrait, TagAwareAdapter and ChainTrait
- * now FilesystemAdapter, PhpFilesAdapter, FilesystemCache, PhpFilesCache, PdoAdapter, PdoCache, ChainAdapter, and
- ChainCache implement PruneableInterface and support manual stale cache pruning
-
-3.3.0
------
-
- * added CacheItem::getPreviousTags() to get bound tags coming from the pool storage if any
- * added PSR-16 "Simple Cache" implementations for all existing PSR-6 adapters
- * added Psr6Cache and SimpleCacheAdapter for bidirectional interoperability between PSR-6 and PSR-16
- * added MemcachedAdapter (PSR-6) and MemcachedCache (PSR-16)
- * added TraceableAdapter (PSR-6) and TraceableCache (PSR-16)
-
-3.2.0
------
-
- * added TagAwareAdapter for tags-based invalidation
- * added PdoAdapter with PDO and Doctrine DBAL support
- * added PhpArrayAdapter and PhpFilesAdapter for OPcache-backed shared memory storage (PHP 7+ only)
- * added NullAdapter
-
-3.1.0
------
-
- * added the component with strict PSR-6 implementations
- * added ApcuAdapter, ArrayAdapter, FilesystemAdapter and RedisAdapter
- * added AbstractAdapter, ChainAdapter and ProxyAdapter
- * added DoctrineAdapter and DoctrineProvider for bidirectional interoperability with Doctrine Cache
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/CacheItem.php b/srcs/phpmyadmin/vendor/symfony/cache/CacheItem.php
deleted file mode 100644
index 3abd50e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/CacheItem.php
+++ /dev/null
@@ -1,202 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache;
-
-use Psr\Log\LoggerInterface;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Exception\LogicException;
-use Symfony\Contracts\Cache\ItemInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-final class CacheItem implements ItemInterface
-{
- private const METADATA_EXPIRY_OFFSET = 1527506807;
-
- protected $key;
- protected $value;
- protected $isHit = false;
- protected $expiry;
- protected $defaultLifetime;
- protected $metadata = [];
- protected $newMetadata = [];
- protected $innerItem;
- protected $poolHash;
- protected $isTaggable = false;
-
- /**
- * {@inheritdoc}
- */
- public function getKey(): string
- {
- return $this->key;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get()
- {
- return $this->value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isHit(): bool
- {
- return $this->isHit;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return $this
- */
- public function set($value): self
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return $this
- */
- public function expiresAt($expiration): self
- {
- if (null === $expiration) {
- $this->expiry = $this->defaultLifetime > 0 ? microtime(true) + $this->defaultLifetime : null;
- } elseif ($expiration instanceof \DateTimeInterface) {
- $this->expiry = (float) $expiration->format('U.u');
- } else {
- throw new InvalidArgumentException(sprintf('Expiration date must implement DateTimeInterface or be null, "%s" given', \is_object($expiration) ? \get_class($expiration) : \gettype($expiration)));
- }
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return $this
- */
- public function expiresAfter($time): self
- {
- if (null === $time) {
- $this->expiry = $this->defaultLifetime > 0 ? microtime(true) + $this->defaultLifetime : null;
- } elseif ($time instanceof \DateInterval) {
- $this->expiry = microtime(true) + \DateTime::createFromFormat('U', 0)->add($time)->format('U.u');
- } elseif (\is_int($time)) {
- $this->expiry = $time + microtime(true);
- } else {
- throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given', \is_object($time) ? \get_class($time) : \gettype($time)));
- }
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function tag($tags): ItemInterface
- {
- if (!$this->isTaggable) {
- throw new LogicException(sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key));
- }
- if (!is_iterable($tags)) {
- $tags = [$tags];
- }
- foreach ($tags as $tag) {
- if (!\is_string($tag)) {
- throw new InvalidArgumentException(sprintf('Cache tag must be string, "%s" given', \is_object($tag) ? \get_class($tag) : \gettype($tag)));
- }
- if (isset($this->newMetadata[self::METADATA_TAGS][$tag])) {
- continue;
- }
- if ('' === $tag) {
- throw new InvalidArgumentException('Cache tag length must be greater than zero');
- }
- if (false !== strpbrk($tag, self::RESERVED_CHARACTERS)) {
- throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters %s', $tag, self::RESERVED_CHARACTERS));
- }
- $this->newMetadata[self::METADATA_TAGS][$tag] = $tag;
- }
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getMetadata(): array
- {
- return $this->metadata;
- }
-
- /**
- * Returns the list of tags bound to the value coming from the pool storage if any.
- *
- * @deprecated since Symfony 4.2, use the "getMetadata()" method instead.
- */
- public function getPreviousTags(): array
- {
- @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "getMetadata()" method instead.', __METHOD__), E_USER_DEPRECATED);
-
- return $this->metadata[self::METADATA_TAGS] ?? [];
- }
-
- /**
- * Validates a cache key according to PSR-6.
- *
- * @param string $key The key to validate
- *
- * @throws InvalidArgumentException When $key is not valid
- */
- public static function validateKey($key): string
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if ('' === $key) {
- throw new InvalidArgumentException('Cache key length must be greater than zero');
- }
- if (false !== strpbrk($key, self::RESERVED_CHARACTERS)) {
- throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters %s', $key, self::RESERVED_CHARACTERS));
- }
-
- return $key;
- }
-
- /**
- * Internal logging helper.
- *
- * @internal
- */
- public static function log(?LoggerInterface $logger, string $message, array $context = [])
- {
- if ($logger) {
- $logger->warning($message, $context);
- } else {
- $replace = [];
- foreach ($context as $k => $v) {
- if (is_scalar($v)) {
- $replace['{'.$k.'}'] = $v;
- }
- }
- @trigger_error(strtr($message, $replace), E_USER_WARNING);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/DataCollector/CacheDataCollector.php b/srcs/phpmyadmin/vendor/symfony/cache/DataCollector/CacheDataCollector.php
deleted file mode 100644
index c63cd32..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/DataCollector/CacheDataCollector.php
+++ /dev/null
@@ -1,194 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\DataCollector;
-
-use Symfony\Component\Cache\Adapter\TraceableAdapter;
-use Symfony\Component\Cache\Adapter\TraceableAdapterEvent;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\HttpKernel\DataCollector\DataCollector;
-use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface;
-
-/**
- * @author Aaron Scherer <aequasi@gmail.com>
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
- *
- * @final since Symfony 4.4
- */
-class CacheDataCollector extends DataCollector implements LateDataCollectorInterface
-{
- /**
- * @var TraceableAdapter[]
- */
- private $instances = [];
-
- /**
- * @param string $name
- */
- public function addInstance($name, TraceableAdapter $instance)
- {
- $this->instances[$name] = $instance;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param \Throwable|null $exception
- */
- public function collect(Request $request, Response $response/*, \Throwable $exception = null*/)
- {
- $empty = ['calls' => [], 'config' => [], 'options' => [], 'statistics' => []];
- $this->data = ['instances' => $empty, 'total' => $empty];
- foreach ($this->instances as $name => $instance) {
- $this->data['instances']['calls'][$name] = $instance->getCalls();
- }
-
- $this->data['instances']['statistics'] = $this->calculateStatistics();
- $this->data['total']['statistics'] = $this->calculateTotalStatistics();
- }
-
- public function reset()
- {
- $this->data = [];
- foreach ($this->instances as $instance) {
- $instance->clearCalls();
- }
- }
-
- public function lateCollect()
- {
- $this->data = $this->cloneVar($this->data);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'cache';
- }
-
- /**
- * Method returns amount of logged Cache reads: "get" calls.
- *
- * @return array
- */
- public function getStatistics()
- {
- return $this->data['instances']['statistics'];
- }
-
- /**
- * Method returns the statistic totals.
- *
- * @return array
- */
- public function getTotals()
- {
- return $this->data['total']['statistics'];
- }
-
- /**
- * Method returns all logged Cache call objects.
- *
- * @return mixed
- */
- public function getCalls()
- {
- return $this->data['instances']['calls'];
- }
-
- private function calculateStatistics(): array
- {
- $statistics = [];
- foreach ($this->data['instances']['calls'] as $name => $calls) {
- $statistics[$name] = [
- 'calls' => 0,
- 'time' => 0,
- 'reads' => 0,
- 'writes' => 0,
- 'deletes' => 0,
- 'hits' => 0,
- 'misses' => 0,
- ];
- /** @var TraceableAdapterEvent $call */
- foreach ($calls as $call) {
- ++$statistics[$name]['calls'];
- $statistics[$name]['time'] += $call->end - $call->start;
- if ('get' === $call->name) {
- ++$statistics[$name]['reads'];
- if ($call->hits) {
- ++$statistics[$name]['hits'];
- } else {
- ++$statistics[$name]['misses'];
- ++$statistics[$name]['writes'];
- }
- } elseif ('getItem' === $call->name) {
- ++$statistics[$name]['reads'];
- if ($call->hits) {
- ++$statistics[$name]['hits'];
- } else {
- ++$statistics[$name]['misses'];
- }
- } elseif ('getItems' === $call->name) {
- $statistics[$name]['reads'] += $call->hits + $call->misses;
- $statistics[$name]['hits'] += $call->hits;
- $statistics[$name]['misses'] += $call->misses;
- } elseif ('hasItem' === $call->name) {
- ++$statistics[$name]['reads'];
- if (false === $call->result) {
- ++$statistics[$name]['misses'];
- } else {
- ++$statistics[$name]['hits'];
- }
- } elseif ('save' === $call->name) {
- ++$statistics[$name]['writes'];
- } elseif ('deleteItem' === $call->name) {
- ++$statistics[$name]['deletes'];
- }
- }
- if ($statistics[$name]['reads']) {
- $statistics[$name]['hit_read_ratio'] = round(100 * $statistics[$name]['hits'] / $statistics[$name]['reads'], 2);
- } else {
- $statistics[$name]['hit_read_ratio'] = null;
- }
- }
-
- return $statistics;
- }
-
- private function calculateTotalStatistics(): array
- {
- $statistics = $this->getStatistics();
- $totals = [
- 'calls' => 0,
- 'time' => 0,
- 'reads' => 0,
- 'writes' => 0,
- 'deletes' => 0,
- 'hits' => 0,
- 'misses' => 0,
- ];
- foreach ($statistics as $name => $values) {
- foreach ($totals as $key => $value) {
- $totals[$key] += $statistics[$name][$key];
- }
- }
- if ($totals['reads']) {
- $totals['hit_read_ratio'] = round(100 * $totals['hits'] / $totals['reads'], 2);
- } else {
- $totals['hit_read_ratio'] = null;
- }
-
- return $totals;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php b/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php
deleted file mode 100644
index 6193d34..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\DependencyInjection;
-
-use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface;
-use Symfony\Component\Cache\Adapter\TraceableAdapter;
-use Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Inject a data collector to all the cache services to be able to get detailed statistics.
- *
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
- */
-class CacheCollectorPass implements CompilerPassInterface
-{
- private $dataCollectorCacheId;
- private $cachePoolTag;
- private $cachePoolRecorderInnerSuffix;
-
- public function __construct(string $dataCollectorCacheId = 'data_collector.cache', string $cachePoolTag = 'cache.pool', string $cachePoolRecorderInnerSuffix = '.recorder_inner')
- {
- $this->dataCollectorCacheId = $dataCollectorCacheId;
- $this->cachePoolTag = $cachePoolTag;
- $this->cachePoolRecorderInnerSuffix = $cachePoolRecorderInnerSuffix;
- }
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- if (!$container->hasDefinition($this->dataCollectorCacheId)) {
- return;
- }
-
- $collectorDefinition = $container->getDefinition($this->dataCollectorCacheId);
- foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $attributes) {
- $definition = $container->getDefinition($id);
- if ($definition->isAbstract()) {
- continue;
- }
-
- $recorder = new Definition(is_subclass_of($definition->getClass(), TagAwareAdapterInterface::class) ? TraceableTagAwareAdapter::class : TraceableAdapter::class);
- $recorder->setTags($definition->getTags());
- $recorder->setPublic($definition->isPublic());
- $recorder->setArguments([new Reference($innerId = $id.$this->cachePoolRecorderInnerSuffix)]);
-
- $definition->setTags([]);
- $definition->setPublic(false);
-
- $container->setDefinition($innerId, $definition);
- $container->setDefinition($id, $recorder);
-
- // Tell the collector to add the new instance
- $collectorDefinition->addMethodCall('addInstance', [$id, new Reference($id)]);
- $collectorDefinition->setPublic(false);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php b/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php
deleted file mode 100644
index 3ca89a3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class CachePoolClearerPass implements CompilerPassInterface
-{
- private $cachePoolClearerTag;
-
- public function __construct(string $cachePoolClearerTag = 'cache.pool.clearer')
- {
- $this->cachePoolClearerTag = $cachePoolClearerTag;
- }
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- $container->getParameterBag()->remove('cache.prefix.seed');
-
- foreach ($container->findTaggedServiceIds($this->cachePoolClearerTag) as $id => $attr) {
- $clearer = $container->getDefinition($id);
- $pools = [];
- foreach ($clearer->getArgument(0) as $name => $ref) {
- if ($container->hasDefinition($ref)) {
- $pools[$name] = new Reference($ref);
- }
- }
- $clearer->replaceArgument(0, $pools);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPass.php b/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPass.php
deleted file mode 100644
index 35bf5e7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPass.php
+++ /dev/null
@@ -1,222 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\DependencyInjection;
-
-use Symfony\Component\Cache\Adapter\AbstractAdapter;
-use Symfony\Component\Cache\Adapter\ArrayAdapter;
-use Symfony\Component\Cache\Adapter\ChainAdapter;
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class CachePoolPass implements CompilerPassInterface
-{
- private $cachePoolTag;
- private $kernelResetTag;
- private $cacheClearerId;
- private $cachePoolClearerTag;
- private $cacheSystemClearerId;
- private $cacheSystemClearerTag;
-
- public function __construct(string $cachePoolTag = 'cache.pool', string $kernelResetTag = 'kernel.reset', string $cacheClearerId = 'cache.global_clearer', string $cachePoolClearerTag = 'cache.pool.clearer', string $cacheSystemClearerId = 'cache.system_clearer', string $cacheSystemClearerTag = 'kernel.cache_clearer')
- {
- $this->cachePoolTag = $cachePoolTag;
- $this->kernelResetTag = $kernelResetTag;
- $this->cacheClearerId = $cacheClearerId;
- $this->cachePoolClearerTag = $cachePoolClearerTag;
- $this->cacheSystemClearerId = $cacheSystemClearerId;
- $this->cacheSystemClearerTag = $cacheSystemClearerTag;
- }
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- if ($container->hasParameter('cache.prefix.seed')) {
- $seed = '.'.$container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed'));
- } else {
- $seed = '_'.$container->getParameter('kernel.project_dir');
- }
- $seed .= '.'.$container->getParameter('kernel.container_class');
-
- $pools = [];
- $clearers = [];
- $attributes = [
- 'provider',
- 'name',
- 'namespace',
- 'default_lifetime',
- 'reset',
- ];
- foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $tags) {
- $adapter = $pool = $container->getDefinition($id);
- if ($pool->isAbstract()) {
- continue;
- }
- $class = $adapter->getClass();
- while ($adapter instanceof ChildDefinition) {
- $adapter = $container->findDefinition($adapter->getParent());
- $class = $class ?: $adapter->getClass();
- if ($t = $adapter->getTag($this->cachePoolTag)) {
- $tags[0] += $t[0];
- }
- }
- $name = $tags[0]['name'] ?? $id;
- if (!isset($tags[0]['namespace'])) {
- $namespaceSeed = $seed;
- if (null !== $class) {
- $namespaceSeed .= '.'.$class;
- }
-
- $tags[0]['namespace'] = $this->getNamespace($namespaceSeed, $name);
- }
- if (isset($tags[0]['clearer'])) {
- $clearer = $tags[0]['clearer'];
- while ($container->hasAlias($clearer)) {
- $clearer = (string) $container->getAlias($clearer);
- }
- } else {
- $clearer = null;
- }
- unset($tags[0]['clearer'], $tags[0]['name']);
-
- if (isset($tags[0]['provider'])) {
- $tags[0]['provider'] = new Reference(static::getServiceProvider($container, $tags[0]['provider']));
- }
-
- if (ChainAdapter::class === $class) {
- $adapters = [];
- foreach ($adapter->getArgument(0) as $provider => $adapter) {
- $chainedPool = $adapter = new ChildDefinition($adapter);
- $chainedTags = [\is_int($provider) ? [] : ['provider' => $provider]];
- $chainedClass = '';
-
- while ($adapter instanceof ChildDefinition) {
- $adapter = $container->findDefinition($adapter->getParent());
- $chainedClass = $chainedClass ?: $adapter->getClass();
- if ($t = $adapter->getTag($this->cachePoolTag)) {
- $chainedTags[0] += $t[0];
- }
- }
-
- if (ChainAdapter::class === $chainedClass) {
- throw new InvalidArgumentException(sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent()));
- }
-
- $i = 0;
-
- if (isset($chainedTags[0]['provider'])) {
- $chainedPool->replaceArgument($i++, new Reference(static::getServiceProvider($container, $chainedTags[0]['provider'])));
- }
-
- if (isset($tags[0]['namespace']) && ArrayAdapter::class !== $adapter->getClass()) {
- $chainedPool->replaceArgument($i++, $tags[0]['namespace']);
- }
-
- if (isset($tags[0]['default_lifetime'])) {
- $chainedPool->replaceArgument($i++, $tags[0]['default_lifetime']);
- }
-
- $adapters[] = $chainedPool;
- }
-
- $pool->replaceArgument(0, $adapters);
- unset($tags[0]['provider'], $tags[0]['namespace']);
- $i = 1;
- } else {
- $i = 0;
- }
-
- foreach ($attributes as $attr) {
- if (!isset($tags[0][$attr])) {
- // no-op
- } elseif ('reset' === $attr) {
- if ($tags[0][$attr]) {
- $pool->addTag($this->kernelResetTag, ['method' => $tags[0][$attr]]);
- }
- } elseif ('namespace' !== $attr || ArrayAdapter::class !== $class) {
- $pool->replaceArgument($i++, $tags[0][$attr]);
- }
- unset($tags[0][$attr]);
- }
- if (!empty($tags[0])) {
- throw new InvalidArgumentException(sprintf('Invalid "%s" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime" and "reset", found "%s".', $this->cachePoolTag, $id, implode('", "', array_keys($tags[0]))));
- }
-
- if (null !== $clearer) {
- $clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE);
- }
-
- $pools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE);
- }
-
- $notAliasedCacheClearerId = $this->cacheClearerId;
- while ($container->hasAlias($this->cacheClearerId)) {
- $this->cacheClearerId = (string) $container->getAlias($this->cacheClearerId);
- }
- if ($container->hasDefinition($this->cacheClearerId)) {
- $clearers[$notAliasedCacheClearerId] = $pools;
- }
-
- foreach ($clearers as $id => $pools) {
- $clearer = $container->getDefinition($id);
- if ($clearer instanceof ChildDefinition) {
- $clearer->replaceArgument(0, $pools);
- } else {
- $clearer->setArgument(0, $pools);
- }
- $clearer->addTag($this->cachePoolClearerTag);
-
- if ($this->cacheSystemClearerId === $id) {
- $clearer->addTag($this->cacheSystemClearerTag);
- }
- }
-
- if ($container->hasDefinition('console.command.cache_pool_list')) {
- $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($pools));
- }
- }
-
- private function getNamespace(string $seed, string $id)
- {
- return substr(str_replace('/', '-', base64_encode(hash('sha256', $id.$seed, true))), 0, 10);
- }
-
- /**
- * @internal
- */
- public static function getServiceProvider(ContainerBuilder $container, $name)
- {
- $container->resolveEnvPlaceholders($name, null, $usedEnvs);
-
- if ($usedEnvs || preg_match('#^[a-z]++:#', $name)) {
- $dsn = $name;
-
- if (!$container->hasDefinition($name = '.cache_connection.'.ContainerBuilder::hash($dsn))) {
- $definition = new Definition(AbstractAdapter::class);
- $definition->setPublic(false);
- $definition->setFactory([AbstractAdapter::class, 'createConnection']);
- $definition->setArguments([$dsn, ['lazy' => true]]);
- $container->setDefinition($name, $definition);
- }
- }
-
- return $name;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php b/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php
deleted file mode 100644
index e569962..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\DependencyInjection;
-
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * @author Rob Frawley 2nd <rmf@src.run>
- */
-class CachePoolPrunerPass implements CompilerPassInterface
-{
- private $cacheCommandServiceId;
- private $cachePoolTag;
-
- public function __construct(string $cacheCommandServiceId = 'console.command.cache_pool_prune', string $cachePoolTag = 'cache.pool')
- {
- $this->cacheCommandServiceId = $cacheCommandServiceId;
- $this->cachePoolTag = $cachePoolTag;
- }
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- if (!$container->hasDefinition($this->cacheCommandServiceId)) {
- return;
- }
-
- $services = [];
-
- foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $tags) {
- $class = $container->getParameterBag()->resolveValue($container->getDefinition($id)->getClass());
-
- if (!$reflection = $container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
- }
-
- if ($reflection->implementsInterface(PruneableInterface::class)) {
- $services[$id] = new Reference($id);
- }
- }
-
- $container->getDefinition($this->cacheCommandServiceId)->replaceArgument(0, new IteratorArgument($services));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/DoctrineProvider.php b/srcs/phpmyadmin/vendor/symfony/cache/DoctrineProvider.php
deleted file mode 100644
index d7e0bca..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/DoctrineProvider.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache;
-
-use Doctrine\Common\Cache\CacheProvider;
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class DoctrineProvider extends CacheProvider implements PruneableInterface, ResettableInterface
-{
- private $pool;
-
- public function __construct(CacheItemPoolInterface $pool)
- {
- $this->pool = $pool;
- }
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- return $this->pool instanceof PruneableInterface && $this->pool->prune();
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- if ($this->pool instanceof ResetInterface) {
- $this->pool->reset();
- }
- $this->setNamespace($this->getNamespace());
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch($id)
- {
- $item = $this->pool->getItem(rawurlencode($id));
-
- return $item->isHit() ? $item->get() : false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doContains($id)
- {
- return $this->pool->hasItem(rawurlencode($id));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doSave($id, $data, $lifeTime = 0)
- {
- $item = $this->pool->getItem(rawurlencode($id));
-
- if (0 < $lifeTime) {
- $item->expiresAfter($lifeTime);
- }
-
- return $this->pool->save($item->set($data));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doDelete($id)
- {
- return $this->pool->deleteItem(rawurlencode($id));
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- protected function doFlush()
- {
- return $this->pool->clear();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return array|null
- */
- protected function doGetStats()
- {
- return null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Exception/CacheException.php b/srcs/phpmyadmin/vendor/symfony/cache/Exception/CacheException.php
deleted file mode 100644
index d2e975b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Exception/CacheException.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Exception;
-
-use Psr\Cache\CacheException as Psr6CacheInterface;
-use Psr\SimpleCache\CacheException as SimpleCacheInterface;
-
-if (interface_exists(SimpleCacheInterface::class)) {
- class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface
- {
- }
-} else {
- class CacheException extends \Exception implements Psr6CacheInterface
- {
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Exception/InvalidArgumentException.php b/srcs/phpmyadmin/vendor/symfony/cache/Exception/InvalidArgumentException.php
deleted file mode 100644
index 7f9584a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Exception/InvalidArgumentException.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Exception;
-
-use Psr\Cache\InvalidArgumentException as Psr6CacheInterface;
-use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface;
-
-if (interface_exists(SimpleCacheInterface::class)) {
- class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface
- {
- }
-} else {
- class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface
- {
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Exception/LogicException.php b/srcs/phpmyadmin/vendor/symfony/cache/Exception/LogicException.php
deleted file mode 100644
index 9ffa7ed..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Exception/LogicException.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Exception;
-
-use Psr\Cache\CacheException as Psr6CacheInterface;
-use Psr\SimpleCache\CacheException as SimpleCacheInterface;
-
-if (interface_exists(SimpleCacheInterface::class)) {
- class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface
- {
- }
-} else {
- class LogicException extends \LogicException implements Psr6CacheInterface
- {
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/LICENSE b/srcs/phpmyadmin/vendor/symfony/cache/LICENSE
deleted file mode 100644
index 3c464ca..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2016-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/LockRegistry.php b/srcs/phpmyadmin/vendor/symfony/cache/LockRegistry.php
deleted file mode 100644
index 80601be..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/LockRegistry.php
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache;
-
-use Psr\Log\LoggerInterface;
-use Symfony\Contracts\Cache\CacheInterface;
-use Symfony\Contracts\Cache\ItemInterface;
-
-/**
- * LockRegistry is used internally by existing adapters to protect against cache stampede.
- *
- * It does so by wrapping the computation of items in a pool of locks.
- * Foreach each apps, there can be at most 20 concurrent processes that
- * compute items at the same time and only one per cache-key.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-final class LockRegistry
-{
- private static $openedFiles = [];
- private static $lockedFiles = [];
-
- /**
- * The number of items in this list controls the max number of concurrent processes.
- */
- private static $files = [
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractTagAwareAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AdapterInterface.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ApcuAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ArrayAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ChainAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemTagAwareAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'MemcachedAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'NullAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PdoAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpArrayAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpFilesAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ProxyAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'Psr16Adapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisTagAwareAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'SimpleCacheAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapterInterface.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableAdapter.php',
- __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableTagAwareAdapter.php',
- ];
-
- /**
- * Defines a set of existing files that will be used as keys to acquire locks.
- *
- * @return array The previously defined set of files
- */
- public static function setFiles(array $files): array
- {
- $previousFiles = self::$files;
- self::$files = $files;
-
- foreach (self::$openedFiles as $file) {
- if ($file) {
- flock($file, LOCK_UN);
- fclose($file);
- }
- }
- self::$openedFiles = self::$lockedFiles = [];
-
- return $previousFiles;
- }
-
- public static function compute(callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata = null, LoggerInterface $logger = null)
- {
- $key = self::$files ? crc32($item->getKey()) % \count(self::$files) : -1;
-
- if ($key < 0 || (self::$lockedFiles[$key] ?? false) || !$lock = self::open($key)) {
- return $callback($item, $save);
- }
-
- while (true) {
- try {
- // race to get the lock in non-blocking mode
- $locked = flock($lock, LOCK_EX | LOCK_NB, $wouldBlock);
-
- if ($locked || !$wouldBlock) {
- $logger && $logger->info(sprintf('Lock %s, now computing item "{key}"', $locked ? 'acquired' : 'not supported'), ['key' => $item->getKey()]);
- self::$lockedFiles[$key] = true;
-
- $value = $callback($item, $save);
-
- if ($save) {
- if ($setMetadata) {
- $setMetadata($item);
- }
-
- $pool->save($item->set($value));
- $save = false;
- }
-
- return $value;
- }
- // if we failed the race, retry locking in blocking mode to wait for the winner
- $logger && $logger->info('Item "{key}" is locked, waiting for it to be released', ['key' => $item->getKey()]);
- flock($lock, LOCK_SH);
- } finally {
- flock($lock, LOCK_UN);
- unset(self::$lockedFiles[$key]);
- }
- static $signalingException, $signalingCallback;
- $signalingException = $signalingException ?? unserialize("O:9:\"Exception\":1:{s:16:\"\0Exception\0trace\";a:0:{}}");
- $signalingCallback = $signalingCallback ?? function () use ($signalingException) { throw $signalingException; };
-
- try {
- $value = $pool->get($item->getKey(), $signalingCallback, 0);
- $logger && $logger->info('Item "{key}" retrieved after lock was released', ['key' => $item->getKey()]);
- $save = false;
-
- return $value;
- } catch (\Exception $e) {
- if ($signalingException !== $e) {
- throw $e;
- }
- $logger && $logger->info('Item "{key}" not found while lock was released, now retrying', ['key' => $item->getKey()]);
- }
- }
-
- return null;
- }
-
- private static function open(int $key)
- {
- if (null !== $h = self::$openedFiles[$key] ?? null) {
- return $h;
- }
- set_error_handler(function () {});
- try {
- $h = fopen(self::$files[$key], 'r+');
- } finally {
- restore_error_handler();
- }
-
- return self::$openedFiles[$key] = $h ?: @fopen(self::$files[$key], 'r');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DefaultMarshaller.php b/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DefaultMarshaller.php
deleted file mode 100644
index 8056090..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DefaultMarshaller.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Marshaller;
-
-use Symfony\Component\Cache\Exception\CacheException;
-
-/**
- * Serializes/unserializes values using igbinary_serialize() if available, serialize() otherwise.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class DefaultMarshaller implements MarshallerInterface
-{
- private $useIgbinarySerialize = true;
-
- public function __construct(bool $useIgbinarySerialize = null)
- {
- if (null === $useIgbinarySerialize) {
- $useIgbinarySerialize = \extension_loaded('igbinary') && \PHP_VERSION_ID < 70400;
- } elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || \PHP_VERSION_ID >= 70400)) {
- throw new CacheException('The "igbinary" PHP extension is not '.(\PHP_VERSION_ID >= 70400 ? 'compatible with PHP 7.4.' : 'loaded.'));
- }
- $this->useIgbinarySerialize = $useIgbinarySerialize;
- }
-
- /**
- * {@inheritdoc}
- */
- public function marshall(array $values, ?array &$failed): array
- {
- $serialized = $failed = [];
-
- foreach ($values as $id => $value) {
- try {
- if ($this->useIgbinarySerialize) {
- $serialized[$id] = igbinary_serialize($value);
- } else {
- $serialized[$id] = serialize($value);
- }
- } catch (\Exception $e) {
- $failed[] = $id;
- }
- }
-
- return $serialized;
- }
-
- /**
- * {@inheritdoc}
- */
- public function unmarshall(string $value)
- {
- if ('b:0;' === $value) {
- return false;
- }
- if ('N;' === $value) {
- return null;
- }
- static $igbinaryNull;
- if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') && \PHP_VERSION_ID < 70400 ? igbinary_serialize(null) : false)) {
- return null;
- }
- $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
- try {
- if (':' === ($value[1] ?? ':')) {
- if (false !== $value = unserialize($value)) {
- return $value;
- }
- } elseif (false === $igbinaryNull) {
- throw new \RuntimeException('Failed to unserialize values, did you forget to install the "igbinary" extension?');
- } elseif (null !== $value = igbinary_unserialize($value)) {
- return $value;
- }
-
- throw new \DomainException(error_get_last() ? error_get_last()['message'] : 'Failed to unserialize values.');
- } catch (\Error $e) {
- throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
- } finally {
- ini_set('unserialize_callback_func', $unserializeCallbackHandler);
- }
- }
-
- /**
- * @internal
- */
- public static function handleUnserializeCallback($class)
- {
- throw new \DomainException('Class not found: '.$class);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DeflateMarshaller.php b/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DeflateMarshaller.php
deleted file mode 100644
index 5544806..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/DeflateMarshaller.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Marshaller;
-
-use Symfony\Component\Cache\Exception\CacheException;
-
-/**
- * Compresses values using gzdeflate().
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class DeflateMarshaller implements MarshallerInterface
-{
- private $marshaller;
-
- public function __construct(MarshallerInterface $marshaller)
- {
- if (!\function_exists('gzdeflate')) {
- throw new CacheException('The "zlib" PHP extension is not loaded.');
- }
-
- $this->marshaller = $marshaller;
- }
-
- /**
- * {@inheritdoc}
- */
- public function marshall(array $values, ?array &$failed): array
- {
- return array_map('gzdeflate', $this->marshaller->marshall($values, $failed));
- }
-
- /**
- * {@inheritdoc}
- */
- public function unmarshall(string $value)
- {
- if (false !== $inflatedValue = @gzinflate($value)) {
- $value = $inflatedValue;
- }
-
- return $this->marshaller->unmarshall($value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/MarshallerInterface.php b/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/MarshallerInterface.php
deleted file mode 100644
index cdd6c40..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/MarshallerInterface.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Marshaller;
-
-/**
- * Serializes/unserializes PHP values.
- *
- * Implementations of this interface MUST deal with errors carefully. They MUST
- * also deal with forward and backward compatibility at the storage format level.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface MarshallerInterface
-{
- /**
- * Serializes a list of values.
- *
- * When serialization fails for a specific value, no exception should be
- * thrown. Instead, its key should be listed in $failed.
- */
- public function marshall(array $values, ?array &$failed): array;
-
- /**
- * Unserializes a single value and throws an exception if anything goes wrong.
- *
- * @return mixed
- *
- * @throws \Exception Whenever unserialization fails
- */
- public function unmarshall(string $value);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php b/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php
deleted file mode 100644
index 5d1e303..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Marshaller;
-
-/**
- * A marshaller optimized for data structures generated by AbstractTagAwareAdapter.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TagAwareMarshaller implements MarshallerInterface
-{
- private $marshaller;
-
- public function __construct(MarshallerInterface $marshaller = null)
- {
- $this->marshaller = $marshaller ?? new DefaultMarshaller();
- }
-
- /**
- * {@inheritdoc}
- */
- public function marshall(array $values, ?array &$failed): array
- {
- $failed = $notSerialized = $serialized = [];
-
- foreach ($values as $id => $value) {
- if (\is_array($value) && \is_array($value['tags'] ?? null) && \array_key_exists('value', $value) && \count($value) === 2 + (\is_string($value['meta'] ?? null) && 8 === \strlen($value['meta']))) {
- // if the value is an array with keys "tags", "value" and "meta", use a compact serialization format
- // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F allow detecting this format quickly in unmarshall()
-
- $v = $this->marshaller->marshall($value, $f);
-
- if ($f) {
- $f = [];
- $failed[] = $id;
- } else {
- if ([] === $value['tags']) {
- $v['tags'] = '';
- }
-
- $serialized[$id] = "\x9D".($value['meta'] ?? "\0\0\0\0\0\0\0\0").pack('N', \strlen($v['tags'])).$v['tags'].$v['value'];
- $serialized[$id][9] = "\x5F";
- }
- } else {
- // other arbitratry values are serialized using the decorated marshaller below
- $notSerialized[$id] = $value;
- }
- }
-
- if ($notSerialized) {
- $serialized += $this->marshaller->marshall($notSerialized, $f);
- $failed = array_merge($failed, $f);
- }
-
- return $serialized;
- }
-
- /**
- * {@inheritdoc}
- */
- public function unmarshall(string $value)
- {
- // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F
- if (13 >= \strlen($value) || "\x9D" !== $value[0] || "\0" !== $value[5] || "\x5F" !== $value[9]) {
- return $this->marshaller->unmarshall($value);
- }
-
- // data consists of value, tags and metadata which we need to unpack
- $meta = substr($value, 1, 12);
- $meta[8] = "\0";
- $tagLen = unpack('Nlen', $meta, 8)['len'];
- $meta = substr($meta, 0, 8);
-
- return [
- 'value' => $this->marshaller->unmarshall(substr($value, 13 + $tagLen)),
- 'tags' => $tagLen ? $this->marshaller->unmarshall(substr($value, 13, $tagLen)) : [],
- 'meta' => "\0\0\0\0\0\0\0\0" === $meta ? null : $meta,
- ];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/PruneableInterface.php b/srcs/phpmyadmin/vendor/symfony/cache/PruneableInterface.php
deleted file mode 100644
index 4261525..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/PruneableInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache;
-
-/**
- * Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.
- */
-interface PruneableInterface
-{
- /**
- * @return bool
- */
- public function prune();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Psr16Cache.php b/srcs/phpmyadmin/vendor/symfony/cache/Psr16Cache.php
deleted file mode 100644
index 6501516..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Psr16Cache.php
+++ /dev/null
@@ -1,277 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache;
-
-use Psr\Cache\CacheException as Psr6CacheException;
-use Psr\Cache\CacheItemPoolInterface;
-use Psr\SimpleCache\CacheException as SimpleCacheException;
-use Psr\SimpleCache\CacheInterface;
-use Symfony\Component\Cache\Adapter\AdapterInterface;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Traits\ProxyTrait;
-
-/**
- * Turns a PSR-6 cache into a PSR-16 one.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class Psr16Cache implements CacheInterface, PruneableInterface, ResettableInterface
-{
- use ProxyTrait;
-
- private const METADATA_EXPIRY_OFFSET = 1527506807;
-
- private $createCacheItem;
- private $cacheItemPrototype;
-
- public function __construct(CacheItemPoolInterface $pool)
- {
- $this->pool = $pool;
-
- if (!$pool instanceof AdapterInterface) {
- return;
- }
- $cacheItemPrototype = &$this->cacheItemPrototype;
- $createCacheItem = \Closure::bind(
- static function ($key, $value, $allowInt = false) use (&$cacheItemPrototype) {
- $item = clone $cacheItemPrototype;
- $item->key = $allowInt && \is_int($key) ? (string) $key : CacheItem::validateKey($key);
- $item->value = $value;
- $item->isHit = false;
-
- return $item;
- },
- null,
- CacheItem::class
- );
- $this->createCacheItem = function ($key, $value, $allowInt = false) use ($createCacheItem) {
- if (null === $this->cacheItemPrototype) {
- $this->get($allowInt && \is_int($key) ? (string) $key : $key);
- }
- $this->createCacheItem = $createCacheItem;
-
- return $createCacheItem($key, null, $allowInt)->set($value);
- };
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- try {
- $item = $this->pool->getItem($key);
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- if (null === $this->cacheItemPrototype) {
- $this->cacheItemPrototype = clone $item;
- $this->cacheItemPrototype->set(null);
- }
-
- return $item->isHit() ? $item->get() : $default;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- try {
- if (null !== $f = $this->createCacheItem) {
- $item = $f($key, $value);
- } else {
- $item = $this->pool->getItem($key)->set($value);
- }
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- if (null !== $ttl) {
- $item->expiresAfter($ttl);
- }
-
- return $this->pool->save($item);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function delete($key)
- {
- try {
- return $this->pool->deleteItem($key);
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function clear()
- {
- return $this->pool->clear();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- } elseif (!\is_array($keys)) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
-
- try {
- $items = $this->pool->getItems($keys);
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- $values = [];
-
- if (!$this->pool instanceof AdapterInterface) {
- foreach ($items as $key => $item) {
- $values[$key] = $item->isHit() ? $item->get() : $default;
- }
-
- return $values;
- }
-
- foreach ($items as $key => $item) {
- if (!$item->isHit()) {
- $values[$key] = $default;
- continue;
- }
- $values[$key] = $item->get();
-
- if (!$metadata = $item->getMetadata()) {
- continue;
- }
- unset($metadata[CacheItem::METADATA_TAGS]);
-
- if ($metadata) {
- $values[$key] = ["\x9D".pack('VN', (int) (0.1 + $metadata[CacheItem::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[CacheItem::METADATA_CTIME])."\x5F" => $values[$key]];
- }
- }
-
- return $values;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- $valuesIsArray = \is_array($values);
- if (!$valuesIsArray && !$values instanceof \Traversable) {
- throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values)));
- }
- $items = [];
-
- try {
- if (null !== $f = $this->createCacheItem) {
- $valuesIsArray = false;
- foreach ($values as $key => $value) {
- $items[$key] = $f($key, $value, true);
- }
- } elseif ($valuesIsArray) {
- $items = [];
- foreach ($values as $key => $value) {
- $items[] = (string) $key;
- }
- $items = $this->pool->getItems($items);
- } else {
- foreach ($values as $key => $value) {
- if (\is_int($key)) {
- $key = (string) $key;
- }
- $items[$key] = $this->pool->getItem($key)->set($value);
- }
- }
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- $ok = true;
-
- foreach ($items as $key => $item) {
- if ($valuesIsArray) {
- $item->set($values[$key]);
- }
- if (null !== $ttl) {
- $item->expiresAfter($ttl);
- }
- $ok = $this->pool->saveDeferred($item) && $ok;
- }
-
- return $this->pool->commit() && $ok;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- } elseif (!\is_array($keys)) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
-
- try {
- return $this->pool->deleteItems($keys);
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function has($key)
- {
- try {
- return $this->pool->hasItem($key);
- } catch (SimpleCacheException $e) {
- throw $e;
- } catch (Psr6CacheException $e) {
- throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/README.md b/srcs/phpmyadmin/vendor/symfony/cache/README.md
deleted file mode 100644
index c4ab752..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Symfony PSR-6 implementation for caching
-========================================
-
-This component provides an extended [PSR-6](http://www.php-fig.org/psr/psr-6/)
-implementation for adding cache to your applications. It is designed to have a
-low overhead so that caching is fastest. It ships with a few caching adapters
-for the most widespread and suited to caching backends. It also provides a
-`doctrine/cache` proxy adapter to cover more advanced caching needs and a proxy
-adapter for greater interoperability between PSR-6 implementations.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/cache.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/ResettableInterface.php b/srcs/phpmyadmin/vendor/symfony/cache/ResettableInterface.php
deleted file mode 100644
index 7b0a853..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/ResettableInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache;
-
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * Resets a pool's local state.
- */
-interface ResettableInterface extends ResetInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/AbstractCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/AbstractCache.php
deleted file mode 100644
index b3477e9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/AbstractCache.php
+++ /dev/null
@@ -1,199 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Psr\Log\LoggerAwareInterface;
-use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
-use Symfony\Component\Cache\Adapter\AbstractAdapter;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\AbstractTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', AbstractCache::class, AbstractAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use AbstractAdapter and type-hint for CacheInterface instead.
- */
-abstract class AbstractCache implements Psr16CacheInterface, LoggerAwareInterface, ResettableInterface
-{
- /**
- * @internal
- */
- protected const NS_SEPARATOR = ':';
-
- use AbstractTrait {
- deleteItems as private;
- AbstractTrait::deleteItem as delete;
- AbstractTrait::hasItem as has;
- }
-
- private $defaultLifetime;
-
- protected function __construct(string $namespace = '', int $defaultLifetime = 0)
- {
- $this->defaultLifetime = max(0, $defaultLifetime);
- $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':';
- if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
- throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s")', $this->maxIdLength - 24, \strlen($namespace), $namespace));
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- $id = $this->getId($key);
-
- try {
- foreach ($this->doFetch([$id]) as $value) {
- return $value;
- }
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to fetch key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e]);
- }
-
- return $default;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- CacheItem::validateKey($key);
-
- return $this->setMultiple([$key => $value], $ttl);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- } elseif (!\is_array($keys)) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
- $ids = [];
-
- foreach ($keys as $key) {
- $ids[] = $this->getId($key);
- }
- try {
- $values = $this->doFetch($ids);
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to fetch values: '.$e->getMessage(), ['keys' => $keys, 'exception' => $e]);
- $values = [];
- }
- $ids = array_combine($ids, $keys);
-
- return $this->generateValues($values, $ids, $default);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- if (!\is_array($values) && !$values instanceof \Traversable) {
- throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values)));
- }
- $valuesById = [];
-
- foreach ($values as $key => $value) {
- if (\is_int($key)) {
- $key = (string) $key;
- }
- $valuesById[$this->getId($key)] = $value;
- }
- if (false === $ttl = $this->normalizeTtl($ttl)) {
- return $this->doDelete(array_keys($valuesById));
- }
-
- try {
- $e = $this->doSave($valuesById, $ttl);
- } catch (\Exception $e) {
- }
- if (true === $e || [] === $e) {
- return true;
- }
- $keys = [];
- foreach (\is_array($e) ? $e : array_keys($valuesById) as $id) {
- $keys[] = substr($id, \strlen($this->namespace));
- }
- $message = 'Failed to save values'.($e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['keys' => $keys, 'exception' => $e instanceof \Exception ? $e : null]);
-
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- } elseif (!\is_array($keys)) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
-
- return $this->deleteItems($keys);
- }
-
- private function normalizeTtl($ttl)
- {
- if (null === $ttl) {
- return $this->defaultLifetime;
- }
- if ($ttl instanceof \DateInterval) {
- $ttl = (int) \DateTime::createFromFormat('U', 0)->add($ttl)->format('U');
- }
- if (\is_int($ttl)) {
- return 0 < $ttl ? $ttl : false;
- }
-
- throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given', \is_object($ttl) ? \get_class($ttl) : \gettype($ttl)));
- }
-
- private function generateValues(iterable $values, array &$keys, $default): iterable
- {
- try {
- foreach ($values as $id => $value) {
- if (!isset($keys[$id])) {
- $id = key($keys);
- }
- $key = $keys[$id];
- unset($keys[$id]);
- yield $key => $value;
- }
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to fetch values: '.$e->getMessage(), ['keys' => array_values($keys), 'exception' => $e]);
- }
-
- foreach ($keys as $key) {
- yield $key => $default;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/ApcuCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/ApcuCache.php
deleted file mode 100644
index f1eb946..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/ApcuCache.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Adapter\ApcuAdapter;
-use Symfony\Component\Cache\Traits\ApcuTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', ApcuCache::class, ApcuAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use ApcuAdapter and type-hint for CacheInterface instead.
- */
-class ApcuCache extends AbstractCache
-{
- use ApcuTrait;
-
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null)
- {
- $this->init($namespace, $defaultLifetime, $version);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/ArrayCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/ArrayCache.php
deleted file mode 100644
index 7174825..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/ArrayCache.php
+++ /dev/null
@@ -1,167 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Psr\Log\LoggerAwareInterface;
-use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
-use Symfony\Component\Cache\Adapter\ArrayAdapter;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\ArrayTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', ArrayCache::class, ArrayAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use ArrayAdapter and type-hint for CacheInterface instead.
- */
-class ArrayCache implements Psr16CacheInterface, LoggerAwareInterface, ResettableInterface
-{
- use ArrayTrait {
- ArrayTrait::deleteItem as delete;
- ArrayTrait::hasItem as has;
- }
-
- private $defaultLifetime;
-
- /**
- * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise
- */
- public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true)
- {
- $this->defaultLifetime = $defaultLifetime;
- $this->storeSerialized = $storeSerialized;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- if (!\is_string($key) || !isset($this->expiries[$key])) {
- CacheItem::validateKey($key);
- }
- if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] > microtime(true) || !$this->delete($key))) {
- $this->values[$key] = null;
-
- return $default;
- }
- if (!$this->storeSerialized) {
- return $this->values[$key];
- }
- $value = $this->unfreeze($key, $isHit);
-
- return $isHit ? $value : $default;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- } elseif (!\is_array($keys)) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
- foreach ($keys as $key) {
- if (!\is_string($key) || !isset($this->expiries[$key])) {
- CacheItem::validateKey($key);
- }
- }
-
- return $this->generateItems($keys, microtime(true), function ($k, $v, $hit) use ($default) { return $hit ? $v : $default; });
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- if (!\is_array($keys) && !$keys instanceof \Traversable) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
- foreach ($keys as $key) {
- $this->delete($key);
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- if (!\is_string($key)) {
- CacheItem::validateKey($key);
- }
-
- return $this->setMultiple([$key => $value], $ttl);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- if (!\is_array($values) && !$values instanceof \Traversable) {
- throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values)));
- }
- $valuesArray = [];
-
- foreach ($values as $key => $value) {
- if (!\is_int($key) && !(\is_string($key) && isset($this->expiries[$key]))) {
- CacheItem::validateKey($key);
- }
- $valuesArray[$key] = $value;
- }
- if (false === $ttl = $this->normalizeTtl($ttl)) {
- return $this->deleteMultiple(array_keys($valuesArray));
- }
- $expiry = 0 < $ttl ? microtime(true) + $ttl : PHP_INT_MAX;
-
- foreach ($valuesArray as $key => $value) {
- if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) {
- return false;
- }
- $this->values[$key] = $value;
- $this->expiries[$key] = $expiry;
- }
-
- return true;
- }
-
- private function normalizeTtl($ttl)
- {
- if (null === $ttl) {
- return $this->defaultLifetime;
- }
- if ($ttl instanceof \DateInterval) {
- $ttl = (int) \DateTime::createFromFormat('U', 0)->add($ttl)->format('U');
- }
- if (\is_int($ttl)) {
- return 0 < $ttl ? $ttl : false;
- }
-
- throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given', \is_object($ttl) ? \get_class($ttl) : \gettype($ttl)));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/ChainCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/ChainCache.php
deleted file mode 100644
index 57a169f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/ChainCache.php
+++ /dev/null
@@ -1,271 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
-use Symfony\Component\Cache\Adapter\ChainAdapter;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Contracts\Cache\CacheInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', ChainCache::class, ChainAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * Chains several caches together.
- *
- * Cached items are fetched from the first cache having them in its data store.
- * They are saved and deleted in all caches at once.
- *
- * @deprecated since Symfony 4.3, use ChainAdapter and type-hint for CacheInterface instead.
- */
-class ChainCache implements Psr16CacheInterface, PruneableInterface, ResettableInterface
-{
- private $miss;
- private $caches = [];
- private $defaultLifetime;
- private $cacheCount;
-
- /**
- * @param Psr16CacheInterface[] $caches The ordered list of caches used to fetch cached items
- * @param int $defaultLifetime The lifetime of items propagated from lower caches to upper ones
- */
- public function __construct(array $caches, int $defaultLifetime = 0)
- {
- if (!$caches) {
- throw new InvalidArgumentException('At least one cache must be specified.');
- }
-
- foreach ($caches as $cache) {
- if (!$cache instanceof Psr16CacheInterface) {
- throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', \get_class($cache), Psr16CacheInterface::class));
- }
- }
-
- $this->miss = new \stdClass();
- $this->caches = array_values($caches);
- $this->cacheCount = \count($this->caches);
- $this->defaultLifetime = 0 < $defaultLifetime ? $defaultLifetime : null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- $miss = null !== $default && \is_object($default) ? $default : $this->miss;
-
- foreach ($this->caches as $i => $cache) {
- $value = $cache->get($key, $miss);
-
- if ($miss !== $value) {
- while (0 <= --$i) {
- $this->caches[$i]->set($key, $value, $this->defaultLifetime);
- }
-
- return $value;
- }
- }
-
- return $default;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- $miss = null !== $default && \is_object($default) ? $default : $this->miss;
-
- return $this->generateItems($this->caches[0]->getMultiple($keys, $miss), 0, $miss, $default);
- }
-
- private function generateItems(iterable $values, int $cacheIndex, $miss, $default): iterable
- {
- $missing = [];
- $nextCacheIndex = $cacheIndex + 1;
- $nextCache = isset($this->caches[$nextCacheIndex]) ? $this->caches[$nextCacheIndex] : null;
-
- foreach ($values as $k => $value) {
- if ($miss !== $value) {
- yield $k => $value;
- } elseif (!$nextCache) {
- yield $k => $default;
- } else {
- $missing[] = $k;
- }
- }
-
- if ($missing) {
- $cache = $this->caches[$cacheIndex];
- $values = $this->generateItems($nextCache->getMultiple($missing, $miss), $nextCacheIndex, $miss, $default);
-
- foreach ($values as $k => $value) {
- if ($miss !== $value) {
- $cache->set($k, $value, $this->defaultLifetime);
- yield $k => $value;
- } else {
- yield $k => $default;
- }
- }
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function has($key)
- {
- foreach ($this->caches as $cache) {
- if ($cache->has($key)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function clear()
- {
- $cleared = true;
- $i = $this->cacheCount;
-
- while ($i--) {
- $cleared = $this->caches[$i]->clear() && $cleared;
- }
-
- return $cleared;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function delete($key)
- {
- $deleted = true;
- $i = $this->cacheCount;
-
- while ($i--) {
- $deleted = $this->caches[$i]->delete($key) && $deleted;
- }
-
- return $deleted;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- }
- $deleted = true;
- $i = $this->cacheCount;
-
- while ($i--) {
- $deleted = $this->caches[$i]->deleteMultiple($keys) && $deleted;
- }
-
- return $deleted;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- $saved = true;
- $i = $this->cacheCount;
-
- while ($i--) {
- $saved = $this->caches[$i]->set($key, $value, $ttl) && $saved;
- }
-
- return $saved;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- if ($values instanceof \Traversable) {
- $valuesIterator = $values;
- $values = function () use ($valuesIterator, &$values) {
- $generatedValues = [];
-
- foreach ($valuesIterator as $key => $value) {
- yield $key => $value;
- $generatedValues[$key] = $value;
- }
-
- $values = $generatedValues;
- };
- $values = $values();
- }
- $saved = true;
- $i = $this->cacheCount;
-
- while ($i--) {
- $saved = $this->caches[$i]->setMultiple($values, $ttl) && $saved;
- }
-
- return $saved;
- }
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- $pruned = true;
-
- foreach ($this->caches as $cache) {
- if ($cache instanceof PruneableInterface) {
- $pruned = $cache->prune() && $pruned;
- }
- }
-
- return $pruned;
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- foreach ($this->caches as $cache) {
- if ($cache instanceof ResetInterface) {
- $cache->reset();
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/DoctrineCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/DoctrineCache.php
deleted file mode 100644
index 6a6d003..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/DoctrineCache.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Doctrine\Common\Cache\CacheProvider;
-use Symfony\Component\Cache\Adapter\DoctrineAdapter;
-use Symfony\Component\Cache\Traits\DoctrineTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', DoctrineCache::class, DoctrineAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use DoctrineAdapter and type-hint for CacheInterface instead.
- */
-class DoctrineCache extends AbstractCache
-{
- use DoctrineTrait;
-
- public function __construct(CacheProvider $provider, string $namespace = '', int $defaultLifetime = 0)
- {
- parent::__construct('', $defaultLifetime);
- $this->provider = $provider;
- $provider->setNamespace($namespace);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/FilesystemCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/FilesystemCache.php
deleted file mode 100644
index 8891abd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/FilesystemCache.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Adapter\FilesystemAdapter;
-use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\FilesystemTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', FilesystemCache::class, FilesystemAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use FilesystemAdapter and type-hint for CacheInterface instead.
- */
-class FilesystemCache extends AbstractCache implements PruneableInterface
-{
- use FilesystemTrait;
-
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null)
- {
- $this->marshaller = $marshaller ?? new DefaultMarshaller();
- parent::__construct('', $defaultLifetime);
- $this->init($namespace, $directory);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/MemcachedCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/MemcachedCache.php
deleted file mode 100644
index e193411..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/MemcachedCache.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Adapter\MemcachedAdapter;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\Traits\MemcachedTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', MemcachedCache::class, MemcachedAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use MemcachedAdapter and type-hint for CacheInterface instead.
- */
-class MemcachedCache extends AbstractCache
-{
- use MemcachedTrait;
-
- protected $maxIdLength = 250;
-
- public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
- {
- $this->init($client, $namespace, $defaultLifetime, $marshaller);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/NullCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/NullCache.php
deleted file mode 100644
index 35600fc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/NullCache.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
-use Symfony\Component\Cache\Adapter\NullAdapter;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', NullCache::class, NullAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use NullAdapter and type-hint for CacheInterface instead.
- */
-class NullCache implements Psr16CacheInterface
-{
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- return $default;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- foreach ($keys as $key) {
- yield $key => $default;
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function has($key)
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function clear()
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function delete($key)
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/PdoCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/PdoCache.php
deleted file mode 100644
index 07849e9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/PdoCache.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Adapter\PdoAdapter;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\PdoTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', PdoCache::class, PdoAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use PdoAdapter and type-hint for CacheInterface instead.
- */
-class PdoCache extends AbstractCache implements PruneableInterface
-{
- use PdoTrait;
-
- protected $maxIdLength = 255;
-
- /**
- * You can either pass an existing database connection as PDO instance or
- * a Doctrine DBAL Connection or a DSN string that will be used to
- * lazy-connect to the database when the cache is actually used.
- *
- * When a Doctrine DBAL Connection is passed, the cache table is created
- * automatically when possible. Otherwise, use the createTable() method.
- *
- * List of available options:
- * * db_table: The name of the table [default: cache_items]
- * * db_id_col: The column where to store the cache id [default: item_id]
- * * db_data_col: The column where to store the cache data [default: item_data]
- * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime]
- * * db_time_col: The column where to store the timestamp [default: item_time]
- * * db_username: The username when lazy-connect [default: '']
- * * db_password: The password when lazy-connect [default: '']
- * * db_connection_options: An array of driver-specific connection options [default: []]
- *
- * @param \PDO|Connection|string $connOrDsn a \PDO or Connection instance or DSN string or null
- *
- * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string
- * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION
- * @throws InvalidArgumentException When namespace contains invalid characters
- */
- public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], MarshallerInterface $marshaller = null)
- {
- $this->init($connOrDsn, $namespace, $defaultLifetime, $options, $marshaller);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpArrayCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpArrayCache.php
deleted file mode 100644
index 3711f46..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpArrayCache.php
+++ /dev/null
@@ -1,256 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
-use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Component\Cache\Traits\PhpArrayTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', PhpArrayCache::class, PhpArrayAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use PhpArrayAdapter and type-hint for CacheInterface instead.
- */
-class PhpArrayCache implements Psr16CacheInterface, PruneableInterface, ResettableInterface
-{
- use PhpArrayTrait;
-
- /**
- * @param string $file The PHP file were values are cached
- * @param Psr16CacheInterface $fallbackPool A pool to fallback on when an item is not hit
- */
- public function __construct(string $file, Psr16CacheInterface $fallbackPool)
- {
- $this->file = $file;
- $this->pool = $fallbackPool;
- }
-
- /**
- * This adapter takes advantage of how PHP stores arrays in its latest versions.
- *
- * @param string $file The PHP file were values are cached
- * @param CacheInterface $fallbackPool A pool to fallback on when an item is not hit
- *
- * @return Psr16CacheInterface
- */
- public static function create($file, Psr16CacheInterface $fallbackPool)
- {
- return new static($file, $fallbackPool);
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
- if (!isset($this->keys[$key])) {
- return $this->pool->get($key, $default);
- }
- $value = $this->values[$this->keys[$key]];
-
- if ('N;' === $value) {
- return null;
- }
- if ($value instanceof \Closure) {
- try {
- return $value();
- } catch (\Throwable $e) {
- return $default;
- }
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- if ($keys instanceof \Traversable) {
- $keys = iterator_to_array($keys, false);
- } elseif (!\is_array($keys)) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
- foreach ($keys as $key) {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return $this->generateItems($keys, $default);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function has($key)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return isset($this->keys[$key]) || $this->pool->has($key);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function delete($key)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return !isset($this->keys[$key]) && $this->pool->delete($key);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- if (!\is_array($keys) && !$keys instanceof \Traversable) {
- throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
- }
-
- $deleted = true;
- $fallbackKeys = [];
-
- foreach ($keys as $key) {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
-
- if (isset($this->keys[$key])) {
- $deleted = false;
- } else {
- $fallbackKeys[] = $key;
- }
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- if ($fallbackKeys) {
- $deleted = $this->pool->deleteMultiple($fallbackKeys) && $deleted;
- }
-
- return $deleted;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
- if (null === $this->values) {
- $this->initialize();
- }
-
- return !isset($this->keys[$key]) && $this->pool->set($key, $value, $ttl);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- if (!\is_array($values) && !$values instanceof \Traversable) {
- throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values)));
- }
-
- $saved = true;
- $fallbackValues = [];
-
- foreach ($values as $key => $value) {
- if (!\is_string($key) && !\is_int($key)) {
- throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
- }
-
- if (isset($this->keys[$key])) {
- $saved = false;
- } else {
- $fallbackValues[$key] = $value;
- }
- }
-
- if ($fallbackValues) {
- $saved = $this->pool->setMultiple($fallbackValues, $ttl) && $saved;
- }
-
- return $saved;
- }
-
- private function generateItems(array $keys, $default): iterable
- {
- $fallbackKeys = [];
-
- foreach ($keys as $key) {
- if (isset($this->keys[$key])) {
- $value = $this->values[$this->keys[$key]];
-
- if ('N;' === $value) {
- yield $key => null;
- } elseif ($value instanceof \Closure) {
- try {
- yield $key => $value();
- } catch (\Throwable $e) {
- yield $key => $default;
- }
- } else {
- yield $key => $value;
- }
- } else {
- $fallbackKeys[] = $key;
- }
- }
-
- if ($fallbackKeys) {
- yield from $this->pool->getMultiple($fallbackKeys, $default);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpFilesCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpFilesCache.php
deleted file mode 100644
index 060244a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/PhpFilesCache.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
-use Symfony\Component\Cache\Exception\CacheException;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\Traits\PhpFilesTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', PhpFilesCache::class, PhpFilesAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use PhpFilesAdapter and type-hint for CacheInterface instead.
- */
-class PhpFilesCache extends AbstractCache implements PruneableInterface
-{
- use PhpFilesTrait;
-
- /**
- * @param $appendOnly Set to `true` to gain extra performance when the items stored in this pool never expire.
- * Doing so is encouraged because it fits perfectly OPcache's memory model.
- *
- * @throws CacheException if OPcache is not enabled
- */
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, bool $appendOnly = false)
- {
- $this->appendOnly = $appendOnly;
- self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time();
- parent::__construct('', $defaultLifetime);
- $this->init($namespace, $directory);
- $this->includeHandler = static function ($type, $msg, $file, $line) {
- throw new \ErrorException($msg, 0, $type, $file, $line);
- };
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/Psr6Cache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/Psr6Cache.php
deleted file mode 100644
index 090f48c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/Psr6Cache.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Psr16Cache;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" instead.', Psr6Cache::class, Psr16Cache::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use Psr16Cache instead.
- */
-class Psr6Cache extends Psr16Cache
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/RedisCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/RedisCache.php
deleted file mode 100644
index 9655a75..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/RedisCache.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Symfony\Component\Cache\Adapter\RedisAdapter;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-use Symfony\Component\Cache\Traits\RedisTrait;
-use Symfony\Contracts\Cache\CacheInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', RedisCache::class, RedisAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use RedisAdapter and type-hint for CacheInterface instead.
- */
-class RedisCache extends AbstractCache
-{
- use RedisTrait;
-
- /**
- * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redisClient
- */
- public function __construct($redisClient, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
- {
- $this->init($redisClient, $namespace, $defaultLifetime, $marshaller);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Simple/TraceableCache.php b/srcs/phpmyadmin/vendor/symfony/cache/Simple/TraceableCache.php
deleted file mode 100644
index eac77ba..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Simple/TraceableCache.php
+++ /dev/null
@@ -1,257 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Simple;
-
-use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Component\Cache\ResettableInterface;
-use Symfony\Contracts\Cache\CacheInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', TraceableCache::class, TraceableAdapter::class, CacheInterface::class), E_USER_DEPRECATED);
-
-/**
- * @deprecated since Symfony 4.3, use TraceableAdapter and type-hint for CacheInterface instead.
- */
-class TraceableCache implements Psr16CacheInterface, PruneableInterface, ResettableInterface
-{
- private $pool;
- private $miss;
- private $calls = [];
-
- public function __construct(Psr16CacheInterface $pool)
- {
- $this->pool = $pool;
- $this->miss = new \stdClass();
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($key, $default = null)
- {
- $miss = null !== $default && \is_object($default) ? $default : $this->miss;
- $event = $this->start(__FUNCTION__);
- try {
- $value = $this->pool->get($key, $miss);
- } finally {
- $event->end = microtime(true);
- }
- if ($event->result[$key] = $miss !== $value) {
- ++$event->hits;
- } else {
- ++$event->misses;
- $value = $default;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function has($key)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$key] = $this->pool->has($key);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function delete($key)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$key] = $this->pool->delete($key);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function set($key, $value, $ttl = null)
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result[$key] = $this->pool->set($key, $value, $ttl);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function setMultiple($values, $ttl = null)
- {
- $event = $this->start(__FUNCTION__);
- $event->result['keys'] = [];
-
- if ($values instanceof \Traversable) {
- $values = function () use ($values, $event) {
- foreach ($values as $k => $v) {
- $event->result['keys'][] = $k;
- yield $k => $v;
- }
- };
- $values = $values();
- } elseif (\is_array($values)) {
- $event->result['keys'] = array_keys($values);
- }
-
- try {
- return $event->result['result'] = $this->pool->setMultiple($values, $ttl);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return iterable
- */
- public function getMultiple($keys, $default = null)
- {
- $miss = null !== $default && \is_object($default) ? $default : $this->miss;
- $event = $this->start(__FUNCTION__);
- try {
- $result = $this->pool->getMultiple($keys, $miss);
- } finally {
- $event->end = microtime(true);
- }
- $f = function () use ($result, $event, $miss, $default) {
- $event->result = [];
- foreach ($result as $key => $value) {
- if ($event->result[$key] = $miss !== $value) {
- ++$event->hits;
- } else {
- ++$event->misses;
- $value = $default;
- }
- yield $key => $value;
- }
- };
-
- return $f();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function clear()
- {
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result = $this->pool->clear();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteMultiple($keys)
- {
- $event = $this->start(__FUNCTION__);
- if ($keys instanceof \Traversable) {
- $keys = $event->result['keys'] = iterator_to_array($keys, false);
- } else {
- $event->result['keys'] = $keys;
- }
- try {
- return $event->result['result'] = $this->pool->deleteMultiple($keys);
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- if (!$this->pool instanceof PruneableInterface) {
- return false;
- }
- $event = $this->start(__FUNCTION__);
- try {
- return $event->result = $this->pool->prune();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- if (!$this->pool instanceof ResetInterface) {
- return;
- }
- $event = $this->start(__FUNCTION__);
- try {
- $this->pool->reset();
- } finally {
- $event->end = microtime(true);
- }
- }
-
- public function getCalls()
- {
- try {
- return $this->calls;
- } finally {
- $this->calls = [];
- }
- }
-
- private function start(string $name): TraceableCacheEvent
- {
- $this->calls[] = $event = new TraceableCacheEvent();
- $event->name = $name;
- $event->start = microtime(true);
-
- return $event;
- }
-}
-
-class TraceableCacheEvent
-{
- public $name;
- public $start;
- public $end;
- public $result;
- public $hits = 0;
- public $misses = 0;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractAdapterTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractAdapterTrait.php
deleted file mode 100644
index 8bf9354..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractAdapterTrait.php
+++ /dev/null
@@ -1,155 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Psr\Cache\CacheItemInterface;
-use Symfony\Component\Cache\CacheItem;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait AbstractAdapterTrait
-{
- use AbstractTrait;
-
- /**
- * @var \Closure needs to be set by class, signature is function(string <key>, mixed <value>, bool <isHit>)
- */
- private $createCacheItem;
-
- /**
- * @var \Closure needs to be set by class, signature is function(array <deferred>, string <namespace>, array <&expiredIds>)
- */
- private $mergeByLifetime;
-
- /**
- * {@inheritdoc}
- */
- public function getItem($key)
- {
- if ($this->deferred) {
- $this->commit();
- }
- $id = $this->getId($key);
-
- $f = $this->createCacheItem;
- $isHit = false;
- $value = null;
-
- try {
- foreach ($this->doFetch([$id]) as $value) {
- $isHit = true;
- }
-
- return $f($key, $value, $isHit);
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to fetch key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e]);
- }
-
- return $f($key, null, false);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getItems(array $keys = [])
- {
- if ($this->deferred) {
- $this->commit();
- }
- $ids = [];
-
- foreach ($keys as $key) {
- $ids[] = $this->getId($key);
- }
- try {
- $items = $this->doFetch($ids);
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => $keys, 'exception' => $e]);
- $items = [];
- }
- $ids = array_combine($ids, $keys);
-
- return $this->generateItems($items, $ids);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function save(CacheItemInterface $item)
- {
- if (!$item instanceof CacheItem) {
- return false;
- }
- $this->deferred[$item->getKey()] = $item;
-
- return $this->commit();
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function saveDeferred(CacheItemInterface $item)
- {
- if (!$item instanceof CacheItem) {
- return false;
- }
- $this->deferred[$item->getKey()] = $item;
-
- return true;
- }
-
- public function __sleep()
- {
- throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
- }
-
- public function __wakeup()
- {
- throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
- }
-
- public function __destruct()
- {
- if ($this->deferred) {
- $this->commit();
- }
- }
-
- private function generateItems(iterable $items, array &$keys): iterable
- {
- $f = $this->createCacheItem;
-
- try {
- foreach ($items as $id => $value) {
- if (!isset($keys[$id])) {
- $id = key($keys);
- }
- $key = $keys[$id];
- unset($keys[$id]);
- yield $key => $f($key, $value, true);
- }
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => array_values($keys), 'exception' => $e]);
- }
-
- foreach ($keys as $key) {
- yield $key => $f($key, null, false);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractTrait.php
deleted file mode 100644
index f9a1d8f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/AbstractTrait.php
+++ /dev/null
@@ -1,295 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Psr\Log\LoggerAwareTrait;
-use Symfony\Component\Cache\CacheItem;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait AbstractTrait
-{
- use LoggerAwareTrait;
-
- private $namespace;
- private $namespaceVersion = '';
- private $versioningIsEnabled = false;
- private $deferred = [];
- private $ids = [];
-
- /**
- * @var int|null The maximum length to enforce for identifiers or null when no limit applies
- */
- protected $maxIdLength;
-
- /**
- * Fetches several cache items.
- *
- * @param array $ids The cache identifiers to fetch
- *
- * @return array|\Traversable The corresponding values found in the cache
- */
- abstract protected function doFetch(array $ids);
-
- /**
- * Confirms if the cache contains specified cache item.
- *
- * @param string $id The identifier for which to check existence
- *
- * @return bool True if item exists in the cache, false otherwise
- */
- abstract protected function doHave($id);
-
- /**
- * Deletes all items in the pool.
- *
- * @param string $namespace The prefix used for all identifiers managed by this pool
- *
- * @return bool True if the pool was successfully cleared, false otherwise
- */
- abstract protected function doClear($namespace);
-
- /**
- * Removes multiple items from the pool.
- *
- * @param array $ids An array of identifiers that should be removed from the pool
- *
- * @return bool True if the items were successfully removed, false otherwise
- */
- abstract protected function doDelete(array $ids);
-
- /**
- * Persists several cache items immediately.
- *
- * @param array $values The values to cache, indexed by their cache identifier
- * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning
- *
- * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not
- */
- abstract protected function doSave(array $values, $lifetime);
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- $id = $this->getId($key);
-
- if (isset($this->deferred[$key])) {
- $this->commit();
- }
-
- try {
- return $this->doHave($id);
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached: '.$e->getMessage(), ['key' => $key, 'exception' => $e]);
-
- return false;
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
- $this->deferred = [];
- if ($cleared = $this->versioningIsEnabled) {
- $namespaceVersion = substr_replace(base64_encode(pack('V', mt_rand())), static::NS_SEPARATOR, 5);
- try {
- $cleared = $this->doSave([static::NS_SEPARATOR.$this->namespace => $namespaceVersion], 0);
- } catch (\Exception $e) {
- $cleared = false;
- }
- if ($cleared = true === $cleared || [] === $cleared) {
- $this->namespaceVersion = $namespaceVersion;
- $this->ids = [];
- }
- }
-
- try {
- return $this->doClear($this->namespace.$prefix) || $cleared;
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to clear the cache: '.$e->getMessage(), ['exception' => $e]);
-
- return false;
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- return $this->deleteItems([$key]);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItems(array $keys)
- {
- $ids = [];
-
- foreach ($keys as $key) {
- $ids[$key] = $this->getId($key);
- unset($this->deferred[$key]);
- }
-
- try {
- if ($this->doDelete($ids)) {
- return true;
- }
- } catch (\Exception $e) {
- }
-
- $ok = true;
-
- // When bulk-delete failed, retry each item individually
- foreach ($ids as $key => $id) {
- try {
- $e = null;
- if ($this->doDelete([$id])) {
- continue;
- }
- } catch (\Exception $e) {
- }
- $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.');
- CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e]);
- $ok = false;
- }
-
- return $ok;
- }
-
- /**
- * Enables/disables versioning of items.
- *
- * When versioning is enabled, clearing the cache is atomic and doesn't require listing existing keys to proceed,
- * but old keys may need garbage collection and extra round-trips to the back-end are required.
- *
- * Calling this method also clears the memoized namespace version and thus forces a resynchonization of it.
- *
- * @param bool $enable
- *
- * @return bool the previous state of versioning
- */
- public function enableVersioning($enable = true)
- {
- $wasEnabled = $this->versioningIsEnabled;
- $this->versioningIsEnabled = (bool) $enable;
- $this->namespaceVersion = '';
- $this->ids = [];
-
- return $wasEnabled;
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- if ($this->deferred) {
- $this->commit();
- }
- $this->namespaceVersion = '';
- $this->ids = [];
- }
-
- /**
- * Like the native unserialize() function but throws an exception if anything goes wrong.
- *
- * @param string $value
- *
- * @return mixed
- *
- * @throws \Exception
- *
- * @deprecated since Symfony 4.2, use DefaultMarshaller instead.
- */
- protected static function unserialize($value)
- {
- @trigger_error(sprintf('The "%s::unserialize()" method is deprecated since Symfony 4.2, use DefaultMarshaller instead.', __CLASS__), E_USER_DEPRECATED);
-
- if ('b:0;' === $value) {
- return false;
- }
- $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
- try {
- if (false !== $value = unserialize($value)) {
- return $value;
- }
- throw new \DomainException('Failed to unserialize cached value');
- } catch (\Error $e) {
- throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
- } finally {
- ini_set('unserialize_callback_func', $unserializeCallbackHandler);
- }
- }
-
- private function getId($key): string
- {
- if ($this->versioningIsEnabled && '' === $this->namespaceVersion) {
- $this->ids = [];
- $this->namespaceVersion = '1'.static::NS_SEPARATOR;
- try {
- foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) {
- $this->namespaceVersion = $v;
- }
- if ('1'.static::NS_SEPARATOR === $this->namespaceVersion) {
- $this->namespaceVersion = substr_replace(base64_encode(pack('V', time())), static::NS_SEPARATOR, 5);
- $this->doSave([static::NS_SEPARATOR.$this->namespace => $this->namespaceVersion], 0);
- }
- } catch (\Exception $e) {
- }
- }
-
- if (\is_string($key) && isset($this->ids[$key])) {
- return $this->namespace.$this->namespaceVersion.$this->ids[$key];
- }
- CacheItem::validateKey($key);
- $this->ids[$key] = $key;
-
- if (null === $this->maxIdLength) {
- return $this->namespace.$this->namespaceVersion.$key;
- }
- if (\strlen($id = $this->namespace.$this->namespaceVersion.$key) > $this->maxIdLength) {
- // Use MD5 to favor speed over security, which is not an issue here
- $this->ids[$key] = $id = substr_replace(base64_encode(hash('md5', $key, true)), static::NS_SEPARATOR, -(\strlen($this->namespaceVersion) + 2));
- $id = $this->namespace.$this->namespaceVersion.$id;
- }
-
- return $id;
- }
-
- /**
- * @internal
- */
- public static function handleUnserializeCallback($class)
- {
- throw new \DomainException('Class not found: '.$class);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ApcuTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/ApcuTrait.php
deleted file mode 100644
index c55def6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ApcuTrait.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\CacheException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait ApcuTrait
-{
- public static function isSupported()
- {
- return \function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN);
- }
-
- private function init(string $namespace, int $defaultLifetime, ?string $version)
- {
- if (!static::isSupported()) {
- throw new CacheException('APCu is not enabled');
- }
- if ('cli' === \PHP_SAPI) {
- ini_set('apc.use_request_time', 0);
- }
- parent::__construct($namespace, $defaultLifetime);
-
- if (null !== $version) {
- CacheItem::validateKey($version);
-
- if (!apcu_exists($version.'@'.$namespace)) {
- $this->doClear($namespace);
- apcu_add($version.'@'.$namespace, null);
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
- try {
- $values = [];
- foreach (apcu_fetch($ids, $ok) ?: [] as $k => $v) {
- if (null !== $v || $ok) {
- $values[$k] = $v;
- }
- }
-
- return $values;
- } catch (\Error $e) {
- throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
- } finally {
- ini_set('unserialize_callback_func', $unserializeCallbackHandler);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- return apcu_exists($id);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- return isset($namespace[0]) && class_exists('APCuIterator', false) && ('cli' !== \PHP_SAPI || filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN))
- ? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), APC_ITER_KEY))
- : apcu_clear_cache();
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- foreach ($ids as $id) {
- apcu_delete($id);
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- try {
- if (false === $failures = apcu_store($values, null, $lifetime)) {
- $failures = $values;
- }
-
- return array_keys($failures);
- } catch (\Throwable $e) {
- if (1 === \count($values)) {
- // Workaround https://github.com/krakjoe/apcu/issues/170
- apcu_delete(key($values));
- }
-
- throw $e;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ArrayTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/ArrayTrait.php
deleted file mode 100644
index 21872c5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ArrayTrait.php
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Psr\Log\LoggerAwareTrait;
-use Symfony\Component\Cache\CacheItem;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait ArrayTrait
-{
- use LoggerAwareTrait;
-
- private $storeSerialized;
- private $values = [];
- private $expiries = [];
-
- /**
- * Returns all cached values, with cache miss as null.
- *
- * @return array
- */
- public function getValues()
- {
- if (!$this->storeSerialized) {
- return $this->values;
- }
-
- $values = $this->values;
- foreach ($values as $k => $v) {
- if (null === $v || 'N;' === $v) {
- continue;
- }
- if (!\is_string($v) || !isset($v[2]) || ':' !== $v[1]) {
- $values[$k] = serialize($v);
- }
- }
-
- return $values;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function hasItem($key)
- {
- if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) {
- return true;
- }
- CacheItem::validateKey($key);
-
- return isset($this->expiries[$key]) && !$this->deleteItem($key);
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
-
- if ('' !== $prefix) {
- foreach ($this->values as $key => $value) {
- if (0 === strpos($key, $prefix)) {
- unset($this->values[$key], $this->expiries[$key]);
- }
- }
- } else {
- $this->values = $this->expiries = [];
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function deleteItem($key)
- {
- if (!\is_string($key) || !isset($this->expiries[$key])) {
- CacheItem::validateKey($key);
- }
- unset($this->values[$key], $this->expiries[$key]);
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- $this->clear();
- }
-
- private function generateItems(array $keys, float $now, callable $f): iterable
- {
- foreach ($keys as $i => $key) {
- if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] > $now || !$this->deleteItem($key))) {
- $this->values[$key] = $value = null;
- } else {
- $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key];
- }
- unset($keys[$i]);
-
- yield $key => $f($key, $value, $isHit);
- }
-
- foreach ($keys as $key) {
- yield $key => $f($key, null, false);
- }
- }
-
- private function freeze($value, $key)
- {
- if (null === $value) {
- return 'N;';
- }
- if (\is_string($value)) {
- // Serialize strings if they could be confused with serialized objects or arrays
- if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
- return serialize($value);
- }
- } elseif (!is_scalar($value)) {
- try {
- $serialized = serialize($value);
- } catch (\Exception $e) {
- $type = \is_object($value) ? \get_class($value) : \gettype($value);
- $message = sprintf('Failed to save key "{key}" of type %s: %s', $type, $e->getMessage());
- CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e]);
-
- return null;
- }
- // Keep value serialized if it contains any objects or any internal references
- if ('C' === $serialized[0] || 'O' === $serialized[0] || preg_match('/;[OCRr]:[1-9]/', $serialized)) {
- return $serialized;
- }
- }
-
- return $value;
- }
-
- private function unfreeze(string $key, bool &$isHit)
- {
- if ('N;' === $value = $this->values[$key]) {
- return null;
- }
- if (\is_string($value) && isset($value[2]) && ':' === $value[1]) {
- try {
- $value = unserialize($value);
- } catch (\Exception $e) {
- CacheItem::log($this->logger, 'Failed to unserialize key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e]);
- $value = false;
- }
- if (false === $value) {
- $this->values[$key] = $value = null;
- $isHit = false;
- }
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ContractsTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/ContractsTrait.php
deleted file mode 100644
index c5827c3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ContractsTrait.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Psr\Log\LoggerInterface;
-use Symfony\Component\Cache\Adapter\AdapterInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\LockRegistry;
-use Symfony\Contracts\Cache\CacheInterface;
-use Symfony\Contracts\Cache\CacheTrait;
-use Symfony\Contracts\Cache\ItemInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait ContractsTrait
-{
- use CacheTrait {
- doGet as private contractsGet;
- }
-
- private $callbackWrapper = [LockRegistry::class, 'compute'];
- private $computing = [];
-
- /**
- * Wraps the callback passed to ->get() in a callable.
- *
- * @return callable the previous callback wrapper
- */
- public function setCallbackWrapper(?callable $callbackWrapper): callable
- {
- $previousWrapper = $this->callbackWrapper;
- $this->callbackWrapper = $callbackWrapper ?? function (callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger) {
- return $callback($item, $save);
- };
-
- return $previousWrapper;
- }
-
- private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null)
- {
- if (0 > $beta = $beta ?? 1.0) {
- throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', \get_class($this), $beta));
- }
-
- static $setMetadata;
-
- $setMetadata = $setMetadata ?? \Closure::bind(
- static function (CacheItem $item, float $startTime, ?array &$metadata) {
- if ($item->expiry > $endTime = microtime(true)) {
- $item->newMetadata[CacheItem::METADATA_EXPIRY] = $metadata[CacheItem::METADATA_EXPIRY] = $item->expiry;
- $item->newMetadata[CacheItem::METADATA_CTIME] = $metadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime));
- } else {
- unset($metadata[CacheItem::METADATA_EXPIRY], $metadata[CacheItem::METADATA_CTIME]);
- }
- },
- null,
- CacheItem::class
- );
-
- return $this->contractsGet($pool, $key, function (CacheItem $item, bool &$save) use ($pool, $callback, $setMetadata, &$metadata, $key) {
- // don't wrap nor save recursive calls
- if (isset($this->computing[$key])) {
- $value = $callback($item, $save);
- $save = false;
-
- return $value;
- }
-
- $this->computing[$key] = $key;
- $startTime = microtime(true);
-
- try {
- $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (CacheItem $item) use ($setMetadata, $startTime, &$metadata) {
- $setMetadata($item, $startTime, $metadata);
- }, $this->logger ?? null);
- $setMetadata($item, $startTime, $metadata);
-
- return $value;
- } finally {
- unset($this->computing[$key]);
- }
- }, $beta, $metadata, $this->logger ?? null);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/DoctrineTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/DoctrineTrait.php
deleted file mode 100644
index c87ecab..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/DoctrineTrait.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait DoctrineTrait
-{
- private $provider;
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- parent::reset();
- $this->provider->setNamespace($this->provider->getNamespace());
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- $unserializeCallbackHandler = ini_set('unserialize_callback_func', parent::class.'::handleUnserializeCallback');
- try {
- return $this->provider->fetchMultiple($ids);
- } catch (\Error $e) {
- $trace = $e->getTrace();
-
- if (isset($trace[0]['function']) && !isset($trace[0]['class'])) {
- switch ($trace[0]['function']) {
- case 'unserialize':
- case 'apcu_fetch':
- case 'apc_fetch':
- throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
- }
- }
-
- throw $e;
- } finally {
- ini_set('unserialize_callback_func', $unserializeCallbackHandler);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- return $this->provider->contains($id);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- $namespace = $this->provider->getNamespace();
-
- return isset($namespace[0])
- ? $this->provider->deleteAll()
- : $this->provider->flushAll();
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- $ok = true;
- foreach ($ids as $id) {
- $ok = $this->provider->delete($id) && $ok;
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- return $this->provider->saveMultiple($values, $lifetime);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemCommonTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemCommonTrait.php
deleted file mode 100644
index d828982..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemCommonTrait.php
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait FilesystemCommonTrait
-{
- private $directory;
- private $tmp;
-
- private function init(string $namespace, ?string $directory)
- {
- if (!isset($directory[0])) {
- $directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfony-cache';
- } else {
- $directory = realpath($directory) ?: $directory;
- }
- if (isset($namespace[0])) {
- if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) {
- throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
- }
- $directory .= \DIRECTORY_SEPARATOR.$namespace;
- }
- if (!file_exists($directory)) {
- @mkdir($directory, 0777, true);
- }
- $directory .= \DIRECTORY_SEPARATOR;
- // On Windows the whole path is limited to 258 chars
- if ('\\' === \DIRECTORY_SEPARATOR && \strlen($directory) > 234) {
- throw new InvalidArgumentException(sprintf('Cache directory too long (%s)', $directory));
- }
-
- $this->directory = $directory;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- $ok = true;
-
- foreach ($this->scanHashDir($this->directory) as $file) {
- if ('' !== $namespace && 0 !== strpos($this->getFileKey($file), $namespace)) {
- continue;
- }
-
- $ok = ($this->doUnlink($file) || !file_exists($file)) && $ok;
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- $ok = true;
-
- foreach ($ids as $id) {
- $file = $this->getFile($id);
- $ok = (!file_exists($file) || $this->doUnlink($file) || !file_exists($file)) && $ok;
- }
-
- return $ok;
- }
-
- protected function doUnlink($file)
- {
- return @unlink($file);
- }
-
- private function write(string $file, string $data, int $expiresAt = null)
- {
- set_error_handler(__CLASS__.'::throwError');
- try {
- if (null === $this->tmp) {
- $this->tmp = $this->directory.uniqid('', true);
- }
- file_put_contents($this->tmp, $data);
-
- if (null !== $expiresAt) {
- touch($this->tmp, $expiresAt);
- }
-
- return rename($this->tmp, $file);
- } finally {
- restore_error_handler();
- }
- }
-
- private function getFile(string $id, bool $mkdir = false, string $directory = null)
- {
- // Use MD5 to favor speed over security, which is not an issue here
- $hash = str_replace('/', '-', base64_encode(hash('md5', static::class.$id, true)));
- $dir = ($directory ?? $this->directory).strtoupper($hash[0].\DIRECTORY_SEPARATOR.$hash[1].\DIRECTORY_SEPARATOR);
-
- if ($mkdir && !file_exists($dir)) {
- @mkdir($dir, 0777, true);
- }
-
- return $dir.substr($hash, 2, 20);
- }
-
- private function getFileKey(string $file): string
- {
- return '';
- }
-
- private function scanHashDir(string $directory): \Generator
- {
- if (!file_exists($directory)) {
- return;
- }
-
- $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
-
- for ($i = 0; $i < 38; ++$i) {
- if (!file_exists($directory.$chars[$i])) {
- continue;
- }
-
- for ($j = 0; $j < 38; ++$j) {
- if (!file_exists($dir = $directory.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) {
- continue;
- }
-
- foreach (@scandir($dir, SCANDIR_SORT_NONE) ?: [] as $file) {
- if ('.' !== $file && '..' !== $file) {
- yield $dir.\DIRECTORY_SEPARATOR.$file;
- }
- }
- }
- }
- }
-
- /**
- * @internal
- */
- public static function throwError($type, $message, $file, $line)
- {
- throw new \ErrorException($message, 0, $type, $file, $line);
- }
-
- /**
- * @return array
- */
- public function __sleep()
- {
- throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
- }
-
- public function __wakeup()
- {
- throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
- }
-
- public function __destruct()
- {
- if (method_exists(parent::class, '__destruct')) {
- parent::__destruct();
- }
- if (null !== $this->tmp && file_exists($this->tmp)) {
- unlink($this->tmp);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemTrait.php
deleted file mode 100644
index 185eb00..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/FilesystemTrait.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\Exception\CacheException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- * @author Rob Frawley 2nd <rmf@src.run>
- *
- * @internal
- */
-trait FilesystemTrait
-{
- use FilesystemCommonTrait;
-
- private $marshaller;
-
- /**
- * @return bool
- */
- public function prune()
- {
- $time = time();
- $pruned = true;
-
- foreach ($this->scanHashDir($this->directory) as $file) {
- if (!$h = @fopen($file, 'rb')) {
- continue;
- }
-
- if (($expiresAt = (int) fgets($h)) && $time >= $expiresAt) {
- fclose($h);
- $pruned = @unlink($file) && !file_exists($file) && $pruned;
- } else {
- fclose($h);
- }
- }
-
- return $pruned;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- $values = [];
- $now = time();
-
- foreach ($ids as $id) {
- $file = $this->getFile($id);
- if (!file_exists($file) || !$h = @fopen($file, 'rb')) {
- continue;
- }
- if (($expiresAt = (int) fgets($h)) && $now >= $expiresAt) {
- fclose($h);
- @unlink($file);
- } else {
- $i = rawurldecode(rtrim(fgets($h)));
- $value = stream_get_contents($h);
- fclose($h);
- if ($i === $id) {
- $values[$id] = $this->marshaller->unmarshall($value);
- }
- }
- }
-
- return $values;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- $file = $this->getFile($id);
-
- return file_exists($file) && (@filemtime($file) > time() || $this->doFetch([$id]));
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- $expiresAt = $lifetime ? (time() + $lifetime) : 0;
- $values = $this->marshaller->marshall($values, $failed);
-
- foreach ($values as $id => $value) {
- if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) {
- $failed[] = $id;
- }
- }
-
- if ($failed && !is_writable($this->directory)) {
- throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
- }
-
- return $failed;
- }
-
- private function getFileKey(string $file): string
- {
- if (!$h = @fopen($file, 'rb')) {
- return '';
- }
-
- fgets($h); // expiry
- $encodedKey = fgets($h);
- fclose($h);
-
- return rawurldecode(rtrim($encodedKey));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/MemcachedTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/MemcachedTrait.php
deleted file mode 100644
index 070eb0e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/MemcachedTrait.php
+++ /dev/null
@@ -1,325 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\Exception\CacheException;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-
-/**
- * @author Rob Frawley 2nd <rmf@src.run>
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait MemcachedTrait
-{
- private static $defaultClientOptions = [
- 'persistent_id' => null,
- 'username' => null,
- 'password' => null,
- \Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP,
- ];
-
- private $marshaller;
- private $client;
- private $lazyClient;
-
- public static function isSupported()
- {
- return \extension_loaded('memcached') && version_compare(phpversion('memcached'), '2.2.0', '>=');
- }
-
- private function init(\Memcached $client, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller)
- {
- if (!static::isSupported()) {
- throw new CacheException('Memcached >= 2.2.0 is required');
- }
- if ('Memcached' === \get_class($client)) {
- $opt = $client->getOption(\Memcached::OPT_SERIALIZER);
- if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) {
- throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".');
- }
- $this->maxIdLength -= \strlen($client->getOption(\Memcached::OPT_PREFIX_KEY));
- $this->client = $client;
- } else {
- $this->lazyClient = $client;
- }
-
- parent::__construct($namespace, $defaultLifetime);
- $this->enableVersioning();
- $this->marshaller = $marshaller ?? new DefaultMarshaller();
- }
-
- /**
- * Creates a Memcached instance.
- *
- * By default, the binary protocol, no block, and libketama compatible options are enabled.
- *
- * Examples for servers:
- * - 'memcached://user:pass@localhost?weight=33'
- * - [['localhost', 11211, 33]]
- *
- * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs
- *
- * @return \Memcached
- *
- * @throws \ErrorException When invalid options or servers are provided
- */
- public static function createConnection($servers, array $options = [])
- {
- if (\is_string($servers)) {
- $servers = [$servers];
- } elseif (!\is_array($servers)) {
- throw new InvalidArgumentException(sprintf('MemcachedAdapter::createClient() expects array or string as first argument, %s given.', \gettype($servers)));
- }
- if (!static::isSupported()) {
- throw new CacheException('Memcached >= 2.2.0 is required');
- }
- set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); });
- try {
- $options += static::$defaultClientOptions;
- $client = new \Memcached($options['persistent_id']);
- $username = $options['username'];
- $password = $options['password'];
-
- // parse any DSN in $servers
- foreach ($servers as $i => $dsn) {
- if (\is_array($dsn)) {
- continue;
- }
- if (0 !== strpos($dsn, 'memcached:')) {
- throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s does not start with "memcached:"', $dsn));
- }
- $params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) {
- if (!empty($m[2])) {
- list($username, $password) = explode(':', $m[2], 2) + [1 => null];
- }
-
- return 'file:'.($m[1] ?? '');
- }, $dsn);
- if (false === $params = parse_url($params)) {
- throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s', $dsn));
- }
- $query = $hosts = [];
- if (isset($params['query'])) {
- parse_str($params['query'], $query);
-
- if (isset($query['host'])) {
- if (!\is_array($hosts = $query['host'])) {
- throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s', $dsn));
- }
- foreach ($hosts as $host => $weight) {
- if (false === $port = strrpos($host, ':')) {
- $hosts[$host] = [$host, 11211, (int) $weight];
- } else {
- $hosts[$host] = [substr($host, 0, $port), (int) substr($host, 1 + $port), (int) $weight];
- }
- }
- $hosts = array_values($hosts);
- unset($query['host']);
- }
- if ($hosts && !isset($params['host']) && !isset($params['path'])) {
- unset($servers[$i]);
- $servers = array_merge($servers, $hosts);
- continue;
- }
- }
- if (!isset($params['host']) && !isset($params['path'])) {
- throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: %s', $dsn));
- }
- if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) {
- $params['weight'] = $m[1];
- $params['path'] = substr($params['path'], 0, -\strlen($m[0]));
- }
- $params += [
- 'host' => isset($params['host']) ? $params['host'] : $params['path'],
- 'port' => isset($params['host']) ? 11211 : null,
- 'weight' => 0,
- ];
- if ($query) {
- $params += $query;
- $options = $query + $options;
- }
-
- $servers[$i] = [$params['host'], $params['port'], $params['weight']];
-
- if ($hosts) {
- $servers = array_merge($servers, $hosts);
- }
- }
-
- // set client's options
- unset($options['persistent_id'], $options['username'], $options['password'], $options['weight'], $options['lazy']);
- $options = array_change_key_case($options, CASE_UPPER);
- $client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
- $client->setOption(\Memcached::OPT_NO_BLOCK, true);
- $client->setOption(\Memcached::OPT_TCP_NODELAY, true);
- if (!\array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !\array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) {
- $client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
- }
- foreach ($options as $name => $value) {
- if (\is_int($name)) {
- continue;
- }
- if ('HASH' === $name || 'SERIALIZER' === $name || 'DISTRIBUTION' === $name) {
- $value = \constant('Memcached::'.$name.'_'.strtoupper($value));
- }
- $opt = \constant('Memcached::OPT_'.$name);
-
- unset($options[$name]);
- $options[$opt] = $value;
- }
- $client->setOptions($options);
-
- // set client's servers, taking care of persistent connections
- if (!$client->isPristine()) {
- $oldServers = [];
- foreach ($client->getServerList() as $server) {
- $oldServers[] = [$server['host'], $server['port']];
- }
-
- $newServers = [];
- foreach ($servers as $server) {
- if (1 < \count($server)) {
- $server = array_values($server);
- unset($server[2]);
- $server[1] = (int) $server[1];
- }
- $newServers[] = $server;
- }
-
- if ($oldServers !== $newServers) {
- $client->resetServerList();
- $client->addServers($servers);
- }
- } else {
- $client->addServers($servers);
- }
-
- if (null !== $username || null !== $password) {
- if (!method_exists($client, 'setSaslAuthData')) {
- trigger_error('Missing SASL support: the memcached extension must be compiled with --enable-memcached-sasl.');
- }
- $client->setSaslAuthData($username, $password);
- }
-
- return $client;
- } finally {
- restore_error_handler();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- if (!$values = $this->marshaller->marshall($values, $failed)) {
- return $failed;
- }
-
- if ($lifetime && $lifetime > 30 * 86400) {
- $lifetime += time();
- }
-
- $encodedValues = [];
- foreach ($values as $key => $value) {
- $encodedValues[rawurlencode($key)] = $value;
- }
-
- return $this->checkResultCode($this->getClient()->setMulti($encodedValues, $lifetime)) ? $failed : false;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- try {
- $encodedIds = array_map('rawurlencode', $ids);
-
- $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds));
-
- $result = [];
- foreach ($encodedResult as $key => $value) {
- $result[rawurldecode($key)] = $this->marshaller->unmarshall($value);
- }
-
- return $result;
- } catch (\Error $e) {
- throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- return false !== $this->getClient()->get(rawurlencode($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode());
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- $ok = true;
- $encodedIds = array_map('rawurlencode', $ids);
- foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) {
- if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) {
- $ok = false;
- break;
- }
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- return '' === $namespace && $this->getClient()->flush();
- }
-
- private function checkResultCode($result)
- {
- $code = $this->client->getResultCode();
-
- if (\Memcached::RES_SUCCESS === $code || \Memcached::RES_NOTFOUND === $code) {
- return $result;
- }
-
- throw new CacheException(sprintf('MemcachedAdapter client error: %s.', strtolower($this->client->getResultMessage())));
- }
-
- private function getClient(): \Memcached
- {
- if ($this->client) {
- return $this->client;
- }
-
- $opt = $this->lazyClient->getOption(\Memcached::OPT_SERIALIZER);
- if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) {
- throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".');
- }
- if ('' !== $prefix = (string) $this->lazyClient->getOption(\Memcached::OPT_PREFIX_KEY)) {
- throw new CacheException(sprintf('MemcachedAdapter: "prefix_key" option must be empty when using proxified connections, "%s" given.', $prefix));
- }
-
- return $this->client = $this->lazyClient;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/PdoTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/PdoTrait.php
deleted file mode 100644
index 3ee1f8c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/PdoTrait.php
+++ /dev/null
@@ -1,445 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Doctrine\DBAL\Connection;
-use Doctrine\DBAL\DBALException;
-use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
-use Doctrine\DBAL\DriverManager;
-use Doctrine\DBAL\Exception\TableNotFoundException;
-use Doctrine\DBAL\Schema\Schema;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-
-/**
- * @internal
- */
-trait PdoTrait
-{
- private $marshaller;
- private $conn;
- private $dsn;
- private $driver;
- private $serverVersion;
- private $table = 'cache_items';
- private $idCol = 'item_id';
- private $dataCol = 'item_data';
- private $lifetimeCol = 'item_lifetime';
- private $timeCol = 'item_time';
- private $username = '';
- private $password = '';
- private $connectionOptions = [];
- private $namespace;
-
- private function init($connOrDsn, string $namespace, int $defaultLifetime, array $options, ?MarshallerInterface $marshaller)
- {
- if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) {
- throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0]));
- }
-
- if ($connOrDsn instanceof \PDO) {
- if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) {
- throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__));
- }
-
- $this->conn = $connOrDsn;
- } elseif ($connOrDsn instanceof Connection) {
- $this->conn = $connOrDsn;
- } elseif (\is_string($connOrDsn)) {
- $this->dsn = $connOrDsn;
- } else {
- throw new InvalidArgumentException(sprintf('"%s" requires PDO or Doctrine\DBAL\Connection instance or DSN string as first argument, "%s" given.', __CLASS__, \is_object($connOrDsn) ? \get_class($connOrDsn) : \gettype($connOrDsn)));
- }
-
- $this->table = isset($options['db_table']) ? $options['db_table'] : $this->table;
- $this->idCol = isset($options['db_id_col']) ? $options['db_id_col'] : $this->idCol;
- $this->dataCol = isset($options['db_data_col']) ? $options['db_data_col'] : $this->dataCol;
- $this->lifetimeCol = isset($options['db_lifetime_col']) ? $options['db_lifetime_col'] : $this->lifetimeCol;
- $this->timeCol = isset($options['db_time_col']) ? $options['db_time_col'] : $this->timeCol;
- $this->username = isset($options['db_username']) ? $options['db_username'] : $this->username;
- $this->password = isset($options['db_password']) ? $options['db_password'] : $this->password;
- $this->connectionOptions = isset($options['db_connection_options']) ? $options['db_connection_options'] : $this->connectionOptions;
- $this->namespace = $namespace;
- $this->marshaller = $marshaller ?? new DefaultMarshaller();
-
- parent::__construct($namespace, $defaultLifetime);
- }
-
- /**
- * Creates the table to store cache items which can be called once for setup.
- *
- * Cache ID are saved in a column of maximum length 255. Cache data is
- * saved in a BLOB.
- *
- * @throws \PDOException When the table already exists
- * @throws DBALException When the table already exists
- * @throws \DomainException When an unsupported PDO driver is used
- */
- public function createTable()
- {
- // connect if we are not yet
- $conn = $this->getConnection();
-
- if ($conn instanceof Connection) {
- $types = [
- 'mysql' => 'binary',
- 'sqlite' => 'text',
- 'pgsql' => 'string',
- 'oci' => 'string',
- 'sqlsrv' => 'string',
- ];
- if (!isset($types[$this->driver])) {
- throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
- }
-
- $schema = new Schema();
- $table = $schema->createTable($this->table);
- $table->addColumn($this->idCol, $types[$this->driver], ['length' => 255]);
- $table->addColumn($this->dataCol, 'blob', ['length' => 16777215]);
- $table->addColumn($this->lifetimeCol, 'integer', ['unsigned' => true, 'notnull' => false]);
- $table->addColumn($this->timeCol, 'integer', ['unsigned' => true]);
- $table->setPrimaryKey([$this->idCol]);
-
- foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
- $conn->exec($sql);
- }
-
- return;
- }
-
- switch ($this->driver) {
- case 'mysql':
- // We use varbinary for the ID column because it prevents unwanted conversions:
- // - character set conversions between server and client
- // - trailing space removal
- // - case-insensitivity
- // - language processing like é == e
- $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(255) NOT NULL PRIMARY KEY, $this->dataCol MEDIUMBLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8_bin, ENGINE = InnoDB";
- break;
- case 'sqlite':
- $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)";
- break;
- case 'pgsql':
- $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)";
- break;
- case 'oci':
- $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(255) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)";
- break;
- case 'sqlsrv':
- $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)";
- break;
- default:
- throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
- }
-
- $conn->exec($sql);
- }
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= :time";
-
- if ('' !== $this->namespace) {
- $deleteSql .= " AND $this->idCol LIKE :namespace";
- }
-
- try {
- $delete = $this->getConnection()->prepare($deleteSql);
- } catch (TableNotFoundException $e) {
- return true;
- } catch (\PDOException $e) {
- return true;
- }
- $delete->bindValue(':time', time(), \PDO::PARAM_INT);
-
- if ('' !== $this->namespace) {
- $delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), \PDO::PARAM_STR);
- }
- try {
- return $delete->execute();
- } catch (TableNotFoundException $e) {
- return true;
- } catch (\PDOException $e) {
- return true;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- $now = time();
- $expired = [];
-
- $sql = str_pad('', (\count($ids) << 1) - 1, '?,');
- $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN ($sql)";
- $stmt = $this->getConnection()->prepare($sql);
- $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT);
- foreach ($ids as $id) {
- $stmt->bindValue(++$i, $id);
- }
- $stmt->execute();
-
- while ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
- if (null === $row[1]) {
- $expired[] = $row[0];
- } else {
- yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]);
- }
- }
-
- if ($expired) {
- $sql = str_pad('', (\count($expired) << 1) - 1, '?,');
- $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN ($sql)";
- $stmt = $this->getConnection()->prepare($sql);
- $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT);
- foreach ($expired as $id) {
- $stmt->bindValue(++$i, $id);
- }
- $stmt->execute();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)";
- $stmt = $this->getConnection()->prepare($sql);
-
- $stmt->bindValue(':id', $id);
- $stmt->bindValue(':time', time(), \PDO::PARAM_INT);
- $stmt->execute();
-
- return (bool) $stmt->fetchColumn();
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- $conn = $this->getConnection();
-
- if ('' === $namespace) {
- if ('sqlite' === $this->driver) {
- $sql = "DELETE FROM $this->table";
- } else {
- $sql = "TRUNCATE TABLE $this->table";
- }
- } else {
- $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'";
- }
-
- try {
- $conn->exec($sql);
- } catch (TableNotFoundException $e) {
- } catch (\PDOException $e) {
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- $sql = str_pad('', (\count($ids) << 1) - 1, '?,');
- $sql = "DELETE FROM $this->table WHERE $this->idCol IN ($sql)";
- try {
- $stmt = $this->getConnection()->prepare($sql);
- $stmt->execute(array_values($ids));
- } catch (TableNotFoundException $e) {
- } catch (\PDOException $e) {
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- if (!$values = $this->marshaller->marshall($values, $failed)) {
- return $failed;
- }
-
- $conn = $this->getConnection();
- $driver = $this->driver;
- $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)";
-
- switch (true) {
- case 'mysql' === $driver:
- $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)";
- break;
- case 'oci' === $driver:
- // DUAL is Oracle specific dummy table
- $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ".
- "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ".
- "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?";
- break;
- case 'sqlsrv' === $driver && version_compare($this->getServerVersion(), '10', '>='):
- // MERGE is only available since SQL Server 2008 and must be terminated by semicolon
- // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx
- $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ".
- "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ".
- "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;";
- break;
- case 'sqlite' === $driver:
- $sql = 'INSERT OR REPLACE'.substr($insertSql, 6);
- break;
- case 'pgsql' === $driver && version_compare($this->getServerVersion(), '9.5', '>='):
- $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)";
- break;
- default:
- $driver = null;
- $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id";
- break;
- }
-
- $now = time();
- $lifetime = $lifetime ?: null;
- try {
- $stmt = $conn->prepare($sql);
- } catch (TableNotFoundException $e) {
- if (!$conn->isTransactionActive() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
- $this->createTable();
- }
- $stmt = $conn->prepare($sql);
- } catch (\PDOException $e) {
- if (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
- $this->createTable();
- }
- $stmt = $conn->prepare($sql);
- }
-
- if ('sqlsrv' === $driver || 'oci' === $driver) {
- $stmt->bindParam(1, $id);
- $stmt->bindParam(2, $id);
- $stmt->bindParam(3, $data, \PDO::PARAM_LOB);
- $stmt->bindValue(4, $lifetime, \PDO::PARAM_INT);
- $stmt->bindValue(5, $now, \PDO::PARAM_INT);
- $stmt->bindParam(6, $data, \PDO::PARAM_LOB);
- $stmt->bindValue(7, $lifetime, \PDO::PARAM_INT);
- $stmt->bindValue(8, $now, \PDO::PARAM_INT);
- } else {
- $stmt->bindParam(':id', $id);
- $stmt->bindParam(':data', $data, \PDO::PARAM_LOB);
- $stmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT);
- $stmt->bindValue(':time', $now, \PDO::PARAM_INT);
- }
- if (null === $driver) {
- $insertStmt = $conn->prepare($insertSql);
-
- $insertStmt->bindParam(':id', $id);
- $insertStmt->bindParam(':data', $data, \PDO::PARAM_LOB);
- $insertStmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT);
- $insertStmt->bindValue(':time', $now, \PDO::PARAM_INT);
- }
-
- foreach ($values as $id => $data) {
- try {
- $stmt->execute();
- } catch (TableNotFoundException $e) {
- if (!$conn->isTransactionActive() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
- $this->createTable();
- }
- $stmt->execute();
- } catch (\PDOException $e) {
- if (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
- $this->createTable();
- }
- $stmt->execute();
- }
- if (null === $driver && !$stmt->rowCount()) {
- try {
- $insertStmt->execute();
- } catch (DBALException $e) {
- } catch (\PDOException $e) {
- // A concurrent write won, let it be
- }
- }
- }
-
- return $failed;
- }
-
- /**
- * @return \PDO|Connection
- */
- private function getConnection()
- {
- if (null === $this->conn) {
- if (strpos($this->dsn, '://')) {
- if (!class_exists(DriverManager::class)) {
- throw new InvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".', $this->dsn));
- }
- $this->conn = DriverManager::getConnection(['url' => $this->dsn]);
- } else {
- $this->conn = new \PDO($this->dsn, $this->username, $this->password, $this->connectionOptions);
- $this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
- }
- }
- if (null === $this->driver) {
- if ($this->conn instanceof \PDO) {
- $this->driver = $this->conn->getAttribute(\PDO::ATTR_DRIVER_NAME);
- } else {
- switch ($this->driver = $this->conn->getDriver()->getName()) {
- case 'mysqli':
- case 'pdo_mysql':
- case 'drizzle_pdo_mysql':
- $this->driver = 'mysql';
- break;
- case 'pdo_sqlite':
- $this->driver = 'sqlite';
- break;
- case 'pdo_pgsql':
- $this->driver = 'pgsql';
- break;
- case 'oci8':
- case 'pdo_oracle':
- $this->driver = 'oci';
- break;
- case 'pdo_sqlsrv':
- $this->driver = 'sqlsrv';
- break;
- }
- }
- }
-
- return $this->conn;
- }
-
- private function getServerVersion(): string
- {
- if (null === $this->serverVersion) {
- $conn = $this->conn instanceof \PDO ? $this->conn : $this->conn->getWrappedConnection();
- if ($conn instanceof \PDO) {
- $this->serverVersion = $conn->getAttribute(\PDO::ATTR_SERVER_VERSION);
- } elseif ($conn instanceof ServerInfoAwareConnection) {
- $this->serverVersion = $conn->getServerVersion();
- } else {
- $this->serverVersion = '0';
- }
- }
-
- return $this->serverVersion;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpArrayTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpArrayTrait.php
deleted file mode 100644
index 6e7c72c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpArrayTrait.php
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\Adapter\AdapterInterface;
-use Symfony\Component\Cache\CacheItem;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\VarExporter\VarExporter;
-
-/**
- * @author Titouan Galopin <galopintitouan@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait PhpArrayTrait
-{
- use ProxyTrait;
-
- private $file;
- private $keys;
- private $values;
-
- private static $valuesCache = [];
-
- /**
- * Store an array of cached values.
- *
- * @param array $values The cached values
- */
- public function warmUp(array $values)
- {
- if (file_exists($this->file)) {
- if (!is_file($this->file)) {
- throw new InvalidArgumentException(sprintf('Cache path exists and is not a file: %s.', $this->file));
- }
-
- if (!is_writable($this->file)) {
- throw new InvalidArgumentException(sprintf('Cache file is not writable: %s.', $this->file));
- }
- } else {
- $directory = \dirname($this->file);
-
- if (!is_dir($directory) && !@mkdir($directory, 0777, true)) {
- throw new InvalidArgumentException(sprintf('Cache directory does not exist and cannot be created: %s.', $directory));
- }
-
- if (!is_writable($directory)) {
- throw new InvalidArgumentException(sprintf('Cache directory is not writable: %s.', $directory));
- }
- }
-
- $dumpedValues = '';
- $dumpedMap = [];
- $dump = <<<'EOF'
-<?php
-
-// This file has been auto-generated by the Symfony Cache Component.
-
-return [[
-
-
-EOF;
-
- foreach ($values as $key => $value) {
- CacheItem::validateKey(\is_int($key) ? (string) $key : $key);
- $isStaticValue = true;
-
- if (null === $value) {
- $value = "'N;'";
- } elseif (\is_object($value) || \is_array($value)) {
- try {
- $value = VarExporter::export($value, $isStaticValue);
- } catch (\Exception $e) {
- throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \is_object($value) ? \get_class($value) : 'array'), 0, $e);
- }
- } elseif (\is_string($value)) {
- // Wrap "N;" in a closure to not confuse it with an encoded `null`
- if ('N;' === $value) {
- $isStaticValue = false;
- }
- $value = var_export($value, true);
- } elseif (!is_scalar($value)) {
- throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
- } else {
- $value = var_export($value, true);
- }
-
- if (!$isStaticValue) {
- $value = str_replace("\n", "\n ", $value);
- $value = "static function () {\n return {$value};\n}";
- }
- $hash = hash('md5', $value);
-
- if (null === $id = $dumpedMap[$hash] ?? null) {
- $id = $dumpedMap[$hash] = \count($dumpedMap);
- $dumpedValues .= "{$id} => {$value},\n";
- }
-
- $dump .= var_export($key, true)." => {$id},\n";
- }
-
- $dump .= "\n], [\n\n{$dumpedValues}\n]];\n";
-
- $tmpFile = uniqid($this->file, true);
-
- file_put_contents($tmpFile, $dump);
- @chmod($tmpFile, 0666 & ~umask());
- unset($serialized, $value, $dump);
-
- @rename($tmpFile, $this->file);
- unset(self::$valuesCache[$this->file]);
-
- $this->initialize();
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $prefix
- *
- * @return bool
- */
- public function clear(/*string $prefix = ''*/)
- {
- $prefix = 0 < \func_num_args() ? (string) func_get_arg(0) : '';
- $this->keys = $this->values = [];
-
- $cleared = @unlink($this->file) || !file_exists($this->file);
- unset(self::$valuesCache[$this->file]);
-
- if ($this->pool instanceof AdapterInterface) {
- return $this->pool->clear($prefix) && $cleared;
- }
-
- return $this->pool->clear() && $cleared;
- }
-
- /**
- * Load the cache file.
- */
- private function initialize()
- {
- if (isset(self::$valuesCache[$this->file])) {
- $values = self::$valuesCache[$this->file];
- } elseif (!file_exists($this->file)) {
- $this->keys = $this->values = [];
-
- return;
- } else {
- $values = self::$valuesCache[$this->file] = (include $this->file) ?: [[], []];
- }
-
- if (2 !== \count($values) || !isset($values[0], $values[1])) {
- $this->keys = $this->values = [];
- } else {
- list($this->keys, $this->values) = $values;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpFilesTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpFilesTrait.php
deleted file mode 100644
index 05b9d88..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/PhpFilesTrait.php
+++ /dev/null
@@ -1,313 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\Exception\CacheException;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\VarExporter\VarExporter;
-
-/**
- * @author Piotr Stankowski <git@trakos.pl>
- * @author Nicolas Grekas <p@tchwork.com>
- * @author Rob Frawley 2nd <rmf@src.run>
- *
- * @internal
- */
-trait PhpFilesTrait
-{
- use FilesystemCommonTrait {
- doClear as private doCommonClear;
- doDelete as private doCommonDelete;
- }
-
- private $includeHandler;
- private $appendOnly;
- private $values = [];
- private $files = [];
-
- private static $startTime;
- private static $valuesCache = [];
-
- public static function isSupported()
- {
- self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time();
-
- return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN));
- }
-
- /**
- * @return bool
- */
- public function prune()
- {
- $time = time();
- $pruned = true;
- $getExpiry = true;
-
- set_error_handler($this->includeHandler);
- try {
- foreach ($this->scanHashDir($this->directory) as $file) {
- try {
- if (\is_array($expiresAt = include $file)) {
- $expiresAt = $expiresAt[0];
- }
- } catch (\ErrorException $e) {
- $expiresAt = $time;
- }
-
- if ($time >= $expiresAt) {
- $pruned = $this->doUnlink($file) && !file_exists($file) && $pruned;
- }
- }
- } finally {
- restore_error_handler();
- }
-
- return $pruned;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- if ($this->appendOnly) {
- $now = 0;
- $missingIds = [];
- } else {
- $now = time();
- $missingIds = $ids;
- $ids = [];
- }
- $values = [];
-
- begin:
- $getExpiry = false;
-
- foreach ($ids as $id) {
- if (null === $value = $this->values[$id] ?? null) {
- $missingIds[] = $id;
- } elseif ('N;' === $value) {
- $values[$id] = null;
- } elseif (!\is_object($value)) {
- $values[$id] = $value;
- } elseif (!$value instanceof LazyValue) {
- $values[$id] = $value();
- } elseif (false === $values[$id] = include $value->file) {
- unset($values[$id], $this->values[$id]);
- $missingIds[] = $id;
- }
- if (!$this->appendOnly) {
- unset($this->values[$id]);
- }
- }
-
- if (!$missingIds) {
- return $values;
- }
-
- set_error_handler($this->includeHandler);
- try {
- $getExpiry = true;
-
- foreach ($missingIds as $k => $id) {
- try {
- $file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id);
-
- if (isset(self::$valuesCache[$file])) {
- [$expiresAt, $this->values[$id]] = self::$valuesCache[$file];
- } elseif (\is_array($expiresAt = include $file)) {
- if ($this->appendOnly) {
- self::$valuesCache[$file] = $expiresAt;
- }
-
- [$expiresAt, $this->values[$id]] = $expiresAt;
- } elseif ($now < $expiresAt) {
- $this->values[$id] = new LazyValue($file);
- }
-
- if ($now >= $expiresAt) {
- unset($this->values[$id], $missingIds[$k], self::$valuesCache[$file]);
- }
- } catch (\ErrorException $e) {
- unset($missingIds[$k]);
- }
- }
- } finally {
- restore_error_handler();
- }
-
- $ids = $missingIds;
- $missingIds = [];
- goto begin;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- if ($this->appendOnly && isset($this->values[$id])) {
- return true;
- }
-
- set_error_handler($this->includeHandler);
- try {
- $file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id);
- $getExpiry = true;
-
- if (isset(self::$valuesCache[$file])) {
- [$expiresAt, $value] = self::$valuesCache[$file];
- } elseif (\is_array($expiresAt = include $file)) {
- if ($this->appendOnly) {
- self::$valuesCache[$file] = $expiresAt;
- }
-
- [$expiresAt, $value] = $expiresAt;
- } elseif ($this->appendOnly) {
- $value = new LazyValue($file);
- }
- } catch (\ErrorException $e) {
- return false;
- } finally {
- restore_error_handler();
- }
- if ($this->appendOnly) {
- $now = 0;
- $this->values[$id] = $value;
- } else {
- $now = time();
- }
-
- return $now < $expiresAt;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- $ok = true;
- $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX';
- $allowCompile = self::isSupported();
-
- foreach ($values as $key => $value) {
- unset($this->values[$key]);
- $isStaticValue = true;
- if (null === $value) {
- $value = "'N;'";
- } elseif (\is_object($value) || \is_array($value)) {
- try {
- $value = VarExporter::export($value, $isStaticValue);
- } catch (\Exception $e) {
- throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \is_object($value) ? \get_class($value) : 'array'), 0, $e);
- }
- } elseif (\is_string($value)) {
- // Wrap "N;" in a closure to not confuse it with an encoded `null`
- if ('N;' === $value) {
- $isStaticValue = false;
- }
- $value = var_export($value, true);
- } elseif (!is_scalar($value)) {
- throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
- } else {
- $value = var_export($value, true);
- }
-
- $encodedKey = rawurlencode($key);
-
- if ($isStaticValue) {
- $value = "return [{$expiry}, {$value}];";
- } elseif ($this->appendOnly) {
- $value = "return [{$expiry}, static function () { return {$value}; }];";
- } else {
- // We cannot use a closure here because of https://bugs.php.net/76982
- $value = str_replace('\Symfony\Component\VarExporter\Internal\\', '', $value);
- $value = "namespace Symfony\Component\VarExporter\Internal;\n\nreturn \$getExpiry ? {$expiry} : {$value};";
- }
-
- $file = $this->files[$key] = $this->getFile($key, true);
- // Since OPcache only compiles files older than the script execution start, set the file's mtime in the past
- $ok = $this->write($file, "<?php //{$encodedKey}\n\n{$value}\n", self::$startTime - 10) && $ok;
-
- if ($allowCompile) {
- @opcache_invalidate($file, true);
- @opcache_compile_file($file);
- }
- unset(self::$valuesCache[$file]);
- }
-
- if (!$ok && !is_writable($this->directory)) {
- throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
- }
-
- return $ok;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- $this->values = [];
-
- return $this->doCommonClear($namespace);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- foreach ($ids as $id) {
- unset($this->values[$id]);
- }
-
- return $this->doCommonDelete($ids);
- }
-
- protected function doUnlink($file)
- {
- unset(self::$valuesCache[$file]);
-
- if (self::isSupported()) {
- @opcache_invalidate($file, true);
- }
-
- return @unlink($file);
- }
-
- private function getFileKey(string $file): string
- {
- if (!$h = @fopen($file, 'rb')) {
- return '';
- }
-
- $encodedKey = substr(fgets($h), 8);
- fclose($h);
-
- return rawurldecode(rtrim($encodedKey));
- }
-}
-
-/**
- * @internal
- */
-class LazyValue
-{
- public $file;
-
- public function __construct(string $file)
- {
- $this->file = $file;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ProxyTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/ProxyTrait.php
deleted file mode 100644
index c86f360..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/ProxyTrait.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Symfony\Component\Cache\PruneableInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait ProxyTrait
-{
- private $pool;
-
- /**
- * {@inheritdoc}
- */
- public function prune()
- {
- return $this->pool instanceof PruneableInterface && $this->pool->prune();
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- if ($this->pool instanceof ResetInterface) {
- $this->pool->reset();
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisClusterProxy.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisClusterProxy.php
deleted file mode 100644
index b4cef59..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisClusterProxy.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-/**
- * @author Alessandro Chitolina <alekitto@gmail.com>
- *
- * @internal
- */
-class RedisClusterProxy
-{
- private $redis;
- private $initializer;
-
- public function __construct(\Closure $initializer)
- {
- $this->initializer = $initializer;
- }
-
- public function __call($method, array $args)
- {
- $this->redis ?: $this->redis = $this->initializer->__invoke();
-
- return $this->redis->{$method}(...$args);
- }
-
- public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
- {
- $this->redis ?: $this->redis = $this->initializer->__invoke();
-
- return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount);
- }
-
- public function scan(&$iIterator, $strPattern = null, $iCount = null)
- {
- $this->redis ?: $this->redis = $this->initializer->__invoke();
-
- return $this->redis->scan($iIterator, $strPattern, $iCount);
- }
-
- public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
- {
- $this->redis ?: $this->redis = $this->initializer->__invoke();
-
- return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount);
- }
-
- public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
- {
- $this->redis ?: $this->redis = $this->initializer->__invoke();
-
- return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisProxy.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisProxy.php
deleted file mode 100644
index 2b0b857..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisProxy.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class RedisProxy
-{
- private $redis;
- private $initializer;
- private $ready = false;
-
- public function __construct(\Redis $redis, \Closure $initializer)
- {
- $this->redis = $redis;
- $this->initializer = $initializer;
- }
-
- public function __call($method, array $args)
- {
- $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis);
-
- return $this->redis->{$method}(...$args);
- }
-
- public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
- {
- $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis);
-
- return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount);
- }
-
- public function scan(&$iIterator, $strPattern = null, $iCount = null)
- {
- $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis);
-
- return $this->redis->scan($iIterator, $strPattern, $iCount);
- }
-
- public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
- {
- $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis);
-
- return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount);
- }
-
- public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
- {
- $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis);
-
- return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisTrait.php b/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisTrait.php
deleted file mode 100644
index 9b65ccb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/Traits/RedisTrait.php
+++ /dev/null
@@ -1,511 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Traits;
-
-use Predis\Connection\Aggregate\ClusterInterface;
-use Predis\Connection\Aggregate\RedisCluster;
-use Predis\Response\Status;
-use Symfony\Component\Cache\Exception\CacheException;
-use Symfony\Component\Cache\Exception\InvalidArgumentException;
-use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
-use Symfony\Component\Cache\Marshaller\MarshallerInterface;
-
-/**
- * @author Aurimas Niekis <aurimas@niekis.lt>
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-trait RedisTrait
-{
- private static $defaultConnectionOptions = [
- 'class' => null,
- 'persistent' => 0,
- 'persistent_id' => null,
- 'timeout' => 30,
- 'read_timeout' => 0,
- 'retry_interval' => 0,
- 'tcp_keepalive' => 0,
- 'lazy' => null,
- 'redis_cluster' => false,
- 'redis_sentinel' => null,
- 'dbindex' => 0,
- 'failover' => 'none',
- ];
- private $redis;
- private $marshaller;
-
- /**
- * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface $redisClient
- */
- private function init($redisClient, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller)
- {
- parent::__construct($namespace, $defaultLifetime);
-
- if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) {
- throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
- }
-
- if (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\ClientInterface && !$redisClient instanceof RedisProxy && !$redisClient instanceof RedisClusterProxy) {
- throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, %s given.', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
- }
-
- if ($redisClient instanceof \Predis\ClientInterface && $redisClient->getOptions()->exceptions) {
- $options = clone $redisClient->getOptions();
- \Closure::bind(function () { $this->options['exceptions'] = false; }, $options, $options)();
- $redisClient = new $redisClient($redisClient->getConnection(), $options);
- }
-
- $this->redis = $redisClient;
- $this->marshaller = $marshaller ?? new DefaultMarshaller();
- }
-
- /**
- * Creates a Redis connection using a DSN configuration.
- *
- * Example DSN:
- * - redis://localhost
- * - redis://example.com:1234
- * - redis://secret@example.com/13
- * - redis:///var/run/redis.sock
- * - redis://secret@/var/run/redis.sock/13
- *
- * @param string $dsn
- * @param array $options See self::$defaultConnectionOptions
- *
- * @throws InvalidArgumentException when the DSN is invalid
- *
- * @return \Redis|\RedisCluster|\Predis\ClientInterface According to the "class" option
- */
- public static function createConnection($dsn, array $options = [])
- {
- if (0 === strpos($dsn, 'redis:')) {
- $scheme = 'redis';
- } elseif (0 === strpos($dsn, 'rediss:')) {
- $scheme = 'rediss';
- } else {
- throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with "redis:" or "rediss".', $dsn));
- }
-
- if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) {
- throw new CacheException(sprintf('Cannot find the "redis" extension nor the "predis/predis" package: %s', $dsn));
- }
-
- $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) {
- if (isset($m[2])) {
- $auth = $m[2];
- }
-
- return 'file:'.($m[1] ?? '');
- }, $dsn);
-
- if (false === $params = parse_url($params)) {
- throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn));
- }
-
- $query = $hosts = [];
-
- if (isset($params['query'])) {
- parse_str($params['query'], $query);
-
- if (isset($query['host'])) {
- if (!\is_array($hosts = $query['host'])) {
- throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn));
- }
- foreach ($hosts as $host => $parameters) {
- if (\is_string($parameters)) {
- parse_str($parameters, $parameters);
- }
- if (false === $i = strrpos($host, ':')) {
- $hosts[$host] = ['scheme' => 'tcp', 'host' => $host, 'port' => 6379] + $parameters;
- } elseif ($port = (int) substr($host, 1 + $i)) {
- $hosts[$host] = ['scheme' => 'tcp', 'host' => substr($host, 0, $i), 'port' => $port] + $parameters;
- } else {
- $hosts[$host] = ['scheme' => 'unix', 'path' => substr($host, 0, $i)] + $parameters;
- }
- }
- $hosts = array_values($hosts);
- }
- }
-
- if (isset($params['host']) || isset($params['path'])) {
- if (!isset($params['dbindex']) && isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) {
- $params['dbindex'] = $m[1];
- $params['path'] = substr($params['path'], 0, -\strlen($m[0]));
- }
-
- if (isset($params['host'])) {
- array_unshift($hosts, ['scheme' => 'tcp', 'host' => $params['host'], 'port' => $params['port'] ?? 6379]);
- } else {
- array_unshift($hosts, ['scheme' => 'unix', 'path' => $params['path']]);
- }
- }
-
- if (!$hosts) {
- throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s', $dsn));
- }
-
- if (isset($params['redis_sentinel']) && !class_exists(\Predis\Client::class)) {
- throw new CacheException(sprintf('Redis Sentinel support requires the "predis/predis" package: %s', $dsn));
- }
-
- $params += $query + $options + self::$defaultConnectionOptions;
-
- if (null === $params['class'] && !isset($params['redis_sentinel']) && \extension_loaded('redis')) {
- $class = $params['redis_cluster'] ? \RedisCluster::class : (1 < \count($hosts) ? \RedisArray::class : \Redis::class);
- } else {
- $class = null === $params['class'] ? \Predis\Client::class : $params['class'];
- }
-
- if (is_a($class, \Redis::class, true)) {
- $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect';
- $redis = new $class();
-
- $initializer = function ($redis) use ($connect, $params, $dsn, $auth, $hosts) {
- try {
- @$redis->{$connect}($hosts[0]['host'] ?? $hosts[0]['path'], $hosts[0]['port'] ?? null, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval']);
- } catch (\RedisException $e) {
- throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e->getMessage(), $dsn));
- }
-
- set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
- $isConnected = $redis->isConnected();
- restore_error_handler();
- if (!$isConnected) {
- $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error, $error) ? sprintf(' (%s)', $error[1]) : '';
- throw new InvalidArgumentException(sprintf('Redis connection failed%s: %s', $error, $dsn));
- }
-
- if ((null !== $auth && !$redis->auth($auth))
- || ($params['dbindex'] && !$redis->select($params['dbindex']))
- || ($params['read_timeout'] && !$redis->setOption(\Redis::OPT_READ_TIMEOUT, $params['read_timeout']))
- ) {
- $e = preg_replace('/^ERR /', '', $redis->getLastError());
- throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e, $dsn));
- }
-
- if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) {
- $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']);
- }
-
- return true;
- };
-
- if ($params['lazy']) {
- $redis = new RedisProxy($redis, $initializer);
- } else {
- $initializer($redis);
- }
- } elseif (is_a($class, \RedisArray::class, true)) {
- foreach ($hosts as $i => $host) {
- $hosts[$i] = 'tcp' === $host['scheme'] ? $host['host'].':'.$host['port'] : $host['path'];
- }
- $params['lazy_connect'] = $params['lazy'] ?? true;
- $params['connect_timeout'] = $params['timeout'];
-
- try {
- $redis = new $class($hosts, $params);
- } catch (\RedisClusterException $e) {
- throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e->getMessage(), $dsn));
- }
-
- if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) {
- $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']);
- }
- } elseif (is_a($class, \RedisCluster::class, true)) {
- $initializer = function () use ($class, $params, $dsn, $hosts) {
- foreach ($hosts as $i => $host) {
- $hosts[$i] = 'tcp' === $host['scheme'] ? $host['host'].':'.$host['port'] : $host['path'];
- }
-
- try {
- $redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], (bool) $params['persistent']);
- } catch (\RedisClusterException $e) {
- throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e->getMessage(), $dsn));
- }
-
- if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) {
- $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']);
- }
- switch ($params['failover']) {
- case 'error': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_ERROR); break;
- case 'distribute': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE); break;
- case 'slaves': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES); break;
- }
-
- return $redis;
- };
-
- $redis = $params['lazy'] ? new RedisClusterProxy($initializer) : $initializer();
- } elseif (is_a($class, \Predis\ClientInterface::class, true)) {
- if ($params['redis_cluster']) {
- $params['cluster'] = 'redis';
- if (isset($params['redis_sentinel'])) {
- throw new InvalidArgumentException(sprintf('Cannot use both "redis_cluster" and "redis_sentinel" at the same time: %s', $dsn));
- }
- } elseif (isset($params['redis_sentinel'])) {
- $params['replication'] = 'sentinel';
- $params['service'] = $params['redis_sentinel'];
- }
- $params += ['parameters' => []];
- $params['parameters'] += [
- 'persistent' => $params['persistent'],
- 'timeout' => $params['timeout'],
- 'read_write_timeout' => $params['read_timeout'],
- 'tcp_nodelay' => true,
- ];
- if ($params['dbindex']) {
- $params['parameters']['database'] = $params['dbindex'];
- }
- if (null !== $auth) {
- $params['parameters']['password'] = $auth;
- }
- if (1 === \count($hosts) && !($params['redis_cluster'] || $params['redis_sentinel'])) {
- $hosts = $hosts[0];
- } elseif (\in_array($params['failover'], ['slaves', 'distribute'], true) && !isset($params['replication'])) {
- $params['replication'] = true;
- $hosts[0] += ['alias' => 'master'];
- }
- $params['exceptions'] = false;
-
- $redis = new $class($hosts, array_diff_key($params, self::$defaultConnectionOptions));
- if (isset($params['redis_sentinel'])) {
- $redis->getConnection()->setSentinelTimeout($params['timeout']);
- }
- } elseif (class_exists($class, false)) {
- throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster" nor "Predis\ClientInterface".', $class));
- } else {
- throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
- }
-
- return $redis;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doFetch(array $ids)
- {
- if (!$ids) {
- return [];
- }
-
- $result = [];
-
- if ($this->redis instanceof \Predis\ClientInterface && $this->redis->getConnection() instanceof ClusterInterface) {
- $values = $this->pipeline(function () use ($ids) {
- foreach ($ids as $id) {
- yield 'get' => [$id];
- }
- });
- } else {
- $values = $this->redis->mget($ids);
-
- if (!\is_array($values) || \count($values) !== \count($ids)) {
- return [];
- }
-
- $values = array_combine($ids, $values);
- }
-
- foreach ($values as $id => $v) {
- if ($v) {
- $result[$id] = $this->marshaller->unmarshall($v);
- }
- }
-
- return $result;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doHave($id)
- {
- return (bool) $this->redis->exists($id);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doClear($namespace)
- {
- $cleared = true;
- if ($this->redis instanceof \Predis\ClientInterface) {
- $evalArgs = [0, $namespace];
- } else {
- $evalArgs = [[$namespace], 0];
- }
-
- foreach ($this->getHosts() as $host) {
- if (!isset($namespace[0])) {
- $cleared = $host->flushDb() && $cleared;
- continue;
- }
-
- $info = $host->info('Server');
- $info = isset($info['Server']) ? $info['Server'] : $info;
-
- if (!version_compare($info['redis_version'], '2.8', '>=')) {
- // As documented in Redis documentation (http://redis.io/commands/keys) using KEYS
- // can hang your server when it is executed against large databases (millions of items).
- // Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above.
- $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]..'*') for i=1,#keys,5000 do redis.call('DEL',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $evalArgs[0], $evalArgs[1]) && $cleared;
- continue;
- }
-
- $cursor = null;
- do {
- $keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $namespace.'*', 'COUNT', 1000) : $host->scan($cursor, $namespace.'*', 1000);
- if (isset($keys[1]) && \is_array($keys[1])) {
- $cursor = $keys[0];
- $keys = $keys[1];
- }
- if ($keys) {
- $this->doDelete($keys);
- }
- } while ($cursor = (int) $cursor);
- }
-
- return $cleared;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doDelete(array $ids)
- {
- if (!$ids) {
- return true;
- }
-
- if ($this->redis instanceof \Predis\ClientInterface && $this->redis->getConnection() instanceof ClusterInterface) {
- $this->pipeline(function () use ($ids) {
- foreach ($ids as $id) {
- yield 'del' => [$id];
- }
- })->rewind();
- } else {
- $this->redis->del($ids);
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doSave(array $values, $lifetime)
- {
- if (!$values = $this->marshaller->marshall($values, $failed)) {
- return $failed;
- }
-
- $results = $this->pipeline(function () use ($values, $lifetime) {
- foreach ($values as $id => $value) {
- if (0 >= $lifetime) {
- yield 'set' => [$id, $value];
- } else {
- yield 'setEx' => [$id, $lifetime, $value];
- }
- }
- });
-
- foreach ($results as $id => $result) {
- if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) {
- $failed[] = $id;
- }
- }
-
- return $failed;
- }
-
- private function pipeline(\Closure $generator, $redis = null): \Generator
- {
- $ids = [];
- $redis = $redis ?? $this->redis;
-
- if ($redis instanceof RedisClusterProxy || $redis instanceof \RedisCluster || ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof RedisCluster)) {
- // phpredis & predis don't support pipelining with RedisCluster
- // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining
- // see https://github.com/nrk/predis/issues/267#issuecomment-123781423
- $results = [];
- foreach ($generator() as $command => $args) {
- $results[] = $redis->{$command}(...$args);
- $ids[] = 'eval' === $command ? ($redis instanceof \Predis\ClientInterface ? $args[2] : $args[1][0]) : $args[0];
- }
- } elseif ($redis instanceof \Predis\ClientInterface) {
- $results = $redis->pipeline(static function ($redis) use ($generator, &$ids) {
- foreach ($generator() as $command => $args) {
- $redis->{$command}(...$args);
- $ids[] = 'eval' === $command ? $args[2] : $args[0];
- }
- });
- } elseif ($redis instanceof \RedisArray) {
- $connections = $results = $ids = [];
- foreach ($generator() as $command => $args) {
- $id = 'eval' === $command ? $args[1][0] : $args[0];
- if (!isset($connections[$h = $redis->_target($id)])) {
- $connections[$h] = [$redis->_instance($h), -1];
- $connections[$h][0]->multi(\Redis::PIPELINE);
- }
- $connections[$h][0]->{$command}(...$args);
- $results[] = [$h, ++$connections[$h][1]];
- $ids[] = $id;
- }
- foreach ($connections as $h => $c) {
- $connections[$h] = $c[0]->exec();
- }
- foreach ($results as $k => list($h, $c)) {
- $results[$k] = $connections[$h][$c];
- }
- } else {
- $redis->multi(\Redis::PIPELINE);
- foreach ($generator() as $command => $args) {
- $redis->{$command}(...$args);
- $ids[] = 'eval' === $command ? $args[1][0] : $args[0];
- }
- $results = $redis->exec();
- }
-
- foreach ($ids as $k => $id) {
- yield $id => $results[$k];
- }
- }
-
- private function getHosts(): array
- {
- $hosts = [$this->redis];
- if ($this->redis instanceof \Predis\ClientInterface) {
- $connection = $this->redis->getConnection();
- if ($connection instanceof ClusterInterface && $connection instanceof \Traversable) {
- $hosts = [];
- foreach ($connection as $c) {
- $hosts[] = new \Predis\Client($c);
- }
- }
- } elseif ($this->redis instanceof \RedisArray) {
- $hosts = [];
- foreach ($this->redis->_hosts() as $host) {
- $hosts[] = $this->redis->_instance($host);
- }
- } elseif ($this->redis instanceof RedisClusterProxy || $this->redis instanceof \RedisCluster) {
- $hosts = [];
- foreach ($this->redis->_masters() as $host) {
- $hosts[] = $h = new \Redis();
- $h->connect($host[0], $host[1]);
- }
- }
-
- return $hosts;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/cache/composer.json b/srcs/phpmyadmin/vendor/symfony/cache/composer.json
deleted file mode 100644
index 0f0033c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/cache/composer.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "name": "symfony/cache",
- "type": "library",
- "description": "Symfony Cache component with PSR-6, PSR-16, and tags",
- "keywords": ["caching", "psr6"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "provide": {
- "psr/cache-implementation": "1.0",
- "psr/simple-cache-implementation": "1.0",
- "symfony/cache-implementation": "1.0"
- },
- "require": {
- "php": "^7.1.3",
- "psr/cache": "~1.0",
- "psr/log": "~1.0",
- "symfony/cache-contracts": "^1.1.7|^2",
- "symfony/service-contracts": "^1.1|^2",
- "symfony/var-exporter": "^4.2|^5.0"
- },
- "require-dev": {
- "cache/integration-tests": "dev-master",
- "doctrine/cache": "~1.6",
- "doctrine/dbal": "~2.5",
- "predis/predis": "~1.1",
- "psr/simple-cache": "^1.0",
- "symfony/config": "^4.2|^5.0",
- "symfony/dependency-injection": "^3.4|^4.1|^5.0",
- "symfony/var-dumper": "^4.4|^5.0"
- },
- "conflict": {
- "doctrine/dbal": "<2.5",
- "symfony/dependency-injection": "<3.4",
- "symfony/http-kernel": "<4.4",
- "symfony/var-dumper": "<4.4"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Cache\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/config/CHANGELOG.md
deleted file mode 100644
index a650e10..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/CHANGELOG.md
+++ /dev/null
@@ -1,108 +0,0 @@
-CHANGELOG
-=========
-
-4.4.0
------
-
- * added a way to exclude patterns of resources from being imported by the `import()` method
-
-4.3.0
------
-
- * deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()`
- * made `Resource\*` classes final and not implement `Serializable` anymore
- * deprecated the `root()` method in `TreeBuilder`, pass the root node information to the constructor instead
-
-4.2.0
------
-
- * deprecated constructing a `TreeBuilder` without passing root node information
- * renamed `FileLoaderLoadException` to `LoaderLoadException`
-
-4.1.0
------
-
- * added `setPathSeparator` method to `NodeBuilder` class
- * added third `$pathSeparator` constructor argument to `BaseNode`
- * the `Processor` class has been made final
-
-4.0.0
------
-
- * removed `ConfigCachePass`
-
-3.4.0
------
-
- * added `setDeprecated()` method to indicate a deprecated node
- * added `XmlUtils::parse()` method to parse an XML string
- * deprecated `ConfigCachePass`
-
-3.3.0
------
-
- * added `ReflectionClassResource` class
- * added second `$exists` constructor argument to `ClassExistenceResource`
- * made `ClassExistenceResource` work with interfaces and traits
- * added `ConfigCachePass` (originally in FrameworkBundle)
- * added `castToArray()` helper to turn any config value into an array
-
-3.0.0
------
-
- * removed `ReferenceDumper` class
- * removed the `ResourceInterface::isFresh()` method
- * removed `BCResourceInterfaceChecker` class
- * removed `ResourceInterface::getResource()` method
-
-2.8.0
------
-
-The edge case of defining just one value for nodes of type Enum is now allowed:
-
-```php
-$rootNode
- ->children()
- ->enumNode('variable')
- ->values(['value'])
- ->end()
- ->end()
-;
-```
-
-Before: `InvalidArgumentException` (variable must contain at least two
-distinct elements).
-After: the code will work as expected and it will restrict the values of the
-`variable` option to just `value`.
-
- * deprecated the `ResourceInterface::isFresh()` method. If you implement custom resource types and they
- can be validated that way, make them implement the new `SelfCheckingResourceInterface`.
- * deprecated the getResource() method in ResourceInterface. You can still call this method
- on concrete classes implementing the interface, but it does not make sense at the interface
- level as you need to know about the particular type of resource at hand to understand the
- semantics of the returned value.
-
-2.7.0
------
-
- * added `ConfigCacheInterface`, `ConfigCacheFactoryInterface` and a basic `ConfigCacheFactory`
- implementation to delegate creation of ConfigCache instances
-
-2.2.0
------
-
- * added `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()`
- to ease configuration when some sections are respectively disabled / enabled
- by default.
- * added a `normalizeKeys()` method for array nodes (to avoid key normalization)
- * added numerical type handling for config definitions
- * added convenience methods for optional configuration sections to `ArrayNodeDefinition`
- * added a utils class for XML manipulations
-
-2.1.0
------
-
- * added a way to add documentation on configuration
- * implemented `Serializable` on resources
- * `LoaderResolverInterface` is now used instead of `LoaderResolver` for type
- hinting
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ConfigCache.php b/srcs/phpmyadmin/vendor/symfony/config/ConfigCache.php
deleted file mode 100644
index 053059b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ConfigCache.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-use Symfony\Component\Config\Resource\SelfCheckingResourceChecker;
-
-/**
- * ConfigCache caches arbitrary content in files on disk.
- *
- * When in debug mode, those metadata resources that implement
- * \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will
- * be used to check cache freshness.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-class ConfigCache extends ResourceCheckerConfigCache
-{
- private $debug;
-
- /**
- * @param string $file The absolute cache path
- * @param bool $debug Whether debugging is enabled or not
- */
- public function __construct(string $file, bool $debug)
- {
- $this->debug = $debug;
-
- $checkers = [];
- if (true === $this->debug) {
- $checkers = [new SelfCheckingResourceChecker()];
- }
-
- parent::__construct($file, $checkers);
- }
-
- /**
- * Checks if the cache is still fresh.
- *
- * This implementation always returns true when debug is off and the
- * cache file exists.
- *
- * @return bool true if the cache is fresh, false otherwise
- */
- public function isFresh()
- {
- if (!$this->debug && is_file($this->getPath())) {
- return true;
- }
-
- return parent::isFresh();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactory.php b/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactory.php
deleted file mode 100644
index bfb70cb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactory.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-/**
- * Basic implementation of ConfigCacheFactoryInterface that
- * creates an instance of the default ConfigCache.
- *
- * This factory and/or cache <em>do not</em> support cache validation
- * by means of ResourceChecker instances (that is, service-based).
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-class ConfigCacheFactory implements ConfigCacheFactoryInterface
-{
- private $debug;
-
- /**
- * @param bool $debug The debug flag to pass to ConfigCache
- */
- public function __construct(bool $debug)
- {
- $this->debug = $debug;
- }
-
- /**
- * {@inheritdoc}
- */
- public function cache($file, $callback)
- {
- if (!\is_callable($callback)) {
- throw new \InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', \gettype($callback)));
- }
-
- $cache = new ConfigCache($file, $this->debug);
- if (!$cache->isFresh()) {
- $callback($cache);
- }
-
- return $cache;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactoryInterface.php b/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactoryInterface.php
deleted file mode 100644
index 8e80142..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheFactoryInterface.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-/**
- * Interface for a ConfigCache factory. This factory creates
- * an instance of ConfigCacheInterface and initializes the
- * cache if necessary.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-interface ConfigCacheFactoryInterface
-{
- /**
- * Creates a cache instance and (re-)initializes it if necessary.
- *
- * @param string $file The absolute cache file path
- * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
- *
- * @return ConfigCacheInterface The cache instance
- */
- public function cache($file, $callable);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheInterface.php b/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheInterface.php
deleted file mode 100644
index 7c47ad7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ConfigCacheInterface.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-use Symfony\Component\Config\Resource\ResourceInterface;
-
-/**
- * Interface for ConfigCache.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-interface ConfigCacheInterface
-{
- /**
- * Gets the cache file path.
- *
- * @return string The cache file path
- */
- public function getPath();
-
- /**
- * Checks if the cache is still fresh.
- *
- * This check should take the metadata passed to the write() method into consideration.
- *
- * @return bool Whether the cache is still fresh
- */
- public function isFresh();
-
- /**
- * Writes the given content into the cache file. Metadata will be stored
- * independently and can be used to check cache freshness at a later time.
- *
- * @param string $content The content to write into the cache
- * @param ResourceInterface[]|null $metadata An array of ResourceInterface instances
- *
- * @throws \RuntimeException When the cache file cannot be written
- */
- public function write($content, array $metadata = null);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/ArrayNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/ArrayNode.php
deleted file mode 100644
index 3b2ace7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/ArrayNode.php
+++ /dev/null
@@ -1,416 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
-
-/**
- * Represents an Array node in the config tree.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ArrayNode extends BaseNode implements PrototypeNodeInterface
-{
- protected $xmlRemappings = [];
- protected $children = [];
- protected $allowFalse = false;
- protected $allowNewKeys = true;
- protected $addIfNotSet = false;
- protected $performDeepMerging = true;
- protected $ignoreExtraKeys = false;
- protected $removeExtraKeys = true;
- protected $normalizeKeys = true;
-
- public function setNormalizeKeys($normalizeKeys)
- {
- $this->normalizeKeys = (bool) $normalizeKeys;
- }
-
- /**
- * {@inheritdoc}
- *
- * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML.
- * After running this method, all keys are normalized to foo_bar.
- *
- * If you have a mixed key like foo-bar_moo, it will not be altered.
- * The key will also not be altered if the target key already exists.
- */
- protected function preNormalize($value)
- {
- if (!$this->normalizeKeys || !\is_array($value)) {
- return $value;
- }
-
- $normalized = [];
-
- foreach ($value as $k => $v) {
- if (false !== strpos($k, '-') && false === strpos($k, '_') && !\array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) {
- $normalized[$normalizedKey] = $v;
- } else {
- $normalized[$k] = $v;
- }
- }
-
- return $normalized;
- }
-
- /**
- * Retrieves the children of this node.
- *
- * @return array The children
- */
- public function getChildren()
- {
- return $this->children;
- }
-
- /**
- * Sets the xml remappings that should be performed.
- *
- * @param array $remappings An array of the form [[string, string]]
- */
- public function setXmlRemappings(array $remappings)
- {
- $this->xmlRemappings = $remappings;
- }
-
- /**
- * Gets the xml remappings that should be performed.
- *
- * @return array an array of the form [[string, string]]
- */
- public function getXmlRemappings()
- {
- return $this->xmlRemappings;
- }
-
- /**
- * Sets whether to add default values for this array if it has not been
- * defined in any of the configuration files.
- *
- * @param bool $boolean
- */
- public function setAddIfNotSet($boolean)
- {
- $this->addIfNotSet = (bool) $boolean;
- }
-
- /**
- * Sets whether false is allowed as value indicating that the array should be unset.
- *
- * @param bool $allow
- */
- public function setAllowFalse($allow)
- {
- $this->allowFalse = (bool) $allow;
- }
-
- /**
- * Sets whether new keys can be defined in subsequent configurations.
- *
- * @param bool $allow
- */
- public function setAllowNewKeys($allow)
- {
- $this->allowNewKeys = (bool) $allow;
- }
-
- /**
- * Sets if deep merging should occur.
- *
- * @param bool $boolean
- */
- public function setPerformDeepMerging($boolean)
- {
- $this->performDeepMerging = (bool) $boolean;
- }
-
- /**
- * Whether extra keys should just be ignored without an exception.
- *
- * @param bool $boolean To allow extra keys
- * @param bool $remove To remove extra keys
- */
- public function setIgnoreExtraKeys($boolean, $remove = true)
- {
- $this->ignoreExtraKeys = (bool) $boolean;
- $this->removeExtraKeys = $this->ignoreExtraKeys && $remove;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setName($name)
- {
- $this->name = $name;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasDefaultValue()
- {
- return $this->addIfNotSet;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getDefaultValue()
- {
- if (!$this->hasDefaultValue()) {
- throw new \RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath()));
- }
-
- $defaults = [];
- foreach ($this->children as $name => $child) {
- if ($child->hasDefaultValue()) {
- $defaults[$name] = $child->getDefaultValue();
- }
- }
-
- return $defaults;
- }
-
- /**
- * Adds a child node.
- *
- * @throws \InvalidArgumentException when the child node has no name
- * @throws \InvalidArgumentException when the child node's name is not unique
- */
- public function addChild(NodeInterface $node)
- {
- $name = $node->getName();
- if (!\strlen($name)) {
- throw new \InvalidArgumentException('Child nodes must be named.');
- }
- if (isset($this->children[$name])) {
- throw new \InvalidArgumentException(sprintf('A child node named "%s" already exists.', $name));
- }
-
- $this->children[$name] = $node;
- }
-
- /**
- * Finalizes the value of this node.
- *
- * @param mixed $value
- *
- * @return mixed The finalised value
- *
- * @throws UnsetKeyException
- * @throws InvalidConfigurationException if the node doesn't have enough children
- */
- protected function finalizeValue($value)
- {
- if (false === $value) {
- throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value)));
- }
-
- foreach ($this->children as $name => $child) {
- if (!\array_key_exists($name, $value)) {
- if ($child->isRequired()) {
- $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()));
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- if ($child->hasDefaultValue()) {
- $value[$name] = $child->getDefaultValue();
- }
-
- continue;
- }
-
- if ($child->isDeprecated()) {
- @trigger_error($child->getDeprecationMessage($name, $this->getPath()), E_USER_DEPRECATED);
- }
-
- try {
- $value[$name] = $child->finalize($value[$name]);
- } catch (UnsetKeyException $e) {
- unset($value[$name]);
- }
- }
-
- return $value;
- }
-
- /**
- * Validates the type of the value.
- *
- * @param mixed $value
- *
- * @throws InvalidTypeException
- */
- protected function validateType($value)
- {
- if (!\is_array($value) && (!$this->allowFalse || false !== $value)) {
- $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected array, but got %s', $this->getPath(), \gettype($value)));
- if ($hint = $this->getInfo()) {
- $ex->addHint($hint);
- }
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
- }
-
- /**
- * Normalizes the value.
- *
- * @param mixed $value The value to normalize
- *
- * @return mixed The normalized value
- *
- * @throws InvalidConfigurationException
- */
- protected function normalizeValue($value)
- {
- if (false === $value) {
- return $value;
- }
-
- $value = $this->remapXml($value);
-
- $normalized = [];
- foreach ($value as $name => $val) {
- if (isset($this->children[$name])) {
- try {
- $normalized[$name] = $this->children[$name]->normalize($val);
- } catch (UnsetKeyException $e) {
- }
- unset($value[$name]);
- } elseif (!$this->removeExtraKeys) {
- $normalized[$name] = $val;
- }
- }
-
- // if extra fields are present, throw exception
- if (\count($value) && !$this->ignoreExtraKeys) {
- $proposals = array_keys($this->children);
- sort($proposals);
- $guesses = [];
-
- foreach (array_keys($value) as $subject) {
- $minScore = INF;
- foreach ($proposals as $proposal) {
- $distance = levenshtein($subject, $proposal);
- if ($distance <= $minScore && $distance < 3) {
- $guesses[$proposal] = $distance;
- $minScore = $distance;
- }
- }
- }
-
- $msg = sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath());
-
- if (\count($guesses)) {
- asort($guesses);
- $msg .= sprintf('. Did you mean "%s"?', implode('", "', array_keys($guesses)));
- } else {
- $msg .= sprintf('. Available option%s %s "%s".', 1 === \count($proposals) ? '' : 's', 1 === \count($proposals) ? 'is' : 'are', implode('", "', $proposals));
- }
-
- $ex = new InvalidConfigurationException($msg);
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- return $normalized;
- }
-
- /**
- * Remaps multiple singular values to a single plural value.
- *
- * @param array $value The source values
- *
- * @return array The remapped values
- */
- protected function remapXml($value)
- {
- foreach ($this->xmlRemappings as list($singular, $plural)) {
- if (!isset($value[$singular])) {
- continue;
- }
-
- $value[$plural] = Processor::normalizeConfig($value, $singular, $plural);
- unset($value[$singular]);
- }
-
- return $value;
- }
-
- /**
- * Merges values together.
- *
- * @param mixed $leftSide The left side to merge
- * @param mixed $rightSide The right side to merge
- *
- * @return mixed The merged values
- *
- * @throws InvalidConfigurationException
- * @throws \RuntimeException
- */
- protected function mergeValues($leftSide, $rightSide)
- {
- if (false === $rightSide) {
- // if this is still false after the last config has been merged the
- // finalization pass will take care of removing this key entirely
- return false;
- }
-
- if (false === $leftSide || !$this->performDeepMerging) {
- return $rightSide;
- }
-
- foreach ($rightSide as $k => $v) {
- // no conflict
- if (!\array_key_exists($k, $leftSide)) {
- if (!$this->allowNewKeys) {
- $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath()));
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- $leftSide[$k] = $v;
- continue;
- }
-
- if (!isset($this->children[$k])) {
- if (!$this->ignoreExtraKeys || $this->removeExtraKeys) {
- throw new \RuntimeException('merge() expects a normalized config array.');
- }
-
- $leftSide[$k] = $v;
- continue;
- }
-
- $leftSide[$k] = $this->children[$k]->merge($leftSide[$k], $v);
- }
-
- return $leftSide;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function allowPlaceholders(): bool
- {
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/BaseNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/BaseNode.php
deleted file mode 100644
index 076d175..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/BaseNode.php
+++ /dev/null
@@ -1,559 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\Exception;
-use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException;
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
-
-/**
- * The base node class.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-abstract class BaseNode implements NodeInterface
-{
- const DEFAULT_PATH_SEPARATOR = '.';
-
- private static $placeholderUniquePrefix;
- private static $placeholders = [];
-
- protected $name;
- protected $parent;
- protected $normalizationClosures = [];
- protected $finalValidationClosures = [];
- protected $allowOverwrite = true;
- protected $required = false;
- protected $deprecationMessage = null;
- protected $equivalentValues = [];
- protected $attributes = [];
- protected $pathSeparator;
-
- private $handlingPlaceholder;
-
- /**
- * @throws \InvalidArgumentException if the name contains a period
- */
- public function __construct(?string $name, NodeInterface $parent = null, string $pathSeparator = self::DEFAULT_PATH_SEPARATOR)
- {
- if (false !== strpos($name = (string) $name, $pathSeparator)) {
- throw new \InvalidArgumentException('The name must not contain "'.$pathSeparator.'".');
- }
-
- $this->name = $name;
- $this->parent = $parent;
- $this->pathSeparator = $pathSeparator;
- }
-
- /**
- * Register possible (dummy) values for a dynamic placeholder value.
- *
- * Matching configuration values will be processed with a provided value, one by one. After a provided value is
- * successfully processed the configuration value is returned as is, thus preserving the placeholder.
- *
- * @internal
- */
- public static function setPlaceholder(string $placeholder, array $values): void
- {
- if (!$values) {
- throw new \InvalidArgumentException('At least one value must be provided.');
- }
-
- self::$placeholders[$placeholder] = $values;
- }
-
- /**
- * Sets a common prefix for dynamic placeholder values.
- *
- * Matching configuration values will be skipped from being processed and are returned as is, thus preserving the
- * placeholder. An exact match provided by {@see setPlaceholder()} might take precedence.
- *
- * @internal
- */
- public static function setPlaceholderUniquePrefix(string $prefix): void
- {
- self::$placeholderUniquePrefix = $prefix;
- }
-
- /**
- * Resets all current placeholders available.
- *
- * @internal
- */
- public static function resetPlaceholders(): void
- {
- self::$placeholderUniquePrefix = null;
- self::$placeholders = [];
- }
-
- /**
- * @param string $key
- */
- public function setAttribute($key, $value)
- {
- $this->attributes[$key] = $value;
- }
-
- /**
- * @param string $key
- *
- * @return mixed
- */
- public function getAttribute($key, $default = null)
- {
- return isset($this->attributes[$key]) ? $this->attributes[$key] : $default;
- }
-
- /**
- * @param string $key
- *
- * @return bool
- */
- public function hasAttribute($key)
- {
- return isset($this->attributes[$key]);
- }
-
- /**
- * @return array
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
-
- public function setAttributes(array $attributes)
- {
- $this->attributes = $attributes;
- }
-
- /**
- * @param string $key
- */
- public function removeAttribute($key)
- {
- unset($this->attributes[$key]);
- }
-
- /**
- * Sets an info message.
- *
- * @param string $info
- */
- public function setInfo($info)
- {
- $this->setAttribute('info', $info);
- }
-
- /**
- * Returns info message.
- *
- * @return string|null The info text
- */
- public function getInfo()
- {
- return $this->getAttribute('info');
- }
-
- /**
- * Sets the example configuration for this node.
- *
- * @param string|array $example
- */
- public function setExample($example)
- {
- $this->setAttribute('example', $example);
- }
-
- /**
- * Retrieves the example configuration for this node.
- *
- * @return string|array|null The example
- */
- public function getExample()
- {
- return $this->getAttribute('example');
- }
-
- /**
- * Adds an equivalent value.
- *
- * @param mixed $originalValue
- * @param mixed $equivalentValue
- */
- public function addEquivalentValue($originalValue, $equivalentValue)
- {
- $this->equivalentValues[] = [$originalValue, $equivalentValue];
- }
-
- /**
- * Set this node as required.
- *
- * @param bool $boolean Required node
- */
- public function setRequired($boolean)
- {
- $this->required = (bool) $boolean;
- }
-
- /**
- * Sets this node as deprecated.
- *
- * You can use %node% and %path% placeholders in your message to display,
- * respectively, the node name and its complete path.
- *
- * @param string|null $message Deprecated message
- */
- public function setDeprecated($message)
- {
- $this->deprecationMessage = $message;
- }
-
- /**
- * Sets if this node can be overridden.
- *
- * @param bool $allow
- */
- public function setAllowOverwrite($allow)
- {
- $this->allowOverwrite = (bool) $allow;
- }
-
- /**
- * Sets the closures used for normalization.
- *
- * @param \Closure[] $closures An array of Closures used for normalization
- */
- public function setNormalizationClosures(array $closures)
- {
- $this->normalizationClosures = $closures;
- }
-
- /**
- * Sets the closures used for final validation.
- *
- * @param \Closure[] $closures An array of Closures used for final validation
- */
- public function setFinalValidationClosures(array $closures)
- {
- $this->finalValidationClosures = $closures;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isRequired()
- {
- return $this->required;
- }
-
- /**
- * Checks if this node is deprecated.
- *
- * @return bool
- */
- public function isDeprecated()
- {
- return null !== $this->deprecationMessage;
- }
-
- /**
- * Returns the deprecated message.
- *
- * @param string $node the configuration node name
- * @param string $path the path of the node
- *
- * @return string
- */
- public function getDeprecationMessage($node, $path)
- {
- return strtr($this->deprecationMessage, ['%node%' => $node, '%path%' => $path]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getPath()
- {
- if (null !== $this->parent) {
- return $this->parent->getPath().$this->pathSeparator.$this->name;
- }
-
- return $this->name;
- }
-
- /**
- * {@inheritdoc}
- */
- final public function merge($leftSide, $rightSide)
- {
- if (!$this->allowOverwrite) {
- throw new ForbiddenOverwriteException(sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath()));
- }
-
- if ($leftSide !== $leftPlaceholders = self::resolvePlaceholderValue($leftSide)) {
- foreach ($leftPlaceholders as $leftPlaceholder) {
- $this->handlingPlaceholder = $leftSide;
- try {
- $this->merge($leftPlaceholder, $rightSide);
- } finally {
- $this->handlingPlaceholder = null;
- }
- }
-
- return $rightSide;
- }
-
- if ($rightSide !== $rightPlaceholders = self::resolvePlaceholderValue($rightSide)) {
- foreach ($rightPlaceholders as $rightPlaceholder) {
- $this->handlingPlaceholder = $rightSide;
- try {
- $this->merge($leftSide, $rightPlaceholder);
- } finally {
- $this->handlingPlaceholder = null;
- }
- }
-
- return $rightSide;
- }
-
- $this->doValidateType($leftSide);
- $this->doValidateType($rightSide);
-
- return $this->mergeValues($leftSide, $rightSide);
- }
-
- /**
- * {@inheritdoc}
- */
- final public function normalize($value)
- {
- $value = $this->preNormalize($value);
-
- // run custom normalization closures
- foreach ($this->normalizationClosures as $closure) {
- $value = $closure($value);
- }
-
- // resolve placeholder value
- if ($value !== $placeholders = self::resolvePlaceholderValue($value)) {
- foreach ($placeholders as $placeholder) {
- $this->handlingPlaceholder = $value;
- try {
- $this->normalize($placeholder);
- } finally {
- $this->handlingPlaceholder = null;
- }
- }
-
- return $value;
- }
-
- // replace value with their equivalent
- foreach ($this->equivalentValues as $data) {
- if ($data[0] === $value) {
- $value = $data[1];
- }
- }
-
- // validate type
- $this->doValidateType($value);
-
- // normalize value
- return $this->normalizeValue($value);
- }
-
- /**
- * Normalizes the value before any other normalization is applied.
- *
- * @param mixed $value
- *
- * @return mixed The normalized array value
- */
- protected function preNormalize($value)
- {
- return $value;
- }
-
- /**
- * Returns parent node for this node.
- *
- * @return NodeInterface|null
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * {@inheritdoc}
- */
- final public function finalize($value)
- {
- if ($value !== $placeholders = self::resolvePlaceholderValue($value)) {
- foreach ($placeholders as $placeholder) {
- $this->handlingPlaceholder = $value;
- try {
- $this->finalize($placeholder);
- } finally {
- $this->handlingPlaceholder = null;
- }
- }
-
- return $value;
- }
-
- $this->doValidateType($value);
-
- $value = $this->finalizeValue($value);
-
- // Perform validation on the final value if a closure has been set.
- // The closure is also allowed to return another value.
- foreach ($this->finalValidationClosures as $closure) {
- try {
- $value = $closure($value);
- } catch (Exception $e) {
- if ($e instanceof UnsetKeyException && null !== $this->handlingPlaceholder) {
- continue;
- }
-
- throw $e;
- } catch (\Exception $e) {
- throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": %s', $this->getPath(), $e->getMessage()), $e->getCode(), $e);
- }
- }
-
- return $value;
- }
-
- /**
- * Validates the type of a Node.
- *
- * @param mixed $value The value to validate
- *
- * @throws InvalidTypeException when the value is invalid
- */
- abstract protected function validateType($value);
-
- /**
- * Normalizes the value.
- *
- * @param mixed $value The value to normalize
- *
- * @return mixed The normalized value
- */
- abstract protected function normalizeValue($value);
-
- /**
- * Merges two values together.
- *
- * @param mixed $leftSide
- * @param mixed $rightSide
- *
- * @return mixed The merged value
- */
- abstract protected function mergeValues($leftSide, $rightSide);
-
- /**
- * Finalizes a value.
- *
- * @param mixed $value The value to finalize
- *
- * @return mixed The finalized value
- */
- abstract protected function finalizeValue($value);
-
- /**
- * Tests if placeholder values are allowed for this node.
- */
- protected function allowPlaceholders(): bool
- {
- return true;
- }
-
- /**
- * Tests if a placeholder is being handled currently.
- */
- protected function isHandlingPlaceholder(): bool
- {
- return null !== $this->handlingPlaceholder;
- }
-
- /**
- * Gets allowed dynamic types for this node.
- */
- protected function getValidPlaceholderTypes(): array
- {
- return [];
- }
-
- private static function resolvePlaceholderValue($value)
- {
- if (\is_string($value)) {
- if (isset(self::$placeholders[$value])) {
- return self::$placeholders[$value];
- }
-
- if (self::$placeholderUniquePrefix && 0 === strpos($value, self::$placeholderUniquePrefix)) {
- return [];
- }
- }
-
- return $value;
- }
-
- private function doValidateType($value): void
- {
- if (null !== $this->handlingPlaceholder && !$this->allowPlaceholders()) {
- $e = new InvalidTypeException(sprintf('A dynamic value is not compatible with a "%s" node type at path "%s".', \get_class($this), $this->getPath()));
- $e->setPath($this->getPath());
-
- throw $e;
- }
-
- if (null === $this->handlingPlaceholder || null === $value) {
- $this->validateType($value);
-
- return;
- }
-
- $knownTypes = array_keys(self::$placeholders[$this->handlingPlaceholder]);
- $validTypes = $this->getValidPlaceholderTypes();
-
- if ($validTypes && array_diff($knownTypes, $validTypes)) {
- $e = new InvalidTypeException(sprintf(
- 'Invalid type for path "%s". Expected %s, but got %s.',
- $this->getPath(),
- 1 === \count($validTypes) ? '"'.reset($validTypes).'"' : 'one of "'.implode('", "', $validTypes).'"',
- 1 === \count($knownTypes) ? '"'.reset($knownTypes).'"' : 'one of "'.implode('", "', $knownTypes).'"'
- ));
- if ($hint = $this->getInfo()) {
- $e->addHint($hint);
- }
- $e->setPath($this->getPath());
-
- throw $e;
- }
-
- $this->validateType($value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/BooleanNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/BooleanNode.php
deleted file mode 100644
index c43c46f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/BooleanNode.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-
-/**
- * This node represents a Boolean value in the config tree.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class BooleanNode extends ScalarNode
-{
- /**
- * {@inheritdoc}
- */
- protected function validateType($value)
- {
- if (!\is_bool($value)) {
- $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected boolean, but got %s.', $this->getPath(), \gettype($value)));
- if ($hint = $this->getInfo()) {
- $ex->addHint($hint);
- }
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function isValueEmpty($value)
- {
- // a boolean value cannot be empty
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getValidPlaceholderTypes(): array
- {
- return ['bool'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
deleted file mode 100644
index e40d97b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
+++ /dev/null
@@ -1,548 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\ArrayNode;
-use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
-use Symfony\Component\Config\Definition\PrototypedArrayNode;
-
-/**
- * This class provides a fluent interface for defining an array node.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface
-{
- protected $performDeepMerging = true;
- protected $ignoreExtraKeys = false;
- protected $removeExtraKeys = true;
- protected $children = [];
- protected $prototype;
- protected $atLeastOne = false;
- protected $allowNewKeys = true;
- protected $key;
- protected $removeKeyItem;
- protected $addDefaults = false;
- protected $addDefaultChildren = false;
- protected $nodeBuilder;
- protected $normalizeKeys = true;
-
- /**
- * {@inheritdoc}
- */
- public function __construct(?string $name, NodeParentInterface $parent = null)
- {
- parent::__construct($name, $parent);
-
- $this->nullEquivalent = [];
- $this->trueEquivalent = [];
- }
-
- /**
- * {@inheritdoc}
- */
- public function setBuilder(NodeBuilder $builder)
- {
- $this->nodeBuilder = $builder;
- }
-
- /**
- * {@inheritdoc}
- */
- public function children()
- {
- return $this->getNodeBuilder();
- }
-
- /**
- * Sets a prototype for child nodes.
- *
- * @param string $type The type of node
- *
- * @return NodeDefinition
- */
- public function prototype($type)
- {
- return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this);
- }
-
- /**
- * @return VariableNodeDefinition
- */
- public function variablePrototype()
- {
- return $this->prototype('variable');
- }
-
- /**
- * @return ScalarNodeDefinition
- */
- public function scalarPrototype()
- {
- return $this->prototype('scalar');
- }
-
- /**
- * @return BooleanNodeDefinition
- */
- public function booleanPrototype()
- {
- return $this->prototype('boolean');
- }
-
- /**
- * @return IntegerNodeDefinition
- */
- public function integerPrototype()
- {
- return $this->prototype('integer');
- }
-
- /**
- * @return FloatNodeDefinition
- */
- public function floatPrototype()
- {
- return $this->prototype('float');
- }
-
- /**
- * @return ArrayNodeDefinition
- */
- public function arrayPrototype()
- {
- return $this->prototype('array');
- }
-
- /**
- * @return EnumNodeDefinition
- */
- public function enumPrototype()
- {
- return $this->prototype('enum');
- }
-
- /**
- * Adds the default value if the node is not set in the configuration.
- *
- * This method is applicable to concrete nodes only (not to prototype nodes).
- * If this function has been called and the node is not set during the finalization
- * phase, it's default value will be derived from its children default values.
- *
- * @return $this
- */
- public function addDefaultsIfNotSet()
- {
- $this->addDefaults = true;
-
- return $this;
- }
-
- /**
- * Adds children with a default value when none are defined.
- *
- * This method is applicable to prototype nodes only.
- *
- * @param int|string|array|null $children The number of children|The child name|The children names to be added
- *
- * @return $this
- */
- public function addDefaultChildrenIfNoneSet($children = null)
- {
- $this->addDefaultChildren = $children;
-
- return $this;
- }
-
- /**
- * Requires the node to have at least one element.
- *
- * This method is applicable to prototype nodes only.
- *
- * @return $this
- */
- public function requiresAtLeastOneElement()
- {
- $this->atLeastOne = true;
-
- return $this;
- }
-
- /**
- * Disallows adding news keys in a subsequent configuration.
- *
- * If used all keys have to be defined in the same configuration file.
- *
- * @return $this
- */
- public function disallowNewKeysInSubsequentConfigs()
- {
- $this->allowNewKeys = false;
-
- return $this;
- }
-
- /**
- * Sets a normalization rule for XML configurations.
- *
- * @param string $singular The key to remap
- * @param string $plural The plural of the key for irregular plurals
- *
- * @return $this
- */
- public function fixXmlConfig($singular, $plural = null)
- {
- $this->normalization()->remap($singular, $plural);
-
- return $this;
- }
-
- /**
- * Sets the attribute which value is to be used as key.
- *
- * This is useful when you have an indexed array that should be an
- * associative array. You can select an item from within the array
- * to be the key of the particular item. For example, if "id" is the
- * "key", then:
- *
- * [
- * ['id' => 'my_name', 'foo' => 'bar'],
- * ];
- *
- * becomes
- *
- * [
- * 'my_name' => ['foo' => 'bar'],
- * ];
- *
- * If you'd like "'id' => 'my_name'" to still be present in the resulting
- * array, then you can set the second argument of this method to false.
- *
- * This method is applicable to prototype nodes only.
- *
- * @param string $name The name of the key
- * @param bool $removeKeyItem Whether or not the key item should be removed
- *
- * @return $this
- */
- public function useAttributeAsKey($name, $removeKeyItem = true)
- {
- $this->key = $name;
- $this->removeKeyItem = $removeKeyItem;
-
- return $this;
- }
-
- /**
- * Sets whether the node can be unset.
- *
- * @param bool $allow
- *
- * @return $this
- */
- public function canBeUnset($allow = true)
- {
- $this->merge()->allowUnset($allow);
-
- return $this;
- }
-
- /**
- * Adds an "enabled" boolean to enable the current section.
- *
- * By default, the section is disabled. If any configuration is specified then
- * the node will be automatically enabled:
- *
- * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden
- * enableableArrayNode: ~ # The config is enabled & use the default values
- * enableableArrayNode: true # The config is enabled & use the default values
- * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden
- * enableableArrayNode: {enabled: false, ...} # The config is disabled
- * enableableArrayNode: false # The config is disabled
- *
- * @return $this
- */
- public function canBeEnabled()
- {
- $this
- ->addDefaultsIfNotSet()
- ->treatFalseLike(['enabled' => false])
- ->treatTrueLike(['enabled' => true])
- ->treatNullLike(['enabled' => true])
- ->beforeNormalization()
- ->ifArray()
- ->then(function ($v) {
- $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true;
-
- return $v;
- })
- ->end()
- ->children()
- ->booleanNode('enabled')
- ->defaultFalse()
- ;
-
- return $this;
- }
-
- /**
- * Adds an "enabled" boolean to enable the current section.
- *
- * By default, the section is enabled.
- *
- * @return $this
- */
- public function canBeDisabled()
- {
- $this
- ->addDefaultsIfNotSet()
- ->treatFalseLike(['enabled' => false])
- ->treatTrueLike(['enabled' => true])
- ->treatNullLike(['enabled' => true])
- ->children()
- ->booleanNode('enabled')
- ->defaultTrue()
- ;
-
- return $this;
- }
-
- /**
- * Disables the deep merging of the node.
- *
- * @return $this
- */
- public function performNoDeepMerging()
- {
- $this->performDeepMerging = false;
-
- return $this;
- }
-
- /**
- * Allows extra config keys to be specified under an array without
- * throwing an exception.
- *
- * Those config values are ignored and removed from the resulting
- * array. This should be used only in special cases where you want
- * to send an entire configuration array through a special tree that
- * processes only part of the array.
- *
- * @param bool $remove Whether to remove the extra keys
- *
- * @return $this
- */
- public function ignoreExtraKeys($remove = true)
- {
- $this->ignoreExtraKeys = true;
- $this->removeExtraKeys = $remove;
-
- return $this;
- }
-
- /**
- * Sets key normalization.
- *
- * @param bool $bool Whether to enable key normalization
- *
- * @return $this
- */
- public function normalizeKeys($bool)
- {
- $this->normalizeKeys = (bool) $bool;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function append(NodeDefinition $node)
- {
- $this->children[$node->name] = $node->setParent($this);
-
- return $this;
- }
-
- /**
- * Returns a node builder to be used to add children and prototype.
- *
- * @return NodeBuilder The node builder
- */
- protected function getNodeBuilder()
- {
- if (null === $this->nodeBuilder) {
- $this->nodeBuilder = new NodeBuilder();
- }
-
- return $this->nodeBuilder->setParent($this);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function createNode()
- {
- if (null === $this->prototype) {
- $node = new ArrayNode($this->name, $this->parent, $this->pathSeparator);
-
- $this->validateConcreteNode($node);
-
- $node->setAddIfNotSet($this->addDefaults);
-
- foreach ($this->children as $child) {
- $child->parent = $node;
- $node->addChild($child->getNode());
- }
- } else {
- $node = new PrototypedArrayNode($this->name, $this->parent, $this->pathSeparator);
-
- $this->validatePrototypeNode($node);
-
- if (null !== $this->key) {
- $node->setKeyAttribute($this->key, $this->removeKeyItem);
- }
-
- if (true === $this->atLeastOne || false === $this->allowEmptyValue) {
- $node->setMinNumberOfElements(1);
- }
-
- if ($this->default) {
- $node->setDefaultValue($this->defaultValue);
- }
-
- if (false !== $this->addDefaultChildren) {
- $node->setAddChildrenIfNoneSet($this->addDefaultChildren);
- if ($this->prototype instanceof static && null === $this->prototype->prototype) {
- $this->prototype->addDefaultsIfNotSet();
- }
- }
-
- $this->prototype->parent = $node;
- $node->setPrototype($this->prototype->getNode());
- }
-
- $node->setAllowNewKeys($this->allowNewKeys);
- $node->addEquivalentValue(null, $this->nullEquivalent);
- $node->addEquivalentValue(true, $this->trueEquivalent);
- $node->addEquivalentValue(false, $this->falseEquivalent);
- $node->setPerformDeepMerging($this->performDeepMerging);
- $node->setRequired($this->required);
- $node->setDeprecated($this->deprecationMessage);
- $node->setIgnoreExtraKeys($this->ignoreExtraKeys, $this->removeExtraKeys);
- $node->setNormalizeKeys($this->normalizeKeys);
-
- if (null !== $this->normalization) {
- $node->setNormalizationClosures($this->normalization->before);
- $node->setXmlRemappings($this->normalization->remappings);
- }
-
- if (null !== $this->merge) {
- $node->setAllowOverwrite($this->merge->allowOverwrite);
- $node->setAllowFalse($this->merge->allowFalse);
- }
-
- if (null !== $this->validation) {
- $node->setFinalValidationClosures($this->validation->rules);
- }
-
- return $node;
- }
-
- /**
- * Validate the configuration of a concrete node.
- *
- * @throws InvalidDefinitionException
- */
- protected function validateConcreteNode(ArrayNode $node)
- {
- $path = $node->getPath();
-
- if (null !== $this->key) {
- throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path));
- }
-
- if (false === $this->allowEmptyValue) {
- throw new InvalidDefinitionException(sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s"', $path));
- }
-
- if (true === $this->atLeastOne) {
- throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s"', $path));
- }
-
- if ($this->default) {
- throw new InvalidDefinitionException(sprintf('->defaultValue() is not applicable to concrete nodes at path "%s"', $path));
- }
-
- if (false !== $this->addDefaultChildren) {
- throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s"', $path));
- }
- }
-
- /**
- * Validate the configuration of a prototype node.
- *
- * @throws InvalidDefinitionException
- */
- protected function validatePrototypeNode(PrototypedArrayNode $node)
- {
- $path = $node->getPath();
-
- if ($this->addDefaults) {
- throw new InvalidDefinitionException(sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s"', $path));
- }
-
- if (false !== $this->addDefaultChildren) {
- if ($this->default) {
- throw new InvalidDefinitionException(sprintf('A default value and default children might not be used together at path "%s"', $path));
- }
-
- if (null !== $this->key && (null === $this->addDefaultChildren || \is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) {
- throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s"', $path));
- }
-
- if (null === $this->key && (\is_string($this->addDefaultChildren) || \is_array($this->addDefaultChildren))) {
- throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s"', $path));
- }
- }
- }
-
- /**
- * @return NodeDefinition[]
- */
- public function getChildNodeDefinitions()
- {
- return $this->children;
- }
-
- /**
- * Finds a node defined by the given $nodePath.
- *
- * @param string $nodePath The path of the node to find. e.g "doctrine.orm.mappings"
- */
- public function find(string $nodePath): NodeDefinition
- {
- $firstPathSegment = (false === $pathSeparatorPos = strpos($nodePath, $this->pathSeparator))
- ? $nodePath
- : substr($nodePath, 0, $pathSeparatorPos);
-
- if (null === $node = ($this->children[$firstPathSegment] ?? null)) {
- throw new \RuntimeException(sprintf('Node with name "%s" does not exist in the current node "%s".', $firstPathSegment, $this->name));
- }
-
- if (false === $pathSeparatorPos) {
- return $node;
- }
-
- return $node->find(substr($nodePath, $pathSeparatorPos + \strlen($this->pathSeparator)));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
deleted file mode 100644
index d193242..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\BooleanNode;
-use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
-
-/**
- * This class provides a fluent interface for defining a node.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class BooleanNodeDefinition extends ScalarNodeDefinition
-{
- /**
- * {@inheritdoc}
- */
- public function __construct(?string $name, NodeParentInterface $parent = null)
- {
- parent::__construct($name, $parent);
-
- $this->nullEquivalent = true;
- }
-
- /**
- * Instantiate a Node.
- *
- * @return BooleanNode The node
- */
- protected function instantiateNode()
- {
- return new BooleanNode($this->name, $this->parent, $this->pathSeparator);
- }
-
- /**
- * {@inheritdoc}
- *
- * @throws InvalidDefinitionException
- */
- public function cannotBeEmpty()
- {
- throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php
deleted file mode 100644
index f30b873..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * An interface that can be implemented by nodes which build other nodes.
- *
- * @author Roland Franssen <franssen.roland@gmail.com>
- */
-interface BuilderAwareInterface
-{
- /**
- * Sets a custom children builder.
- */
- public function setBuilder(NodeBuilder $builder);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
deleted file mode 100644
index 9a9c096..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\EnumNode;
-
-/**
- * Enum Node Definition.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class EnumNodeDefinition extends ScalarNodeDefinition
-{
- private $values;
-
- /**
- * @return $this
- */
- public function values(array $values)
- {
- $values = array_unique($values);
-
- if (empty($values)) {
- throw new \InvalidArgumentException('->values() must be called with at least one value.');
- }
-
- $this->values = $values;
-
- return $this;
- }
-
- /**
- * Instantiate a Node.
- *
- * @return EnumNode The node
- *
- * @throws \RuntimeException
- */
- protected function instantiateNode()
- {
- if (null === $this->values) {
- throw new \RuntimeException('You must call ->values() on enum nodes.');
- }
-
- return new EnumNode($this->name, $this->parent, $this->values, $this->pathSeparator);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ExprBuilder.php
deleted file mode 100644
index 05949d2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ExprBuilder.php
+++ /dev/null
@@ -1,248 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
-
-/**
- * This class builds an if expression.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- * @author Christophe Coevoet <stof@notk.org>
- */
-class ExprBuilder
-{
- protected $node;
- public $ifPart;
- public $thenPart;
-
- public function __construct(NodeDefinition $node)
- {
- $this->node = $node;
- }
-
- /**
- * Marks the expression as being always used.
- *
- * @return $this
- */
- public function always(\Closure $then = null)
- {
- $this->ifPart = function ($v) { return true; };
-
- if (null !== $then) {
- $this->thenPart = $then;
- }
-
- return $this;
- }
-
- /**
- * Sets a closure to use as tests.
- *
- * The default one tests if the value is true.
- *
- * @return $this
- */
- public function ifTrue(\Closure $closure = null)
- {
- if (null === $closure) {
- $closure = function ($v) { return true === $v; };
- }
-
- $this->ifPart = $closure;
-
- return $this;
- }
-
- /**
- * Tests if the value is a string.
- *
- * @return $this
- */
- public function ifString()
- {
- $this->ifPart = function ($v) { return \is_string($v); };
-
- return $this;
- }
-
- /**
- * Tests if the value is null.
- *
- * @return $this
- */
- public function ifNull()
- {
- $this->ifPart = function ($v) { return null === $v; };
-
- return $this;
- }
-
- /**
- * Tests if the value is empty.
- *
- * @return ExprBuilder
- */
- public function ifEmpty()
- {
- $this->ifPart = function ($v) { return empty($v); };
-
- return $this;
- }
-
- /**
- * Tests if the value is an array.
- *
- * @return $this
- */
- public function ifArray()
- {
- $this->ifPart = function ($v) { return \is_array($v); };
-
- return $this;
- }
-
- /**
- * Tests if the value is in an array.
- *
- * @return $this
- */
- public function ifInArray(array $array)
- {
- $this->ifPart = function ($v) use ($array) { return \in_array($v, $array, true); };
-
- return $this;
- }
-
- /**
- * Tests if the value is not in an array.
- *
- * @return $this
- */
- public function ifNotInArray(array $array)
- {
- $this->ifPart = function ($v) use ($array) { return !\in_array($v, $array, true); };
-
- return $this;
- }
-
- /**
- * Transforms variables of any type into an array.
- *
- * @return $this
- */
- public function castToArray()
- {
- $this->ifPart = function ($v) { return !\is_array($v); };
- $this->thenPart = function ($v) { return [$v]; };
-
- return $this;
- }
-
- /**
- * Sets the closure to run if the test pass.
- *
- * @return $this
- */
- public function then(\Closure $closure)
- {
- $this->thenPart = $closure;
-
- return $this;
- }
-
- /**
- * Sets a closure returning an empty array.
- *
- * @return $this
- */
- public function thenEmptyArray()
- {
- $this->thenPart = function ($v) { return []; };
-
- return $this;
- }
-
- /**
- * Sets a closure marking the value as invalid at processing time.
- *
- * if you want to add the value of the node in your message just use a %s placeholder.
- *
- * @param string $message
- *
- * @return $this
- *
- * @throws \InvalidArgumentException
- */
- public function thenInvalid($message)
- {
- $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); };
-
- return $this;
- }
-
- /**
- * Sets a closure unsetting this key of the array at processing time.
- *
- * @return $this
- *
- * @throws UnsetKeyException
- */
- public function thenUnset()
- {
- $this->thenPart = function ($v) { throw new UnsetKeyException('Unsetting key'); };
-
- return $this;
- }
-
- /**
- * Returns the related node.
- *
- * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
- *
- * @throws \RuntimeException
- */
- public function end()
- {
- if (null === $this->ifPart) {
- throw new \RuntimeException('You must specify an if part.');
- }
- if (null === $this->thenPart) {
- throw new \RuntimeException('You must specify a then part.');
- }
-
- return $this->node;
- }
-
- /**
- * Builds the expressions.
- *
- * @param ExprBuilder[] $expressions An array of ExprBuilder instances to build
- *
- * @return array
- */
- public static function buildExpressions(array $expressions)
- {
- foreach ($expressions as $k => $expr) {
- if ($expr instanceof self) {
- $if = $expr->ifPart;
- $then = $expr->thenPart;
- $expressions[$k] = function ($v) use ($if, $then) {
- return $if($v) ? $then($v) : $v;
- };
- }
- }
-
- return $expressions;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
deleted file mode 100644
index 7b74271..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\FloatNode;
-
-/**
- * This class provides a fluent interface for defining a float node.
- *
- * @author Jeanmonod David <david.jeanmonod@gmail.com>
- */
-class FloatNodeDefinition extends NumericNodeDefinition
-{
- /**
- * Instantiates a Node.
- *
- * @return FloatNode The node
- */
- protected function instantiateNode()
- {
- return new FloatNode($this->name, $this->parent, $this->min, $this->max, $this->pathSeparator);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
deleted file mode 100644
index 0472a98..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\IntegerNode;
-
-/**
- * This class provides a fluent interface for defining an integer node.
- *
- * @author Jeanmonod David <david.jeanmonod@gmail.com>
- */
-class IntegerNodeDefinition extends NumericNodeDefinition
-{
- /**
- * Instantiates a Node.
- *
- * @return IntegerNode The node
- */
- protected function instantiateNode()
- {
- return new IntegerNode($this->name, $this->parent, $this->min, $this->max, $this->pathSeparator);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/MergeBuilder.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/MergeBuilder.php
deleted file mode 100644
index 105e2d6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/MergeBuilder.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * This class builds merge conditions.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class MergeBuilder
-{
- protected $node;
- public $allowFalse = false;
- public $allowOverwrite = true;
-
- public function __construct(NodeDefinition $node)
- {
- $this->node = $node;
- }
-
- /**
- * Sets whether the node can be unset.
- *
- * @param bool $allow
- *
- * @return $this
- */
- public function allowUnset($allow = true)
- {
- $this->allowFalse = $allow;
-
- return $this;
- }
-
- /**
- * Sets whether the node can be overwritten.
- *
- * @param bool $deny Whether the overwriting is forbidden or not
- *
- * @return $this
- */
- public function denyOverwrite($deny = true)
- {
- $this->allowOverwrite = !$deny;
-
- return $this;
- }
-
- /**
- * Returns the related node.
- *
- * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
- */
- public function end()
- {
- return $this->node;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeBuilder.php
deleted file mode 100644
index be059f5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeBuilder.php
+++ /dev/null
@@ -1,238 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * This class provides a fluent interface for building a node.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class NodeBuilder implements NodeParentInterface
-{
- protected $parent;
- protected $nodeMapping;
-
- public function __construct()
- {
- $this->nodeMapping = [
- 'variable' => VariableNodeDefinition::class,
- 'scalar' => ScalarNodeDefinition::class,
- 'boolean' => BooleanNodeDefinition::class,
- 'integer' => IntegerNodeDefinition::class,
- 'float' => FloatNodeDefinition::class,
- 'array' => ArrayNodeDefinition::class,
- 'enum' => EnumNodeDefinition::class,
- ];
- }
-
- /**
- * Set the parent node.
- *
- * @return $this
- */
- public function setParent(ParentNodeDefinitionInterface $parent = null)
- {
- $this->parent = $parent;
-
- return $this;
- }
-
- /**
- * Creates a child array node.
- *
- * @param string $name The name of the node
- *
- * @return ArrayNodeDefinition The child node
- */
- public function arrayNode($name)
- {
- return $this->node($name, 'array');
- }
-
- /**
- * Creates a child scalar node.
- *
- * @param string $name The name of the node
- *
- * @return ScalarNodeDefinition The child node
- */
- public function scalarNode($name)
- {
- return $this->node($name, 'scalar');
- }
-
- /**
- * Creates a child Boolean node.
- *
- * @param string $name The name of the node
- *
- * @return BooleanNodeDefinition The child node
- */
- public function booleanNode($name)
- {
- return $this->node($name, 'boolean');
- }
-
- /**
- * Creates a child integer node.
- *
- * @param string $name The name of the node
- *
- * @return IntegerNodeDefinition The child node
- */
- public function integerNode($name)
- {
- return $this->node($name, 'integer');
- }
-
- /**
- * Creates a child float node.
- *
- * @param string $name The name of the node
- *
- * @return FloatNodeDefinition The child node
- */
- public function floatNode($name)
- {
- return $this->node($name, 'float');
- }
-
- /**
- * Creates a child EnumNode.
- *
- * @param string $name
- *
- * @return EnumNodeDefinition
- */
- public function enumNode($name)
- {
- return $this->node($name, 'enum');
- }
-
- /**
- * Creates a child variable node.
- *
- * @param string $name The name of the node
- *
- * @return VariableNodeDefinition The builder of the child node
- */
- public function variableNode($name)
- {
- return $this->node($name, 'variable');
- }
-
- /**
- * Returns the parent node.
- *
- * @return NodeDefinition&ParentNodeDefinitionInterface The parent node
- */
- public function end()
- {
- return $this->parent;
- }
-
- /**
- * Creates a child node.
- *
- * @param string|null $name The name of the node
- * @param string $type The type of the node
- *
- * @return NodeDefinition The child node
- *
- * @throws \RuntimeException When the node type is not registered
- * @throws \RuntimeException When the node class is not found
- */
- public function node($name, $type)
- {
- $class = $this->getNodeClass($type);
-
- $node = new $class($name);
-
- $this->append($node);
-
- return $node;
- }
-
- /**
- * Appends a node definition.
- *
- * Usage:
- *
- * $node = new ArrayNodeDefinition('name')
- * ->children()
- * ->scalarNode('foo')->end()
- * ->scalarNode('baz')->end()
- * ->append($this->getBarNodeDefinition())
- * ->end()
- * ;
- *
- * @return $this
- */
- public function append(NodeDefinition $node)
- {
- if ($node instanceof BuilderAwareInterface) {
- $builder = clone $this;
- $builder->setParent(null);
- $node->setBuilder($builder);
- }
-
- if (null !== $this->parent) {
- $this->parent->append($node);
- // Make this builder the node parent to allow for a fluid interface
- $node->setParent($this);
- }
-
- return $this;
- }
-
- /**
- * Adds or overrides a node Type.
- *
- * @param string $type The name of the type
- * @param string $class The fully qualified name the node definition class
- *
- * @return $this
- */
- public function setNodeClass($type, $class)
- {
- $this->nodeMapping[strtolower($type)] = $class;
-
- return $this;
- }
-
- /**
- * Returns the class name of the node definition.
- *
- * @param string $type The node type
- *
- * @return string The node definition class name
- *
- * @throws \RuntimeException When the node type is not registered
- * @throws \RuntimeException When the node class is not found
- */
- protected function getNodeClass($type)
- {
- $type = strtolower($type);
-
- if (!isset($this->nodeMapping[$type])) {
- throw new \RuntimeException(sprintf('The node type "%s" is not registered.', $type));
- }
-
- $class = $this->nodeMapping[$type];
-
- if (!class_exists($class)) {
- throw new \RuntimeException(sprintf('The node class "%s" does not exist.', $class));
- }
-
- return $class;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeDefinition.php
deleted file mode 100644
index dc2e5e3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeDefinition.php
+++ /dev/null
@@ -1,373 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\BaseNode;
-use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
-use Symfony\Component\Config\Definition\NodeInterface;
-
-/**
- * This class provides a fluent interface for defining a node.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-abstract class NodeDefinition implements NodeParentInterface
-{
- protected $name;
- protected $normalization;
- protected $validation;
- protected $defaultValue;
- protected $default = false;
- protected $required = false;
- protected $deprecationMessage = null;
- protected $merge;
- protected $allowEmptyValue = true;
- protected $nullEquivalent;
- protected $trueEquivalent = true;
- protected $falseEquivalent = false;
- protected $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR;
- protected $parent;
- protected $attributes = [];
-
- public function __construct(?string $name, NodeParentInterface $parent = null)
- {
- $this->parent = $parent;
- $this->name = $name;
- }
-
- /**
- * Sets the parent node.
- *
- * @return $this
- */
- public function setParent(NodeParentInterface $parent)
- {
- $this->parent = $parent;
-
- return $this;
- }
-
- /**
- * Sets info message.
- *
- * @param string $info The info text
- *
- * @return $this
- */
- public function info($info)
- {
- return $this->attribute('info', $info);
- }
-
- /**
- * Sets example configuration.
- *
- * @param string|array $example
- *
- * @return $this
- */
- public function example($example)
- {
- return $this->attribute('example', $example);
- }
-
- /**
- * Sets an attribute on the node.
- *
- * @param string $key
- * @param mixed $value
- *
- * @return $this
- */
- public function attribute($key, $value)
- {
- $this->attributes[$key] = $value;
-
- return $this;
- }
-
- /**
- * Returns the parent node.
- *
- * @return NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null The builder of the parent node
- */
- public function end()
- {
- return $this->parent;
- }
-
- /**
- * Creates the node.
- *
- * @param bool $forceRootNode Whether to force this node as the root node
- *
- * @return NodeInterface
- */
- public function getNode($forceRootNode = false)
- {
- if ($forceRootNode) {
- $this->parent = null;
- }
-
- if (null !== $this->normalization) {
- $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before);
- }
-
- if (null !== $this->validation) {
- $this->validation->rules = ExprBuilder::buildExpressions($this->validation->rules);
- }
-
- $node = $this->createNode();
- $node->setAttributes($this->attributes);
-
- return $node;
- }
-
- /**
- * Sets the default value.
- *
- * @param mixed $value The default value
- *
- * @return $this
- */
- public function defaultValue($value)
- {
- $this->default = true;
- $this->defaultValue = $value;
-
- return $this;
- }
-
- /**
- * Sets the node as required.
- *
- * @return $this
- */
- public function isRequired()
- {
- $this->required = true;
-
- return $this;
- }
-
- /**
- * Sets the node as deprecated.
- *
- * You can use %node% and %path% placeholders in your message to display,
- * respectively, the node name and its complete path.
- *
- * @param string $message Deprecation message
- *
- * @return $this
- */
- public function setDeprecated($message = 'The child node "%node%" at path "%path%" is deprecated.')
- {
- $this->deprecationMessage = $message;
-
- return $this;
- }
-
- /**
- * Sets the equivalent value used when the node contains null.
- *
- * @param mixed $value
- *
- * @return $this
- */
- public function treatNullLike($value)
- {
- $this->nullEquivalent = $value;
-
- return $this;
- }
-
- /**
- * Sets the equivalent value used when the node contains true.
- *
- * @param mixed $value
- *
- * @return $this
- */
- public function treatTrueLike($value)
- {
- $this->trueEquivalent = $value;
-
- return $this;
- }
-
- /**
- * Sets the equivalent value used when the node contains false.
- *
- * @param mixed $value
- *
- * @return $this
- */
- public function treatFalseLike($value)
- {
- $this->falseEquivalent = $value;
-
- return $this;
- }
-
- /**
- * Sets null as the default value.
- *
- * @return $this
- */
- public function defaultNull()
- {
- return $this->defaultValue(null);
- }
-
- /**
- * Sets true as the default value.
- *
- * @return $this
- */
- public function defaultTrue()
- {
- return $this->defaultValue(true);
- }
-
- /**
- * Sets false as the default value.
- *
- * @return $this
- */
- public function defaultFalse()
- {
- return $this->defaultValue(false);
- }
-
- /**
- * Sets an expression to run before the normalization.
- *
- * @return ExprBuilder
- */
- public function beforeNormalization()
- {
- return $this->normalization()->before();
- }
-
- /**
- * Denies the node value being empty.
- *
- * @return $this
- */
- public function cannotBeEmpty()
- {
- $this->allowEmptyValue = false;
-
- return $this;
- }
-
- /**
- * Sets an expression to run for the validation.
- *
- * The expression receives the value of the node and must return it. It can
- * modify it.
- * An exception should be thrown when the node is not valid.
- *
- * @return ExprBuilder
- */
- public function validate()
- {
- return $this->validation()->rule();
- }
-
- /**
- * Sets whether the node can be overwritten.
- *
- * @param bool $deny Whether the overwriting is forbidden or not
- *
- * @return $this
- */
- public function cannotBeOverwritten($deny = true)
- {
- $this->merge()->denyOverwrite($deny);
-
- return $this;
- }
-
- /**
- * Gets the builder for validation rules.
- *
- * @return ValidationBuilder
- */
- protected function validation()
- {
- if (null === $this->validation) {
- $this->validation = new ValidationBuilder($this);
- }
-
- return $this->validation;
- }
-
- /**
- * Gets the builder for merging rules.
- *
- * @return MergeBuilder
- */
- protected function merge()
- {
- if (null === $this->merge) {
- $this->merge = new MergeBuilder($this);
- }
-
- return $this->merge;
- }
-
- /**
- * Gets the builder for normalization rules.
- *
- * @return NormalizationBuilder
- */
- protected function normalization()
- {
- if (null === $this->normalization) {
- $this->normalization = new NormalizationBuilder($this);
- }
-
- return $this->normalization;
- }
-
- /**
- * Instantiate and configure the node according to this definition.
- *
- * @return NodeInterface The node instance
- *
- * @throws InvalidDefinitionException When the definition is invalid
- */
- abstract protected function createNode();
-
- /**
- * Set PathSeparator to use.
- *
- * @return $this
- */
- public function setPathSeparator(string $separator)
- {
- if ($this instanceof ParentNodeDefinitionInterface) {
- if (method_exists($this, 'getChildNodeDefinitions')) {
- foreach ($this->getChildNodeDefinitions() as $child) {
- $child->setPathSeparator($separator);
- }
- } else {
- @trigger_error(sprintf('Not implementing the "%s::getChildNodeDefinitions()" method in "%s" is deprecated since Symfony 4.1.', ParentNodeDefinitionInterface::class, \get_class($this)), E_USER_DEPRECATED);
- }
- }
-
- $this->pathSeparator = $separator;
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeParentInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeParentInterface.php
deleted file mode 100644
index 305e993..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NodeParentInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * An interface that must be implemented by all node parents.
- *
- * @author Victor Berchet <victor@suumit.com>
- */
-interface NodeParentInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
deleted file mode 100644
index d3cdca9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * This class builds normalization conditions.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class NormalizationBuilder
-{
- protected $node;
- public $before = [];
- public $remappings = [];
-
- public function __construct(NodeDefinition $node)
- {
- $this->node = $node;
- }
-
- /**
- * Registers a key to remap to its plural form.
- *
- * @param string $key The key to remap
- * @param string $plural The plural of the key in case of irregular plural
- *
- * @return $this
- */
- public function remap($key, $plural = null)
- {
- $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural];
-
- return $this;
- }
-
- /**
- * Registers a closure to run before the normalization or an expression builder to build it if null is provided.
- *
- * @return ExprBuilder|$this
- */
- public function before(\Closure $closure = null)
- {
- if (null !== $closure) {
- $this->before[] = $closure;
-
- return $this;
- }
-
- return $this->before[] = new ExprBuilder($this->node);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
deleted file mode 100644
index 0d0207c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
-
-/**
- * Abstract class that contains common code of integer and float node definitions.
- *
- * @author David Jeanmonod <david.jeanmonod@gmail.com>
- */
-abstract class NumericNodeDefinition extends ScalarNodeDefinition
-{
- protected $min;
- protected $max;
-
- /**
- * Ensures that the value is smaller than the given reference.
- *
- * @param mixed $max
- *
- * @return $this
- *
- * @throws \InvalidArgumentException when the constraint is inconsistent
- */
- public function max($max)
- {
- if (isset($this->min) && $this->min > $max) {
- throw new \InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s)', $max, $this->min));
- }
- $this->max = $max;
-
- return $this;
- }
-
- /**
- * Ensures that the value is bigger than the given reference.
- *
- * @param mixed $min
- *
- * @return $this
- *
- * @throws \InvalidArgumentException when the constraint is inconsistent
- */
- public function min($min)
- {
- if (isset($this->max) && $this->max < $min) {
- throw new \InvalidArgumentException(sprintf('You cannot define a min(%s) as you already have a max(%s)', $min, $this->max));
- }
- $this->min = $min;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- *
- * @throws InvalidDefinitionException
- */
- public function cannotBeEmpty()
- {
- throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
deleted file mode 100644
index c6328c2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * An interface that must be implemented by nodes which can have children.
- *
- * @author Victor Berchet <victor@suumit.com>
- *
- * @method NodeDefinition[] getChildNodeDefinitions() Gets the child node definitions - not implementing it is deprecated since Symfony 4.2
- */
-interface ParentNodeDefinitionInterface extends BuilderAwareInterface
-{
- /**
- * Returns a builder to add children nodes.
- *
- * @return NodeBuilder
- */
- public function children();
-
- /**
- * Appends a node definition.
- *
- * Usage:
- *
- * $node = $parentNode
- * ->children()
- * ->scalarNode('foo')->end()
- * ->scalarNode('baz')->end()
- * ->append($this->getBarNodeDefinition())
- * ->end()
- * ;
- *
- * @return $this
- */
- public function append(NodeDefinition $node);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
deleted file mode 100644
index 428f612..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\ScalarNode;
-
-/**
- * This class provides a fluent interface for defining a node.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ScalarNodeDefinition extends VariableNodeDefinition
-{
- /**
- * Instantiate a Node.
- *
- * @return ScalarNode The node
- */
- protected function instantiateNode()
- {
- return new ScalarNode($this->name, $this->parent, $this->pathSeparator);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/TreeBuilder.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/TreeBuilder.php
deleted file mode 100644
index 83f2c59..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/TreeBuilder.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\Exception\TreeWithoutRootNodeException;
-use Symfony\Component\Config\Definition\NodeInterface;
-
-/**
- * This is the entry class for building a config tree.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class TreeBuilder implements NodeParentInterface
-{
- protected $tree;
- protected $root;
-
- public function __construct(string $name = null, string $type = 'array', NodeBuilder $builder = null)
- {
- if (null === $name) {
- @trigger_error('A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.', E_USER_DEPRECATED);
- } else {
- $builder = $builder ?: new NodeBuilder();
- $this->root = $builder->node($name, $type)->setParent($this);
- }
- }
-
- /**
- * Creates the root node.
- *
- * @param string $name The name of the root node
- * @param string $type The type of the root node
- *
- * @return ArrayNodeDefinition|NodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')
- *
- * @throws \RuntimeException When the node type is not supported
- *
- * @deprecated since Symfony 4.3, pass the root name to the constructor instead
- */
- public function root($name, $type = 'array', NodeBuilder $builder = null)
- {
- @trigger_error(sprintf('The "%s()" method called for the "%s" configuration is deprecated since Symfony 4.3, pass the root name to the constructor instead.', __METHOD__, $name), E_USER_DEPRECATED);
-
- $builder = $builder ?: new NodeBuilder();
-
- return $this->root = $builder->node($name, $type)->setParent($this);
- }
-
- /**
- * @return NodeDefinition|ArrayNodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')
- */
- public function getRootNode(): NodeDefinition
- {
- if (null === $this->root) {
- throw new \RuntimeException(sprintf('Calling %s() before creating the root node is not supported, migrate to the new constructor signature instead.', __METHOD__));
- }
-
- return $this->root;
- }
-
- /**
- * Builds the tree.
- *
- * @return NodeInterface
- *
- * @throws \RuntimeException
- */
- public function buildTree()
- {
- $this->assertTreeHasRootNode();
- if (null !== $this->tree) {
- return $this->tree;
- }
-
- return $this->tree = $this->root->getNode(true);
- }
-
- public function setPathSeparator(string $separator)
- {
- $this->assertTreeHasRootNode();
-
- // unset last built as changing path separator changes all nodes
- $this->tree = null;
-
- $this->root->setPathSeparator($separator);
- }
-
- /**
- * @throws \RuntimeException if root node is not defined
- */
- private function assertTreeHasRootNode()
- {
- if (null === $this->root) {
- throw new TreeWithoutRootNodeException('The configuration tree has no root node.');
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ValidationBuilder.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
deleted file mode 100644
index 4efc726..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-/**
- * This class builds validation conditions.
- *
- * @author Christophe Coevoet <stof@notk.org>
- */
-class ValidationBuilder
-{
- protected $node;
- public $rules = [];
-
- public function __construct(NodeDefinition $node)
- {
- $this->node = $node;
- }
-
- /**
- * Registers a closure to run as normalization or an expression builder to build it if null is provided.
- *
- * @return ExprBuilder|$this
- */
- public function rule(\Closure $closure = null)
- {
- if (null !== $closure) {
- $this->rules[] = $closure;
-
- return $this;
- }
-
- return $this->rules[] = new ExprBuilder($this->node);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
deleted file mode 100644
index 39a564f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Builder;
-
-use Symfony\Component\Config\Definition\VariableNode;
-
-/**
- * This class provides a fluent interface for defining a node.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class VariableNodeDefinition extends NodeDefinition
-{
- /**
- * Instantiate a Node.
- *
- * @return VariableNode The node
- */
- protected function instantiateNode()
- {
- return new VariableNode($this->name, $this->parent, $this->pathSeparator);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function createNode()
- {
- $node = $this->instantiateNode();
-
- if (null !== $this->normalization) {
- $node->setNormalizationClosures($this->normalization->before);
- }
-
- if (null !== $this->merge) {
- $node->setAllowOverwrite($this->merge->allowOverwrite);
- }
-
- if (true === $this->default) {
- $node->setDefaultValue($this->defaultValue);
- }
-
- $node->setAllowEmptyValue($this->allowEmptyValue);
- $node->addEquivalentValue(null, $this->nullEquivalent);
- $node->addEquivalentValue(true, $this->trueEquivalent);
- $node->addEquivalentValue(false, $this->falseEquivalent);
- $node->setRequired($this->required);
- $node->setDeprecated($this->deprecationMessage);
-
- if (null !== $this->validation) {
- $node->setFinalValidationClosures($this->validation->rules);
- }
-
- return $node;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/ConfigurationInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/ConfigurationInterface.php
deleted file mode 100644
index d6456ed..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/ConfigurationInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-/**
- * Configuration interface.
- *
- * @author Victor Berchet <victor@suumit.com>
- */
-interface ConfigurationInterface
-{
- /**
- * Generates the configuration tree builder.
- *
- * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
- */
- public function getConfigTreeBuilder();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
deleted file mode 100644
index ff8c353..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
+++ /dev/null
@@ -1,302 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Dumper;
-
-use Symfony\Component\Config\Definition\ArrayNode;
-use Symfony\Component\Config\Definition\ConfigurationInterface;
-use Symfony\Component\Config\Definition\EnumNode;
-use Symfony\Component\Config\Definition\NodeInterface;
-use Symfony\Component\Config\Definition\PrototypedArrayNode;
-
-/**
- * Dumps a XML reference configuration for the given configuration/node instance.
- *
- * @author Wouter J <waldio.webdesign@gmail.com>
- */
-class XmlReferenceDumper
-{
- private $reference;
-
- public function dump(ConfigurationInterface $configuration, $namespace = null)
- {
- return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace);
- }
-
- public function dumpNode(NodeInterface $node, $namespace = null)
- {
- $this->reference = '';
- $this->writeNode($node, 0, true, $namespace);
- $ref = $this->reference;
- $this->reference = null;
-
- return $ref;
- }
-
- private function writeNode(NodeInterface $node, int $depth = 0, bool $root = false, string $namespace = null)
- {
- $rootName = ($root ? 'config' : $node->getName());
- $rootNamespace = ($namespace ?: ($root ? 'http://example.org/schema/dic/'.$node->getName() : null));
-
- // xml remapping
- if ($node->getParent()) {
- $remapping = array_filter($node->getParent()->getXmlRemappings(), function ($mapping) use ($rootName) {
- return $rootName === $mapping[1];
- });
-
- if (\count($remapping)) {
- list($singular) = current($remapping);
- $rootName = $singular;
- }
- }
- $rootName = str_replace('_', '-', $rootName);
-
- $rootAttributes = [];
- $rootAttributeComments = [];
- $rootChildren = [];
- $rootComments = [];
-
- if ($node instanceof ArrayNode) {
- $children = $node->getChildren();
-
- // comments about the root node
- if ($rootInfo = $node->getInfo()) {
- $rootComments[] = $rootInfo;
- }
-
- if ($rootNamespace) {
- $rootComments[] = 'Namespace: '.$rootNamespace;
- }
-
- // render prototyped nodes
- if ($node instanceof PrototypedArrayNode) {
- $prototype = $node->getPrototype();
-
- $info = 'prototype';
- if (null !== $prototype->getInfo()) {
- $info .= ': '.$prototype->getInfo();
- }
- array_unshift($rootComments, $info);
-
- if ($key = $node->getKeyAttribute()) {
- $rootAttributes[$key] = str_replace('-', ' ', $rootName).' '.$key;
- }
-
- if ($prototype instanceof PrototypedArrayNode) {
- $prototype->setName($key);
- $children = [$key => $prototype];
- } elseif ($prototype instanceof ArrayNode) {
- $children = $prototype->getChildren();
- } else {
- if ($prototype->hasDefaultValue()) {
- $prototypeValue = $prototype->getDefaultValue();
- } else {
- switch (\get_class($prototype)) {
- case 'Symfony\Component\Config\Definition\ScalarNode':
- $prototypeValue = 'scalar value';
- break;
-
- case 'Symfony\Component\Config\Definition\FloatNode':
- case 'Symfony\Component\Config\Definition\IntegerNode':
- $prototypeValue = 'numeric value';
- break;
-
- case 'Symfony\Component\Config\Definition\BooleanNode':
- $prototypeValue = 'true|false';
- break;
-
- case 'Symfony\Component\Config\Definition\EnumNode':
- $prototypeValue = implode('|', array_map('json_encode', $prototype->getValues()));
- break;
-
- default:
- $prototypeValue = 'value';
- }
- }
- }
- }
-
- // get attributes and elements
- foreach ($children as $child) {
- if (!$child instanceof ArrayNode) {
- // get attributes
-
- // metadata
- $name = str_replace('_', '-', $child->getName());
- $value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world
-
- // comments
- $comments = [];
- if ($info = $child->getInfo()) {
- $comments[] = $info;
- }
-
- if ($example = $child->getExample()) {
- $comments[] = 'Example: '.$example;
- }
-
- if ($child->isRequired()) {
- $comments[] = 'Required';
- }
-
- if ($child->isDeprecated()) {
- $comments[] = sprintf('Deprecated (%s)', $child->getDeprecationMessage($child->getName(), $node->getPath()));
- }
-
- if ($child instanceof EnumNode) {
- $comments[] = 'One of '.implode('; ', array_map('json_encode', $child->getValues()));
- }
-
- if (\count($comments)) {
- $rootAttributeComments[$name] = implode(";\n", $comments);
- }
-
- // default values
- if ($child->hasDefaultValue()) {
- $value = $child->getDefaultValue();
- }
-
- // append attribute
- $rootAttributes[$name] = $value;
- } else {
- // get elements
- $rootChildren[] = $child;
- }
- }
- }
-
- // render comments
-
- // root node comment
- if (\count($rootComments)) {
- foreach ($rootComments as $comment) {
- $this->writeLine('<!-- '.$comment.' -->', $depth);
- }
- }
-
- // attribute comments
- if (\count($rootAttributeComments)) {
- foreach ($rootAttributeComments as $attrName => $comment) {
- $commentDepth = $depth + 4 + \strlen($attrName) + 2;
- $commentLines = explode("\n", $comment);
- $multiline = (\count($commentLines) > 1);
- $comment = implode(PHP_EOL.str_repeat(' ', $commentDepth), $commentLines);
-
- if ($multiline) {
- $this->writeLine('<!--', $depth);
- $this->writeLine($attrName.': '.$comment, $depth + 4);
- $this->writeLine('-->', $depth);
- } else {
- $this->writeLine('<!-- '.$attrName.': '.$comment.' -->', $depth);
- }
- }
- }
-
- // render start tag + attributes
- $rootIsVariablePrototype = isset($prototypeValue);
- $rootIsEmptyTag = (0 === \count($rootChildren) && !$rootIsVariablePrototype);
- $rootOpenTag = '<'.$rootName;
- if (1 >= ($attributesCount = \count($rootAttributes))) {
- if (1 === $attributesCount) {
- $rootOpenTag .= sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes)));
- }
-
- $rootOpenTag .= $rootIsEmptyTag ? ' />' : '>';
-
- if ($rootIsVariablePrototype) {
- $rootOpenTag .= $prototypeValue.'</'.$rootName.'>';
- }
-
- $this->writeLine($rootOpenTag, $depth);
- } else {
- $this->writeLine($rootOpenTag, $depth);
-
- $i = 1;
-
- foreach ($rootAttributes as $attrName => $attrValue) {
- $attr = sprintf('%s="%s"', $attrName, $this->writeValue($attrValue));
-
- $this->writeLine($attr, $depth + 4);
-
- if ($attributesCount === $i++) {
- $this->writeLine($rootIsEmptyTag ? '/>' : '>', $depth);
-
- if ($rootIsVariablePrototype) {
- $rootOpenTag .= $prototypeValue.'</'.$rootName.'>';
- }
- }
- }
- }
-
- // render children tags
- foreach ($rootChildren as $child) {
- $this->writeLine('');
- $this->writeNode($child, $depth + 4);
- }
-
- // render end tag
- if (!$rootIsEmptyTag && !$rootIsVariablePrototype) {
- $this->writeLine('');
-
- $rootEndTag = '</'.$rootName.'>';
- $this->writeLine($rootEndTag, $depth);
- }
- }
-
- /**
- * Outputs a single config reference line.
- */
- private function writeLine(string $text, int $indent = 0)
- {
- $indent = \strlen($text) + $indent;
- $format = '%'.$indent.'s';
-
- $this->reference .= sprintf($format, $text).PHP_EOL;
- }
-
- /**
- * Renders the string conversion of the value.
- *
- * @param mixed $value
- */
- private function writeValue($value): string
- {
- if ('%%%%not_defined%%%%' === $value) {
- return '';
- }
-
- if (\is_string($value) || is_numeric($value)) {
- return $value;
- }
-
- if (false === $value) {
- return 'false';
- }
-
- if (true === $value) {
- return 'true';
- }
-
- if (null === $value) {
- return 'null';
- }
-
- if (empty($value)) {
- return '';
- }
-
- if (\is_array($value)) {
- return implode(',', $value);
- }
-
- return '';
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php
deleted file mode 100644
index c53481b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php
+++ /dev/null
@@ -1,242 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Dumper;
-
-use Symfony\Component\Config\Definition\ArrayNode;
-use Symfony\Component\Config\Definition\ConfigurationInterface;
-use Symfony\Component\Config\Definition\EnumNode;
-use Symfony\Component\Config\Definition\NodeInterface;
-use Symfony\Component\Config\Definition\PrototypedArrayNode;
-use Symfony\Component\Config\Definition\ScalarNode;
-use Symfony\Component\Yaml\Inline;
-
-/**
- * Dumps a Yaml reference configuration for the given configuration/node instance.
- *
- * @author Kevin Bond <kevinbond@gmail.com>
- */
-class YamlReferenceDumper
-{
- private $reference;
-
- public function dump(ConfigurationInterface $configuration)
- {
- return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree());
- }
-
- public function dumpAtPath(ConfigurationInterface $configuration, $path)
- {
- $rootNode = $node = $configuration->getConfigTreeBuilder()->buildTree();
-
- foreach (explode('.', $path) as $step) {
- if (!$node instanceof ArrayNode) {
- throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s"', $rootNode->getName(), $path));
- }
-
- /** @var NodeInterface[] $children */
- $children = $node instanceof PrototypedArrayNode ? $this->getPrototypeChildren($node) : $node->getChildren();
-
- foreach ($children as $child) {
- if ($child->getName() === $step) {
- $node = $child;
-
- continue 2;
- }
- }
-
- throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s"', $rootNode->getName(), $path));
- }
-
- return $this->dumpNode($node);
- }
-
- public function dumpNode(NodeInterface $node)
- {
- $this->reference = '';
- $this->writeNode($node);
- $ref = $this->reference;
- $this->reference = null;
-
- return $ref;
- }
-
- private function writeNode(NodeInterface $node, NodeInterface $parentNode = null, int $depth = 0, bool $prototypedArray = false)
- {
- $comments = [];
- $default = '';
- $defaultArray = null;
- $children = null;
- $example = $node->getExample();
-
- // defaults
- if ($node instanceof ArrayNode) {
- $children = $node->getChildren();
-
- if ($node instanceof PrototypedArrayNode) {
- $children = $this->getPrototypeChildren($node);
- }
-
- if (!$children) {
- if ($node->hasDefaultValue() && \count($defaultArray = $node->getDefaultValue())) {
- $default = '';
- } elseif (!\is_array($example)) {
- $default = '[]';
- }
- }
- } elseif ($node instanceof EnumNode) {
- $comments[] = 'One of '.implode('; ', array_map('json_encode', $node->getValues()));
- $default = $node->hasDefaultValue() ? Inline::dump($node->getDefaultValue()) : '~';
- } else {
- $default = '~';
-
- if ($node->hasDefaultValue()) {
- $default = $node->getDefaultValue();
-
- if (\is_array($default)) {
- if (\count($defaultArray = $node->getDefaultValue())) {
- $default = '';
- } elseif (!\is_array($example)) {
- $default = '[]';
- }
- } else {
- $default = Inline::dump($default);
- }
- }
- }
-
- // required?
- if ($node->isRequired()) {
- $comments[] = 'Required';
- }
-
- // deprecated?
- if ($node->isDeprecated()) {
- $comments[] = sprintf('Deprecated (%s)', $node->getDeprecationMessage($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath()));
- }
-
- // example
- if ($example && !\is_array($example)) {
- $comments[] = 'Example: '.$example;
- }
-
- $default = '' != (string) $default ? ' '.$default : '';
- $comments = \count($comments) ? '# '.implode(', ', $comments) : '';
-
- $key = $prototypedArray ? '-' : $node->getName().':';
- $text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' ');
-
- if ($info = $node->getInfo()) {
- $this->writeLine('');
- // indenting multi-line info
- $info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info);
- $this->writeLine('# '.$info, $depth * 4);
- }
-
- $this->writeLine($text, $depth * 4);
-
- // output defaults
- if ($defaultArray) {
- $this->writeLine('');
-
- $message = \count($defaultArray) > 1 ? 'Defaults' : 'Default';
-
- $this->writeLine('# '.$message.':', $depth * 4 + 4);
-
- $this->writeArray($defaultArray, $depth + 1);
- }
-
- if (\is_array($example)) {
- $this->writeLine('');
-
- $message = \count($example) > 1 ? 'Examples' : 'Example';
-
- $this->writeLine('# '.$message.':', $depth * 4 + 4);
-
- $this->writeArray($example, $depth + 1);
- }
-
- if ($children) {
- foreach ($children as $childNode) {
- $this->writeNode($childNode, $node, $depth + 1, $node instanceof PrototypedArrayNode && !$node->getKeyAttribute());
- }
- }
- }
-
- /**
- * Outputs a single config reference line.
- */
- private function writeLine(string $text, int $indent = 0)
- {
- $indent = \strlen($text) + $indent;
- $format = '%'.$indent.'s';
-
- $this->reference .= sprintf($format, $text)."\n";
- }
-
- private function writeArray(array $array, int $depth)
- {
- $isIndexed = array_values($array) === $array;
-
- foreach ($array as $key => $value) {
- if (\is_array($value)) {
- $val = '';
- } else {
- $val = $value;
- }
-
- if ($isIndexed) {
- $this->writeLine('- '.$val, $depth * 4);
- } else {
- $this->writeLine(sprintf('%-20s %s', $key.':', $val), $depth * 4);
- }
-
- if (\is_array($value)) {
- $this->writeArray($value, $depth + 1);
- }
- }
- }
-
- private function getPrototypeChildren(PrototypedArrayNode $node): array
- {
- $prototype = $node->getPrototype();
- $key = $node->getKeyAttribute();
-
- // Do not expand prototype if it isn't an array node nor uses attribute as key
- if (!$key && !$prototype instanceof ArrayNode) {
- return $node->getChildren();
- }
-
- if ($prototype instanceof ArrayNode) {
- $keyNode = new ArrayNode($key, $node);
- $children = $prototype->getChildren();
-
- if ($prototype instanceof PrototypedArrayNode && $prototype->getKeyAttribute()) {
- $children = $this->getPrototypeChildren($prototype);
- }
-
- // add children
- foreach ($children as $childNode) {
- $keyNode->addChild($childNode);
- }
- } else {
- $keyNode = new ScalarNode($key, $node);
- }
-
- $info = 'Prototype';
- if (null !== $prototype->getInfo()) {
- $info .= ': '.$prototype->getInfo();
- }
- $keyNode->setInfo($info);
-
- return [$key => $keyNode];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/EnumNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/EnumNode.php
deleted file mode 100644
index 23fc508..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/EnumNode.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-
-/**
- * Node which only allows a finite set of values.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class EnumNode extends ScalarNode
-{
- private $values;
-
- public function __construct(?string $name, NodeInterface $parent = null, array $values = [], string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR)
- {
- $values = array_unique($values);
- if (empty($values)) {
- throw new \InvalidArgumentException('$values must contain at least one element.');
- }
-
- parent::__construct($name, $parent, $pathSeparator);
- $this->values = $values;
- }
-
- public function getValues()
- {
- return $this->values;
- }
-
- protected function finalizeValue($value)
- {
- $value = parent::finalizeValue($value);
-
- if (!\in_array($value, $this->values, true)) {
- $ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_map('json_encode', $this->values))));
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function allowPlaceholders(): bool
- {
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php
deleted file mode 100644
index 48dd932..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * This exception is thrown whenever the key of an array is not unique. This can
- * only be the case if the configuration is coming from an XML file.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class DuplicateKeyException extends InvalidConfigurationException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/Exception.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/Exception.php
deleted file mode 100644
index 8933a49..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/Exception.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * Base exception for all configuration exceptions.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class Exception extends \RuntimeException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php
deleted file mode 100644
index 726c07f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * This exception is thrown when a configuration path is overwritten from a
- * subsequent configuration file, but the entry node specifically forbids this.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ForbiddenOverwriteException extends InvalidConfigurationException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php
deleted file mode 100644
index 3dbc57b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * A very general exception which can be thrown whenever non of the more specific
- * exceptions is suitable.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class InvalidConfigurationException extends Exception
-{
- private $path;
- private $containsHints = false;
-
- public function setPath($path)
- {
- $this->path = $path;
- }
-
- public function getPath()
- {
- return $this->path;
- }
-
- /**
- * Adds extra information that is suffixed to the original exception message.
- *
- * @param string $hint
- */
- public function addHint($hint)
- {
- if (!$this->containsHints) {
- $this->message .= "\nHint: ".$hint;
- $this->containsHints = true;
- } else {
- $this->message .= ', '.$hint;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php
deleted file mode 100644
index 98310da..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * Thrown when an error is detected in a node Definition.
- *
- * @author Victor Berchet <victor.berchet@suumit.com>
- */
-class InvalidDefinitionException extends Exception
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidTypeException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidTypeException.php
deleted file mode 100644
index d7ca8c9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/InvalidTypeException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * This exception is thrown if an invalid type is encountered.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class InvalidTypeException extends InvalidConfigurationException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/TreeWithoutRootNodeException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/TreeWithoutRootNodeException.php
deleted file mode 100644
index 04406fc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/TreeWithoutRootNodeException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * @author Roland Franssen <franssen.roland@gmail.com>
- *
- * @internal
- */
-class TreeWithoutRootNodeException extends \RuntimeException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/UnsetKeyException.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/UnsetKeyException.php
deleted file mode 100644
index 863181a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Exception/UnsetKeyException.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition\Exception;
-
-/**
- * This exception is usually not encountered by the end-user, but only used
- * internally to signal the parent scope to unset a key.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class UnsetKeyException extends Exception
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/FloatNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/FloatNode.php
deleted file mode 100644
index 8e229ed..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/FloatNode.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-
-/**
- * This node represents a float value in the config tree.
- *
- * @author Jeanmonod David <david.jeanmonod@gmail.com>
- */
-class FloatNode extends NumericNode
-{
- /**
- * {@inheritdoc}
- */
- protected function validateType($value)
- {
- // Integers are also accepted, we just cast them
- if (\is_int($value)) {
- $value = (float) $value;
- }
-
- if (!\is_float($value)) {
- $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected float, but got %s.', $this->getPath(), \gettype($value)));
- if ($hint = $this->getInfo()) {
- $ex->addHint($hint);
- }
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getValidPlaceholderTypes(): array
- {
- return ['float'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/IntegerNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/IntegerNode.php
deleted file mode 100644
index e8c6a81..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/IntegerNode.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-
-/**
- * This node represents an integer value in the config tree.
- *
- * @author Jeanmonod David <david.jeanmonod@gmail.com>
- */
-class IntegerNode extends NumericNode
-{
- /**
- * {@inheritdoc}
- */
- protected function validateType($value)
- {
- if (!\is_int($value)) {
- $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected int, but got %s.', $this->getPath(), \gettype($value)));
- if ($hint = $this->getInfo()) {
- $ex->addHint($hint);
- }
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getValidPlaceholderTypes(): array
- {
- return ['int'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/NodeInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/NodeInterface.php
deleted file mode 100644
index 45f1f68..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/NodeInterface.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException;
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-
-/**
- * Common Interface among all nodes.
- *
- * In most cases, it is better to inherit from BaseNode instead of implementing
- * this interface yourself.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-interface NodeInterface
-{
- /**
- * Returns the name of the node.
- *
- * @return string The name of the node
- */
- public function getName();
-
- /**
- * Returns the path of the node.
- *
- * @return string The node path
- */
- public function getPath();
-
- /**
- * Returns true when the node is required.
- *
- * @return bool If the node is required
- */
- public function isRequired();
-
- /**
- * Returns true when the node has a default value.
- *
- * @return bool If the node has a default value
- */
- public function hasDefaultValue();
-
- /**
- * Returns the default value of the node.
- *
- * @return mixed The default value
- *
- * @throws \RuntimeException if the node has no default value
- */
- public function getDefaultValue();
-
- /**
- * Normalizes a value.
- *
- * @param mixed $value The value to normalize
- *
- * @return mixed The normalized value
- *
- * @throws InvalidTypeException if the value type is invalid
- */
- public function normalize($value);
-
- /**
- * Merges two values together.
- *
- * @param mixed $leftSide
- * @param mixed $rightSide
- *
- * @return mixed The merged value
- *
- * @throws ForbiddenOverwriteException if the configuration path cannot be overwritten
- * @throws InvalidTypeException if the value type is invalid
- */
- public function merge($leftSide, $rightSide);
-
- /**
- * Finalizes a value.
- *
- * @param mixed $value The value to finalize
- *
- * @return mixed The finalized value
- *
- * @throws InvalidTypeException if the value type is invalid
- * @throws InvalidConfigurationException if the value is invalid configuration
- */
- public function finalize($value);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/NumericNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/NumericNode.php
deleted file mode 100644
index 19c96e8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/NumericNode.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-
-/**
- * This node represents a numeric value in the config tree.
- *
- * @author David Jeanmonod <david.jeanmonod@gmail.com>
- */
-class NumericNode extends ScalarNode
-{
- protected $min;
- protected $max;
-
- public function __construct(?string $name, NodeInterface $parent = null, $min = null, $max = null, string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR)
- {
- parent::__construct($name, $parent, $pathSeparator);
- $this->min = $min;
- $this->max = $max;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function finalizeValue($value)
- {
- $value = parent::finalizeValue($value);
-
- $errorMsg = null;
- if (isset($this->min) && $value < $this->min) {
- $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min);
- }
- if (isset($this->max) && $value > $this->max) {
- $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max);
- }
- if (isset($errorMsg)) {
- $ex = new InvalidConfigurationException($errorMsg);
- $ex->setPath($this->getPath());
- throw $ex;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function isValueEmpty($value)
- {
- // a numeric value cannot be empty
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/Processor.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/Processor.php
deleted file mode 100644
index a878b90..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/Processor.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-/**
- * This class is the entry point for config normalization/merging/finalization.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- *
- * @final since version 4.1
- */
-class Processor
-{
- /**
- * Processes an array of configurations.
- *
- * @param array $configs An array of configuration items to process
- *
- * @return array The processed configuration
- */
- public function process(NodeInterface $configTree, array $configs)
- {
- $currentConfig = [];
- foreach ($configs as $config) {
- $config = $configTree->normalize($config);
- $currentConfig = $configTree->merge($currentConfig, $config);
- }
-
- return $configTree->finalize($currentConfig);
- }
-
- /**
- * Processes an array of configurations.
- *
- * @param array $configs An array of configuration items to process
- *
- * @return array The processed configuration
- */
- public function processConfiguration(ConfigurationInterface $configuration, array $configs)
- {
- return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs);
- }
-
- /**
- * Normalizes a configuration entry.
- *
- * This method returns a normalize configuration array for a given key
- * to remove the differences due to the original format (YAML and XML mainly).
- *
- * Here is an example.
- *
- * The configuration in XML:
- *
- * <twig:extension>twig.extension.foo</twig:extension>
- * <twig:extension>twig.extension.bar</twig:extension>
- *
- * And the same configuration in YAML:
- *
- * extensions: ['twig.extension.foo', 'twig.extension.bar']
- *
- * @param array $config A config array
- * @param string $key The key to normalize
- * @param string $plural The plural form of the key if it is irregular
- *
- * @return array
- */
- public static function normalizeConfig($config, $key, $plural = null)
- {
- if (null === $plural) {
- $plural = $key.'s';
- }
-
- if (isset($config[$plural])) {
- return $config[$plural];
- }
-
- if (isset($config[$key])) {
- if (\is_string($config[$key]) || !\is_int(key($config[$key]))) {
- // only one
- return [$config[$key]];
- }
-
- return $config[$key];
- }
-
- return [];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypeNodeInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypeNodeInterface.php
deleted file mode 100644
index 8bbb84d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypeNodeInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-/**
- * This interface must be implemented by nodes which can be used as prototypes.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-interface PrototypeNodeInterface extends NodeInterface
-{
- /**
- * Sets the name of the node.
- *
- * @param string $name The name of the node
- */
- public function setName($name);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypedArrayNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypedArrayNode.php
deleted file mode 100644
index 72d8fa0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/PrototypedArrayNode.php
+++ /dev/null
@@ -1,375 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\DuplicateKeyException;
-use Symfony\Component\Config\Definition\Exception\Exception;
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
-
-/**
- * Represents a prototyped Array node in the config tree.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class PrototypedArrayNode extends ArrayNode
-{
- protected $prototype;
- protected $keyAttribute;
- protected $removeKeyAttribute = false;
- protected $minNumberOfElements = 0;
- protected $defaultValue = [];
- protected $defaultChildren;
- /**
- * @var NodeInterface[] An array of the prototypes of the simplified value children
- */
- private $valuePrototypes = [];
-
- /**
- * Sets the minimum number of elements that a prototype based node must
- * contain. By default this is zero, meaning no elements.
- *
- * @param int $number
- */
- public function setMinNumberOfElements($number)
- {
- $this->minNumberOfElements = $number;
- }
-
- /**
- * Sets the attribute which value is to be used as key.
- *
- * This is useful when you have an indexed array that should be an
- * associative array. You can select an item from within the array
- * to be the key of the particular item. For example, if "id" is the
- * "key", then:
- *
- * [
- * ['id' => 'my_name', 'foo' => 'bar'],
- * ];
- *
- * becomes
- *
- * [
- * 'my_name' => ['foo' => 'bar'],
- * ];
- *
- * If you'd like "'id' => 'my_name'" to still be present in the resulting
- * array, then you can set the second argument of this method to false.
- *
- * @param string $attribute The name of the attribute which value is to be used as a key
- * @param bool $remove Whether or not to remove the key
- */
- public function setKeyAttribute($attribute, $remove = true)
- {
- $this->keyAttribute = $attribute;
- $this->removeKeyAttribute = $remove;
- }
-
- /**
- * Retrieves the name of the attribute which value should be used as key.
- *
- * @return string|null The name of the attribute
- */
- public function getKeyAttribute()
- {
- return $this->keyAttribute;
- }
-
- /**
- * Sets the default value of this node.
- *
- * @param string $value
- *
- * @throws \InvalidArgumentException if the default value is not an array
- */
- public function setDefaultValue($value)
- {
- if (!\is_array($value)) {
- throw new \InvalidArgumentException($this->getPath().': the default value of an array node has to be an array.');
- }
-
- $this->defaultValue = $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasDefaultValue()
- {
- return true;
- }
-
- /**
- * Adds default children when none are set.
- *
- * @param int|string|array|null $children The number of children|The child name|The children names to be added
- */
- public function setAddChildrenIfNoneSet($children = ['defaults'])
- {
- if (null === $children) {
- $this->defaultChildren = ['defaults'];
- } else {
- $this->defaultChildren = \is_int($children) && $children > 0 ? range(1, $children) : (array) $children;
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * The default value could be either explicited or derived from the prototype
- * default value.
- */
- public function getDefaultValue()
- {
- if (null !== $this->defaultChildren) {
- $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : [];
- $defaults = [];
- foreach (array_values($this->defaultChildren) as $i => $name) {
- $defaults[null === $this->keyAttribute ? $i : $name] = $default;
- }
-
- return $defaults;
- }
-
- return $this->defaultValue;
- }
-
- /**
- * Sets the node prototype.
- */
- public function setPrototype(PrototypeNodeInterface $node)
- {
- $this->prototype = $node;
- }
-
- /**
- * Retrieves the prototype.
- *
- * @return PrototypeNodeInterface The prototype
- */
- public function getPrototype()
- {
- return $this->prototype;
- }
-
- /**
- * Disable adding concrete children for prototyped nodes.
- *
- * @throws Exception
- */
- public function addChild(NodeInterface $node)
- {
- throw new Exception('A prototyped array node can not have concrete children.');
- }
-
- /**
- * Finalizes the value of this node.
- *
- * @param mixed $value
- *
- * @return mixed The finalized value
- *
- * @throws UnsetKeyException
- * @throws InvalidConfigurationException if the node doesn't have enough children
- */
- protected function finalizeValue($value)
- {
- if (false === $value) {
- throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value)));
- }
-
- foreach ($value as $k => $v) {
- $prototype = $this->getPrototypeForChild($k);
- try {
- $value[$k] = $prototype->finalize($v);
- } catch (UnsetKeyException $e) {
- unset($value[$k]);
- }
- }
-
- if (\count($value) < $this->minNumberOfElements) {
- $ex = new InvalidConfigurationException(sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements));
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- return $value;
- }
-
- /**
- * Normalizes the value.
- *
- * @param mixed $value The value to normalize
- *
- * @return mixed The normalized value
- *
- * @throws InvalidConfigurationException
- * @throws DuplicateKeyException
- */
- protected function normalizeValue($value)
- {
- if (false === $value) {
- return $value;
- }
-
- $value = $this->remapXml($value);
-
- $isAssoc = array_keys($value) !== range(0, \count($value) - 1);
- $normalized = [];
- foreach ($value as $k => $v) {
- if (null !== $this->keyAttribute && \is_array($v)) {
- if (!isset($v[$this->keyAttribute]) && \is_int($k) && !$isAssoc) {
- $ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath()));
- $ex->setPath($this->getPath());
-
- throw $ex;
- } elseif (isset($v[$this->keyAttribute])) {
- $k = $v[$this->keyAttribute];
-
- // remove the key attribute when required
- if ($this->removeKeyAttribute) {
- unset($v[$this->keyAttribute]);
- }
-
- // if only "value" is left
- if (array_keys($v) === ['value']) {
- $v = $v['value'];
- if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && \array_key_exists('value', $children)) {
- $valuePrototype = current($this->valuePrototypes) ?: clone $children['value'];
- $valuePrototype->parent = $this;
- $originalClosures = $this->prototype->normalizationClosures;
- if (\is_array($originalClosures)) {
- $valuePrototypeClosures = $valuePrototype->normalizationClosures;
- $valuePrototype->normalizationClosures = \is_array($valuePrototypeClosures) ? array_merge($originalClosures, $valuePrototypeClosures) : $originalClosures;
- }
- $this->valuePrototypes[$k] = $valuePrototype;
- }
- }
- }
-
- if (\array_key_exists($k, $normalized)) {
- $ex = new DuplicateKeyException(sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath()));
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
- }
-
- $prototype = $this->getPrototypeForChild($k);
- if (null !== $this->keyAttribute || $isAssoc) {
- $normalized[$k] = $prototype->normalize($v);
- } else {
- $normalized[] = $prototype->normalize($v);
- }
- }
-
- return $normalized;
- }
-
- /**
- * Merges values together.
- *
- * @param mixed $leftSide The left side to merge
- * @param mixed $rightSide The right side to merge
- *
- * @return mixed The merged values
- *
- * @throws InvalidConfigurationException
- * @throws \RuntimeException
- */
- protected function mergeValues($leftSide, $rightSide)
- {
- if (false === $rightSide) {
- // if this is still false after the last config has been merged the
- // finalization pass will take care of removing this key entirely
- return false;
- }
-
- if (false === $leftSide || !$this->performDeepMerging) {
- return $rightSide;
- }
-
- foreach ($rightSide as $k => $v) {
- // prototype, and key is irrelevant, append the element
- if (null === $this->keyAttribute) {
- $leftSide[] = $v;
- continue;
- }
-
- // no conflict
- if (!\array_key_exists($k, $leftSide)) {
- if (!$this->allowNewKeys) {
- $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath()));
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- $leftSide[$k] = $v;
- continue;
- }
-
- $prototype = $this->getPrototypeForChild($k);
- $leftSide[$k] = $prototype->merge($leftSide[$k], $v);
- }
-
- return $leftSide;
- }
-
- /**
- * Returns a prototype for the child node that is associated to $key in the value array.
- * For general child nodes, this will be $this->prototype.
- * But if $this->removeKeyAttribute is true and there are only two keys in the child node:
- * one is same as this->keyAttribute and the other is 'value', then the prototype will be different.
- *
- * For example, assume $this->keyAttribute is 'name' and the value array is as follows:
- *
- * [
- * [
- * 'name' => 'name001',
- * 'value' => 'value001'
- * ]
- * ]
- *
- * Now, the key is 0 and the child node is:
- *
- * [
- * 'name' => 'name001',
- * 'value' => 'value001'
- * ]
- *
- * When normalizing the value array, the 'name' element will removed from the child node
- * and its value becomes the new key of the child node:
- *
- * [
- * 'name001' => ['value' => 'value001']
- * ]
- *
- * Now only 'value' element is left in the child node which can be further simplified into a string:
- *
- * ['name001' => 'value001']
- *
- * Now, the key becomes 'name001' and the child node becomes 'value001' and
- * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance.
- *
- * @return mixed The prototype instance
- */
- private function getPrototypeForChild(string $key)
- {
- $prototype = isset($this->valuePrototypes[$key]) ? $this->valuePrototypes[$key] : $this->prototype;
- $prototype->setName($key);
-
- return $prototype;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/ScalarNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/ScalarNode.php
deleted file mode 100644
index 5ad28ec..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/ScalarNode.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
-
-/**
- * This node represents a scalar value in the config tree.
- *
- * The following values are considered scalars:
- * * booleans
- * * strings
- * * null
- * * integers
- * * floats
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ScalarNode extends VariableNode
-{
- /**
- * {@inheritdoc}
- */
- protected function validateType($value)
- {
- if (!is_scalar($value) && null !== $value) {
- $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected scalar, but got %s.', $this->getPath(), \gettype($value)));
- if ($hint = $this->getInfo()) {
- $ex->addHint($hint);
- }
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function isValueEmpty($value)
- {
- // assume environment variables are never empty (which in practice is likely to be true during runtime)
- // not doing so breaks many configs that are valid today
- if ($this->isHandlingPlaceholder()) {
- return false;
- }
-
- return null === $value || '' === $value;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getValidPlaceholderTypes(): array
- {
- return ['bool', 'int', 'float', 'string'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Definition/VariableNode.php b/srcs/phpmyadmin/vendor/symfony/config/Definition/VariableNode.php
deleted file mode 100644
index ad70d6e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Definition/VariableNode.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Definition;
-
-use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
-
-/**
- * This node represents a value of variable type in the config tree.
- *
- * This node is intended for values of arbitrary type.
- * Any PHP type is accepted as a value.
- *
- * @author Jeremy Mikola <jmikola@gmail.com>
- */
-class VariableNode extends BaseNode implements PrototypeNodeInterface
-{
- protected $defaultValueSet = false;
- protected $defaultValue;
- protected $allowEmptyValue = true;
-
- public function setDefaultValue($value)
- {
- $this->defaultValueSet = true;
- $this->defaultValue = $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasDefaultValue()
- {
- return $this->defaultValueSet;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getDefaultValue()
- {
- $v = $this->defaultValue;
-
- return $v instanceof \Closure ? $v() : $v;
- }
-
- /**
- * Sets if this node is allowed to have an empty value.
- *
- * @param bool $boolean True if this entity will accept empty values
- */
- public function setAllowEmptyValue($boolean)
- {
- $this->allowEmptyValue = (bool) $boolean;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setName($name)
- {
- $this->name = $name;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function validateType($value)
- {
- }
-
- /**
- * {@inheritdoc}
- */
- protected function finalizeValue($value)
- {
- // deny environment variables only when using custom validators
- // this avoids ever passing an empty value to final validation closures
- if (!$this->allowEmptyValue && $this->isHandlingPlaceholder() && $this->finalValidationClosures) {
- @trigger_error(sprintf('Setting path "%s" to an environment variable is deprecated since Symfony 4.3. Remove "cannotBeEmpty()", "validate()" or include a prefix/suffix value instead.', $this->getPath()), E_USER_DEPRECATED);
-// $e = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.', $this->getPath()));
-// if ($hint = $this->getInfo()) {
-// $e->addHint($hint);
-// }
-// $e->setPath($this->getPath());
-//
-// throw $e;
- }
-
- if (!$this->allowEmptyValue && $this->isValueEmpty($value)) {
- $ex = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value)));
- if ($hint = $this->getInfo()) {
- $ex->addHint($hint);
- }
- $ex->setPath($this->getPath());
-
- throw $ex;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function normalizeValue($value)
- {
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function mergeValues($leftSide, $rightSide)
- {
- return $rightSide;
- }
-
- /**
- * Evaluates if the given value is to be treated as empty.
- *
- * By default, PHP's empty() function is used to test for emptiness. This
- * method may be overridden by subtypes to better match their understanding
- * of empty data.
- *
- * @param mixed $value
- *
- * @return bool
- *
- * @see finalizeValue()
- */
- protected function isValueEmpty($value)
- {
- return empty($value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php b/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php
deleted file mode 100644
index 8c5e736..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Exception;
-
-/**
- * Exception class for when a circular reference is detected when importing resources.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class FileLoaderImportCircularReferenceException extends LoaderLoadException
-{
- public function __construct(array $resources, int $code = null, \Throwable $previous = null)
- {
- $message = sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]);
-
- \Exception::__construct($message, $code, $previous);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderLoadException.php b/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderLoadException.php
deleted file mode 100644
index 16beec5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLoaderLoadException.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Exception;
-
-/**
- * Exception class for when a resource cannot be loaded or imported.
- *
- * @author Ryan Weaver <ryan@thatsquality.com>
- *
- * @deprecated since Symfony 4.2, use LoaderLoadException instead.
- */
-class FileLoaderLoadException extends \Exception
-{
- /**
- * @param string $resource The resource that could not be imported
- * @param string $sourceResource The original resource importing the new resource
- * @param int $code The error code
- * @param \Throwable $previous A previous exception
- * @param string $type The type of resource
- */
- public function __construct(string $resource, string $sourceResource = null, int $code = null, \Throwable $previous = null, string $type = null)
- {
- $message = '';
- if ($previous) {
- // Include the previous exception, to help the user see what might be the underlying cause
-
- // Trim the trailing period of the previous message. We only want 1 period remove so no rtrim...
- if ('.' === substr($previous->getMessage(), -1)) {
- $trimmedMessage = substr($previous->getMessage(), 0, -1);
- $message .= sprintf('%s', $trimmedMessage).' in ';
- } else {
- $message .= sprintf('%s', $previous->getMessage()).' in ';
- }
- $message .= $resource.' ';
-
- // show tweaked trace to complete the human readable sentence
- if (null === $sourceResource) {
- $message .= sprintf('(which is loaded in resource "%s")', $resource);
- } else {
- $message .= sprintf('(which is being imported from "%s")', $sourceResource);
- }
- $message .= '.';
-
- // if there's no previous message, present it the default way
- } elseif (null === $sourceResource) {
- $message .= sprintf('Cannot load resource "%s".', $resource);
- } else {
- $message .= sprintf('Cannot import resource "%s" from "%s".', $resource, $sourceResource);
- }
-
- // Is the resource located inside a bundle?
- if ('@' === $resource[0]) {
- $parts = explode(\DIRECTORY_SEPARATOR, $resource);
- $bundle = substr($parts[0], 1);
- $message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle);
- $message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource);
- } elseif (null !== $type) {
- // maybe there is no loader for this specific type
- if ('annotation' === $type) {
- $message .= ' Make sure annotations are installed and enabled.';
- } else {
- $message .= sprintf(' Make sure there is a loader supporting the "%s" type.', $type);
- }
- }
-
- parent::__construct($message, $code, $previous);
- }
-
- protected function varToString($var)
- {
- if (\is_object($var)) {
- return sprintf('Object(%s)', \get_class($var));
- }
-
- if (\is_array($var)) {
- $a = [];
- foreach ($var as $k => $v) {
- $a[] = sprintf('%s => %s', $k, $this->varToString($v));
- }
-
- return sprintf('Array(%s)', implode(', ', $a));
- }
-
- if (\is_resource($var)) {
- return sprintf('Resource(%s)', get_resource_type($var));
- }
-
- if (null === $var) {
- return 'null';
- }
-
- if (false === $var) {
- return 'false';
- }
-
- if (true === $var) {
- return 'true';
- }
-
- return (string) $var;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php
deleted file mode 100644
index 3ee4b93..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Exception;
-
-/**
- * File locator exception if a file does not exist.
- *
- * @author Leo Feyer <https://github.com/leofeyer>
- */
-class FileLocatorFileNotFoundException extends \InvalidArgumentException
-{
- private $paths;
-
- public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, array $paths = [])
- {
- parent::__construct($message, $code, $previous);
-
- $this->paths = $paths;
- }
-
- public function getPaths()
- {
- return $this->paths;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Exception/LoaderLoadException.php b/srcs/phpmyadmin/vendor/symfony/config/Exception/LoaderLoadException.php
deleted file mode 100644
index 41a959d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Exception/LoaderLoadException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Exception;
-
-/**
- * Exception class for when a resource cannot be loaded or imported.
- *
- * @author Ryan Weaver <ryan@thatsquality.com>
- */
-class LoaderLoadException extends FileLoaderLoadException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/FileLocator.php b/srcs/phpmyadmin/vendor/symfony/config/FileLocator.php
deleted file mode 100644
index ce856a8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/FileLocator.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
-
-/**
- * FileLocator uses an array of pre-defined paths to find files.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class FileLocator implements FileLocatorInterface
-{
- protected $paths;
-
- /**
- * @param string|string[] $paths A path or an array of paths where to look for resources
- */
- public function __construct($paths = [])
- {
- $this->paths = (array) $paths;
- }
-
- /**
- * {@inheritdoc}
- */
- public function locate($name, $currentPath = null, $first = true)
- {
- if ('' == $name) {
- throw new \InvalidArgumentException('An empty file name is not valid to be located.');
- }
-
- if ($this->isAbsolutePath($name)) {
- if (!file_exists($name)) {
- throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name), 0, null, [$name]);
- }
-
- return $name;
- }
-
- $paths = $this->paths;
-
- if (null !== $currentPath) {
- array_unshift($paths, $currentPath);
- }
-
- $paths = array_unique($paths);
- $filepaths = $notfound = [];
-
- foreach ($paths as $path) {
- if (@file_exists($file = $path.\DIRECTORY_SEPARATOR.$name)) {
- if (true === $first) {
- return $file;
- }
- $filepaths[] = $file;
- } else {
- $notfound[] = $file;
- }
- }
-
- if (!$filepaths) {
- throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist (in: %s).', $name, implode(', ', $paths)), 0, null, $notfound);
- }
-
- return $filepaths;
- }
-
- /**
- * Returns whether the file path is an absolute path.
- */
- private function isAbsolutePath(string $file): bool
- {
- if ('/' === $file[0] || '\\' === $file[0]
- || (\strlen($file) > 3 && ctype_alpha($file[0])
- && ':' === $file[1]
- && ('\\' === $file[2] || '/' === $file[2])
- )
- || null !== parse_url($file, PHP_URL_SCHEME)
- ) {
- return true;
- }
-
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/FileLocatorInterface.php b/srcs/phpmyadmin/vendor/symfony/config/FileLocatorInterface.php
deleted file mode 100644
index cf3c2e5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/FileLocatorInterface.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface FileLocatorInterface
-{
- /**
- * Returns a full path for a given file name.
- *
- * @param string $name The file name to locate
- * @param string|null $currentPath The current path
- * @param bool $first Whether to return the first occurrence or an array of filenames
- *
- * @return string|array The full path to the file or an array of file paths
- *
- * @throws \InvalidArgumentException If $name is empty
- * @throws FileLocatorFileNotFoundException If a file is not found
- */
- public function locate($name, $currentPath = null, $first = true);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/LICENSE b/srcs/phpmyadmin/vendor/symfony/config/LICENSE
deleted file mode 100644
index a677f43..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/DelegatingLoader.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/DelegatingLoader.php
deleted file mode 100644
index e40e57d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/DelegatingLoader.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-use Symfony\Component\Config\Exception\LoaderLoadException;
-
-/**
- * DelegatingLoader delegates loading to other loaders using a loader resolver.
- *
- * This loader acts as an array of LoaderInterface objects - each having
- * a chance to load a given resource (handled by the resolver)
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class DelegatingLoader extends Loader
-{
- public function __construct(LoaderResolverInterface $resolver)
- {
- $this->resolver = $resolver;
- }
-
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- if (false === $loader = $this->resolver->resolve($resource, $type)) {
- throw new LoaderLoadException($resource, null, null, null, $type);
- }
-
- return $loader->load($resource, $type);
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- return false !== $this->resolver->resolve($resource, $type);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/FileLoader.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/FileLoader.php
deleted file mode 100644
index 828ac67..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/FileLoader.php
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException;
-use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
-use Symfony\Component\Config\Exception\LoaderLoadException;
-use Symfony\Component\Config\FileLocatorInterface;
-use Symfony\Component\Config\Resource\FileExistenceResource;
-use Symfony\Component\Config\Resource\GlobResource;
-
-/**
- * FileLoader is the abstract class used by all built-in loaders that are file based.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-abstract class FileLoader extends Loader
-{
- protected static $loading = [];
-
- protected $locator;
-
- private $currentDir;
-
- public function __construct(FileLocatorInterface $locator)
- {
- $this->locator = $locator;
- }
-
- /**
- * Sets the current directory.
- *
- * @param string $dir
- */
- public function setCurrentDir($dir)
- {
- $this->currentDir = $dir;
- }
-
- /**
- * Returns the file locator used by this loader.
- *
- * @return FileLocatorInterface
- */
- public function getLocator()
- {
- return $this->locator;
- }
-
- /**
- * Imports a resource.
- *
- * @param mixed $resource A Resource
- * @param string|null $type The resource type or null if unknown
- * @param bool $ignoreErrors Whether to ignore import errors or not
- * @param string|null $sourceResource The original resource importing the new resource
- * @param string|string[]|null $exclude Glob patterns to exclude from the import
- *
- * @return mixed
- *
- * @throws LoaderLoadException
- * @throws FileLoaderImportCircularReferenceException
- * @throws FileLocatorFileNotFoundException
- */
- public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null/*, $exclude = null*/)
- {
- if (\func_num_args() < 5 && __CLASS__ !== \get_class($this) && 0 !== strpos(\get_class($this), 'Symfony\Component\\') && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) {
- @trigger_error(sprintf('The "%s()" method will have a new "$exclude = null" argument in version 5.0, not defining it is deprecated since Symfony 4.4.', __METHOD__), E_USER_DEPRECATED);
- }
- $exclude = \func_num_args() >= 5 ? func_get_arg(4) : null;
-
- if (\is_string($resource) && \strlen($resource) !== $i = strcspn($resource, '*?{[')) {
- $excluded = [];
- foreach ((array) $exclude as $pattern) {
- foreach ($this->glob($pattern, true, $_, false, true) as $path => $info) {
- // normalize Windows slashes
- $excluded[str_replace('\\', '/', $path)] = true;
- }
- }
-
- $ret = [];
- $isSubpath = 0 !== $i && false !== strpos(substr($resource, 0, $i), '/');
- foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath, false, $excluded) as $path => $info) {
- if (null !== $res = $this->doImport($path, $type, $ignoreErrors, $sourceResource)) {
- $ret[] = $res;
- }
- $isSubpath = true;
- }
-
- if ($isSubpath) {
- return isset($ret[1]) ? $ret : (isset($ret[0]) ? $ret[0] : null);
- }
- }
-
- return $this->doImport($resource, $type, $ignoreErrors, $sourceResource);
- }
-
- /**
- * @internal
- */
- protected function glob(string $pattern, bool $recursive, &$resource = null, bool $ignoreErrors = false, bool $forExclusion = false, array $excluded = [])
- {
- if (\strlen($pattern) === $i = strcspn($pattern, '*?{[')) {
- $prefix = $pattern;
- $pattern = '';
- } elseif (0 === $i || false === strpos(substr($pattern, 0, $i), '/')) {
- $prefix = '.';
- $pattern = '/'.$pattern;
- } else {
- $prefix = \dirname(substr($pattern, 0, 1 + $i));
- $pattern = substr($pattern, \strlen($prefix));
- }
-
- try {
- $prefix = $this->locator->locate($prefix, $this->currentDir, true);
- } catch (FileLocatorFileNotFoundException $e) {
- if (!$ignoreErrors) {
- throw $e;
- }
-
- $resource = [];
- foreach ($e->getPaths() as $path) {
- $resource[] = new FileExistenceResource($path);
- }
-
- return;
- }
- $resource = new GlobResource($prefix, $pattern, $recursive, $forExclusion, $excluded);
-
- yield from $resource;
- }
-
- private function doImport($resource, string $type = null, bool $ignoreErrors = false, $sourceResource = null)
- {
- try {
- $loader = $this->resolve($resource, $type);
-
- if ($loader instanceof self && null !== $this->currentDir) {
- $resource = $loader->getLocator()->locate($resource, $this->currentDir, false);
- }
-
- $resources = \is_array($resource) ? $resource : [$resource];
- for ($i = 0; $i < $resourcesCount = \count($resources); ++$i) {
- if (isset(self::$loading[$resources[$i]])) {
- if ($i == $resourcesCount - 1) {
- throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading));
- }
- } else {
- $resource = $resources[$i];
- break;
- }
- }
- self::$loading[$resource] = true;
-
- try {
- $ret = $loader->load($resource, $type);
- } finally {
- unset(self::$loading[$resource]);
- }
-
- return $ret;
- } catch (FileLoaderImportCircularReferenceException $e) {
- throw $e;
- } catch (\Exception $e) {
- if (!$ignoreErrors) {
- // prevent embedded imports from nesting multiple exceptions
- if ($e instanceof LoaderLoadException) {
- throw $e;
- }
-
- throw new LoaderLoadException($resource, $sourceResource, null, $e, $type);
- }
- }
-
- return null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/GlobFileLoader.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/GlobFileLoader.php
deleted file mode 100644
index f432b45..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/GlobFileLoader.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-/**
- * GlobFileLoader loads files from a glob pattern.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class GlobFileLoader extends FileLoader
-{
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- return $this->import($resource);
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- return 'glob' === $type;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/Loader.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/Loader.php
deleted file mode 100644
index 698ab40..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/Loader.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-use Symfony\Component\Config\Exception\LoaderLoadException;
-
-/**
- * Loader is the abstract class used by all built-in loaders.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-abstract class Loader implements LoaderInterface
-{
- protected $resolver;
-
- /**
- * {@inheritdoc}
- */
- public function getResolver()
- {
- return $this->resolver;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setResolver(LoaderResolverInterface $resolver)
- {
- $this->resolver = $resolver;
- }
-
- /**
- * Imports a resource.
- *
- * @param mixed $resource A resource
- * @param string|null $type The resource type or null if unknown
- *
- * @return mixed
- */
- public function import($resource, $type = null)
- {
- return $this->resolve($resource, $type)->load($resource, $type);
- }
-
- /**
- * Finds a loader able to load an imported resource.
- *
- * @param mixed $resource A resource
- * @param string|null $type The resource type or null if unknown
- *
- * @return $this|LoaderInterface
- *
- * @throws LoaderLoadException If no loader is found
- */
- public function resolve($resource, $type = null)
- {
- if ($this->supports($resource, $type)) {
- return $this;
- }
-
- $loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type);
-
- if (false === $loader) {
- throw new LoaderLoadException($resource, null, null, null, $type);
- }
-
- return $loader;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderInterface.php
deleted file mode 100644
index dfca9dd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderInterface.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-/**
- * LoaderInterface is the interface implemented by all loader classes.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface LoaderInterface
-{
- /**
- * Loads a resource.
- *
- * @param mixed $resource The resource
- * @param string|null $type The resource type or null if unknown
- *
- * @throws \Exception If something went wrong
- */
- public function load($resource, $type = null);
-
- /**
- * Returns whether this class supports the given resource.
- *
- * @param mixed $resource A resource
- * @param string|null $type The resource type or null if unknown
- *
- * @return bool True if this class supports the given resource, false otherwise
- */
- public function supports($resource, $type = null);
-
- /**
- * Gets the loader resolver.
- *
- * @return LoaderResolverInterface A LoaderResolverInterface instance
- */
- public function getResolver();
-
- /**
- * Sets the loader resolver.
- */
- public function setResolver(LoaderResolverInterface $resolver);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolver.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolver.php
deleted file mode 100644
index c99efda..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolver.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-/**
- * LoaderResolver selects a loader for a given resource.
- *
- * A resource can be anything (e.g. a full path to a config file or a Closure).
- * Each loader determines whether it can load a resource and how.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class LoaderResolver implements LoaderResolverInterface
-{
- /**
- * @var LoaderInterface[] An array of LoaderInterface objects
- */
- private $loaders = [];
-
- /**
- * @param LoaderInterface[] $loaders An array of loaders
- */
- public function __construct(array $loaders = [])
- {
- foreach ($loaders as $loader) {
- $this->addLoader($loader);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function resolve($resource, $type = null)
- {
- foreach ($this->loaders as $loader) {
- if ($loader->supports($resource, $type)) {
- return $loader;
- }
- }
-
- return false;
- }
-
- public function addLoader(LoaderInterface $loader)
- {
- $this->loaders[] = $loader;
- $loader->setResolver($this);
- }
-
- /**
- * Returns the registered loaders.
- *
- * @return LoaderInterface[] An array of LoaderInterface instances
- */
- public function getLoaders()
- {
- return $this->loaders;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolverInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolverInterface.php
deleted file mode 100644
index 40f1a1a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Loader/LoaderResolverInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Loader;
-
-/**
- * LoaderResolverInterface selects a loader for a given resource.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface LoaderResolverInterface
-{
- /**
- * Returns a loader able to load the resource.
- *
- * @param mixed $resource A resource
- * @param string|null $type The resource type or null if unknown
- *
- * @return LoaderInterface|false The loader or false if none is able to load the resource
- */
- public function resolve($resource, $type = null);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/README.md b/srcs/phpmyadmin/vendor/symfony/config/README.md
deleted file mode 100644
index bf400da..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-Config Component
-================
-
-The Config component provides several classes to help you find, load, combine,
-autofill and validate configuration values of any kind, whatever their source
-may be (YAML, XML, INI files, or for instance a database).
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/config/index.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/ClassExistenceResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/ClassExistenceResource.php
deleted file mode 100644
index 77cd8e5..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/ClassExistenceResource.php
+++ /dev/null
@@ -1,231 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * ClassExistenceResource represents a class existence.
- * Freshness is only evaluated against resource existence.
- *
- * The resource must be a fully-qualified class name.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @final since Symfony 4.3
- */
-class ClassExistenceResource implements SelfCheckingResourceInterface
-{
- private $resource;
- private $exists;
-
- private static $autoloadLevel = 0;
- private static $autoloadedClass;
- private static $existsCache = [];
-
- /**
- * @param string $resource The fully-qualified class name
- * @param bool|null $exists Boolean when the existency check has already been done
- */
- public function __construct(string $resource, bool $exists = null)
- {
- $this->resource = $resource;
- if (null !== $exists) {
- $this->exists = [(bool) $exists, null];
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return $this->resource;
- }
-
- /**
- * @return string The file path to the resource
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * {@inheritdoc}
- *
- * @throws \ReflectionException when a parent class/interface/trait is not found
- */
- public function isFresh($timestamp)
- {
- $loaded = class_exists($this->resource, false) || interface_exists($this->resource, false) || trait_exists($this->resource, false);
-
- if (null !== $exists = &self::$existsCache[$this->resource]) {
- if ($loaded) {
- $exists = [true, null];
- } elseif (0 >= $timestamp && !$exists[0] && null !== $exists[1]) {
- throw new \ReflectionException($exists[1]);
- }
- } elseif ([false, null] === $exists = [$loaded, null]) {
- if (!self::$autoloadLevel++) {
- spl_autoload_register(__CLASS__.'::throwOnRequiredClass');
- }
- $autoloadedClass = self::$autoloadedClass;
- self::$autoloadedClass = ltrim($this->resource, '\\');
-
- try {
- $exists[0] = class_exists($this->resource) || interface_exists($this->resource, false) || trait_exists($this->resource, false);
- } catch (\Exception $e) {
- $exists[1] = $e->getMessage();
-
- try {
- self::throwOnRequiredClass($this->resource, $e);
- } catch (\ReflectionException $e) {
- if (0 >= $timestamp) {
- throw $e;
- }
- }
- } catch (\Throwable $e) {
- $exists[1] = $e->getMessage();
- } finally {
- self::$autoloadedClass = $autoloadedClass;
- if (!--self::$autoloadLevel) {
- spl_autoload_unregister(__CLASS__.'::throwOnRequiredClass');
- }
- }
- }
-
- if (null === $this->exists) {
- $this->exists = $exists;
- }
-
- return $this->exists[0] xor !$exists[0];
- }
-
- /**
- * @internal
- */
- public function __sleep(): array
- {
- if (null === $this->exists) {
- $this->isFresh(0);
- }
-
- return ['resource', 'exists'];
- }
-
- /**
- * @internal
- */
- public function __wakeup()
- {
- if (\is_bool($this->exists)) {
- $this->exists = [$this->exists, null];
- }
- }
-
- /**
- * Throws a reflection exception when the passed class does not exist but is required.
- *
- * A class is considered "not required" when it's loaded as part of a "class_exists" or similar check.
- *
- * This function can be used as an autoload function to throw a reflection
- * exception if the class was not found by previous autoload functions.
- *
- * A previous exception can be passed. In this case, the class is considered as being
- * required totally, so if it doesn't exist, a reflection exception is always thrown.
- * If it exists, the previous exception is rethrown.
- *
- * @throws \ReflectionException
- *
- * @internal
- */
- public static function throwOnRequiredClass($class, \Exception $previous = null)
- {
- // If the passed class is the resource being checked, we shouldn't throw.
- if (null === $previous && self::$autoloadedClass === $class) {
- return;
- }
-
- if (class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) {
- if (null !== $previous) {
- throw $previous;
- }
-
- return;
- }
-
- if ($previous instanceof \ReflectionException) {
- throw $previous;
- }
-
- $message = sprintf('Class "%s" not found.', $class);
-
- if (self::$autoloadedClass !== $class) {
- $message = substr_replace($message, sprintf(' while loading "%s"', self::$autoloadedClass), -1, 0);
- }
-
- if (null !== $previous) {
- $message = $previous->getMessage();
- }
-
- $e = new \ReflectionException($message, 0, $previous);
-
- if (null !== $previous) {
- throw $e;
- }
-
- $trace = debug_backtrace();
- $autoloadFrame = [
- 'function' => 'spl_autoload_call',
- 'args' => [$class],
- ];
-
- if (false === $i = array_search($autoloadFrame, $trace, true)) {
- throw $e;
- }
-
- if (isset($trace[++$i]['function']) && !isset($trace[$i]['class'])) {
- switch ($trace[$i]['function']) {
- case 'get_class_methods':
- case 'get_class_vars':
- case 'get_parent_class':
- case 'is_a':
- case 'is_subclass_of':
- case 'class_exists':
- case 'class_implements':
- case 'class_parents':
- case 'trait_exists':
- case 'defined':
- case 'interface_exists':
- case 'method_exists':
- case 'property_exists':
- case 'is_callable':
- return;
- }
-
- $props = [
- 'file' => isset($trace[$i]['file']) ? $trace[$i]['file'] : null,
- 'line' => isset($trace[$i]['line']) ? $trace[$i]['line'] : null,
- 'trace' => \array_slice($trace, 1 + $i),
- ];
-
- foreach ($props as $p => $v) {
- if (null !== $v) {
- $r = new \ReflectionProperty('Exception', $p);
- $r->setAccessible(true);
- $r->setValue($e, $v);
- }
- }
- }
-
- throw $e;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/ComposerResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/ComposerResource.php
deleted file mode 100644
index 822766b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/ComposerResource.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * ComposerResource tracks the PHP version and Composer dependencies.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @final since Symfony 4.3
- */
-class ComposerResource implements SelfCheckingResourceInterface
-{
- private $vendors;
-
- private static $runtimeVendors;
-
- public function __construct()
- {
- self::refresh();
- $this->vendors = self::$runtimeVendors;
- }
-
- public function getVendors()
- {
- return array_keys($this->vendors);
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return __CLASS__;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh($timestamp)
- {
- self::refresh();
-
- return array_values(self::$runtimeVendors) === array_values($this->vendors);
- }
-
- private static function refresh()
- {
- self::$runtimeVendors = [];
-
- foreach (get_declared_classes() as $class) {
- if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
- $r = new \ReflectionClass($class);
- $v = \dirname($r->getFileName(), 2);
- if (file_exists($v.'/composer/installed.json')) {
- self::$runtimeVendors[$v] = @filemtime($v.'/composer/installed.json');
- }
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/DirectoryResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/DirectoryResource.php
deleted file mode 100644
index 3d703db..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/DirectoryResource.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * DirectoryResource represents a resources stored in a subdirectory tree.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @final since Symfony 4.3
- */
-class DirectoryResource implements SelfCheckingResourceInterface
-{
- private $resource;
- private $pattern;
-
- /**
- * @param string $resource The file path to the resource
- * @param string|null $pattern A pattern to restrict monitored files
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(string $resource, string $pattern = null)
- {
- $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false);
- $this->pattern = $pattern;
-
- if (false === $this->resource || !is_dir($this->resource)) {
- throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $resource));
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return md5(serialize([$this->resource, $this->pattern]));
- }
-
- /**
- * @return string The file path to the resource
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * Returns the pattern to restrict monitored files.
- *
- * @return string|null
- */
- public function getPattern()
- {
- return $this->pattern;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh($timestamp)
- {
- if (!is_dir($this->resource)) {
- return false;
- }
-
- if ($timestamp < filemtime($this->resource)) {
- return false;
- }
-
- foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) {
- // if regex filtering is enabled only check matching files
- if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) {
- continue;
- }
-
- // always monitor directories for changes, except the .. entries
- // (otherwise deleted files wouldn't get detected)
- if ($file->isDir() && '/..' === substr($file, -3)) {
- continue;
- }
-
- // for broken links
- try {
- $fileMTime = $file->getMTime();
- } catch (\RuntimeException $e) {
- continue;
- }
-
- // early return if a file's mtime exceeds the passed timestamp
- if ($timestamp < $fileMTime) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/FileExistenceResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/FileExistenceResource.php
deleted file mode 100644
index 5723416..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/FileExistenceResource.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * FileExistenceResource represents a resource stored on the filesystem.
- * Freshness is only evaluated against resource creation or deletion.
- *
- * The resource can be a file or a directory.
- *
- * @author Charles-Henri Bruyand <charleshenri.bruyand@gmail.com>
- *
- * @final since Symfony 4.3
- */
-class FileExistenceResource implements SelfCheckingResourceInterface
-{
- private $resource;
-
- private $exists;
-
- /**
- * @param string $resource The file path to the resource
- */
- public function __construct(string $resource)
- {
- $this->resource = $resource;
- $this->exists = file_exists($resource);
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return $this->resource;
- }
-
- /**
- * @return string The file path to the resource
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh($timestamp)
- {
- return file_exists($this->resource) === $this->exists;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/FileResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/FileResource.php
deleted file mode 100644
index 95fe8a0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/FileResource.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * FileResource represents a resource stored on the filesystem.
- *
- * The resource can be a file or a directory.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @final since Symfony 4.3
- */
-class FileResource implements SelfCheckingResourceInterface
-{
- /**
- * @var string|false
- */
- private $resource;
-
- /**
- * @param string $resource The file path to the resource
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(string $resource)
- {
- $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false);
-
- if (false === $this->resource) {
- throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource));
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return $this->resource;
- }
-
- /**
- * @return string The canonicalized, absolute path to the resource
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh($timestamp)
- {
- return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/GlobResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/GlobResource.php
deleted file mode 100644
index 9f6e0d8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/GlobResource.php
+++ /dev/null
@@ -1,233 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-use Symfony\Component\Finder\Finder;
-use Symfony\Component\Finder\Glob;
-
-/**
- * GlobResource represents a set of resources stored on the filesystem.
- *
- * Only existence/removal is tracked (not mtimes.)
- *
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @final since Symfony 4.3
- */
-class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface
-{
- private $prefix;
- private $pattern;
- private $recursive;
- private $hash;
- private $forExclusion;
- private $excludedPrefixes;
- private $globBrace;
-
- /**
- * @param string $prefix A directory prefix
- * @param string $pattern A glob pattern
- * @param bool $recursive Whether directories should be scanned recursively or not
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(string $prefix, string $pattern, bool $recursive, bool $forExclusion = false, array $excludedPrefixes = [])
- {
- ksort($excludedPrefixes);
- $this->prefix = realpath($prefix) ?: (file_exists($prefix) ? $prefix : false);
- $this->pattern = $pattern;
- $this->recursive = $recursive;
- $this->forExclusion = $forExclusion;
- $this->excludedPrefixes = $excludedPrefixes;
- $this->globBrace = \defined('GLOB_BRACE') ? GLOB_BRACE : 0;
-
- if (false === $this->prefix) {
- throw new \InvalidArgumentException(sprintf('The path "%s" does not exist.', $prefix));
- }
- }
-
- public function getPrefix()
- {
- return $this->prefix;
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return 'glob.'.$this->prefix.(int) $this->recursive.$this->pattern.(int) $this->forExclusion.implode("\0", $this->excludedPrefixes);
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh($timestamp)
- {
- $hash = $this->computeHash();
-
- if (null === $this->hash) {
- $this->hash = $hash;
- }
-
- return $this->hash === $hash;
- }
-
- /**
- * @internal
- */
- public function __sleep(): array
- {
- if (null === $this->hash) {
- $this->hash = $this->computeHash();
- }
-
- return ['prefix', 'pattern', 'recursive', 'hash', 'forExclusion', 'excludedPrefixes'];
- }
-
- /**
- * @return \Traversable
- */
- public function getIterator()
- {
- if (!file_exists($this->prefix) || (!$this->recursive && '' === $this->pattern)) {
- return;
- }
- $prefix = str_replace('\\', '/', $this->prefix);
- $paths = null;
-
- if (0 !== strpos($this->prefix, 'phar://') && false === strpos($this->pattern, '/**/')) {
- if ($this->globBrace || false === strpos($this->pattern, '{')) {
- $paths = glob($this->prefix.$this->pattern, GLOB_NOSORT | $this->globBrace);
- } elseif (false === strpos($this->pattern, '\\') || !preg_match('/\\\\[,{}]/', $this->pattern)) {
- foreach ($this->expandGlob($this->pattern) as $p) {
- $paths[] = glob($this->prefix.$p, GLOB_NOSORT);
- }
- $paths = array_merge(...$paths);
- }
- }
-
- if (null !== $paths) {
- sort($paths);
- foreach ($paths as $path) {
- if ($this->excludedPrefixes) {
- $normalizedPath = str_replace('\\', '/', $path);
- do {
- if (isset($this->excludedPrefixes[$dirPath = $normalizedPath])) {
- continue 2;
- }
- } while ($prefix !== $dirPath && $dirPath !== $normalizedPath = \dirname($dirPath));
- }
-
- if (is_file($path)) {
- yield $path => new \SplFileInfo($path);
- }
- if (!is_dir($path)) {
- continue;
- }
- if ($this->forExclusion) {
- yield $path => new \SplFileInfo($path);
- continue;
- }
- if (!$this->recursive || isset($this->excludedPrefixes[str_replace('\\', '/', $path)])) {
- continue;
- }
- $files = iterator_to_array(new \RecursiveIteratorIterator(
- new \RecursiveCallbackFilterIterator(
- new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
- function (\SplFileInfo $file, $path) {
- return !isset($this->excludedPrefixes[str_replace('\\', '/', $path)]) && '.' !== $file->getBasename()[0];
- }
- ),
- \RecursiveIteratorIterator::LEAVES_ONLY
- ));
- uasort($files, 'strnatcmp');
-
- foreach ($files as $path => $info) {
- if ($info->isFile()) {
- yield $path => $info;
- }
- }
- }
-
- return;
- }
-
- if (!class_exists(Finder::class)) {
- throw new \LogicException(sprintf('Extended glob pattern "%s" cannot be used as the Finder component is not installed.', $this->pattern));
- }
-
- $finder = new Finder();
- $regex = Glob::toRegex($this->pattern);
- if ($this->recursive) {
- $regex = substr_replace($regex, '(/|$)', -2, 1);
- }
-
- $prefixLen = \strlen($this->prefix);
- foreach ($finder->followLinks()->sortByName()->in($this->prefix) as $path => $info) {
- $normalizedPath = str_replace('\\', '/', $path);
- if (!preg_match($regex, substr($normalizedPath, $prefixLen)) || !$info->isFile()) {
- continue;
- }
- if ($this->excludedPrefixes) {
- do {
- if (isset($this->excludedPrefixes[$dirPath = $normalizedPath])) {
- continue 2;
- }
- } while ($prefix !== $dirPath && $dirPath !== $normalizedPath = \dirname($dirPath));
- }
-
- yield $path => $info;
- }
- }
-
- private function computeHash(): string
- {
- $hash = hash_init('md5');
-
- foreach ($this->getIterator() as $path => $info) {
- hash_update($hash, $path."\n");
- }
-
- return hash_final($hash);
- }
-
- private function expandGlob(string $pattern): array
- {
- $segments = preg_split('/\{([^{}]*+)\}/', $pattern, -1, PREG_SPLIT_DELIM_CAPTURE);
- $paths = [$segments[0]];
- $patterns = [];
-
- for ($i = 1; $i < \count($segments); $i += 2) {
- $patterns = [];
-
- foreach (explode(',', $segments[$i]) as $s) {
- foreach ($paths as $p) {
- $patterns[] = $p.$s.$segments[1 + $i];
- }
- }
-
- $paths = $patterns;
- }
-
- $j = 0;
- foreach ($patterns as $i => $p) {
- if (false !== strpos($p, '{')) {
- $p = $this->expandGlob($p);
- array_splice($paths, $i + $j, 1, $p);
- $j += \count($p) - 1;
- }
- }
-
- return $paths;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/ReflectionClassResource.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/ReflectionClassResource.php
deleted file mode 100644
index 48fdcd6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/ReflectionClassResource.php
+++ /dev/null
@@ -1,221 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-use Symfony\Component\DependencyInjection\ServiceSubscriberInterface as LegacyServiceSubscriberInterface;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
-use Symfony\Contracts\Service\ServiceSubscriberInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @final since Symfony 4.3
- */
-class ReflectionClassResource implements SelfCheckingResourceInterface
-{
- private $files = [];
- private $className;
- private $classReflector;
- private $excludedVendors = [];
- private $hash;
-
- public function __construct(\ReflectionClass $classReflector, array $excludedVendors = [])
- {
- $this->className = $classReflector->name;
- $this->classReflector = $classReflector;
- $this->excludedVendors = $excludedVendors;
- }
-
- public function isFresh($timestamp)
- {
- if (null === $this->hash) {
- $this->hash = $this->computeHash();
- $this->loadFiles($this->classReflector);
- }
-
- foreach ($this->files as $file => $v) {
- if (false === $filemtime = @filemtime($file)) {
- return false;
- }
-
- if ($filemtime > $timestamp) {
- return $this->hash === $this->computeHash();
- }
- }
-
- return true;
- }
-
- public function __toString()
- {
- return 'reflection.'.$this->className;
- }
-
- /**
- * @internal
- */
- public function __sleep(): array
- {
- if (null === $this->hash) {
- $this->hash = $this->computeHash();
- $this->loadFiles($this->classReflector);
- }
-
- return ['files', 'className', 'hash'];
- }
-
- private function loadFiles(\ReflectionClass $class)
- {
- foreach ($class->getInterfaces() as $v) {
- $this->loadFiles($v);
- }
- do {
- $file = $class->getFileName();
- if (false !== $file && file_exists($file)) {
- foreach ($this->excludedVendors as $vendor) {
- if (0 === strpos($file, $vendor) && false !== strpbrk(substr($file, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) {
- $file = false;
- break;
- }
- }
- if ($file) {
- $this->files[$file] = null;
- }
- }
- foreach ($class->getTraits() as $v) {
- $this->loadFiles($v);
- }
- } while ($class = $class->getParentClass());
- }
-
- private function computeHash(): string
- {
- if (null === $this->classReflector) {
- try {
- $this->classReflector = new \ReflectionClass($this->className);
- } catch (\ReflectionException $e) {
- // the class does not exist anymore
- return false;
- }
- }
- $hash = hash_init('md5');
-
- foreach ($this->generateSignature($this->classReflector) as $info) {
- hash_update($hash, $info);
- }
-
- return hash_final($hash);
- }
-
- private function generateSignature(\ReflectionClass $class): iterable
- {
- yield $class->getDocComment();
- yield (int) $class->isFinal();
- yield (int) $class->isAbstract();
-
- if ($class->isTrait()) {
- yield print_r(class_uses($class->name), true);
- } else {
- yield print_r(class_parents($class->name), true);
- yield print_r(class_implements($class->name), true);
- yield print_r($class->getConstants(), true);
- }
-
- if (!$class->isInterface()) {
- $defaults = $class->getDefaultProperties();
-
- foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) {
- yield $p->getDocComment().$p;
- yield print_r(isset($defaults[$p->name]) && !\is_object($defaults[$p->name]) ? $defaults[$p->name] : null, true);
- }
- }
-
- foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) {
- $defaults = [];
- $parametersWithUndefinedConstants = [];
- foreach ($m->getParameters() as $p) {
- if (!$p->isDefaultValueAvailable()) {
- $defaults[$p->name] = null;
-
- continue;
- }
-
- if (!$p->isDefaultValueConstant() || \defined($p->getDefaultValueConstantName())) {
- $defaults[$p->name] = $p->getDefaultValue();
-
- continue;
- }
-
- $defaults[$p->name] = $p->getDefaultValueConstantName();
- $parametersWithUndefinedConstants[$p->name] = true;
- }
-
- if (!$parametersWithUndefinedConstants) {
- yield preg_replace('/^ @@.*/m', '', $m);
- } else {
- $stack = [
- $m->getDocComment(),
- $m->getName(),
- $m->isAbstract(),
- $m->isFinal(),
- $m->isStatic(),
- $m->isPublic(),
- $m->isPrivate(),
- $m->isProtected(),
- $m->returnsReference(),
- $m->hasReturnType() ? $m->getReturnType()->getName() : '',
- ];
-
- foreach ($m->getParameters() as $p) {
- if (!isset($parametersWithUndefinedConstants[$p->name])) {
- $stack[] = (string) $p;
- } else {
- $stack[] = $p->isOptional();
- $stack[] = $p->hasType() ? $p->getType()->getName() : '';
- $stack[] = $p->isPassedByReference();
- $stack[] = $p->isVariadic();
- $stack[] = $p->getName();
- }
- }
-
- yield implode(',', $stack);
- }
-
- yield print_r($defaults, true);
- }
-
- if ($class->isAbstract() || $class->isInterface() || $class->isTrait()) {
- return;
- }
-
- if (interface_exists(EventSubscriberInterface::class, false) && $class->isSubclassOf(EventSubscriberInterface::class)) {
- yield EventSubscriberInterface::class;
- yield print_r($class->name::getSubscribedEvents(), true);
- }
-
- if (interface_exists(MessageSubscriberInterface::class, false) && $class->isSubclassOf(MessageSubscriberInterface::class)) {
- yield MessageSubscriberInterface::class;
- foreach ($class->name::getHandledMessages() as $key => $value) {
- yield $key.print_r($value, true);
- }
- }
-
- if (interface_exists(LegacyServiceSubscriberInterface::class, false) && $class->isSubclassOf(LegacyServiceSubscriberInterface::class)) {
- yield LegacyServiceSubscriberInterface::class;
- yield print_r([$class->name, 'getSubscribedServices'](), true);
- } elseif (interface_exists(ServiceSubscriberInterface::class, false) && $class->isSubclassOf(ServiceSubscriberInterface::class)) {
- yield ServiceSubscriberInterface::class;
- yield print_r($class->name::getSubscribedServices(), true);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/ResourceInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/ResourceInterface.php
deleted file mode 100644
index d98fd42..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/ResourceInterface.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * ResourceInterface is the interface that must be implemented by all Resource classes.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface ResourceInterface
-{
- /**
- * Returns a string representation of the Resource.
- *
- * This method is necessary to allow for resource de-duplication, for example by means
- * of array_unique(). The string returned need not have a particular meaning, but has
- * to be identical for different ResourceInterface instances referring to the same
- * resource; and it should be unlikely to collide with that of other, unrelated
- * resource instances.
- *
- * @return string A string representation unique to the underlying Resource
- */
- public function __toString();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php
deleted file mode 100644
index d72203b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-use Symfony\Component\Config\ResourceCheckerInterface;
-
-/**
- * Resource checker for instances of SelfCheckingResourceInterface.
- *
- * As these resources perform the actual check themselves, we can provide
- * this class as a standard way of validating them.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-class SelfCheckingResourceChecker implements ResourceCheckerInterface
-{
- public function supports(ResourceInterface $metadata)
- {
- return $metadata instanceof SelfCheckingResourceInterface;
- }
-
- public function isFresh(ResourceInterface $resource, $timestamp)
- {
- /* @var SelfCheckingResourceInterface $resource */
- return $resource->isFresh($timestamp);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php b/srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php
deleted file mode 100644
index b3260f2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Resource;
-
-/**
- * Interface for Resources that can check for freshness autonomously,
- * without special support from external services.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-interface SelfCheckingResourceInterface extends ResourceInterface
-{
- /**
- * Returns true if the resource has not been updated since the given timestamp.
- *
- * @param int $timestamp The last time the resource was loaded
- *
- * @return bool True if the resource has not been updated, false otherwise
- */
- public function isFresh($timestamp);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCache.php b/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCache.php
deleted file mode 100644
index ac4adb7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCache.php
+++ /dev/null
@@ -1,188 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-use Symfony\Component\Config\Resource\ResourceInterface;
-use Symfony\Component\Filesystem\Exception\IOException;
-use Symfony\Component\Filesystem\Filesystem;
-
-/**
- * ResourceCheckerConfigCache uses instances of ResourceCheckerInterface
- * to check whether cached data is still fresh.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-class ResourceCheckerConfigCache implements ConfigCacheInterface
-{
- /**
- * @var string
- */
- private $file;
-
- /**
- * @var iterable|ResourceCheckerInterface[]
- */
- private $resourceCheckers;
-
- /**
- * @param string $file The absolute cache path
- * @param iterable|ResourceCheckerInterface[] $resourceCheckers The ResourceCheckers to use for the freshness check
- */
- public function __construct(string $file, iterable $resourceCheckers = [])
- {
- $this->file = $file;
- $this->resourceCheckers = $resourceCheckers;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getPath()
- {
- return $this->file;
- }
-
- /**
- * Checks if the cache is still fresh.
- *
- * This implementation will make a decision solely based on the ResourceCheckers
- * passed in the constructor.
- *
- * The first ResourceChecker that supports a given resource is considered authoritative.
- * Resources with no matching ResourceChecker will silently be ignored and considered fresh.
- *
- * @return bool true if the cache is fresh, false otherwise
- */
- public function isFresh()
- {
- if (!is_file($this->file)) {
- return false;
- }
-
- if ($this->resourceCheckers instanceof \Traversable && !$this->resourceCheckers instanceof \Countable) {
- $this->resourceCheckers = iterator_to_array($this->resourceCheckers);
- }
-
- if (!\count($this->resourceCheckers)) {
- return true; // shortcut - if we don't have any checkers we don't need to bother with the meta file at all
- }
-
- $metadata = $this->getMetaFile();
-
- if (!is_file($metadata)) {
- return false;
- }
-
- $meta = $this->safelyUnserialize($metadata);
-
- if (false === $meta) {
- return false;
- }
-
- $time = filemtime($this->file);
-
- foreach ($meta as $resource) {
- /* @var ResourceInterface $resource */
- foreach ($this->resourceCheckers as $checker) {
- if (!$checker->supports($resource)) {
- continue; // next checker
- }
- if ($checker->isFresh($resource, $time)) {
- break; // no need to further check this resource
- }
-
- return false; // cache is stale
- }
- // no suitable checker found, ignore this resource
- }
-
- return true;
- }
-
- /**
- * Writes cache.
- *
- * @param string $content The content to write in the cache
- * @param ResourceInterface[] $metadata An array of metadata
- *
- * @throws \RuntimeException When cache file can't be written
- */
- public function write($content, array $metadata = null)
- {
- $mode = 0666;
- $umask = umask();
- $filesystem = new Filesystem();
- $filesystem->dumpFile($this->file, $content);
- try {
- $filesystem->chmod($this->file, $mode, $umask);
- } catch (IOException $e) {
- // discard chmod failure (some filesystem may not support it)
- }
-
- if (null !== $metadata) {
- $filesystem->dumpFile($this->getMetaFile(), serialize($metadata));
- try {
- $filesystem->chmod($this->getMetaFile(), $mode, $umask);
- } catch (IOException $e) {
- // discard chmod failure (some filesystem may not support it)
- }
- }
-
- if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
- @opcache_invalidate($this->file, true);
- }
- }
-
- /**
- * Gets the meta file path.
- */
- private function getMetaFile(): string
- {
- return $this->file.'.meta';
- }
-
- private function safelyUnserialize(string $file)
- {
- $meta = false;
- $content = file_get_contents($file);
- $signalingException = new \UnexpectedValueException();
- $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback');
- $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) {
- if (__FILE__ === $file) {
- throw $signalingException;
- }
-
- return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false;
- });
-
- try {
- $meta = unserialize($content);
- } catch (\Throwable $e) {
- if ($e !== $signalingException) {
- throw $e;
- }
- } finally {
- restore_error_handler();
- ini_set('unserialize_callback_func', $prevUnserializeHandler);
- }
-
- return $meta;
- }
-
- /**
- * @internal
- */
- public static function handleUnserializeCallback($class)
- {
- trigger_error('Class not found: '.$class);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php b/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php
deleted file mode 100644
index 0338635..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-/**
- * A ConfigCacheFactory implementation that validates the
- * cache with an arbitrary set of ResourceCheckers.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- */
-class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface
-{
- private $resourceCheckers = [];
-
- /**
- * @param iterable|ResourceCheckerInterface[] $resourceCheckers
- */
- public function __construct(iterable $resourceCheckers = [])
- {
- $this->resourceCheckers = $resourceCheckers;
- }
-
- /**
- * {@inheritdoc}
- */
- public function cache($file, $callback)
- {
- if (!\is_callable($callback)) {
- throw new \InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', \gettype($callback)));
- }
-
- $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers);
- if (!$cache->isFresh()) {
- $callback($cache);
- }
-
- return $cache;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerInterface.php b/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerInterface.php
deleted file mode 100644
index ac0d402..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/ResourceCheckerInterface.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config;
-
-use Symfony\Component\Config\Resource\ResourceInterface;
-
-/**
- * Interface for ResourceCheckers.
- *
- * When a ResourceCheckerConfigCache instance is checked for freshness, all its associated
- * metadata resources are passed to ResourceCheckers. The ResourceCheckers
- * can then inspect the resources and decide whether the cache can be considered
- * fresh or not.
- *
- * @author Matthias Pigulla <mp@webfactory.de>
- * @author Benjamin Klotz <bk@webfactory.de>
- */
-interface ResourceCheckerInterface
-{
- /**
- * Queries the ResourceChecker whether it can validate a given
- * resource or not.
- *
- * @return bool True if the ResourceChecker can handle this resource type, false if not
- */
- public function supports(ResourceInterface $metadata);
-
- /**
- * Validates the resource.
- *
- * @param int $timestamp The timestamp at which the cache associated with this resource was created
- *
- * @return bool True if the resource has not changed since the given timestamp, false otherwise
- */
- public function isFresh(ResourceInterface $resource, $timestamp);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Util/Exception/InvalidXmlException.php b/srcs/phpmyadmin/vendor/symfony/config/Util/Exception/InvalidXmlException.php
deleted file mode 100644
index a335bbd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Util/Exception/InvalidXmlException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Util\Exception;
-
-/**
- * Exception class for when XML parsing with an XSD schema file path or a callable validator produces errors unrelated
- * to the actual XML parsing.
- *
- * @author Ole Rößner <ole@roessner.it>
- */
-class InvalidXmlException extends XmlParsingException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Util/Exception/XmlParsingException.php b/srcs/phpmyadmin/vendor/symfony/config/Util/Exception/XmlParsingException.php
deleted file mode 100644
index 9bceed6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Util/Exception/XmlParsingException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Util\Exception;
-
-/**
- * Exception class for when XML cannot be parsed properly.
- *
- * @author Ole Rößner <ole@roessner.it>
- */
-class XmlParsingException extends \InvalidArgumentException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/Util/XmlUtils.php b/srcs/phpmyadmin/vendor/symfony/config/Util/XmlUtils.php
deleted file mode 100644
index 6688d93..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/Util/XmlUtils.php
+++ /dev/null
@@ -1,269 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Config\Util;
-
-use Symfony\Component\Config\Util\Exception\InvalidXmlException;
-use Symfony\Component\Config\Util\Exception\XmlParsingException;
-
-/**
- * XMLUtils is a bunch of utility methods to XML operations.
- *
- * This class contains static methods only and is not meant to be instantiated.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Martin Hasoň <martin.hason@gmail.com>
- * @author Ole Rößner <ole@roessner.it>
- */
-class XmlUtils
-{
- /**
- * This class should not be instantiated.
- */
- private function __construct()
- {
- }
-
- /**
- * Parses an XML string.
- *
- * @param string $content An XML string
- * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation
- *
- * @return \DOMDocument
- *
- * @throws XmlParsingException When parsing of XML file returns error
- * @throws InvalidXmlException When parsing of XML with schema or callable produces any errors unrelated to the XML parsing itself
- * @throws \RuntimeException When DOM extension is missing
- */
- public static function parse($content, $schemaOrCallable = null)
- {
- if (!\extension_loaded('dom')) {
- throw new \LogicException('Extension DOM is required.');
- }
-
- $internalErrors = libxml_use_internal_errors(true);
- $disableEntities = libxml_disable_entity_loader(true);
- libxml_clear_errors();
-
- $dom = new \DOMDocument();
- $dom->validateOnParse = true;
- if (!$dom->loadXML($content, LIBXML_NONET | (\defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) {
- libxml_disable_entity_loader($disableEntities);
-
- throw new XmlParsingException(implode("\n", static::getXmlErrors($internalErrors)));
- }
-
- $dom->normalizeDocument();
-
- libxml_use_internal_errors($internalErrors);
- libxml_disable_entity_loader($disableEntities);
-
- foreach ($dom->childNodes as $child) {
- if (XML_DOCUMENT_TYPE_NODE === $child->nodeType) {
- throw new XmlParsingException('Document types are not allowed.');
- }
- }
-
- if (null !== $schemaOrCallable) {
- $internalErrors = libxml_use_internal_errors(true);
- libxml_clear_errors();
-
- $e = null;
- if (\is_callable($schemaOrCallable)) {
- try {
- $valid = $schemaOrCallable($dom, $internalErrors);
- } catch (\Exception $e) {
- $valid = false;
- }
- } elseif (!\is_array($schemaOrCallable) && is_file((string) $schemaOrCallable)) {
- $schemaSource = file_get_contents((string) $schemaOrCallable);
- $valid = @$dom->schemaValidateSource($schemaSource);
- } else {
- libxml_use_internal_errors($internalErrors);
-
- throw new XmlParsingException('The schemaOrCallable argument has to be a valid path to XSD file or callable.');
- }
-
- if (!$valid) {
- $messages = static::getXmlErrors($internalErrors);
- if (empty($messages)) {
- throw new InvalidXmlException('The XML is not valid.', 0, $e);
- }
- throw new XmlParsingException(implode("\n", $messages), 0, $e);
- }
- }
-
- libxml_clear_errors();
- libxml_use_internal_errors($internalErrors);
-
- return $dom;
- }
-
- /**
- * Loads an XML file.
- *
- * @param string $file An XML file path
- * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation
- *
- * @return \DOMDocument
- *
- * @throws \InvalidArgumentException When loading of XML file returns error
- * @throws XmlParsingException When XML parsing returns any errors
- * @throws \RuntimeException When DOM extension is missing
- */
- public static function loadFile($file, $schemaOrCallable = null)
- {
- $content = @file_get_contents($file);
- if ('' === trim($content)) {
- throw new \InvalidArgumentException(sprintf('File %s does not contain valid XML, it is empty.', $file));
- }
-
- try {
- return static::parse($content, $schemaOrCallable);
- } catch (InvalidXmlException $e) {
- throw new XmlParsingException(sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious());
- }
- }
-
- /**
- * Converts a \DOMElement object to a PHP array.
- *
- * The following rules applies during the conversion:
- *
- * * Each tag is converted to a key value or an array
- * if there is more than one "value"
- *
- * * The content of a tag is set under a "value" key (<foo>bar</foo>)
- * if the tag also has some nested tags
- *
- * * The attributes are converted to keys (<foo foo="bar"/>)
- *
- * * The nested-tags are converted to keys (<foo><foo>bar</foo></foo>)
- *
- * @param \DOMElement $element A \DOMElement instance
- * @param bool $checkPrefix Check prefix in an element or an attribute name
- *
- * @return mixed
- */
- public static function convertDomElementToArray(\DOMElement $element, $checkPrefix = true)
- {
- $prefix = (string) $element->prefix;
- $empty = true;
- $config = [];
- foreach ($element->attributes as $name => $node) {
- if ($checkPrefix && !\in_array((string) $node->prefix, ['', $prefix], true)) {
- continue;
- }
- $config[$name] = static::phpize($node->value);
- $empty = false;
- }
-
- $nodeValue = false;
- foreach ($element->childNodes as $node) {
- if ($node instanceof \DOMText) {
- if ('' !== trim($node->nodeValue)) {
- $nodeValue = trim($node->nodeValue);
- $empty = false;
- }
- } elseif ($checkPrefix && $prefix != (string) $node->prefix) {
- continue;
- } elseif (!$node instanceof \DOMComment) {
- $value = static::convertDomElementToArray($node, $checkPrefix);
-
- $key = $node->localName;
- if (isset($config[$key])) {
- if (!\is_array($config[$key]) || !\is_int(key($config[$key]))) {
- $config[$key] = [$config[$key]];
- }
- $config[$key][] = $value;
- } else {
- $config[$key] = $value;
- }
-
- $empty = false;
- }
- }
-
- if (false !== $nodeValue) {
- $value = static::phpize($nodeValue);
- if (\count($config)) {
- $config['value'] = $value;
- } else {
- $config = $value;
- }
- }
-
- return !$empty ? $config : null;
- }
-
- /**
- * Converts an xml value to a PHP type.
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public static function phpize($value)
- {
- $value = (string) $value;
- $lowercaseValue = strtolower($value);
-
- switch (true) {
- case 'null' === $lowercaseValue:
- return null;
- case ctype_digit($value):
- $raw = $value;
- $cast = (int) $value;
-
- return '0' == $value[0] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw);
- case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)):
- $raw = $value;
- $cast = (int) $value;
-
- return '0' == $value[1] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw);
- case 'true' === $lowercaseValue:
- return true;
- case 'false' === $lowercaseValue:
- return false;
- case isset($value[1]) && '0b' == $value[0].$value[1] && preg_match('/^0b[01]*$/', $value):
- return bindec($value);
- case is_numeric($value):
- return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value;
- case preg_match('/^0x[0-9a-f]++$/i', $value):
- return hexdec($value);
- case preg_match('/^[+-]?[0-9]+(\.[0-9]+)?$/', $value):
- return (float) $value;
- default:
- return $value;
- }
- }
-
- protected static function getXmlErrors($internalErrors)
- {
- $errors = [];
- foreach (libxml_get_errors() as $error) {
- $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)',
- LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR',
- $error->code,
- trim($error->message),
- $error->file ?: 'n/a',
- $error->line,
- $error->column
- );
- }
-
- libxml_clear_errors();
- libxml_use_internal_errors($internalErrors);
-
- return $errors;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/config/composer.json b/srcs/phpmyadmin/vendor/symfony/config/composer.json
deleted file mode 100644
index 78433bb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/config/composer.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "symfony/config",
- "type": "library",
- "description": "Symfony Config Component",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "symfony/filesystem": "^3.4|^4.0|^5.0",
- "symfony/polyfill-ctype": "~1.8"
- },
- "require-dev": {
- "symfony/event-dispatcher": "^3.4|^4.0|^5.0",
- "symfony/finder": "^3.4|^4.0|^5.0",
- "symfony/messenger": "^4.1|^5.0",
- "symfony/service-contracts": "^1.1|^2",
- "symfony/yaml": "^3.4|^4.0|^5.0"
- },
- "conflict": {
- "symfony/finder": "<3.4"
- },
- "suggest": {
- "symfony/yaml": "To use the yaml reference dumper"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Config\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Alias.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Alias.php
deleted file mode 100644
index 3e74fd9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Alias.php
+++ /dev/null
@@ -1,137 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-class Alias
-{
- private $id;
- private $public;
- private $private;
- private $deprecated;
- private $deprecationTemplate;
-
- private static $defaultDeprecationTemplate = 'The "%alias_id%" service alias is deprecated. You should stop using it, as it will be removed in the future.';
-
- public function __construct(string $id, bool $public = true)
- {
- $this->id = $id;
- $this->public = $public;
- $this->private = 2 > \func_num_args();
- $this->deprecated = false;
- }
-
- /**
- * Checks if this DI Alias should be public or not.
- *
- * @return bool
- */
- public function isPublic()
- {
- return $this->public;
- }
-
- /**
- * Sets if this Alias is public.
- *
- * @param bool $boolean If this Alias should be public
- *
- * @return $this
- */
- public function setPublic($boolean)
- {
- $this->public = (bool) $boolean;
- $this->private = false;
-
- return $this;
- }
-
- /**
- * Sets if this Alias is private.
- *
- * When set, the "private" state has a higher precedence than "public".
- * In version 3.4, a "private" alias always remains publicly accessible,
- * but triggers a deprecation notice when accessed from the container,
- * so that the alias can be made really private in 4.0.
- *
- * @param bool $boolean
- *
- * @return $this
- */
- public function setPrivate($boolean)
- {
- $this->private = (bool) $boolean;
-
- return $this;
- }
-
- /**
- * Whether this alias is private.
- *
- * @return bool
- */
- public function isPrivate()
- {
- return $this->private;
- }
-
- /**
- * Whether this alias is deprecated, that means it should not be referenced
- * anymore.
- *
- * @param bool $status Whether this alias is deprecated, defaults to true
- * @param string $template Optional template message to use if the alias is deprecated
- *
- * @return $this
- *
- * @throws InvalidArgumentException when the message template is invalid
- */
- public function setDeprecated($status = true, $template = null)
- {
- if (null !== $template) {
- if (preg_match('#[\r\n]|\*/#', $template)) {
- throw new InvalidArgumentException('Invalid characters found in deprecation template.');
- }
-
- if (false === strpos($template, '%alias_id%')) {
- throw new InvalidArgumentException('The deprecation template must contain the "%alias_id%" placeholder.');
- }
-
- $this->deprecationTemplate = $template;
- }
-
- $this->deprecated = (bool) $status;
-
- return $this;
- }
-
- public function isDeprecated(): bool
- {
- return $this->deprecated;
- }
-
- public function getDeprecationMessage(string $id): string
- {
- return str_replace('%alias_id%', $id, $this->deprecationTemplate ?: self::$defaultDeprecationTemplate);
- }
-
- /**
- * Returns the Id of this alias.
- *
- * @return string The alias id
- */
- public function __toString()
- {
- return $this->id;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php
deleted file mode 100644
index b46eb77..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-/**
- * Represents a complex argument containing nested values.
- *
- * @author Titouan Galopin <galopintitouan@gmail.com>
- */
-interface ArgumentInterface
-{
- /**
- * @return array
- */
- public function getValues();
-
- public function setValues(array $values);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/BoundArgument.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/BoundArgument.php
deleted file mode 100644
index 6005926..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/BoundArgument.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-/**
- * @author Guilhem Niot <guilhem.niot@gmail.com>
- */
-final class BoundArgument implements ArgumentInterface
-{
- const SERVICE_BINDING = 0;
- const DEFAULTS_BINDING = 1;
- const INSTANCEOF_BINDING = 2;
-
- private static $sequence = 0;
-
- private $value;
- private $identifier;
- private $used;
- private $type;
- private $file;
-
- public function __construct($value, bool $trackUsage = true, int $type = 0, string $file = null)
- {
- $this->value = $value;
- if ($trackUsage) {
- $this->identifier = ++self::$sequence;
- } else {
- $this->used = true;
- }
- $this->type = $type;
- $this->file = $file;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getValues(): array
- {
- return [$this->value, $this->identifier, $this->used, $this->type, $this->file];
- }
-
- /**
- * {@inheritdoc}
- */
- public function setValues(array $values)
- {
- if (5 === \count($values)) {
- list($this->value, $this->identifier, $this->used, $this->type, $this->file) = $values;
- } else {
- list($this->value, $this->identifier, $this->used) = $values;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/IteratorArgument.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
deleted file mode 100644
index d413678..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-/**
- * Represents a collection of values to lazily iterate over.
- *
- * @author Titouan Galopin <galopintitouan@gmail.com>
- */
-class IteratorArgument implements ArgumentInterface
-{
- use ReferenceSetArgumentTrait;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php
deleted file mode 100644
index 6f8d5d9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * @author Titouan Galopin <galopintitouan@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-trait ReferenceSetArgumentTrait
-{
- private $values;
-
- /**
- * @param Reference[] $values
- */
- public function __construct(array $values)
- {
- $this->setValues($values);
- }
-
- /**
- * @return Reference[] The values in the set
- */
- public function getValues()
- {
- return $this->values;
- }
-
- /**
- * @param Reference[] $values The service references to put in the set
- */
- public function setValues(array $values)
- {
- foreach ($values as $k => $v) {
- if (null !== $v && !$v instanceof Reference) {
- throw new InvalidArgumentException(sprintf('A %s must hold only Reference instances, "%s" given.', __CLASS__, \is_object($v) ? \get_class($v) : \gettype($v)));
- }
- }
-
- $this->values = $values;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
deleted file mode 100644
index 41fec78..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-/**
- * @internal
- */
-class RewindableGenerator implements \IteratorAggregate, \Countable
-{
- private $generator;
- private $count;
-
- /**
- * @param int|callable $count
- */
- public function __construct(callable $generator, $count)
- {
- $this->generator = $generator;
- $this->count = $count;
- }
-
- public function getIterator(): \Traversable
- {
- $g = $this->generator;
-
- return $g();
- }
-
- public function count(): int
- {
- if (\is_callable($count = $this->count)) {
- $this->count = $count();
- }
-
- return $this->count;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
deleted file mode 100644
index 6331aff..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Represents a service wrapped in a memoizing closure.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ServiceClosureArgument implements ArgumentInterface
-{
- private $values;
-
- public function __construct(Reference $reference)
- {
- $this->values = [$reference];
- }
-
- /**
- * {@inheritdoc}
- */
- public function getValues()
- {
- return $this->values;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setValues(array $values)
- {
- if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) {
- throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.');
- }
-
- $this->values = $values;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocator.php
deleted file mode 100644
index 2001a95..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocator.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-use Symfony\Component\DependencyInjection\ServiceLocator as BaseServiceLocator;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class ServiceLocator extends BaseServiceLocator
-{
- private $factory;
- private $serviceMap;
- private $serviceTypes;
-
- public function __construct(\Closure $factory, array $serviceMap, array $serviceTypes = null)
- {
- $this->factory = $factory;
- $this->serviceMap = $serviceMap;
- $this->serviceTypes = $serviceTypes;
- parent::__construct($serviceMap);
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($id)
- {
- return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getProvidedServices(): array
- {
- return $this->serviceTypes ?? $this->serviceTypes = array_map(function () { return '?'; }, $this->serviceMap);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php
deleted file mode 100644
index fcbf478..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Represents a closure acting as a service locator.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ServiceLocatorArgument implements ArgumentInterface
-{
- use ReferenceSetArgumentTrait;
-
- private $taggedIteratorArgument;
-
- /**
- * @param Reference[]|TaggedIteratorArgument $values
- */
- public function __construct($values = [])
- {
- if ($values instanceof TaggedIteratorArgument) {
- $this->taggedIteratorArgument = $values;
- $this->values = [];
- } else {
- $this->setValues($values);
- }
- }
-
- public function getTaggedIteratorArgument(): ?TaggedIteratorArgument
- {
- return $this->taggedIteratorArgument;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
deleted file mode 100644
index d1d5f6d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Argument;
-
-/**
- * Represents a collection of services found by tag name to lazily iterate over.
- *
- * @author Roland Franssen <franssen.roland@gmail.com>
- */
-class TaggedIteratorArgument extends IteratorArgument
-{
- private $tag;
- private $indexAttribute;
- private $defaultIndexMethod;
- private $defaultPriorityMethod;
- private $needsIndexes = false;
-
- /**
- * @param string $tag The name of the tag identifying the target services
- * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection
- * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute
- * @param bool $needsIndexes Whether indexes are required and should be generated when computing the map
- * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute
- */
- public function __construct(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null, bool $needsIndexes = false, string $defaultPriorityMethod = null)
- {
- parent::__construct([]);
-
- if (null === $indexAttribute && $needsIndexes) {
- $indexAttribute = preg_match('/[^.]++$/', $tag, $m) ? $m[0] : $tag;
- }
-
- $this->tag = $tag;
- $this->indexAttribute = $indexAttribute;
- $this->defaultIndexMethod = $defaultIndexMethod ?: ('getDefault'.str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute ?? ''))).'Name');
- $this->needsIndexes = $needsIndexes;
- $this->defaultPriorityMethod = $defaultPriorityMethod ?: ('getDefault'.str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute ?? ''))).'Priority');
- }
-
- public function getTag()
- {
- return $this->tag;
- }
-
- public function getIndexAttribute(): ?string
- {
- return $this->indexAttribute;
- }
-
- public function getDefaultIndexMethod(): ?string
- {
- return $this->defaultIndexMethod;
- }
-
- public function needsIndexes(): bool
- {
- return $this->needsIndexes;
- }
-
- public function getDefaultPriorityMethod(): ?string
- {
- return $this->defaultPriorityMethod;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/dependency-injection/CHANGELOG.md
deleted file mode 100644
index b514ce1..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/CHANGELOG.md
+++ /dev/null
@@ -1,236 +0,0 @@
-CHANGELOG
-=========
-
-4.4.0
------
-
- * added `CheckTypeDeclarationsPass` to check injected parameters type during compilation
- * added support for opcache.preload by generating a preloading script in the cache folder
- * added support for dumping the container in one file instead of many files
- * deprecated support for short factories and short configurators in Yaml
- * added `tagged_iterator` alias for `tagged` which might be deprecated in a future version
- * deprecated passing an instance of `Symfony\Component\DependencyInjection\Parameter` as class name to `Symfony\Component\DependencyInjection\Definition`
- * added support for binding iterable and tagged services
- * made singly-implemented interfaces detection be scoped by file
- * added ability to define a static priority method for tagged service
- * added support for improved syntax to define method calls in Yaml
- * made the `%env(base64:...)%` processor able to decode base64url
- * added ability to choose behavior of decorations on non existent decorated services
-
-4.3.0
------
-
- * added `%env(trim:...)%` processor to trim a string value
- * added `%env(default:param_name:...)%` processor to fallback to a parameter or to null when using `%env(default::...)%`
- * added `%env(url:...)%` processor to convert an URL or DNS into an array of components
- * added `%env(query_string:...)%` processor to convert a query string into an array of key values
- * added support for deprecating aliases
- * made `ContainerParametersResource` final and not implement `Serializable` anymore
- * added `ReverseContainer`: a container that turns services back to their ids
- * added ability to define an index for a tagged collection
- * added ability to define an index for services in an injected service locator argument
- * made `ServiceLocator` implement `ServiceProviderInterface`
- * deprecated support for non-string default env() parameters
- * added `%env(require:...)%` processor to `require()` a PHP file and use the value returned from it
-
-4.2.0
------
-
- * added `ContainerBuilder::registerAliasForArgument()` to support autowiring by type+name
- * added support for binding by type+name
- * added `ServiceSubscriberTrait` to ease implementing `ServiceSubscriberInterface` using methods' return types
- * added `ServiceLocatorArgument` and `!service_locator` config tag for creating optimized service-locators
- * added support for autoconfiguring bindings
- * added `%env(key:...)%` processor to fetch a specific key from an array
- * deprecated `ServiceSubscriberInterface`, use the same interface from the `Symfony\Contracts\Service` namespace instead
- * deprecated `ResettableContainerInterface`, use `Symfony\Contracts\Service\ResetInterface` instead
-
-4.1.0
------
-
- * added support for variadics in named arguments
- * added PSR-11 `ContainerBagInterface` and its `ContainerBag` implementation to access parameters as-a-service
- * added support for service's decorators autowiring
- * deprecated the `TypedReference::canBeAutoregistered()` and `TypedReference::getRequiringClass()` methods
- * environment variables are validated when used in extension configuration
- * deprecated support for auto-discovered extension configuration class which does not implement `ConfigurationInterface`
-
-4.0.0
------
-
- * Relying on service auto-registration while autowiring is not supported anymore.
- Explicitly inject your dependencies or create services whose ids are
- their fully-qualified class name.
-
- Before:
-
- ```php
- namespace App\Controller;
-
- use App\Mailer;
-
- class DefaultController
- {
- public function __construct(Mailer $mailer) {
- // ...
- }
-
- // ...
- }
- ```
- ```yml
- services:
- App\Controller\DefaultController:
- autowire: true
- ```
-
- After:
-
- ```php
- // same PHP code
- ```
- ```yml
- services:
- App\Controller\DefaultController:
- autowire: true
-
- # or
- # App\Controller\DefaultController:
- # arguments: { $mailer: "@App\Mailer" }
-
- App\Mailer:
- autowire: true
- ```
- * removed autowiring services based on the types they implement
- * added a third `$methodName` argument to the `getProxyFactoryCode()` method
- of the `DumperInterface`
- * removed support for autowiring types
- * removed `Container::isFrozen`
- * removed support for dumping an ucompiled container in `PhpDumper`
- * removed support for generating a dumped `Container` without populating the method map
- * removed support for case insensitive service identifiers
- * removed the `DefinitionDecorator` class, replaced by `ChildDefinition`
- * removed the `AutowireServiceResource` class and related `AutowirePass::createResourceForClass()` method
- * removed `LoggingFormatter`, `Compiler::getLoggingFormatter()` and `addLogMessage()` class and methods, use the `ContainerBuilder::log()` method instead
- * removed `FactoryReturnTypePass`
- * removed `ContainerBuilder::addClassResource()`, use the `addObjectResource()` or the `getReflectionClass()` method instead.
- * removed support for top-level anonymous services
- * removed silent behavior for unused attributes and elements
- * removed support for setting and accessing private services in `Container`
- * removed support for setting pre-defined services in `Container`
- * removed support for case insensitivity of parameter names
- * removed `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead
-
-3.4.0
------
-
- * moved the `ExtensionCompilerPass` to before-optimization passes with priority -1000
- * deprecated "public-by-default" definitions and aliases, the new default will be "private" in 4.0
- * added `EnvVarProcessorInterface` and corresponding "container.env_var_processor" tag for processing env vars
- * added support for ignore-on-uninitialized references
- * deprecated service auto-registration while autowiring
- * deprecated the ability to check for the initialization of a private service with the `Container::initialized()` method
- * deprecated support for top-level anonymous services in XML
- * deprecated case insensitivity of parameter names
- * deprecated the `ResolveDefinitionTemplatesPass` class in favor of `ResolveChildDefinitionsPass`
- * added `TaggedIteratorArgument` with YAML (`!tagged foo`) and XML (`<service type="tagged"/>`) support
- * deprecated `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead
-
-
-3.3.0
------
-
- * deprecated autowiring services based on the types they implement;
- rename (or alias) your services to their FQCN id to make them autowirable
- * added "ServiceSubscriberInterface" - to allow for per-class explicit service-locator definitions
- * added "container.service_locator" tag for defining service-locator services
- * added anonymous services support in YAML configuration files using the `!service` tag.
- * added "TypedReference" and "ServiceClosureArgument" for creating service-locator services
- * added `ServiceLocator` - a PSR-11 container holding a set of services to be lazily loaded
- * added "instanceof" section for local interface-defined configs
- * added prototype services for PSR4-based discovery and registration
- * added `ContainerBuilder::getReflectionClass()` for retrieving and tracking reflection class info
- * deprecated `ContainerBuilder::getClassResource()`, use `ContainerBuilder::getReflectionClass()` or `ContainerBuilder::addObjectResource()` instead
- * added `ContainerBuilder::fileExists()` for checking and tracking file or directory existence
- * deprecated autowiring-types, use aliases instead
- * added support for omitting the factory class name in a service definition if the definition class is set
- * deprecated case insensitivity of service identifiers
- * added "iterator" argument type for lazy iteration over a set of values and services
- * added file-wide configurable defaults for service attributes "public", "tags",
- "autowire" and "autoconfigure"
- * made the "class" attribute optional, using the "id" as fallback
- * using the `PhpDumper` with an uncompiled `ContainerBuilder` is deprecated and
- will not be supported anymore in 4.0
- * deprecated the `DefinitionDecorator` class in favor of `ChildDefinition`
- * allow config files to be loaded using a glob pattern
- * [BC BREAK] the `NullDumper` class is now final
-
-3.2.0
------
-
- * allowed to prioritize compiler passes by introducing a third argument to `PassConfig::addPass()`, to `Compiler::addPass` and to `ContainerBuilder::addCompilerPass()`
- * added support for PHP constants in YAML configuration files
- * deprecated the ability to set or unset a private service with the `Container::set()` method
- * deprecated the ability to check for the existence of a private service with the `Container::has()` method
- * deprecated the ability to request a private service with the `Container::get()` method
- * deprecated support for generating a dumped `Container` without populating the method map
-
-3.0.0
------
-
- * removed all deprecated codes from 2.x versions
-
-2.8.0
------
-
- * deprecated the abstract ContainerAware class in favor of ContainerAwareTrait
- * deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0
- * allowed specifying a directory to recursively load all configuration files it contains
- * deprecated the concept of scopes
- * added `Definition::setShared()` and `Definition::isShared()`
- * added ResettableContainerInterface to be able to reset the container to release memory on shutdown
- * added a way to define the priority of service decoration
- * added support for service autowiring
-
-2.7.0
------
-
- * deprecated synchronized services
-
-2.6.0
------
-
- * added new factory syntax and deprecated the old one
-
-2.5.0
------
-
-* added DecoratorServicePass and a way to override a service definition (Definition::setDecoratedService())
-* deprecated SimpleXMLElement class.
-
-2.4.0
------
-
- * added support for expressions in service definitions
- * added ContainerAwareTrait to add default container aware behavior to a class
-
-2.2.0
------
-
- * added Extension::isConfigEnabled() to ease working with enableable configurations
- * added an Extension base class with sensible defaults to be used in conjunction
- with the Config component.
- * added PrependExtensionInterface (to be able to allow extensions to prepend
- application configuration settings for any Bundle)
-
-2.1.0
------
-
- * added IntrospectableContainerInterface (to be able to check if a service
- has been initialized or not)
- * added ConfigurationExtensionInterface
- * added Definition::clearTag()
- * component exceptions that inherit base SPL classes are now used exclusively
- (this includes dumped containers)
- * [BC BREAK] fixed unescaping of class arguments, method
- ParameterBag::unescapeValue() was made public
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ChildDefinition.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ChildDefinition.php
deleted file mode 100644
index 7718f72..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ChildDefinition.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
-
-/**
- * This definition extends another definition.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ChildDefinition extends Definition
-{
- private $parent;
-
- /**
- * @param string $parent The id of Definition instance to decorate
- */
- public function __construct(string $parent)
- {
- $this->parent = $parent;
- $this->setPrivate(false);
- }
-
- /**
- * Returns the Definition to inherit from.
- *
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Sets the Definition to inherit from.
- *
- * @param string $parent
- *
- * @return $this
- */
- public function setParent($parent)
- {
- $this->parent = $parent;
-
- return $this;
- }
-
- /**
- * Gets an argument to pass to the service constructor/factory method.
- *
- * If replaceArgument() has been used to replace an argument, this method
- * will return the replacement value.
- *
- * @param int|string $index
- *
- * @return mixed The argument value
- *
- * @throws OutOfBoundsException When the argument does not exist
- */
- public function getArgument($index)
- {
- if (\array_key_exists('index_'.$index, $this->arguments)) {
- return $this->arguments['index_'.$index];
- }
-
- return parent::getArgument($index);
- }
-
- /**
- * You should always use this method when overwriting existing arguments
- * of the parent definition.
- *
- * If you directly call setArguments() keep in mind that you must follow
- * certain conventions when you want to overwrite the arguments of the
- * parent definition, otherwise your arguments will only be appended.
- *
- * @param int|string $index
- * @param mixed $value
- *
- * @return $this
- *
- * @throws InvalidArgumentException when $index isn't an integer
- */
- public function replaceArgument($index, $value)
- {
- if (\is_int($index)) {
- $this->arguments['index_'.$index] = $value;
- } elseif (0 === strpos($index, '$')) {
- $this->arguments[$index] = $value;
- } else {
- throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.');
- }
-
- return $this;
- }
-
- /**
- * @internal
- */
- public function setAutoconfigured($autoconfigured): self
- {
- throw new BadMethodCallException('A ChildDefinition cannot be autoconfigured.');
- }
-
- /**
- * @internal
- */
- public function setInstanceofConditionals(array $instanceof): self
- {
- throw new BadMethodCallException('A ChildDefinition cannot have instanceof conditionals set on it.');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
deleted file mode 100644
index ad3cb52..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
+++ /dev/null
@@ -1,228 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\ExpressionLanguage;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\ExpressionLanguage\Expression;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-abstract class AbstractRecursivePass implements CompilerPassInterface
-{
- /**
- * @var ContainerBuilder
- */
- protected $container;
- protected $currentId;
-
- private $processExpressions = false;
- private $expressionLanguage;
- private $inExpression = false;
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- $this->container = $container;
-
- try {
- $this->processValue($container->getDefinitions(), true);
- } finally {
- $this->container = null;
- }
- }
-
- protected function enableExpressionProcessing()
- {
- $this->processExpressions = true;
- }
-
- protected function inExpression(bool $reset = true): bool
- {
- $inExpression = $this->inExpression;
- if ($reset) {
- $this->inExpression = false;
- }
-
- return $inExpression;
- }
-
- /**
- * Processes a value found in a definition tree.
- *
- * @param mixed $value
- * @param bool $isRoot
- *
- * @return mixed The processed value
- */
- protected function processValue($value, $isRoot = false)
- {
- if (\is_array($value)) {
- foreach ($value as $k => $v) {
- if ($isRoot) {
- $this->currentId = $k;
- }
- if ($v !== $processedValue = $this->processValue($v, $isRoot)) {
- $value[$k] = $processedValue;
- }
- }
- } elseif ($value instanceof ArgumentInterface) {
- $value->setValues($this->processValue($value->getValues()));
- } elseif ($value instanceof Expression && $this->processExpressions) {
- $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
- } elseif ($value instanceof Definition) {
- $value->setArguments($this->processValue($value->getArguments()));
- $value->setProperties($this->processValue($value->getProperties()));
- $value->setMethodCalls($this->processValue($value->getMethodCalls()));
-
- $changes = $value->getChanges();
- if (isset($changes['factory'])) {
- $value->setFactory($this->processValue($value->getFactory()));
- }
- if (isset($changes['configurator'])) {
- $value->setConfigurator($this->processValue($value->getConfigurator()));
- }
- }
-
- return $value;
- }
-
- /**
- * @param bool $required
- *
- * @return \ReflectionFunctionAbstract|null
- *
- * @throws RuntimeException
- */
- protected function getConstructor(Definition $definition, $required)
- {
- if ($definition->isSynthetic()) {
- return null;
- }
-
- if (\is_string($factory = $definition->getFactory())) {
- if (!\function_exists($factory)) {
- throw new RuntimeException(sprintf('Invalid service "%s": function "%s" does not exist.', $this->currentId, $factory));
- }
- $r = new \ReflectionFunction($factory);
- if (false !== $r->getFileName() && file_exists($r->getFileName())) {
- $this->container->fileExists($r->getFileName());
- }
-
- return $r;
- }
-
- if ($factory) {
- list($class, $method) = $factory;
- if ($class instanceof Reference) {
- $class = $this->container->findDefinition((string) $class)->getClass();
- } elseif ($class instanceof Definition) {
- $class = $class->getClass();
- } elseif (null === $class) {
- $class = $definition->getClass();
- }
-
- if ('__construct' === $method) {
- throw new RuntimeException(sprintf('Invalid service "%s": "__construct()" cannot be used as a factory method.', $this->currentId));
- }
-
- return $this->getReflectionMethod(new Definition($class), $method);
- }
-
- $class = $definition->getClass();
-
- try {
- if (!$r = $this->container->getReflectionClass($class)) {
- throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
- }
- } catch (\ReflectionException $e) {
- throw new RuntimeException(sprintf('Invalid service "%s": %s.', $this->currentId, lcfirst(rtrim($e->getMessage(), '.'))));
- }
- if (!$r = $r->getConstructor()) {
- if ($required) {
- throw new RuntimeException(sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, sprintf($class !== $this->currentId ? ' "%s"' : '', $class)));
- }
- } elseif (!$r->isPublic()) {
- throw new RuntimeException(sprintf('Invalid service "%s": %s must be public.', $this->currentId, sprintf($class !== $this->currentId ? 'constructor of class "%s"' : 'its constructor', $class)));
- }
-
- return $r;
- }
-
- /**
- * @param string $method
- *
- * @throws RuntimeException
- *
- * @return \ReflectionFunctionAbstract
- */
- protected function getReflectionMethod(Definition $definition, $method)
- {
- if ('__construct' === $method) {
- return $this->getConstructor($definition, true);
- }
-
- if (!$class = $definition->getClass()) {
- throw new RuntimeException(sprintf('Invalid service "%s": the class is not set.', $this->currentId));
- }
-
- if (!$r = $this->container->getReflectionClass($class)) {
- throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
- }
-
- if (!$r->hasMethod($method)) {
- throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" does not exist.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method));
- }
-
- $r = $r->getMethod($method);
- if (!$r->isPublic()) {
- throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" must be public.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method));
- }
-
- return $r;
- }
-
- private function getExpressionLanguage(): ExpressionLanguage
- {
- if (null === $this->expressionLanguage) {
- if (!class_exists(ExpressionLanguage::class)) {
- throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
- }
-
- $providers = $this->container->getExpressionLanguageProviders();
- $this->expressionLanguage = new ExpressionLanguage(null, $providers, function (string $arg): string {
- if ('""' === substr_replace($arg, '', 1, -1)) {
- $id = stripcslashes(substr($arg, 1, -1));
- $this->inExpression = true;
- $arg = $this->processValue(new Reference($id));
- $this->inExpression = false;
- if (!$arg instanceof Reference) {
- throw new RuntimeException(sprintf('"%s::processValue()" must return a Reference when processing an expression, %s returned for service("%s").', \get_class($this), \is_object($arg) ? \get_class($arg) : \gettype($arg), $id));
- }
- $arg = sprintf('"%s"', $arg);
- }
-
- return sprintf('$this->get(%s)', $arg);
- });
- }
-
- return $this->expressionLanguage;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
deleted file mode 100644
index 59a27ae..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Run this pass before passes that need to know more about the relation of
- * your services.
- *
- * This class will populate the ServiceReferenceGraph with information. You can
- * retrieve the graph in other passes from the compiler.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements RepeatablePassInterface
-{
- private $graph;
- private $currentDefinition;
- private $onlyConstructorArguments;
- private $hasProxyDumper;
- private $lazy;
- private $byConstructor;
- private $definitions;
- private $aliases;
-
- /**
- * @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls
- */
- public function __construct(bool $onlyConstructorArguments = false, bool $hasProxyDumper = true)
- {
- $this->onlyConstructorArguments = $onlyConstructorArguments;
- $this->hasProxyDumper = $hasProxyDumper;
- $this->enableExpressionProcessing();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setRepeatedPass(RepeatedPass $repeatedPass)
- {
- @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
- }
-
- /**
- * Processes a ContainerBuilder object to populate the service reference graph.
- */
- public function process(ContainerBuilder $container)
- {
- $this->container = $container;
- $this->graph = $container->getCompiler()->getServiceReferenceGraph();
- $this->graph->clear();
- $this->lazy = false;
- $this->byConstructor = false;
- $this->definitions = $container->getDefinitions();
- $this->aliases = $container->getAliases();
-
- foreach ($this->aliases as $id => $alias) {
- $targetId = $this->getDefinitionId((string) $alias);
- $this->graph->connect($id, $alias, $targetId, null !== $targetId ? $this->container->getDefinition($targetId) : null, null);
- }
-
- try {
- parent::process($container);
- } finally {
- $this->aliases = $this->definitions = [];
- }
- }
-
- protected function processValue($value, $isRoot = false)
- {
- $lazy = $this->lazy;
- $inExpression = $this->inExpression();
-
- if ($value instanceof ArgumentInterface) {
- $this->lazy = true;
- parent::processValue($value->getValues());
- $this->lazy = $lazy;
-
- return $value;
- }
- if ($value instanceof Reference) {
- $targetId = $this->getDefinitionId((string) $value);
- $targetDefinition = null !== $targetId ? $this->container->getDefinition($targetId) : null;
-
- $this->graph->connect(
- $this->currentId,
- $this->currentDefinition,
- $targetId,
- $targetDefinition,
- $value,
- $this->lazy || ($this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy()),
- ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(),
- $this->byConstructor
- );
-
- if ($inExpression) {
- $this->graph->connect(
- '.internal.reference_in_expression',
- null,
- $targetId,
- $targetDefinition,
- $value,
- $this->lazy || ($targetDefinition && $targetDefinition->isLazy()),
- true
- );
- }
-
- return $value;
- }
- if (!$value instanceof Definition) {
- return parent::processValue($value, $isRoot);
- }
- if ($isRoot) {
- if ($value->isSynthetic() || $value->isAbstract()) {
- return $value;
- }
- $this->currentDefinition = $value;
- } elseif ($this->currentDefinition === $value) {
- return $value;
- }
- $this->lazy = false;
-
- $byConstructor = $this->byConstructor;
- $this->byConstructor = $isRoot || $byConstructor;
- $this->processValue($value->getFactory());
- $this->processValue($value->getArguments());
-
- $properties = $value->getProperties();
- $setters = $value->getMethodCalls();
-
- // Any references before a "wither" are part of the constructor-instantiation graph
- $lastWitherIndex = null;
- foreach ($setters as $k => $call) {
- if ($call[2] ?? false) {
- $lastWitherIndex = $k;
- }
- }
-
- if (null !== $lastWitherIndex) {
- $this->processValue($properties);
- $setters = $properties = [];
-
- foreach ($value->getMethodCalls() as $k => $call) {
- if (null === $lastWitherIndex) {
- $setters[] = $call;
- continue;
- }
-
- if ($lastWitherIndex === $k) {
- $lastWitherIndex = null;
- }
-
- $this->processValue($call);
- }
- }
-
- $this->byConstructor = $byConstructor;
-
- if (!$this->onlyConstructorArguments) {
- $this->processValue($properties);
- $this->processValue($setters);
- $this->processValue($value->getConfigurator());
- }
- $this->lazy = $lazy;
-
- return $value;
- }
-
- private function getDefinitionId(string $id): ?string
- {
- while (isset($this->aliases[$id])) {
- $id = (string) $this->aliases[$id];
- }
-
- return isset($this->definitions[$id]) ? $id : null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
deleted file mode 100644
index 0342068..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * Sets a service to be an alias of another one, given a format pattern.
- */
-class AutoAliasServicePass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) {
- foreach ($tags as $tag) {
- if (!isset($tag['format'])) {
- throw new InvalidArgumentException(sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId));
- }
-
- $aliasId = $container->getParameterBag()->resolveValue($tag['format']);
- if ($container->hasDefinition($aliasId) || $container->hasAlias($aliasId)) {
- $container->setAlias($serviceId, new Alias($aliasId, true));
- }
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
deleted file mode 100644
index 8d46fd6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
+++ /dev/null
@@ -1,475 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\Config\Resource\ClassExistenceResource;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\AutowiringFailedException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
-use Symfony\Component\DependencyInjection\TypedReference;
-
-/**
- * Inspects existing service definitions and wires the autowired ones using the type hints of their classes.
- *
- * @author Kévin Dunglas <dunglas@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class AutowirePass extends AbstractRecursivePass
-{
- private $types;
- private $ambiguousServiceTypes;
- private $lastFailure;
- private $throwOnAutowiringException;
- private $decoratedClass;
- private $decoratedId;
- private $methodCalls;
- private $getPreviousValue;
- private $decoratedMethodIndex;
- private $decoratedMethodArgumentIndex;
- private $typesClone;
-
- public function __construct(bool $throwOnAutowireException = true)
- {
- $this->throwOnAutowiringException = $throwOnAutowireException;
- }
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- try {
- $this->typesClone = clone $this;
- parent::process($container);
- } finally {
- $this->decoratedClass = null;
- $this->decoratedId = null;
- $this->methodCalls = null;
- $this->getPreviousValue = null;
- $this->decoratedMethodIndex = null;
- $this->decoratedMethodArgumentIndex = null;
- $this->typesClone = null;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- try {
- return $this->doProcessValue($value, $isRoot);
- } catch (AutowiringFailedException $e) {
- if ($this->throwOnAutowiringException) {
- throw $e;
- }
-
- $this->container->getDefinition($this->currentId)->addError($e->getMessageCallback() ?? $e->getMessage());
-
- return parent::processValue($value, $isRoot);
- }
- }
-
- /**
- * @return mixed
- */
- private function doProcessValue($value, bool $isRoot = false)
- {
- if ($value instanceof TypedReference) {
- if ($ref = $this->getAutowiredReference($value)) {
- return $ref;
- }
- if (ContainerBuilder::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
- $message = $this->createTypeNotFoundMessageCallback($value, 'it');
-
- // since the error message varies by referenced id and $this->currentId, so should the id of the dummy errored definition
- $this->container->register($id = sprintf('.errored.%s.%s', $this->currentId, (string) $value), $value->getType())
- ->addError($message);
-
- return new TypedReference($id, $value->getType(), $value->getInvalidBehavior(), $value->getName());
- }
- }
- $value = parent::processValue($value, $isRoot);
-
- if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
- return $value;
- }
- if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) {
- $this->container->log($this, sprintf('Skipping service "%s": Class or interface "%s" cannot be loaded.', $this->currentId, $value->getClass()));
-
- return $value;
- }
-
- $this->methodCalls = $value->getMethodCalls();
-
- try {
- $constructor = $this->getConstructor($value, false);
- } catch (RuntimeException $e) {
- throw new AutowiringFailedException($this->currentId, $e->getMessage(), 0, $e);
- }
-
- if ($constructor) {
- array_unshift($this->methodCalls, [$constructor, $value->getArguments()]);
- }
-
- $this->methodCalls = $this->autowireCalls($reflectionClass, $isRoot);
-
- if ($constructor) {
- list(, $arguments) = array_shift($this->methodCalls);
-
- if ($arguments !== $value->getArguments()) {
- $value->setArguments($arguments);
- }
- }
-
- if ($this->methodCalls !== $value->getMethodCalls()) {
- $value->setMethodCalls($this->methodCalls);
- }
-
- return $value;
- }
-
- private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot): array
- {
- $this->decoratedId = null;
- $this->decoratedClass = null;
- $this->getPreviousValue = null;
-
- if ($isRoot && ($definition = $this->container->getDefinition($this->currentId)) && $this->container->has($this->decoratedId = $definition->innerServiceId)) {
- $this->decoratedClass = $this->container->findDefinition($this->decoratedId)->getClass();
- }
-
- foreach ($this->methodCalls as $i => $call) {
- $this->decoratedMethodIndex = $i;
- list($method, $arguments) = $call;
-
- if ($method instanceof \ReflectionFunctionAbstract) {
- $reflectionMethod = $method;
- } else {
- $definition = new Definition($reflectionClass->name);
- try {
- $reflectionMethod = $this->getReflectionMethod($definition, $method);
- } catch (RuntimeException $e) {
- if ($definition->getFactory()) {
- continue;
- }
- throw $e;
- }
- }
-
- $arguments = $this->autowireMethod($reflectionMethod, $arguments);
-
- if ($arguments !== $call[1]) {
- $this->methodCalls[$i][1] = $arguments;
- }
- }
-
- return $this->methodCalls;
- }
-
- /**
- * Autowires the constructor or a method.
- *
- * @return array The autowired arguments
- *
- * @throws AutowiringFailedException
- */
- private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments): array
- {
- $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId;
- $method = $reflectionMethod->name;
- $parameters = $reflectionMethod->getParameters();
- if ($reflectionMethod->isVariadic()) {
- array_pop($parameters);
- }
-
- foreach ($parameters as $index => $parameter) {
- if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) {
- continue;
- }
-
- $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true);
-
- if (!$type) {
- if (isset($arguments[$index])) {
- continue;
- }
-
- // no default value? Then fail
- if (!$parameter->isDefaultValueAvailable()) {
- // For core classes, isDefaultValueAvailable() can
- // be false when isOptional() returns true. If the
- // argument *is* optional, allow it to be missing
- if ($parameter->isOptional()) {
- continue;
- }
- $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, false);
- $type = $type ? sprintf('is type-hinted "%s"', ltrim($type, '\\')) : 'has no type-hint';
-
- throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type));
- }
-
- // specifically pass the default value
- $arguments[$index] = $parameter->getDefaultValue();
-
- continue;
- }
-
- $getValue = function () use ($type, $parameter, $class, $method) {
- if (!$value = $this->getAutowiredReference($ref = new TypedReference($type, $type, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $parameter->name))) {
- $failureMessage = $this->createTypeNotFoundMessageCallback($ref, sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method));
-
- if ($parameter->isDefaultValueAvailable()) {
- $value = $parameter->getDefaultValue();
- } elseif (!$parameter->allowsNull()) {
- throw new AutowiringFailedException($this->currentId, $failureMessage);
- }
- }
-
- return $value;
- };
-
- if ($this->decoratedClass && $isDecorated = is_a($this->decoratedClass, $type, true)) {
- if ($this->getPreviousValue) {
- // The inner service is injected only if there is only 1 argument matching the type of the decorated class
- // across all arguments of all autowired methods.
- // If a second matching argument is found, the default behavior is restored.
-
- $getPreviousValue = $this->getPreviousValue;
- $this->methodCalls[$this->decoratedMethodIndex][1][$this->decoratedMethodArgumentIndex] = $getPreviousValue();
- $this->decoratedClass = null; // Prevent further checks
- } else {
- $arguments[$index] = new TypedReference($this->decoratedId, $this->decoratedClass);
- $this->getPreviousValue = $getValue;
- $this->decoratedMethodArgumentIndex = $index;
-
- continue;
- }
- }
-
- $arguments[$index] = $getValue();
- }
-
- if ($parameters && !isset($arguments[++$index])) {
- while (0 <= --$index) {
- $parameter = $parameters[$index];
- if (!$parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() !== $arguments[$index]) {
- break;
- }
- unset($arguments[$index]);
- }
- }
-
- // it's possible index 1 was set, then index 0, then 2, etc
- // make sure that we re-order so they're injected as expected
- ksort($arguments);
-
- return $arguments;
- }
-
- /**
- * Returns a reference to the service matching the given type, if any.
- */
- private function getAutowiredReference(TypedReference $reference): ?TypedReference
- {
- $this->lastFailure = null;
- $type = $reference->getType();
-
- if ($type !== (string) $reference) {
- return $reference;
- }
-
- if (null !== $name = $reference->getName()) {
- if ($this->container->has($alias = $type.' $'.$name) && !$this->container->findDefinition($alias)->isAbstract()) {
- return new TypedReference($alias, $type, $reference->getInvalidBehavior());
- }
-
- if ($this->container->has($name) && !$this->container->findDefinition($name)->isAbstract()) {
- foreach ($this->container->getAliases() as $id => $alias) {
- if ($name === (string) $alias && 0 === strpos($id, $type.' $')) {
- return new TypedReference($name, $type, $reference->getInvalidBehavior());
- }
- }
- }
- }
-
- if ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract()) {
- return new TypedReference($type, $type, $reference->getInvalidBehavior());
- }
-
- return null;
- }
-
- /**
- * Populates the list of available types.
- */
- private function populateAvailableTypes(ContainerBuilder $container)
- {
- $this->types = [];
- $this->ambiguousServiceTypes = [];
-
- foreach ($container->getDefinitions() as $id => $definition) {
- $this->populateAvailableType($container, $id, $definition);
- }
- }
-
- /**
- * Populates the list of available types for a given definition.
- */
- private function populateAvailableType(ContainerBuilder $container, string $id, Definition $definition)
- {
- // Never use abstract services
- if ($definition->isAbstract()) {
- return;
- }
-
- if ('' === $id || '.' === $id[0] || $definition->isDeprecated() || !$reflectionClass = $container->getReflectionClass($definition->getClass(), false)) {
- return;
- }
-
- foreach ($reflectionClass->getInterfaces() as $reflectionInterface) {
- $this->set($reflectionInterface->name, $id);
- }
-
- do {
- $this->set($reflectionClass->name, $id);
- } while ($reflectionClass = $reflectionClass->getParentClass());
- }
-
- /**
- * Associates a type and a service id if applicable.
- */
- private function set(string $type, string $id)
- {
- // is this already a type/class that is known to match multiple services?
- if (isset($this->ambiguousServiceTypes[$type])) {
- $this->ambiguousServiceTypes[$type][] = $id;
-
- return;
- }
-
- // check to make sure the type doesn't match multiple services
- if (!isset($this->types[$type]) || $this->types[$type] === $id) {
- $this->types[$type] = $id;
-
- return;
- }
-
- // keep an array of all services matching this type
- if (!isset($this->ambiguousServiceTypes[$type])) {
- $this->ambiguousServiceTypes[$type] = [$this->types[$type]];
- unset($this->types[$type]);
- }
- $this->ambiguousServiceTypes[$type][] = $id;
- }
-
- private function createTypeNotFoundMessageCallback(TypedReference $reference, string $label): callable
- {
- if (null === $this->typesClone->container) {
- $this->typesClone->container = new ContainerBuilder($this->container->getParameterBag());
- $this->typesClone->container->setAliases($this->container->getAliases());
- $this->typesClone->container->setDefinitions($this->container->getDefinitions());
- $this->typesClone->container->setResourceTracking(false);
- }
- $currentId = $this->currentId;
-
- return (function () use ($reference, $label, $currentId) {
- return $this->createTypeNotFoundMessage($reference, $label, $currentId);
- })->bindTo($this->typesClone);
- }
-
- private function createTypeNotFoundMessage(TypedReference $reference, string $label, string $currentId): string
- {
- if (!$r = $this->container->getReflectionClass($type = $reference->getType(), false)) {
- // either $type does not exist or a parent class does not exist
- try {
- $resource = new ClassExistenceResource($type, false);
- // isFresh() will explode ONLY if a parent class/trait does not exist
- $resource->isFresh(0);
- $parentMsg = false;
- } catch (\ReflectionException $e) {
- $parentMsg = $e->getMessage();
- }
-
- $message = sprintf('has type "%s" but this class %s.', $type, $parentMsg ? sprintf('is missing a parent class (%s)', $parentMsg) : 'was not found');
- } else {
- $alternatives = $this->createTypeAlternatives($this->container, $reference);
- $message = $this->container->has($type) ? 'this service is abstract' : 'no such service exists';
- $message = sprintf('references %s "%s" but %s.%s', $r->isInterface() ? 'interface' : 'class', $type, $message, $alternatives);
-
- if ($r->isInterface() && !$alternatives) {
- $message .= ' Did you create a class that implements this interface?';
- }
- }
-
- $message = sprintf('Cannot autowire service "%s": %s %s', $currentId, $label, $message);
-
- if (null !== $this->lastFailure) {
- $message = $this->lastFailure."\n".$message;
- $this->lastFailure = null;
- }
-
- return $message;
- }
-
- private function createTypeAlternatives(ContainerBuilder $container, TypedReference $reference): string
- {
- // try suggesting available aliases first
- if ($message = $this->getAliasesSuggestionForType($container, $type = $reference->getType())) {
- return ' '.$message;
- }
- if (null === $this->ambiguousServiceTypes) {
- $this->populateAvailableTypes($container);
- }
-
- $servicesAndAliases = $container->getServiceIds();
- if (!$container->has($type) && false !== $key = array_search(strtolower($type), array_map('strtolower', $servicesAndAliases))) {
- return sprintf(' Did you mean "%s"?', $servicesAndAliases[$key]);
- } elseif (isset($this->ambiguousServiceTypes[$type])) {
- $message = sprintf('one of these existing services: "%s"', implode('", "', $this->ambiguousServiceTypes[$type]));
- } elseif (isset($this->types[$type])) {
- $message = sprintf('the existing "%s" service', $this->types[$type]);
- } else {
- return '';
- }
-
- return sprintf(' You should maybe alias this %s to %s.', class_exists($type, false) ? 'class' : 'interface', $message);
- }
-
- private function getAliasesSuggestionForType(ContainerBuilder $container, string $type): ?string
- {
- $aliases = [];
- foreach (class_parents($type) + class_implements($type) as $parent) {
- if ($container->has($parent) && !$container->findDefinition($parent)->isAbstract()) {
- $aliases[] = $parent;
- }
- }
-
- if (1 < $len = \count($aliases)) {
- $message = 'Try changing the type-hint to one of its parents: ';
- for ($i = 0, --$len; $i < $len; ++$i) {
- $message .= sprintf('%s "%s", ', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]);
- }
- $message .= sprintf('or %s "%s".', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]);
-
- return $message;
- }
-
- if ($aliases) {
- return sprintf('Try changing the type-hint to "%s" instead.', $aliases[0]);
- }
-
- return null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
deleted file mode 100644
index 20d3113..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * Looks for definitions with autowiring enabled and registers their corresponding "@required" methods as setters.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class AutowireRequiredMethodsPass extends AbstractRecursivePass
-{
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- $value = parent::processValue($value, $isRoot);
-
- if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
- return $value;
- }
- if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) {
- return $value;
- }
-
- $alreadyCalledMethods = [];
- $withers = [];
-
- foreach ($value->getMethodCalls() as list($method)) {
- $alreadyCalledMethods[strtolower($method)] = true;
- }
-
- foreach ($reflectionClass->getMethods() as $reflectionMethod) {
- $r = $reflectionMethod;
-
- if ($r->isConstructor() || isset($alreadyCalledMethods[strtolower($r->name)])) {
- continue;
- }
-
- while (true) {
- if (false !== $doc = $r->getDocComment()) {
- if (false !== stripos($doc, '@required') && preg_match('#(?:^/\*\*|\n\s*+\*)\s*+@required(?:\s|\*/$)#i', $doc)) {
- if (preg_match('#(?:^/\*\*|\n\s*+\*)\s*+@return\s++static[\s\*]#i', $doc)) {
- $withers[] = [$reflectionMethod->name, [], true];
- } else {
- $value->addMethodCall($reflectionMethod->name, []);
- }
- break;
- }
- if (false === stripos($doc, '@inheritdoc') || !preg_match('#(?:^/\*\*|\n\s*+\*)\s*+(?:\{@inheritdoc\}|@inheritdoc)(?:\s|\*/$)#i', $doc)) {
- break;
- }
- }
- try {
- $r = $r->getPrototype();
- } catch (\ReflectionException $e) {
- break; // method has no prototype
- }
- }
- }
-
- if ($withers) {
- // Prepend withers to prevent creating circular loops
- $setters = $value->getMethodCalls();
- $value->setMethodCalls($withers);
- foreach ($setters as $call) {
- $value->addMethodCall($call[0], $call[1], $call[2] ?? false);
- }
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
deleted file mode 100644
index d289c05..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * Checks if arguments of methods are properly configured.
- *
- * @author Kévin Dunglas <dunglas@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class CheckArgumentsValidityPass extends AbstractRecursivePass
-{
- private $throwExceptions;
-
- public function __construct(bool $throwExceptions = true)
- {
- $this->throwExceptions = $throwExceptions;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Definition) {
- return parent::processValue($value, $isRoot);
- }
-
- $i = 0;
- foreach ($value->getArguments() as $k => $v) {
- if ($k !== $i++) {
- if (!\is_int($k)) {
- $msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k);
- $value->addError($msg);
- if ($this->throwExceptions) {
- throw new RuntimeException($msg);
- }
-
- break;
- }
-
- $msg = sprintf('Invalid constructor argument %d for service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $this->currentId, $i);
- $value->addError($msg);
- if ($this->throwExceptions) {
- throw new RuntimeException($msg);
- }
- }
- }
-
- foreach ($value->getMethodCalls() as $methodCall) {
- $i = 0;
- foreach ($methodCall[1] as $k => $v) {
- if ($k !== $i++) {
- if (!\is_int($k)) {
- $msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k);
- $value->addError($msg);
- if ($this->throwExceptions) {
- throw new RuntimeException($msg);
- }
-
- break;
- }
-
- $msg = sprintf('Invalid argument %d for method call "%s" of service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $methodCall[0], $this->currentId, $i);
- $value->addError($msg);
- if ($this->throwExceptions) {
- throw new RuntimeException($msg);
- }
- }
- }
- }
-
- return null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
deleted file mode 100644
index 55d911c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-
-/**
- * Checks your services for circular references.
- *
- * References from method calls are ignored since we might be able to resolve
- * these references depending on the order in which services are called.
- *
- * Circular reference from method calls will only be detected at run-time.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class CheckCircularReferencesPass implements CompilerPassInterface
-{
- private $currentPath;
- private $checkedNodes;
-
- /**
- * Checks the ContainerBuilder object for circular references.
- */
- public function process(ContainerBuilder $container)
- {
- $graph = $container->getCompiler()->getServiceReferenceGraph();
-
- $this->checkedNodes = [];
- foreach ($graph->getNodes() as $id => $node) {
- $this->currentPath = [$id];
-
- $this->checkOutEdges($node->getOutEdges());
- }
- }
-
- /**
- * Checks for circular references.
- *
- * @param ServiceReferenceGraphEdge[] $edges An array of Edges
- *
- * @throws ServiceCircularReferenceException when a circular reference is found
- */
- private function checkOutEdges(array $edges)
- {
- foreach ($edges as $edge) {
- $node = $edge->getDestNode();
- $id = $node->getId();
-
- if (empty($this->checkedNodes[$id])) {
- // Don't check circular references for lazy edges
- if (!$node->getValue() || (!$edge->isLazy() && !$edge->isWeak())) {
- $searchKey = array_search($id, $this->currentPath);
- $this->currentPath[] = $id;
-
- if (false !== $searchKey) {
- throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey));
- }
-
- $this->checkOutEdges($node->getOutEdges());
- }
-
- $this->checkedNodes[$id] = true;
- array_pop($this->currentPath);
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
deleted file mode 100644
index bb87f47..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Loader\FileLoader;
-
-/**
- * This pass validates each definition individually only taking the information
- * into account which is contained in the definition itself.
- *
- * Later passes can rely on the following, and specifically do not need to
- * perform these checks themselves:
- *
- * - non synthetic, non abstract services always have a class set
- * - synthetic services are always public
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class CheckDefinitionValidityPass implements CompilerPassInterface
-{
- /**
- * Processes the ContainerBuilder to validate the Definition.
- *
- * @throws RuntimeException When the Definition is invalid
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getDefinitions() as $id => $definition) {
- // synthetic service is public
- if ($definition->isSynthetic() && !$definition->isPublic()) {
- throw new RuntimeException(sprintf('A synthetic service ("%s") must be public.', $id));
- }
-
- // non-synthetic, non-abstract service has class
- if (!$definition->isAbstract() && !$definition->isSynthetic() && !$definition->getClass() && (!$definition->getFactory() || !preg_match(FileLoader::ANONYMOUS_ID_REGEXP, $id))) {
- if ($definition->getFactory()) {
- throw new RuntimeException(sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id));
- }
- if (class_exists($id) || interface_exists($id, false)) {
- if (0 === strpos($id, '\\') && 1 < substr_count($id, '\\')) {
- throw new RuntimeException(sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface. Please specify the class attribute explicitly or remove the leading backslash by renaming the service to "%s" to get rid of this error.', $id, substr($id, 1)));
- }
-
- throw new RuntimeException(sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface in the global namespace. Leaving out the "class" attribute is only allowed for namespaced classes. Please specify the class attribute explicitly to get rid of this error.', $id));
- }
-
- throw new RuntimeException(sprintf('The definition for "%s" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.', $id));
- }
-
- // tag attribute values must be scalars
- foreach ($definition->getTags() as $name => $tags) {
- foreach ($tags as $attributes) {
- foreach ($attributes as $attribute => $value) {
- if (!is_scalar($value) && null !== $value) {
- throw new RuntimeException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute));
- }
- }
- }
- }
-
- if ($definition->isPublic() && !$definition->isPrivate()) {
- $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
- if (null !== $usedEnvs) {
- throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.');
- }
- }
- }
-
- foreach ($container->getAliases() as $id => $alias) {
- if ($alias->isPublic() && !$alias->isPrivate()) {
- $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
- if (null !== $usedEnvs) {
- throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.');
- }
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
deleted file mode 100644
index eef7158..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Checks that all references are pointing to a valid service.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
-{
- private $serviceLocatorContextIds = [];
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- $this->serviceLocatorContextIds = [];
- foreach ($container->findTaggedServiceIds('container.service_locator_context') as $id => $tags) {
- $this->serviceLocatorContextIds[$id] = $tags[0]['id'];
- $container->getDefinition($id)->clearTag('container.service_locator_context');
- }
-
- try {
- return parent::process($container);
- } finally {
- $this->serviceLocatorContextIds = [];
- }
- }
-
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Reference) {
- return parent::processValue($value, $isRoot);
- }
- if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $value->getInvalidBehavior() || $this->container->has($id = (string) $value)) {
- return $value;
- }
-
- $currentId = $this->currentId;
- $graph = $this->container->getCompiler()->getServiceReferenceGraph();
-
- if (isset($this->serviceLocatorContextIds[$currentId])) {
- $currentId = $this->serviceLocatorContextIds[$currentId];
- $locator = $this->container->getDefinition($this->currentId)->getFactory()[0];
-
- foreach ($locator->getArgument(0) as $k => $v) {
- if ($v->getValues()[0] === $value) {
- if ($k !== $id) {
- $currentId = $k.'" in the container provided to "'.$currentId;
- }
- throw new ServiceNotFoundException($id, $currentId);
- }
- }
- }
-
- if ('.' === $currentId[0] && $graph->hasNode($currentId)) {
- foreach ($graph->getNode($currentId)->getInEdges() as $edge) {
- if (!$edge->getValue() instanceof Reference || ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $edge->getValue()->getInvalidBehavior()) {
- continue;
- }
- $sourceId = $edge->getSourceNode()->getId();
-
- if ('.' !== $sourceId[0]) {
- $currentId = $sourceId;
- break;
- }
- }
- }
-
- throw new ServiceNotFoundException($id, $currentId);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
deleted file mode 100644
index 8f2a3bd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Checks the validity of references.
- *
- * The following checks are performed by this pass:
- * - target definitions are not abstract
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class CheckReferenceValidityPass extends AbstractRecursivePass
-{
- protected function processValue($value, $isRoot = false)
- {
- if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) {
- return $value;
- }
- if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) {
- $targetDefinition = $this->container->getDefinition((string) $value);
-
- if ($targetDefinition->isAbstract()) {
- throw new RuntimeException(sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $value));
- }
- }
-
- return parent::processValue($value, $isRoot);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php
deleted file mode 100644
index 0743cbb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php
+++ /dev/null
@@ -1,245 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\InvalidParameterTypeException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\ExpressionLanguage;
-use Symfony\Component\DependencyInjection\Parameter;
-use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\ServiceLocator;
-use Symfony\Component\ExpressionLanguage\Expression;
-
-/**
- * Checks whether injected parameters are compatible with type declarations.
- *
- * This pass should be run after all optimization passes.
- *
- * It can be added either:
- * * before removing passes to check all services even if they are not currently used,
- * * after removing passes to check only services are used in the app.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author Julien Maulny <jmaulny@darkmira.fr>
- */
-final class CheckTypeDeclarationsPass extends AbstractRecursivePass
-{
- private const SCALAR_TYPES = ['int', 'float', 'bool', 'string'];
-
- private $autoload;
- private $skippedIds;
-
- private $expressionLanguage;
-
- /**
- * @param bool $autoload Whether services who's class in not loaded should be checked or not.
- * Defaults to false to save loading code during compilation.
- * @param array $skippedIds An array indexed by the service ids to skip
- */
- public function __construct(bool $autoload = false, array $skippedIds = [])
- {
- $this->autoload = $autoload;
- $this->skippedIds = $skippedIds;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (isset($this->skippedIds[$this->currentId])) {
- return $value;
- }
-
- if (!$value instanceof Definition || $value->hasErrors()) {
- return parent::processValue($value, $isRoot);
- }
-
- if (!$this->autoload && !class_exists($class = $value->getClass(), false) && !interface_exists($class, false)) {
- return parent::processValue($value, $isRoot);
- }
-
- if (ServiceLocator::class === $value->getClass()) {
- return parent::processValue($value, $isRoot);
- }
-
- if ($constructor = $this->getConstructor($value, false)) {
- $this->checkTypeDeclarations($value, $constructor, $value->getArguments());
- }
-
- foreach ($value->getMethodCalls() as $methodCall) {
- try {
- $reflectionMethod = $this->getReflectionMethod($value, $methodCall[0]);
- } catch (RuntimeException $e) {
- if ($value->getFactory()) {
- continue;
- }
-
- throw $e;
- }
-
- $this->checkTypeDeclarations($value, $reflectionMethod, $methodCall[1]);
- }
-
- return parent::processValue($value, $isRoot);
- }
-
- /**
- * @throws InvalidArgumentException When not enough parameters are defined for the method
- */
- private function checkTypeDeclarations(Definition $checkedDefinition, \ReflectionFunctionAbstract $reflectionFunction, array $values): void
- {
- $numberOfRequiredParameters = $reflectionFunction->getNumberOfRequiredParameters();
-
- if (\count($values) < $numberOfRequiredParameters) {
- throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": "%s::%s()" requires %d arguments, %d passed.', $this->currentId, $reflectionFunction->class, $reflectionFunction->name, $numberOfRequiredParameters, \count($values)));
- }
-
- $reflectionParameters = $reflectionFunction->getParameters();
- $checksCount = min($reflectionFunction->getNumberOfParameters(), \count($values));
-
- $envPlaceholderUniquePrefix = $this->container->getParameterBag() instanceof EnvPlaceholderParameterBag ? $this->container->getParameterBag()->getEnvPlaceholderUniquePrefix() : null;
-
- for ($i = 0; $i < $checksCount; ++$i) {
- if (!$reflectionParameters[$i]->hasType() || $reflectionParameters[$i]->isVariadic()) {
- continue;
- }
-
- $this->checkType($checkedDefinition, $values[$i], $reflectionParameters[$i], $envPlaceholderUniquePrefix);
- }
-
- if ($reflectionFunction->isVariadic() && ($lastParameter = end($reflectionParameters))->hasType()) {
- $variadicParameters = \array_slice($values, $lastParameter->getPosition());
-
- foreach ($variadicParameters as $variadicParameter) {
- $this->checkType($checkedDefinition, $variadicParameter, $lastParameter, $envPlaceholderUniquePrefix);
- }
- }
- }
-
- /**
- * @throws InvalidParameterTypeException When a parameter is not compatible with the declared type
- */
- private function checkType(Definition $checkedDefinition, $value, \ReflectionParameter $parameter, ?string $envPlaceholderUniquePrefix): void
- {
- $type = $parameter->getType()->getName();
-
- if ($value instanceof Reference) {
- if (!$this->container->has($value = (string) $value)) {
- return;
- }
-
- if ('service_container' === $value && is_a($type, Container::class, true)) {
- return;
- }
-
- $value = $this->container->findDefinition($value);
- }
-
- if ('self' === $type) {
- $type = $parameter->getDeclaringClass()->getName();
- }
-
- if ('static' === $type) {
- $type = $checkedDefinition->getClass();
- }
-
- if ($value instanceof Definition) {
- $class = $value->getClass();
-
- if (!$class || (!$this->autoload && !class_exists($class, false) && !interface_exists($class, false))) {
- return;
- }
-
- if ('callable' === $type && method_exists($class, '__invoke')) {
- return;
- }
-
- if ('iterable' === $type && is_subclass_of($class, 'Traversable')) {
- return;
- }
-
- if ('object' === $type) {
- return;
- }
-
- if (is_a($class, $type, true)) {
- return;
- }
-
- throw new InvalidParameterTypeException($this->currentId, $class, $parameter);
- }
-
- if ($value instanceof Parameter) {
- $value = $this->container->getParameter($value);
- } elseif ($value instanceof Expression) {
- $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this->container]);
- } elseif (\is_string($value)) {
- if ('%' === ($value[0] ?? '') && preg_match('/^%([^%]+)%$/', $value, $match)) {
- // Only array parameters are not inlined when dumped.
- $value = [];
- } elseif ($envPlaceholderUniquePrefix && false !== strpos($value, 'env_')) {
- // If the value is an env placeholder that is either mixed with a string or with another env placeholder, then its resolved value will always be a string, so we don't need to resolve it.
- // We don't need to change the value because it is already a string.
- if ('' === preg_replace('/'.$envPlaceholderUniquePrefix.'_\w+_[a-f0-9]{32}/U', '', $value, -1, $c) && 1 === $c) {
- try {
- $value = $this->container->resolveEnvPlaceholders($value, true);
- } catch (EnvNotFoundException | RuntimeException $e) {
- // If an env placeholder cannot be resolved, we skip the validation.
- return;
- }
- }
- }
- }
-
- if (null === $value && $parameter->allowsNull()) {
- return;
- }
-
- if (\in_array($type, self::SCALAR_TYPES, true) && is_scalar($value)) {
- return;
- }
-
- if ('callable' === $type && \is_array($value) && isset($value[0]) && ($value[0] instanceof Reference || $value[0] instanceof Definition)) {
- return;
- }
-
- if ('iterable' === $type && (\is_array($value) || $value instanceof \Traversable || $value instanceof IteratorArgument)) {
- return;
- }
-
- if ('Traversable' === $type && ($value instanceof \Traversable || $value instanceof IteratorArgument)) {
- return;
- }
-
- $checkFunction = sprintf('is_%s', $parameter->getType()->getName());
-
- if (!$parameter->getType()->isBuiltin() || !$checkFunction($value)) {
- throw new InvalidParameterTypeException($this->currentId, \is_object($value) ? \get_class($value) : \gettype($value), $parameter);
- }
- }
-
- private function getExpressionLanguage(): ExpressionLanguage
- {
- if (null === $this->expressionLanguage) {
- $this->expressionLanguage = new ExpressionLanguage(null, $this->container->getExpressionLanguageProviders());
- }
-
- return $this->expressionLanguage;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/Compiler.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/Compiler.php
deleted file mode 100644
index 14dedf0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/Compiler.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
-
-/**
- * This class is used to remove circular dependencies between individual passes.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class Compiler
-{
- private $passConfig;
- private $log = [];
- private $serviceReferenceGraph;
-
- public function __construct()
- {
- $this->passConfig = new PassConfig();
- $this->serviceReferenceGraph = new ServiceReferenceGraph();
- }
-
- /**
- * Returns the PassConfig.
- *
- * @return PassConfig The PassConfig instance
- */
- public function getPassConfig()
- {
- return $this->passConfig;
- }
-
- /**
- * Returns the ServiceReferenceGraph.
- *
- * @return ServiceReferenceGraph The ServiceReferenceGraph instance
- */
- public function getServiceReferenceGraph()
- {
- return $this->serviceReferenceGraph;
- }
-
- /**
- * Adds a pass to the PassConfig.
- *
- * @param string $type The type of the pass
- * @param int $priority Used to sort the passes
- */
- public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
- {
- $this->passConfig->addPass($pass, $type, $priority);
- }
-
- /**
- * @final
- */
- public function log(CompilerPassInterface $pass, string $message)
- {
- if (false !== strpos($message, "\n")) {
- $message = str_replace("\n", "\n".\get_class($pass).': ', trim($message));
- }
-
- $this->log[] = \get_class($pass).': '.$message;
- }
-
- /**
- * Returns the log.
- *
- * @return array Log array
- */
- public function getLog()
- {
- return $this->log;
- }
-
- /**
- * Run the Compiler and process all Passes.
- */
- public function compile(ContainerBuilder $container)
- {
- try {
- foreach ($this->passConfig->getPasses() as $pass) {
- $pass->process($container);
- }
- } catch (\Exception $e) {
- $usedEnvs = [];
- $prev = $e;
-
- do {
- $msg = $prev->getMessage();
-
- if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) {
- $r = new \ReflectionProperty($prev, 'message');
- $r->setAccessible(true);
- $r->setValue($prev, $resolvedMsg);
- }
- } while ($prev = $prev->getPrevious());
-
- if ($usedEnvs) {
- $e = new EnvParameterException($usedEnvs, $e);
- }
-
- throw $e;
- } finally {
- $this->getServiceReferenceGraph()->clear();
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
deleted file mode 100644
index 3085006..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * Interface that must be implemented by compilation passes.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-interface CompilerPassInterface
-{
- /**
- * You can modify the container here before it is dumped to PHP code.
- */
- public function process(ContainerBuilder $container);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
deleted file mode 100644
index da909ae..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Overwrites a service but keeps the overridden one.
- *
- * @author Christophe Coevoet <stof@notk.org>
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Diego Saint Esteben <diego@saintesteben.me>
- */
-class DecoratorServicePass implements CompilerPassInterface
-{
- public function process(ContainerBuilder $container)
- {
- $definitions = new \SplPriorityQueue();
- $order = PHP_INT_MAX;
-
- foreach ($container->getDefinitions() as $id => $definition) {
- if (!$decorated = $definition->getDecoratedService()) {
- continue;
- }
- $definitions->insert([$id, $definition], [$decorated[2], --$order]);
- }
- $decoratingDefinitions = [];
-
- foreach ($definitions as list($id, $definition)) {
- $decoratedService = $definition->getDecoratedService();
- list($inner, $renamedId) = $decoratedService;
- $invalidBehavior = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
-
- $definition->setDecoratedService(null);
-
- if (!$renamedId) {
- $renamedId = $id.'.inner';
- }
- $definition->innerServiceId = $renamedId;
- $definition->decorationOnInvalid = $invalidBehavior;
-
- // we create a new alias/service for the service we are replacing
- // to be able to reference it in the new one
- if ($container->hasAlias($inner)) {
- $alias = $container->getAlias($inner);
- $public = $alias->isPublic();
- $private = $alias->isPrivate();
- $container->setAlias($renamedId, new Alias((string) $alias, false));
- } elseif ($container->hasDefinition($inner)) {
- $decoratedDefinition = $container->getDefinition($inner);
- $public = $decoratedDefinition->isPublic();
- $private = $decoratedDefinition->isPrivate();
- $decoratedDefinition->setPublic(false);
- $container->setDefinition($renamedId, $decoratedDefinition);
- $decoratingDefinitions[$inner] = $decoratedDefinition;
- } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) {
- $container->removeDefinition($id);
- continue;
- } elseif (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) {
- $public = $definition->isPublic();
- $private = $definition->isPrivate();
- } else {
- throw new ServiceNotFoundException($inner, $id);
- }
-
- if (isset($decoratingDefinitions[$inner])) {
- $decoratingDefinition = $decoratingDefinitions[$inner];
- $definition->setTags(array_merge($decoratingDefinition->getTags(), $definition->getTags()));
- $decoratingDefinition->setTags([]);
- $decoratingDefinitions[$inner] = $definition;
- }
-
- $container->setAlias($inner, $id)->setPublic($public)->setPrivate($private);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
deleted file mode 100644
index 5ee0ff1..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Throws an exception for any Definitions that have errors and still exist.
- *
- * @author Ryan Weaver <ryan@knpuniversity.com>
- */
-class DefinitionErrorExceptionPass extends AbstractRecursivePass
-{
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Definition || !$value->hasErrors()) {
- return parent::processValue($value, $isRoot);
- }
-
- if ($isRoot && !$value->isPublic()) {
- $graph = $this->container->getCompiler()->getServiceReferenceGraph();
- $runtimeException = false;
- foreach ($graph->getNode($this->currentId)->getInEdges() as $edge) {
- if (!$edge->getValue() instanceof Reference || ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE !== $edge->getValue()->getInvalidBehavior()) {
- $runtimeException = false;
- break;
- }
- $runtimeException = true;
- }
- if ($runtimeException) {
- return parent::processValue($value, $isRoot);
- }
- }
-
- // only show the first error so the user can focus on it
- $errors = $value->getErrors();
- $message = reset($errors);
-
- throw new RuntimeException($message);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
deleted file mode 100644
index 27e5048..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * A pass to automatically process extensions if they implement
- * CompilerPassInterface.
- *
- * @author Wouter J <wouter@wouterj.nl>
- */
-class ExtensionCompilerPass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getExtensions() as $extension) {
- if (!$extension instanceof CompilerPassInterface) {
- continue;
- }
-
- $extension->process($container);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
deleted file mode 100644
index ac3b4fe..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
+++ /dev/null
@@ -1,231 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Inline service definitions where this is possible.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class InlineServiceDefinitionsPass extends AbstractRecursivePass implements RepeatablePassInterface
-{
- private $analyzingPass;
- private $repeatedPass;
- private $cloningIds = [];
- private $connectedIds = [];
- private $notInlinedIds = [];
- private $inlinedIds = [];
- private $graph;
-
- public function __construct(AnalyzeServiceReferencesPass $analyzingPass = null)
- {
- $this->analyzingPass = $analyzingPass;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setRepeatedPass(RepeatedPass $repeatedPass)
- {
- @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
- $this->repeatedPass = $repeatedPass;
- }
-
- public function process(ContainerBuilder $container)
- {
- $this->container = $container;
- if ($this->analyzingPass) {
- $analyzedContainer = new ContainerBuilder();
- $analyzedContainer->setAliases($container->getAliases());
- $analyzedContainer->setDefinitions($container->getDefinitions());
- foreach ($container->getExpressionLanguageProviders() as $provider) {
- $analyzedContainer->addExpressionLanguageProvider($provider);
- }
- } else {
- $analyzedContainer = $container;
- }
- try {
- $remainingInlinedIds = [];
- $this->connectedIds = $this->notInlinedIds = $container->getDefinitions();
- do {
- if ($this->analyzingPass) {
- $analyzedContainer->setDefinitions(array_intersect_key($analyzedContainer->getDefinitions(), $this->connectedIds));
- $this->analyzingPass->process($analyzedContainer);
- }
- $this->graph = $analyzedContainer->getCompiler()->getServiceReferenceGraph();
- $notInlinedIds = $this->notInlinedIds;
- $this->connectedIds = $this->notInlinedIds = $this->inlinedIds = [];
-
- foreach ($analyzedContainer->getDefinitions() as $id => $definition) {
- if (!$this->graph->hasNode($id)) {
- continue;
- }
- foreach ($this->graph->getNode($id)->getOutEdges() as $edge) {
- if (isset($notInlinedIds[$edge->getSourceNode()->getId()])) {
- $this->currentId = $id;
- $this->processValue($definition, true);
- break;
- }
- }
- }
-
- foreach ($this->inlinedIds as $id => $isPublicOrNotShared) {
- if ($isPublicOrNotShared) {
- $remainingInlinedIds[$id] = $id;
- } else {
- $container->removeDefinition($id);
- $analyzedContainer->removeDefinition($id);
- }
- }
- } while ($this->inlinedIds && $this->analyzingPass);
-
- if ($this->inlinedIds && $this->repeatedPass) {
- $this->repeatedPass->setRepeat();
- }
-
- foreach ($remainingInlinedIds as $id) {
- $definition = $container->getDefinition($id);
-
- if (!$definition->isShared() && !$definition->isPublic()) {
- $container->removeDefinition($id);
- }
- }
- } finally {
- $this->container = null;
- $this->connectedIds = $this->notInlinedIds = $this->inlinedIds = [];
- $this->graph = null;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof ArgumentInterface) {
- // Reference found in ArgumentInterface::getValues() are not inlineable
- return $value;
- }
-
- if ($value instanceof Definition && $this->cloningIds) {
- if ($value->isShared()) {
- return $value;
- }
- $value = clone $value;
- }
-
- if (!$value instanceof Reference) {
- return parent::processValue($value, $isRoot);
- } elseif (!$this->container->hasDefinition($id = (string) $value)) {
- return $value;
- }
-
- $definition = $this->container->getDefinition($id);
-
- if (!$this->isInlineableDefinition($id, $definition)) {
- return $value;
- }
-
- $this->container->log($this, sprintf('Inlined service "%s" to "%s".', $id, $this->currentId));
- $this->inlinedIds[$id] = $definition->isPublic() || !$definition->isShared();
- $this->notInlinedIds[$this->currentId] = true;
-
- if ($definition->isShared()) {
- return $definition;
- }
-
- if (isset($this->cloningIds[$id])) {
- $ids = array_keys($this->cloningIds);
- $ids[] = $id;
-
- throw new ServiceCircularReferenceException($id, \array_slice($ids, array_search($id, $ids)));
- }
-
- $this->cloningIds[$id] = true;
- try {
- return $this->processValue($definition);
- } finally {
- unset($this->cloningIds[$id]);
- }
- }
-
- /**
- * Checks if the definition is inlineable.
- */
- private function isInlineableDefinition(string $id, Definition $definition): bool
- {
- if ($definition->hasErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic()) {
- return false;
- }
-
- if (!$definition->isShared()) {
- if (!$this->graph->hasNode($id)) {
- return true;
- }
-
- foreach ($this->graph->getNode($id)->getInEdges() as $edge) {
- $srcId = $edge->getSourceNode()->getId();
- $this->connectedIds[$srcId] = true;
- if ($edge->isWeak() || $edge->isLazy()) {
- return false;
- }
- }
-
- return true;
- }
-
- if ($definition->isPublic()) {
- return false;
- }
-
- if (!$this->graph->hasNode($id)) {
- return true;
- }
-
- if ($this->currentId == $id) {
- return false;
- }
- $this->connectedIds[$id] = true;
-
- $srcIds = [];
- $srcCount = 0;
- $isReferencedByConstructor = false;
- foreach ($this->graph->getNode($id)->getInEdges() as $edge) {
- $isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
- $srcId = $edge->getSourceNode()->getId();
- $this->connectedIds[$srcId] = true;
- if ($edge->isWeak() || $edge->isLazy()) {
- return false;
- }
- $srcIds[$srcId] = true;
- ++$srcCount;
- }
-
- if (1 !== \count($srcIds)) {
- $this->notInlinedIds[$id] = true;
-
- return false;
- }
-
- if ($srcCount > 1 && \is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) {
- return false;
- }
-
- return $this->container->getDefinition($srcId)->isShared();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
deleted file mode 100644
index 264dd80..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
+++ /dev/null
@@ -1,220 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\Config\Definition\BaseNode;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
-use Symfony\Component\DependencyInjection\Extension\Extension;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
-use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
-
-/**
- * Merges extension configs into the container builder.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class MergeExtensionConfigurationPass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- $parameters = $container->getParameterBag()->all();
- $definitions = $container->getDefinitions();
- $aliases = $container->getAliases();
- $exprLangProviders = $container->getExpressionLanguageProviders();
- $configAvailable = class_exists(BaseNode::class);
-
- foreach ($container->getExtensions() as $extension) {
- if ($extension instanceof PrependExtensionInterface) {
- $extension->prepend($container);
- }
- }
-
- foreach ($container->getExtensions() as $name => $extension) {
- if (!$config = $container->getExtensionConfig($name)) {
- // this extension was not called
- continue;
- }
- $resolvingBag = $container->getParameterBag();
- if ($resolvingBag instanceof EnvPlaceholderParameterBag && $extension instanceof Extension) {
- // create a dedicated bag so that we can track env vars per-extension
- $resolvingBag = new MergeExtensionConfigurationParameterBag($resolvingBag);
- if ($configAvailable) {
- BaseNode::setPlaceholderUniquePrefix($resolvingBag->getEnvPlaceholderUniquePrefix());
- }
- }
- $config = $resolvingBag->resolveValue($config);
-
- try {
- $tmpContainer = new MergeExtensionConfigurationContainerBuilder($extension, $resolvingBag);
- $tmpContainer->setResourceTracking($container->isTrackingResources());
- $tmpContainer->addObjectResource($extension);
- if ($extension instanceof ConfigurationExtensionInterface && null !== $configuration = $extension->getConfiguration($config, $tmpContainer)) {
- $tmpContainer->addObjectResource($configuration);
- }
-
- foreach ($exprLangProviders as $provider) {
- $tmpContainer->addExpressionLanguageProvider($provider);
- }
-
- $extension->load($config, $tmpContainer);
- } catch (\Exception $e) {
- if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
- $container->getParameterBag()->mergeEnvPlaceholders($resolvingBag);
- }
-
- throw $e;
- } finally {
- if ($configAvailable) {
- BaseNode::resetPlaceholders();
- }
- }
-
- if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
- // don't keep track of env vars that are *overridden* when configs are merged
- $resolvingBag->freezeAfterProcessing($extension, $tmpContainer);
- }
-
- $container->merge($tmpContainer);
- $container->getParameterBag()->add($parameters);
- }
-
- $container->addDefinitions($definitions);
- $container->addAliases($aliases);
- }
-}
-
-/**
- * @internal
- */
-class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag
-{
- private $processedEnvPlaceholders;
-
- public function __construct(parent $parameterBag)
- {
- parent::__construct($parameterBag->all());
- $this->mergeEnvPlaceholders($parameterBag);
- }
-
- public function freezeAfterProcessing(Extension $extension, ContainerBuilder $container)
- {
- if (!$config = $extension->getProcessedConfigs()) {
- // Extension::processConfiguration() wasn't called, we cannot know how configs were merged
- return;
- }
- $this->processedEnvPlaceholders = [];
-
- // serialize config and container to catch env vars nested in object graphs
- $config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all());
-
- foreach (parent::getEnvPlaceholders() as $env => $placeholders) {
- foreach ($placeholders as $placeholder) {
- if (false !== stripos($config, $placeholder)) {
- $this->processedEnvPlaceholders[$env] = $placeholders;
- break;
- }
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getEnvPlaceholders(): array
- {
- return null !== $this->processedEnvPlaceholders ? $this->processedEnvPlaceholders : parent::getEnvPlaceholders();
- }
-
- public function getUnusedEnvPlaceholders(): array
- {
- return null === $this->processedEnvPlaceholders ? [] : array_diff_key(parent::getEnvPlaceholders(), $this->processedEnvPlaceholders);
- }
-}
-
-/**
- * A container builder preventing using methods that wouldn't have any effect from extensions.
- *
- * @internal
- */
-class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder
-{
- private $extensionClass;
-
- public function __construct(ExtensionInterface $extension, ParameterBagInterface $parameterBag = null)
- {
- parent::__construct($parameterBag);
-
- $this->extensionClass = \get_class($extension);
- }
-
- /**
- * {@inheritdoc}
- */
- public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): self
- {
- throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', \get_class($pass), $this->extensionClass));
- }
-
- /**
- * {@inheritdoc}
- */
- public function registerExtension(ExtensionInterface $extension)
- {
- throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', \get_class($extension), $this->extensionClass));
- }
-
- /**
- * {@inheritdoc}
- */
- public function compile(bool $resolveEnvPlaceholders = false)
- {
- throw new LogicException(sprintf('Cannot compile the container in extension "%s".', $this->extensionClass));
- }
-
- /**
- * {@inheritdoc}
- */
- public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null)
- {
- if (true !== $format || !\is_string($value)) {
- return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
- }
-
- $bag = $this->getParameterBag();
- $value = $bag->resolveValue($value);
-
- if (!$bag instanceof EnvPlaceholderParameterBag) {
- return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
- }
-
- foreach ($bag->getEnvPlaceholders() as $env => $placeholders) {
- if (false === strpos($env, ':')) {
- continue;
- }
- foreach ($placeholders as $placeholder) {
- if (false !== stripos($value, $placeholder)) {
- throw new RuntimeException(sprintf('Using a cast in "env(%s)" is incompatible with resolution at compile time in "%s". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.', $env, $this->extensionClass));
- }
- }
- }
-
- return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PassConfig.php
deleted file mode 100644
index 8cc328e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PassConfig.php
+++ /dev/null
@@ -1,269 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * Compiler Pass Configuration.
- *
- * This class has a default configuration embedded.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class PassConfig
-{
- const TYPE_AFTER_REMOVING = 'afterRemoving';
- const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization';
- const TYPE_BEFORE_REMOVING = 'beforeRemoving';
- const TYPE_OPTIMIZE = 'optimization';
- const TYPE_REMOVE = 'removing';
-
- private $mergePass;
- private $afterRemovingPasses = [];
- private $beforeOptimizationPasses = [];
- private $beforeRemovingPasses = [];
- private $optimizationPasses;
- private $removingPasses;
-
- public function __construct()
- {
- $this->mergePass = new MergeExtensionConfigurationPass();
-
- $this->beforeOptimizationPasses = [
- 100 => [
- new ResolveClassPass(),
- new ResolveInstanceofConditionalsPass(),
- new RegisterEnvVarProcessorsPass(),
- ],
- -1000 => [new ExtensionCompilerPass()],
- ];
-
- $this->optimizationPasses = [[
- new ValidateEnvPlaceholdersPass(),
- new ResolveChildDefinitionsPass(),
- new RegisterServiceSubscribersPass(),
- new ResolveParameterPlaceHoldersPass(false),
- new ResolveFactoryClassPass(),
- new ResolveNamedArgumentsPass(),
- new AutowireRequiredMethodsPass(),
- new ResolveBindingsPass(),
- new ServiceLocatorTagPass(),
- new DecoratorServicePass(),
- new CheckDefinitionValidityPass(),
- new AutowirePass(false),
- new ResolveTaggedIteratorArgumentPass(),
- new ResolveServiceSubscribersPass(),
- new ResolveReferencesToAliasesPass(),
- new ResolveInvalidReferencesPass(),
- new AnalyzeServiceReferencesPass(true),
- new CheckCircularReferencesPass(),
- new CheckReferenceValidityPass(),
- new CheckArgumentsValidityPass(false),
- ]];
-
- $this->beforeRemovingPasses = [
- -100 => [
- new ResolvePrivatesPass(),
- ],
- ];
-
- $this->removingPasses = [[
- new RemovePrivateAliasesPass(),
- new ReplaceAliasByActualDefinitionPass(),
- new RemoveAbstractDefinitionsPass(),
- new RemoveUnusedDefinitionsPass(),
- new InlineServiceDefinitionsPass(new AnalyzeServiceReferencesPass()),
- new AnalyzeServiceReferencesPass(),
- new DefinitionErrorExceptionPass(),
- ]];
-
- $this->afterRemovingPasses = [[
- new CheckExceptionOnInvalidReferenceBehaviorPass(),
- new ResolveHotPathPass(),
- ]];
- }
-
- /**
- * Returns all passes in order to be processed.
- *
- * @return CompilerPassInterface[]
- */
- public function getPasses()
- {
- return array_merge(
- [$this->mergePass],
- $this->getBeforeOptimizationPasses(),
- $this->getOptimizationPasses(),
- $this->getBeforeRemovingPasses(),
- $this->getRemovingPasses(),
- $this->getAfterRemovingPasses()
- );
- }
-
- /**
- * Adds a pass.
- *
- * @param string $type The pass type
- * @param int $priority Used to sort the passes
- *
- * @throws InvalidArgumentException when a pass type doesn't exist
- */
- public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
- {
- $property = $type.'Passes';
- if (!isset($this->$property)) {
- throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type));
- }
-
- $passes = &$this->$property;
-
- if (!isset($passes[$priority])) {
- $passes[$priority] = [];
- }
- $passes[$priority][] = $pass;
- }
-
- /**
- * Gets all passes for the AfterRemoving pass.
- *
- * @return CompilerPassInterface[]
- */
- public function getAfterRemovingPasses()
- {
- return $this->sortPasses($this->afterRemovingPasses);
- }
-
- /**
- * Gets all passes for the BeforeOptimization pass.
- *
- * @return CompilerPassInterface[]
- */
- public function getBeforeOptimizationPasses()
- {
- return $this->sortPasses($this->beforeOptimizationPasses);
- }
-
- /**
- * Gets all passes for the BeforeRemoving pass.
- *
- * @return CompilerPassInterface[]
- */
- public function getBeforeRemovingPasses()
- {
- return $this->sortPasses($this->beforeRemovingPasses);
- }
-
- /**
- * Gets all passes for the Optimization pass.
- *
- * @return CompilerPassInterface[]
- */
- public function getOptimizationPasses()
- {
- return $this->sortPasses($this->optimizationPasses);
- }
-
- /**
- * Gets all passes for the Removing pass.
- *
- * @return CompilerPassInterface[]
- */
- public function getRemovingPasses()
- {
- return $this->sortPasses($this->removingPasses);
- }
-
- /**
- * Gets the Merge pass.
- *
- * @return CompilerPassInterface
- */
- public function getMergePass()
- {
- return $this->mergePass;
- }
-
- public function setMergePass(CompilerPassInterface $pass)
- {
- $this->mergePass = $pass;
- }
-
- /**
- * Sets the AfterRemoving passes.
- *
- * @param CompilerPassInterface[] $passes
- */
- public function setAfterRemovingPasses(array $passes)
- {
- $this->afterRemovingPasses = [$passes];
- }
-
- /**
- * Sets the BeforeOptimization passes.
- *
- * @param CompilerPassInterface[] $passes
- */
- public function setBeforeOptimizationPasses(array $passes)
- {
- $this->beforeOptimizationPasses = [$passes];
- }
-
- /**
- * Sets the BeforeRemoving passes.
- *
- * @param CompilerPassInterface[] $passes
- */
- public function setBeforeRemovingPasses(array $passes)
- {
- $this->beforeRemovingPasses = [$passes];
- }
-
- /**
- * Sets the Optimization passes.
- *
- * @param CompilerPassInterface[] $passes
- */
- public function setOptimizationPasses(array $passes)
- {
- $this->optimizationPasses = [$passes];
- }
-
- /**
- * Sets the Removing passes.
- *
- * @param CompilerPassInterface[] $passes
- */
- public function setRemovingPasses(array $passes)
- {
- $this->removingPasses = [$passes];
- }
-
- /**
- * Sort passes by priority.
- *
- * @param array $passes CompilerPassInterface instances with their priority as key
- *
- * @return CompilerPassInterface[]
- */
- private function sortPasses(array $passes): array
- {
- if (0 === \count($passes)) {
- return [];
- }
-
- krsort($passes);
-
- // Flatten the array
- return array_merge(...$passes);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
deleted file mode 100644
index 9b3760b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\TypedReference;
-
-/**
- * Trait that allows a generic method to find and sort service by priority option in the tag.
- *
- * @author Iltar van der Berg <kjarli@gmail.com>
- */
-trait PriorityTaggedServiceTrait
-{
- /**
- * Finds all services with the given tag name and order them by their priority.
- *
- * The order of additions must be respected for services having the same priority,
- * and knowing that the \SplPriorityQueue class does not respect the FIFO method,
- * we should not use that class.
- *
- * @see https://bugs.php.net/53710
- * @see https://bugs.php.net/60926
- *
- * @param string|TaggedIteratorArgument $tagName
- *
- * @return Reference[]
- */
- private function findAndSortTaggedServices($tagName, ContainerBuilder $container): array
- {
- $indexAttribute = $defaultIndexMethod = $needsIndexes = $defaultPriorityMethod = null;
-
- if ($tagName instanceof TaggedIteratorArgument) {
- $indexAttribute = $tagName->getIndexAttribute();
- $defaultIndexMethod = $tagName->getDefaultIndexMethod();
- $needsIndexes = $tagName->needsIndexes();
- $defaultPriorityMethod = $tagName->getDefaultPriorityMethod();
- $tagName = $tagName->getTag();
- }
-
- $services = [];
-
- foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) {
- $class = $r = null;
- $priority = 0;
- if (isset($attributes[0]['priority'])) {
- $priority = $attributes[0]['priority'];
- } elseif ($defaultPriorityMethod) {
- $class = $container->getDefinition($serviceId)->getClass();
- $class = $container->getParameterBag()->resolveValue($class) ?: null;
-
- if (($r = $container->getReflectionClass($class)) && $r->hasMethod($defaultPriorityMethod)) {
- if (!($rm = $r->getMethod($defaultPriorityMethod))->isStatic()) {
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" should be static: tag "%s" on service "%s".', $class, $defaultPriorityMethod, $tagName, $serviceId));
- }
-
- if (!$rm->isPublic()) {
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" should be public: tag "%s" on service "%s".', $class, $defaultPriorityMethod, $tagName, $serviceId));
- }
-
- $priority = $rm->invoke(null);
-
- if (!\is_int($priority)) {
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" should return an integer, got %s: tag "%s" on service "%s".', $class, $defaultPriorityMethod, \gettype($priority), $tagName, $serviceId));
- }
- }
- }
-
- if (null === $indexAttribute && !$needsIndexes) {
- $services[$priority][] = new Reference($serviceId);
-
- continue;
- }
-
- if (!$class) {
- $class = $container->getDefinition($serviceId)->getClass();
- $class = $container->getParameterBag()->resolveValue($class) ?: null;
- }
-
- if (null !== $indexAttribute && isset($attributes[0][$indexAttribute])) {
- $services[$priority][$attributes[0][$indexAttribute]] = new TypedReference($serviceId, $class, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $attributes[0][$indexAttribute]);
-
- continue;
- }
-
- if (!$r && !$r = $container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $serviceId));
- }
-
- $class = $r->name;
-
- if (!$r->hasMethod($defaultIndexMethod)) {
- if ($needsIndexes) {
- $services[$priority][$serviceId] = new TypedReference($serviceId, $class);
-
- continue;
- }
-
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" not found: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
- }
-
- if (!($rm = $r->getMethod($defaultIndexMethod))->isStatic()) {
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" should be static: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
- }
-
- if (!$rm->isPublic()) {
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" should be public: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, $tagName, $serviceId, $indexAttribute));
- }
-
- $key = $rm->invoke(null);
-
- if (!\is_string($key)) {
- throw new InvalidArgumentException(sprintf('Method "%s::%s()" should return a string, got %s: tag "%s" on service "%s" is missing "%s" attribute.', $class, $defaultIndexMethod, \gettype($key), $tagName, $serviceId, $indexAttribute));
- }
-
- $services[$priority][$key] = new TypedReference($serviceId, $class, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $key);
- }
-
- if ($services) {
- krsort($services);
- $services = array_merge(...$services);
- }
-
- return $services;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
deleted file mode 100644
index a9a133b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\EnvVarProcessor;
-use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Creates the container.env_var_processors_locator service.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class RegisterEnvVarProcessorsPass implements CompilerPassInterface
-{
- private static $allowedTypes = ['array', 'bool', 'float', 'int', 'string'];
-
- public function process(ContainerBuilder $container)
- {
- $bag = $container->getParameterBag();
- $types = [];
- $processors = [];
- foreach ($container->findTaggedServiceIds('container.env_var_processor') as $id => $tags) {
- if (!$r = $container->getReflectionClass($class = $container->getDefinition($id)->getClass())) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
- } elseif (!$r->isSubclassOf(EnvVarProcessorInterface::class)) {
- throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EnvVarProcessorInterface::class));
- }
- foreach ($class::getProvidedTypes() as $prefix => $type) {
- $processors[$prefix] = new Reference($id);
- $types[$prefix] = self::validateProvidedTypes($type, $class);
- }
- }
-
- if ($bag instanceof EnvPlaceholderParameterBag) {
- foreach (EnvVarProcessor::getProvidedTypes() as $prefix => $type) {
- if (!isset($types[$prefix])) {
- $types[$prefix] = self::validateProvidedTypes($type, EnvVarProcessor::class);
- }
- }
- $bag->setProvidedTypes($types);
- }
-
- if ($processors) {
- $container->setAlias('container.env_var_processors_locator', (string) ServiceLocatorTagPass::register($container, $processors))
- ->setPublic(true)
- ;
- }
- }
-
- private static function validateProvidedTypes(string $types, string $class): array
- {
- $types = explode('|', $types);
-
- foreach ($types as $type) {
- if (!\in_array($type, self::$allowedTypes)) {
- throw new InvalidArgumentException(sprintf('Invalid type "%s" returned by "%s::getProvidedTypes()", expected one of "%s".', $type, $class, implode('", "', self::$allowedTypes)));
- }
- }
-
- return $types;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php
deleted file mode 100644
index 571eab3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class RegisterReverseContainerPass implements CompilerPassInterface
-{
- private $beforeRemoving;
- private $serviceId;
- private $tagName;
-
- public function __construct(bool $beforeRemoving, string $serviceId = 'reverse_container', string $tagName = 'container.reversible')
- {
- $this->beforeRemoving = $beforeRemoving;
- $this->serviceId = $serviceId;
- $this->tagName = $tagName;
- }
-
- public function process(ContainerBuilder $container)
- {
- if (!$container->hasDefinition($this->serviceId)) {
- return;
- }
-
- $refType = $this->beforeRemoving ? ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- $services = [];
- foreach ($container->findTaggedServiceIds($this->tagName) as $id => $tags) {
- $services[$id] = new Reference($id, $refType);
- }
-
- if ($this->beforeRemoving) {
- // prevent inlining of the reverse container
- $services[$this->serviceId] = new Reference($this->serviceId, $refType);
- }
- $locator = $container->getDefinition($this->serviceId)->getArgument(1);
-
- if ($locator instanceof Reference) {
- $locator = $container->getDefinition((string) $locator);
- }
- if ($locator instanceof Definition) {
- foreach ($services as $id => $ref) {
- $services[$id] = new ServiceClosureArgument($ref);
- }
- $locator->replaceArgument(0, $services);
- } else {
- $locator->setValues($services);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
deleted file mode 100644
index 14bf000..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Psr\Container\ContainerInterface as PsrContainerInterface;
-use Symfony\Component\DependencyInjection\Argument\BoundArgument;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\TypedReference;
-use Symfony\Contracts\Service\ServiceProviderInterface;
-use Symfony\Contracts\Service\ServiceSubscriberInterface;
-
-/**
- * Compiler pass to register tagged services that require a service locator.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class RegisterServiceSubscribersPass extends AbstractRecursivePass
-{
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) {
- return parent::processValue($value, $isRoot);
- }
-
- $serviceMap = [];
- $autowire = $value->isAutowired();
-
- foreach ($value->getTag('container.service_subscriber') as $attributes) {
- if (!$attributes) {
- $autowire = true;
- continue;
- }
- ksort($attributes);
- if ([] !== array_diff(array_keys($attributes), ['id', 'key'])) {
- throw new InvalidArgumentException(sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".', implode('", "', array_keys($attributes)), $this->currentId));
- }
- if (!\array_key_exists('id', $attributes)) {
- throw new InvalidArgumentException(sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".', $attributes['key'], $this->currentId));
- }
- if (!\array_key_exists('key', $attributes)) {
- $attributes['key'] = $attributes['id'];
- }
- if (isset($serviceMap[$attributes['key']])) {
- continue;
- }
- $serviceMap[$attributes['key']] = new Reference($attributes['id']);
- }
- $class = $value->getClass();
-
- if (!$r = $this->container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $this->currentId));
- }
- if (!$r->isSubclassOf(ServiceSubscriberInterface::class)) {
- throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $this->currentId, ServiceSubscriberInterface::class));
- }
- $class = $r->name;
-
- $subscriberMap = [];
-
- foreach ($class::getSubscribedServices() as $key => $type) {
- if (!\is_string($type) || !preg_match('/^\??[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)*+$/', $type)) {
- throw new InvalidArgumentException(sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.', $class, $this->currentId, $key, \is_string($type) ? $type : \gettype($type)));
- }
- if ($optionalBehavior = '?' === $type[0]) {
- $type = substr($type, 1);
- $optionalBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
- }
- if (\is_int($name = $key)) {
- $key = $type;
- $name = null;
- }
- if (!isset($serviceMap[$key])) {
- if (!$autowire) {
- throw new InvalidArgumentException(sprintf('Service "%s" misses a "container.service_subscriber" tag with "key"/"id" attributes corresponding to entry "%s" as returned by "%s::getSubscribedServices()".', $this->currentId, $key, $class));
- }
- $serviceMap[$key] = new Reference($type);
- }
-
- if (false !== $i = strpos($name, '::get')) {
- $name = lcfirst(substr($name, 5 + $i));
- } elseif (false !== strpos($name, '::')) {
- $name = null;
- }
-
- if (null !== $name && !$this->container->has($name) && !$this->container->has($type.' $'.$name)) {
- $camelCaseName = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $name))));
- $name = $this->container->has($type.' $'.$camelCaseName) ? $camelCaseName : $name;
- }
-
- $subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name);
- unset($serviceMap[$key]);
- }
-
- if ($serviceMap = array_keys($serviceMap)) {
- $message = sprintf(1 < \count($serviceMap) ? 'keys "%s" do' : 'key "%s" does', str_replace('%', '%%', implode('", "', $serviceMap)));
- throw new InvalidArgumentException(sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".', $message, $class, $this->currentId));
- }
-
- $locatorRef = ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId);
-
- $value->addTag('container.service_subscriber.locator', ['id' => (string) $locatorRef]);
-
- $value->setBindings([
- PsrContainerInterface::class => new BoundArgument($locatorRef, false),
- ServiceProviderInterface::class => new BoundArgument($locatorRef, false),
- ] + $value->getBindings());
-
- return parent::processValue($value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
deleted file mode 100644
index 04b6852..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * Removes abstract Definitions.
- */
-class RemoveAbstractDefinitionsPass implements CompilerPassInterface
-{
- /**
- * Removes abstract definitions from the ContainerBuilder.
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition->isAbstract()) {
- $container->removeDefinition($id);
- $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id));
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
deleted file mode 100644
index 75b36d2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * Remove private aliases from the container. They were only used to establish
- * dependencies between services, and these dependencies have been resolved in
- * one of the previous passes.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class RemovePrivateAliasesPass implements CompilerPassInterface
-{
- /**
- * Removes private aliases from the ContainerBuilder.
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getAliases() as $id => $alias) {
- if ($alias->isPublic()) {
- continue;
- }
-
- $container->removeAlias($id);
- $container->log($this, sprintf('Removed service "%s"; reason: private alias.', $id));
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
deleted file mode 100644
index 287af23..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Removes unused service definitions from the container.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class RemoveUnusedDefinitionsPass extends AbstractRecursivePass implements RepeatablePassInterface
-{
- private $connectedIds = [];
-
- /**
- * {@inheritdoc}
- */
- public function setRepeatedPass(RepeatedPass $repeatedPass)
- {
- @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
- }
-
- /**
- * Processes the ContainerBuilder to remove unused definitions.
- */
- public function process(ContainerBuilder $container)
- {
- try {
- $this->enableExpressionProcessing();
- $this->container = $container;
- $connectedIds = [];
- $aliases = $container->getAliases();
-
- foreach ($aliases as $id => $alias) {
- if ($alias->isPublic()) {
- $this->connectedIds[] = (string) $aliases[$id];
- }
- }
-
- foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition->isPublic()) {
- $connectedIds[$id] = true;
- $this->processValue($definition);
- }
- }
-
- while ($this->connectedIds) {
- $ids = $this->connectedIds;
- $this->connectedIds = [];
- foreach ($ids as $id) {
- if (!isset($connectedIds[$id]) && $container->hasDefinition($id)) {
- $connectedIds[$id] = true;
- $this->processValue($container->getDefinition($id));
- }
- }
- }
-
- foreach ($container->getDefinitions() as $id => $definition) {
- if (!isset($connectedIds[$id])) {
- $container->removeDefinition($id);
- $container->resolveEnvPlaceholders(!$definition->hasErrors() ? serialize($definition) : $definition);
- $container->log($this, sprintf('Removed service "%s"; reason: unused.', $id));
- }
- }
- } finally {
- $this->container = null;
- $this->connectedIds = [];
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Reference) {
- return parent::processValue($value, $isRoot);
- }
-
- if (ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior()) {
- $this->connectedIds[] = (string) $value;
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
deleted file mode 100644
index 11a5b0d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-/**
- * Interface that must be implemented by passes that are run as part of an
- * RepeatedPass.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- *
- * @deprecated since Symfony 4.2.
- */
-interface RepeatablePassInterface extends CompilerPassInterface
-{
- public function setRepeatedPass(RepeatedPass $repeatedPass);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
deleted file mode 100644
index b8add1b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', RepeatedPass::class), E_USER_DEPRECATED);
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * A pass that might be run repeatedly.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- *
- * @deprecated since Symfony 4.2.
- */
-class RepeatedPass implements CompilerPassInterface
-{
- /**
- * @var bool
- */
- private $repeat = false;
-
- private $passes;
-
- /**
- * @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects
- *
- * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface
- */
- public function __construct(array $passes)
- {
- foreach ($passes as $pass) {
- if (!$pass instanceof RepeatablePassInterface) {
- throw new InvalidArgumentException('$passes must be an array of RepeatablePassInterface.');
- }
-
- $pass->setRepeatedPass($this);
- }
-
- $this->passes = $passes;
- }
-
- /**
- * Process the repeatable passes that run more than once.
- */
- public function process(ContainerBuilder $container)
- {
- do {
- $this->repeat = false;
- foreach ($this->passes as $pass) {
- $pass->process($container);
- }
- } while ($this->repeat);
- }
-
- /**
- * Sets if the pass should repeat.
- */
- public function setRepeat()
- {
- $this->repeat = true;
- }
-
- /**
- * Returns the passes.
- *
- * @return RepeatablePassInterface[] An array of RepeatablePassInterface objects
- */
- public function getPasses()
- {
- return $this->passes;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
deleted file mode 100644
index 9981096..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Replaces aliases with actual service definitions, effectively removing these
- * aliases.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass
-{
- private $replacements;
-
- /**
- * Process the Container to replace aliases with service definitions.
- *
- * @throws InvalidArgumentException if the service definition does not exist
- */
- public function process(ContainerBuilder $container)
- {
- // First collect all alias targets that need to be replaced
- $seenAliasTargets = [];
- $replacements = [];
- foreach ($container->getAliases() as $definitionId => $target) {
- $targetId = (string) $target;
- // Special case: leave this target alone
- if ('service_container' === $targetId) {
- continue;
- }
- // Check if target needs to be replaces
- if (isset($replacements[$targetId])) {
- $container->setAlias($definitionId, $replacements[$targetId])->setPublic($target->isPublic())->setPrivate($target->isPrivate());
- }
- // No need to process the same target twice
- if (isset($seenAliasTargets[$targetId])) {
- continue;
- }
- // Process new target
- $seenAliasTargets[$targetId] = true;
- try {
- $definition = $container->getDefinition($targetId);
- } catch (ServiceNotFoundException $e) {
- if ('' !== $e->getId() && '@' === $e->getId()[0]) {
- throw new ServiceNotFoundException($e->getId(), $e->getSourceId(), null, [substr($e->getId(), 1)]);
- }
-
- throw $e;
- }
- if ($definition->isPublic()) {
- continue;
- }
- // Remove private definition and schedule for replacement
- $definition->setPublic(!$target->isPrivate());
- $definition->setPrivate($target->isPrivate());
- $container->setDefinition($definitionId, $definition);
- $container->removeDefinition($targetId);
- $replacements[$targetId] = $definitionId;
- }
- $this->replacements = $replacements;
-
- parent::process($container);
- $this->replacements = [];
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) {
- // Perform the replacement
- $newId = $this->replacements[$referenceId];
- $value = new Reference($newId, $value->getInvalidBehavior());
- $this->container->log($this, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId));
- }
-
- return parent::processValue($value, $isRoot);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
deleted file mode 100644
index e76c43b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
+++ /dev/null
@@ -1,227 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\BoundArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\TypedReference;
-
-/**
- * @author Guilhem Niot <guilhem.niot@gmail.com>
- */
-class ResolveBindingsPass extends AbstractRecursivePass
-{
- private $usedBindings = [];
- private $unusedBindings = [];
- private $errorMessages = [];
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- $this->usedBindings = $container->getRemovedBindingIds();
-
- try {
- parent::process($container);
-
- foreach ($this->unusedBindings as list($key, $serviceId, $bindingType, $file)) {
- $argumentType = $argumentName = $message = null;
-
- if (false !== strpos($key, ' ')) {
- list($argumentType, $argumentName) = explode(' ', $key, 2);
- } elseif ('$' === $key[0]) {
- $argumentName = $key;
- } else {
- $argumentType = $key;
- }
-
- if ($argumentType) {
- $message .= sprintf('of type "%s" ', $argumentType);
- }
-
- if ($argumentName) {
- $message .= sprintf('named "%s" ', $argumentName);
- }
-
- if (BoundArgument::DEFAULTS_BINDING === $bindingType) {
- $message .= 'under "_defaults"';
- } elseif (BoundArgument::INSTANCEOF_BINDING === $bindingType) {
- $message .= 'under "_instanceof"';
- } else {
- $message .= sprintf('for service "%s"', $serviceId);
- }
-
- if ($file) {
- $message .= sprintf(' in file "%s"', $file);
- }
-
- $message = sprintf('A binding is configured for an argument %s, but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.', $message);
-
- if ($this->errorMessages) {
- $message .= sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : '');
- }
- foreach ($this->errorMessages as $m) {
- $message .= "\n - ".$m;
- }
- throw new InvalidArgumentException($message);
- }
- } finally {
- $this->usedBindings = [];
- $this->unusedBindings = [];
- $this->errorMessages = [];
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof TypedReference && $value->getType() === (string) $value) {
- // Already checked
- $bindings = $this->container->getDefinition($this->currentId)->getBindings();
- $name = $value->getName();
-
- if (isset($name, $bindings[$name = $value.' $'.$name])) {
- return $this->getBindingValue($bindings[$name]);
- }
-
- if (isset($bindings[$value->getType()])) {
- return $this->getBindingValue($bindings[$value->getType()]);
- }
-
- return parent::processValue($value, $isRoot);
- }
-
- if (!$value instanceof Definition || !$bindings = $value->getBindings()) {
- return parent::processValue($value, $isRoot);
- }
-
- foreach ($bindings as $key => $binding) {
- list($bindingValue, $bindingId, $used, $bindingType, $file) = $binding->getValues();
- if ($used) {
- $this->usedBindings[$bindingId] = true;
- unset($this->unusedBindings[$bindingId]);
- } elseif (!isset($this->usedBindings[$bindingId])) {
- $this->unusedBindings[$bindingId] = [$key, $this->currentId, $bindingType, $file];
- }
-
- if (preg_match('/^(?:(?:array|bool|float|int|string) )?\$/', $key)) {
- continue;
- }
-
- if (null !== $bindingValue && !$bindingValue instanceof Reference && !$bindingValue instanceof Definition && !$bindingValue instanceof TaggedIteratorArgument && !$bindingValue instanceof ServiceLocatorArgument) {
- throw new InvalidArgumentException(sprintf('Invalid value for binding key "%s" for service "%s": expected null, %s, %s, %s or ServiceLocatorArgument, %s given.', $key, $this->currentId, Reference::class, Definition::class, TaggedIteratorArgument::class, \gettype($bindingValue)));
- }
- }
-
- if ($value->isAbstract()) {
- return parent::processValue($value, $isRoot);
- }
-
- $calls = $value->getMethodCalls();
-
- try {
- if ($constructor = $this->getConstructor($value, false)) {
- $calls[] = [$constructor, $value->getArguments()];
- }
- } catch (RuntimeException $e) {
- $this->errorMessages[] = $e->getMessage();
- $this->container->getDefinition($this->currentId)->addError($e->getMessage());
-
- return parent::processValue($value, $isRoot);
- }
-
- foreach ($calls as $i => $call) {
- list($method, $arguments) = $call;
-
- if ($method instanceof \ReflectionFunctionAbstract) {
- $reflectionMethod = $method;
- } else {
- try {
- $reflectionMethod = $this->getReflectionMethod($value, $method);
- } catch (RuntimeException $e) {
- if ($value->getFactory()) {
- continue;
- }
- throw $e;
- }
- }
-
- foreach ($reflectionMethod->getParameters() as $key => $parameter) {
- if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
- continue;
- }
-
- $typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter);
-
- if (\array_key_exists($k = ltrim($typeHint, '\\').' $'.$parameter->name, $bindings)) {
- $arguments[$key] = $this->getBindingValue($bindings[$k]);
-
- continue;
- }
-
- if (\array_key_exists('$'.$parameter->name, $bindings)) {
- $arguments[$key] = $this->getBindingValue($bindings['$'.$parameter->name]);
-
- continue;
- }
-
- if (!$typeHint || '\\' !== $typeHint[0] || !isset($bindings[$typeHint = substr($typeHint, 1)])) {
- continue;
- }
-
- $arguments[$key] = $this->getBindingValue($bindings[$typeHint]);
- }
-
- if ($arguments !== $call[1]) {
- ksort($arguments);
- $calls[$i][1] = $arguments;
- }
- }
-
- if ($constructor) {
- list(, $arguments) = array_pop($calls);
-
- if ($arguments !== $value->getArguments()) {
- $value->setArguments($arguments);
- }
- }
-
- if ($calls !== $value->getMethodCalls()) {
- $value->setMethodCalls($calls);
- }
-
- return parent::processValue($value, $isRoot);
- }
-
- /**
- * @return mixed
- */
- private function getBindingValue(BoundArgument $binding)
- {
- list($bindingValue, $bindingId) = $binding->getValues();
-
- $this->usedBindings[$bindingId] = true;
- unset($this->unusedBindings[$bindingId]);
-
- return $bindingValue;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
deleted file mode 100644
index 453e3f6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
+++ /dev/null
@@ -1,190 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\ExceptionInterface;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-
-/**
- * This replaces all ChildDefinition instances with their equivalent fully
- * merged Definition instance.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ResolveChildDefinitionsPass extends AbstractRecursivePass
-{
- private $currentPath;
-
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Definition) {
- return parent::processValue($value, $isRoot);
- }
- if ($isRoot) {
- // yes, we are specifically fetching the definition from the
- // container to ensure we are not operating on stale data
- $value = $this->container->getDefinition($this->currentId);
- }
- if ($value instanceof ChildDefinition) {
- $this->currentPath = [];
- $value = $this->resolveDefinition($value);
- if ($isRoot) {
- $this->container->setDefinition($this->currentId, $value);
- }
- }
-
- return parent::processValue($value, $isRoot);
- }
-
- /**
- * Resolves the definition.
- *
- * @throws RuntimeException When the definition is invalid
- */
- private function resolveDefinition(ChildDefinition $definition): Definition
- {
- try {
- return $this->doResolveDefinition($definition);
- } catch (ServiceCircularReferenceException $e) {
- throw $e;
- } catch (ExceptionInterface $e) {
- $r = new \ReflectionProperty($e, 'message');
- $r->setAccessible(true);
- $r->setValue($e, sprintf('Service "%s": %s', $this->currentId, $e->getMessage()));
-
- throw $e;
- }
- }
-
- private function doResolveDefinition(ChildDefinition $definition): Definition
- {
- if (!$this->container->has($parent = $definition->getParent())) {
- throw new RuntimeException(sprintf('Parent definition "%s" does not exist.', $parent));
- }
-
- $searchKey = array_search($parent, $this->currentPath);
- $this->currentPath[] = $parent;
-
- if (false !== $searchKey) {
- throw new ServiceCircularReferenceException($parent, \array_slice($this->currentPath, $searchKey));
- }
-
- $parentDef = $this->container->findDefinition($parent);
- if ($parentDef instanceof ChildDefinition) {
- $id = $this->currentId;
- $this->currentId = $parent;
- $parentDef = $this->resolveDefinition($parentDef);
- $this->container->setDefinition($parent, $parentDef);
- $this->currentId = $id;
- }
-
- $this->container->log($this, sprintf('Resolving inheritance for "%s" (parent: %s).', $this->currentId, $parent));
- $def = new Definition();
-
- // merge in parent definition
- // purposely ignored attributes: abstract, shared, tags, autoconfigured
- $def->setClass($parentDef->getClass());
- $def->setArguments($parentDef->getArguments());
- $def->setMethodCalls($parentDef->getMethodCalls());
- $def->setProperties($parentDef->getProperties());
- if ($parentDef->isDeprecated()) {
- $def->setDeprecated(true, $parentDef->getDeprecationMessage('%service_id%'));
- }
- $def->setFactory($parentDef->getFactory());
- $def->setConfigurator($parentDef->getConfigurator());
- $def->setFile($parentDef->getFile());
- $def->setPublic($parentDef->isPublic());
- $def->setLazy($parentDef->isLazy());
- $def->setAutowired($parentDef->isAutowired());
- $def->setChanges($parentDef->getChanges());
-
- $def->setBindings($definition->getBindings() + $parentDef->getBindings());
-
- // overwrite with values specified in the decorator
- $changes = $definition->getChanges();
- if (isset($changes['class'])) {
- $def->setClass($definition->getClass());
- }
- if (isset($changes['factory'])) {
- $def->setFactory($definition->getFactory());
- }
- if (isset($changes['configurator'])) {
- $def->setConfigurator($definition->getConfigurator());
- }
- if (isset($changes['file'])) {
- $def->setFile($definition->getFile());
- }
- if (isset($changes['public'])) {
- $def->setPublic($definition->isPublic());
- } else {
- $def->setPrivate($definition->isPrivate() || $parentDef->isPrivate());
- }
- if (isset($changes['lazy'])) {
- $def->setLazy($definition->isLazy());
- }
- if (isset($changes['deprecated'])) {
- $def->setDeprecated($definition->isDeprecated(), $definition->getDeprecationMessage('%service_id%'));
- }
- if (isset($changes['autowired'])) {
- $def->setAutowired($definition->isAutowired());
- }
- if (isset($changes['shared'])) {
- $def->setShared($definition->isShared());
- }
- if (isset($changes['decorated_service'])) {
- $decoratedService = $definition->getDecoratedService();
- if (null === $decoratedService) {
- $def->setDecoratedService($decoratedService);
- } else {
- $def->setDecoratedService($decoratedService[0], $decoratedService[1], $decoratedService[2], $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
- }
- }
-
- // merge arguments
- foreach ($definition->getArguments() as $k => $v) {
- if (is_numeric($k)) {
- $def->addArgument($v);
- } elseif (0 === strpos($k, 'index_')) {
- $def->replaceArgument((int) substr($k, \strlen('index_')), $v);
- } else {
- $def->setArgument($k, $v);
- }
- }
-
- // merge properties
- foreach ($definition->getProperties() as $k => $v) {
- $def->setProperty($k, $v);
- }
-
- // append method calls
- if ($calls = $definition->getMethodCalls()) {
- $def->setMethodCalls(array_merge($def->getMethodCalls(), $calls));
- }
-
- $def->addError($parentDef);
- $def->addError($definition);
-
- // these attributes are always taken from the child
- $def->setAbstract($definition->isAbstract());
- $def->setTags($definition->getTags());
- // autoconfigure is never taken from parent (on purpose)
- // and it's not legal on an instanceof
- $def->setAutoconfigured($definition->isAutoconfigured());
-
- return $def;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
deleted file mode 100644
index 5932472..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ResolveClassPass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition->isSynthetic() || null !== $definition->getClass()) {
- continue;
- }
- if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $id)) {
- if ($definition instanceof ChildDefinition && !class_exists($id)) {
- throw new InvalidArgumentException(sprintf('Service definition "%s" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id));
- }
- $definition->setClass($id);
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
deleted file mode 100644
index 9e1edd4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * Replaces env var placeholders by their current values.
- */
-class ResolveEnvPlaceholdersPass extends AbstractRecursivePass
-{
- protected function processValue($value, $isRoot = false)
- {
- if (\is_string($value)) {
- return $this->container->resolveEnvPlaceholders($value, true);
- }
- if ($value instanceof Definition) {
- $changes = $value->getChanges();
- if (isset($changes['class'])) {
- $value->setClass($this->container->resolveEnvPlaceholders($value->getClass(), true));
- }
- if (isset($changes['file'])) {
- $value->setFile($this->container->resolveEnvPlaceholders($value->getFile(), true));
- }
- }
-
- $value = parent::processValue($value, $isRoot);
-
- if ($value && \is_array($value) && !$isRoot) {
- $value = array_combine($this->container->resolveEnvPlaceholders(array_keys($value), true), $value);
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
deleted file mode 100644
index 848da7f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
- */
-class ResolveFactoryClassPass extends AbstractRecursivePass
-{
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) {
- if (null === $class = $value->getClass()) {
- throw new RuntimeException(sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?', $this->currentId));
- }
-
- $factory[0] = $class;
- $value->setFactory($factory);
- }
-
- return parent::processValue($value, $isRoot);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
deleted file mode 100644
index bfdd91c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Propagate "container.hot_path" tags to referenced services.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ResolveHotPathPass extends AbstractRecursivePass
-{
- private $tagName;
- private $resolvedIds = [];
-
- public function __construct(string $tagName = 'container.hot_path')
- {
- $this->tagName = $tagName;
- }
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- try {
- parent::process($container);
- $container->getDefinition('service_container')->clearTag($this->tagName);
- } finally {
- $this->resolvedIds = [];
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof ArgumentInterface) {
- return $value;
- }
- if ($value instanceof Definition && $isRoot && (isset($this->resolvedIds[$this->currentId]) || !$value->hasTag($this->tagName) || $value->isDeprecated())) {
- return $value->isDeprecated() ? $value->clearTag($this->tagName) : $value;
- }
- if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = (string) $value)) {
- $definition = $this->container->findDefinition($id);
- if (!$definition->hasTag($this->tagName) && !$definition->isDeprecated()) {
- $this->resolvedIds[$id] = true;
- $definition->addTag($this->tagName);
- parent::processValue($definition, false);
- }
-
- return $value;
- }
-
- return parent::processValue($value, $isRoot);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php
deleted file mode 100644
index 96afb03..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php
+++ /dev/null
@@ -1,168 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * Applies instanceof conditionals to definitions.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ResolveInstanceofConditionalsPass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) {
- if ($definition->getArguments()) {
- throw new InvalidArgumentException(sprintf('Autoconfigured instanceof for type "%s" defines arguments but these are not supported and should be removed.', $interface));
- }
- }
-
- foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition instanceof ChildDefinition) {
- // don't apply "instanceof" to children: it will be applied to their parent
- continue;
- }
- $container->setDefinition($id, $this->processDefinition($container, $id, $definition));
- }
- }
-
- private function processDefinition(ContainerBuilder $container, string $id, Definition $definition): Definition
- {
- $instanceofConditionals = $definition->getInstanceofConditionals();
- $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : [];
- if (!$instanceofConditionals && !$autoconfiguredInstanceof) {
- return $definition;
- }
-
- if (!$class = $container->getParameterBag()->resolveValue($definition->getClass())) {
- return $definition;
- }
-
- $conditionals = $this->mergeConditionals($autoconfiguredInstanceof, $instanceofConditionals, $container);
-
- $definition->setInstanceofConditionals([]);
- $parent = $shared = null;
- $instanceofTags = [];
- $instanceofCalls = [];
- $instanceofBindings = [];
- $reflectionClass = null;
-
- foreach ($conditionals as $interface => $instanceofDefs) {
- if ($interface !== $class && !(null === $reflectionClass ? $reflectionClass = ($container->getReflectionClass($class, false) ?: false) : $reflectionClass)) {
- continue;
- }
-
- if ($interface !== $class && !is_subclass_of($class, $interface)) {
- continue;
- }
-
- foreach ($instanceofDefs as $key => $instanceofDef) {
- /** @var ChildDefinition $instanceofDef */
- $instanceofDef = clone $instanceofDef;
- $instanceofDef->setAbstract(true)->setParent($parent ?: '.abstract.instanceof.'.$id);
- $parent = '.instanceof.'.$interface.'.'.$key.'.'.$id;
- $container->setDefinition($parent, $instanceofDef);
- $instanceofTags[] = $instanceofDef->getTags();
- $instanceofBindings = $instanceofDef->getBindings() + $instanceofBindings;
-
- foreach ($instanceofDef->getMethodCalls() as $methodCall) {
- $instanceofCalls[] = $methodCall;
- }
-
- $instanceofDef->setTags([]);
- $instanceofDef->setMethodCalls([]);
- $instanceofDef->setBindings([]);
-
- if (isset($instanceofDef->getChanges()['shared'])) {
- $shared = $instanceofDef->isShared();
- }
- }
- }
-
- if ($parent) {
- $bindings = $definition->getBindings();
- $abstract = $container->setDefinition('.abstract.instanceof.'.$id, $definition);
-
- // cast Definition to ChildDefinition
- $definition->setBindings([]);
- $definition = serialize($definition);
- $definition = substr_replace($definition, '53', 2, 2);
- $definition = substr_replace($definition, 'Child', 44, 0);
- /** @var ChildDefinition $definition */
- $definition = unserialize($definition);
- $definition->setParent($parent);
-
- if (null !== $shared && !isset($definition->getChanges()['shared'])) {
- $definition->setShared($shared);
- }
-
- // Don't add tags to service decorators
- if (null === $definition->getDecoratedService()) {
- $i = \count($instanceofTags);
- while (0 <= --$i) {
- foreach ($instanceofTags[$i] as $k => $v) {
- foreach ($v as $v) {
- if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k))) {
- continue;
- }
- $definition->addTag($k, $v);
- }
- }
- }
- }
-
- $definition->setMethodCalls(array_merge($instanceofCalls, $definition->getMethodCalls()));
- $definition->setBindings($bindings + $instanceofBindings);
-
- // reset fields with "merge" behavior
- $abstract
- ->setBindings([])
- ->setArguments([])
- ->setMethodCalls([])
- ->setDecoratedService(null)
- ->setTags([])
- ->setAbstract(true);
- }
-
- return $definition;
- }
-
- private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, ContainerBuilder $container): array
- {
- // make each value an array of ChildDefinition
- $conditionals = array_map(function ($childDef) { return [$childDef]; }, $autoconfiguredInstanceof);
-
- foreach ($instanceofConditionals as $interface => $instanceofDef) {
- // make sure the interface/class exists (but don't validate automaticInstanceofConditionals)
- if (!$container->getReflectionClass($interface)) {
- throw new RuntimeException(sprintf('"%s" is set as an "instanceof" conditional, but it does not exist.', $interface));
- }
-
- if (!isset($autoconfiguredInstanceof[$interface])) {
- $conditionals[$interface] = [];
- }
-
- $conditionals[$interface][] = $instanceofDef;
- }
-
- return $conditionals;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
deleted file mode 100644
index 948de42..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\TypedReference;
-
-/**
- * Emulates the invalid behavior if the reference is not found within the
- * container.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ResolveInvalidReferencesPass implements CompilerPassInterface
-{
- private $container;
- private $signalingException;
- private $currentId;
-
- /**
- * Process the ContainerBuilder to resolve invalid references.
- */
- public function process(ContainerBuilder $container)
- {
- $this->container = $container;
- $this->signalingException = new RuntimeException('Invalid reference.');
-
- try {
- foreach ($container->getDefinitions() as $this->currentId => $definition) {
- $this->processValue($definition);
- }
- } finally {
- $this->container = $this->signalingException = null;
- }
- }
-
- /**
- * Processes arguments to determine invalid references.
- *
- * @return mixed
- *
- * @throws RuntimeException When an invalid reference is found
- */
- private function processValue($value, int $rootLevel = 0, int $level = 0)
- {
- if ($value instanceof ServiceClosureArgument) {
- $value->setValues($this->processValue($value->getValues(), 1, 1));
- } elseif ($value instanceof ArgumentInterface) {
- $value->setValues($this->processValue($value->getValues(), $rootLevel, 1 + $level));
- } elseif ($value instanceof Definition) {
- if ($value->isSynthetic() || $value->isAbstract()) {
- return $value;
- }
- $value->setArguments($this->processValue($value->getArguments(), 0));
- $value->setProperties($this->processValue($value->getProperties(), 1));
- $value->setMethodCalls($this->processValue($value->getMethodCalls(), 2));
- } elseif (\is_array($value)) {
- $i = 0;
-
- foreach ($value as $k => $v) {
- try {
- if (false !== $i && $k !== $i++) {
- $i = false;
- }
- if ($v !== $processedValue = $this->processValue($v, $rootLevel, 1 + $level)) {
- $value[$k] = $processedValue;
- }
- } catch (RuntimeException $e) {
- if ($rootLevel < $level || ($rootLevel && !$level)) {
- unset($value[$k]);
- } elseif ($rootLevel) {
- throw $e;
- } else {
- $value[$k] = null;
- }
- }
- }
-
- // Ensure numerically indexed arguments have sequential numeric keys.
- if (false !== $i) {
- $value = array_values($value);
- }
- } elseif ($value instanceof Reference) {
- if ($this->container->has($id = (string) $value)) {
- return $value;
- }
-
- $currentDefinition = $this->container->getDefinition($this->currentId);
-
- // resolve decorated service behavior depending on decorator service
- if ($currentDefinition->innerServiceId === $id && ContainerInterface::NULL_ON_INVALID_REFERENCE === $currentDefinition->decorationOnInvalid) {
- return null;
- }
-
- $invalidBehavior = $value->getInvalidBehavior();
-
- if (ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior && $value instanceof TypedReference && !$this->container->has($id)) {
- $e = new ServiceNotFoundException($id, $this->currentId);
-
- // since the error message varies by $id and $this->currentId, so should the id of the dummy errored definition
- $this->container->register($id = sprintf('.errored.%s.%s', $this->currentId, $id), $value->getType())
- ->addError($e->getMessage());
-
- return new TypedReference($id, $value->getType(), $value->getInvalidBehavior());
- }
-
- // resolve invalid behavior
- if (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) {
- $value = null;
- } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) {
- if (0 < $level || $rootLevel) {
- throw $this->signalingException;
- }
- $value = null;
- }
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
deleted file mode 100644
index 6004cc3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Resolves named arguments to their corresponding numeric index.
- *
- * @author Kévin Dunglas <dunglas@gmail.com>
- */
-class ResolveNamedArgumentsPass extends AbstractRecursivePass
-{
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Definition) {
- return parent::processValue($value, $isRoot);
- }
-
- $calls = $value->getMethodCalls();
- $calls[] = ['__construct', $value->getArguments()];
-
- foreach ($calls as $i => $call) {
- list($method, $arguments) = $call;
- $parameters = null;
- $resolvedArguments = [];
-
- foreach ($arguments as $key => $argument) {
- if (\is_int($key)) {
- $resolvedArguments[$key] = $argument;
- continue;
- }
-
- if (null === $parameters) {
- $r = $this->getReflectionMethod($value, $method);
- $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId;
- $method = $r->getName();
- $parameters = $r->getParameters();
- }
-
- if (isset($key[0]) && '$' !== $key[0] && !class_exists($key) && !interface_exists($key, false)) {
- throw new InvalidArgumentException(sprintf('Invalid service "%s": did you forget to add the "$" prefix to argument "%s"?', $this->currentId, $key));
- }
-
- if (isset($key[0]) && '$' === $key[0]) {
- foreach ($parameters as $j => $p) {
- if ($key === '$'.$p->name) {
- if ($p->isVariadic() && \is_array($argument)) {
- foreach ($argument as $variadicArgument) {
- $resolvedArguments[$j++] = $variadicArgument;
- }
- } else {
- $resolvedArguments[$j] = $argument;
- }
-
- continue 2;
- }
- }
-
- throw new InvalidArgumentException(sprintf('Invalid service "%s": method "%s()" has no argument named "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method, $key));
- }
-
- if (null !== $argument && !$argument instanceof Reference && !$argument instanceof Definition) {
- throw new InvalidArgumentException(sprintf('Invalid service "%s": the value of argument "%s" of method "%s()" must be null, an instance of %s or an instance of %s, %s given.', $this->currentId, $key, $class !== $this->currentId ? $class.'::'.$method : $method, Reference::class, Definition::class, \gettype($argument)));
- }
-
- $typeFound = false;
- foreach ($parameters as $j => $p) {
- if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) {
- $resolvedArguments[$j] = $argument;
- $typeFound = true;
- }
- }
-
- if (!$typeFound) {
- throw new InvalidArgumentException(sprintf('Invalid service "%s": method "%s()" has no argument type-hinted as "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method, $key));
- }
- }
-
- if ($resolvedArguments !== $call[1]) {
- ksort($resolvedArguments);
- $calls[$i][1] = $resolvedArguments;
- }
- }
-
- list(, $arguments) = array_pop($calls);
-
- if ($arguments !== $value->getArguments()) {
- $value->setArguments($arguments);
- }
- if ($calls !== $value->getMethodCalls()) {
- $value->setMethodCalls($calls);
- }
-
- return parent::processValue($value, $isRoot);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
deleted file mode 100644
index 2dec13f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-
-/**
- * Resolves all parameter placeholders "%somevalue%" to their real values.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass
-{
- private $bag;
- private $resolveArrays;
-
- public function __construct(bool $resolveArrays = true)
- {
- $this->resolveArrays = $resolveArrays;
- }
-
- /**
- * {@inheritdoc}
- *
- * @throws ParameterNotFoundException
- */
- public function process(ContainerBuilder $container)
- {
- $this->bag = $container->getParameterBag();
-
- try {
- parent::process($container);
-
- $aliases = [];
- foreach ($container->getAliases() as $name => $target) {
- $this->currentId = $name;
- $aliases[$this->bag->resolveValue($name)] = $target;
- }
- $container->setAliases($aliases);
- } catch (ParameterNotFoundException $e) {
- $e->setSourceId($this->currentId);
-
- throw $e;
- }
-
- $this->bag->resolve();
- $this->bag = null;
- }
-
- protected function processValue($value, $isRoot = false)
- {
- if (\is_string($value)) {
- $v = $this->bag->resolveValue($value);
-
- return $this->resolveArrays || !$v || !\is_array($v) ? $v : $value;
- }
- if ($value instanceof Definition) {
- $value->setBindings($this->processValue($value->getBindings()));
- $changes = $value->getChanges();
- if (isset($changes['class'])) {
- $value->setClass($this->bag->resolveValue($value->getClass()));
- }
- if (isset($changes['file'])) {
- $value->setFile($this->bag->resolveValue($value->getFile()));
- }
- }
-
- $value = parent::processValue($value, $isRoot);
-
- if ($value && \is_array($value)) {
- $value = array_combine($this->bag->resolveValue(array_keys($value)), $value);
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
deleted file mode 100644
index 1bd9934..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ResolvePrivatesPass implements CompilerPassInterface
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition->isPrivate()) {
- $definition->setPublic(false);
- $definition->setPrivate(true);
- }
- }
-
- foreach ($container->getAliases() as $id => $alias) {
- if ($alias->isPrivate()) {
- $alias->setPublic(false);
- $alias->setPrivate(true);
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
deleted file mode 100644
index bf9ea2b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * Replaces all references to aliases with references to the actual service.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ResolveReferencesToAliasesPass extends AbstractRecursivePass
-{
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- parent::process($container);
-
- foreach ($container->getAliases() as $id => $alias) {
- $aliasId = (string) $alias;
- $this->currentId = $id;
-
- if ($aliasId !== $defId = $this->getDefinitionId($aliasId, $container)) {
- $container->setAlias($id, $defId)->setPublic($alias->isPublic())->setPrivate($alias->isPrivate());
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof Reference) {
- return parent::processValue($value, $isRoot);
- }
-
- $defId = $this->getDefinitionId($id = (string) $value, $this->container);
-
- return $defId !== $id ? new Reference($defId, $value->getInvalidBehavior()) : $value;
- }
-
- private function getDefinitionId(string $id, ContainerBuilder $container): string
- {
- if (!$container->hasAlias($id)) {
- return $id;
- }
-
- $alias = $container->getAlias($id);
-
- if ($alias->isDeprecated()) {
- @trigger_error(sprintf('%s. It is being referenced by the "%s" %s.', rtrim($alias->getDeprecationMessage($id), '. '), $this->currentId, $container->hasDefinition($this->currentId) ? 'service' : 'alias'), E_USER_DEPRECATED);
- }
-
- $seen = [];
- do {
- if (isset($seen[$id])) {
- throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), [$id]));
- }
-
- $seen[$id] = true;
- $id = (string) $container->getAlias($id);
- } while ($container->hasAlias($id));
-
- return $id;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
deleted file mode 100644
index 399f349..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Psr\Container\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Contracts\Service\ServiceProviderInterface;
-
-/**
- * Compiler pass to inject their service locator to service subscribers.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ResolveServiceSubscribersPass extends AbstractRecursivePass
-{
- private $serviceLocator;
-
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof Reference && $this->serviceLocator && \in_array((string) $value, [ContainerInterface::class, ServiceProviderInterface::class], true)) {
- return new Reference($this->serviceLocator);
- }
-
- if (!$value instanceof Definition) {
- return parent::processValue($value, $isRoot);
- }
-
- $serviceLocator = $this->serviceLocator;
- $this->serviceLocator = null;
-
- if ($value->hasTag('container.service_subscriber.locator')) {
- $this->serviceLocator = $value->getTag('container.service_subscriber.locator')[0]['id'];
- $value->clearTag('container.service_subscriber.locator');
- }
-
- try {
- return parent::processValue($value);
- } finally {
- $this->serviceLocator = $serviceLocator;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
deleted file mode 100644
index a430572..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-
-/**
- * Resolves all TaggedIteratorArgument arguments.
- *
- * @author Roland Franssen <franssen.roland@gmail.com>
- */
-class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass
-{
- use PriorityTaggedServiceTrait;
-
- /**
- * {@inheritdoc}
- */
- protected function processValue($value, $isRoot = false)
- {
- if (!$value instanceof TaggedIteratorArgument) {
- return parent::processValue($value, $isRoot);
- }
-
- $value->setValues($this->findAndSortTaggedServices($value, $this->container));
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
deleted file mode 100644
index 5fdbe56..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\ServiceLocator;
-
-/**
- * Applies the "container.service_locator" tag by wrapping references into ServiceClosureArgument instances.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-final class ServiceLocatorTagPass extends AbstractRecursivePass
-{
- use PriorityTaggedServiceTrait;
-
- protected function processValue($value, $isRoot = false)
- {
- if ($value instanceof ServiceLocatorArgument) {
- if ($value->getTaggedIteratorArgument()) {
- $value->setValues($this->findAndSortTaggedServices($value->getTaggedIteratorArgument(), $this->container));
- }
-
- return self::register($this->container, $value->getValues());
- }
-
- if (!$value instanceof Definition || !$value->hasTag('container.service_locator')) {
- return parent::processValue($value, $isRoot);
- }
-
- if (!$value->getClass()) {
- $value->setClass(ServiceLocator::class);
- }
-
- $arguments = $value->getArguments();
- if (!isset($arguments[0]) || !\is_array($arguments[0])) {
- throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.', $this->currentId));
- }
-
- $i = 0;
-
- foreach ($arguments[0] as $k => $v) {
- if ($v instanceof ServiceClosureArgument) {
- continue;
- }
- if (!$v instanceof Reference) {
- throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, \is_object($v) ? \get_class($v) : \gettype($v), $k));
- }
-
- if ($i === $k) {
- unset($arguments[0][$k]);
-
- $k = (string) $v;
- ++$i;
- } elseif (\is_int($k)) {
- $i = null;
- }
- $arguments[0][$k] = new ServiceClosureArgument($v);
- }
- ksort($arguments[0]);
-
- $value->setArguments($arguments);
-
- $id = '.service_locator.'.ContainerBuilder::hash($value);
-
- if ($isRoot) {
- if ($id !== $this->currentId) {
- $this->container->setAlias($id, new Alias($this->currentId, false));
- }
-
- return $value;
- }
-
- $this->container->setDefinition($id, $value->setPublic(false));
-
- return new Reference($id);
- }
-
- /**
- * @param Reference[] $refMap
- */
- public static function register(ContainerBuilder $container, array $refMap, string $callerId = null): Reference
- {
- foreach ($refMap as $id => $ref) {
- if (!$ref instanceof Reference) {
- throw new InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', \is_object($ref) ? \get_class($ref) : \gettype($ref), $id));
- }
- $refMap[$id] = new ServiceClosureArgument($ref);
- }
- ksort($refMap);
-
- $locator = (new Definition(ServiceLocator::class))
- ->addArgument($refMap)
- ->setPublic(false)
- ->addTag('container.service_locator');
-
- if (null !== $callerId && $container->hasDefinition($callerId)) {
- $locator->setBindings($container->getDefinition($callerId)->getBindings());
- }
-
- if (!$container->hasDefinition($id = '.service_locator.'.ContainerBuilder::hash($locator))) {
- $container->setDefinition($id, $locator);
- }
-
- if (null !== $callerId) {
- $locatorId = $id;
- // Locators are shared when they hold the exact same list of factories;
- // to have them specialized per consumer service, we use a cloning factory
- // to derivate customized instances from the prototype one.
- $container->register($id .= '.'.$callerId, ServiceLocator::class)
- ->setPublic(false)
- ->setFactory([new Reference($locatorId), 'withContext'])
- ->addTag('container.service_locator_context', ['id' => $callerId])
- ->addArgument($callerId)
- ->addArgument(new Reference('service_container'));
- }
-
- return new Reference($id);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
deleted file mode 100644
index 308abc6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * This is a directed graph of your services.
- *
- * This information can be used by your compiler passes instead of collecting
- * it themselves which improves performance quite a lot.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- *
- * @final
- */
-class ServiceReferenceGraph
-{
- /**
- * @var ServiceReferenceGraphNode[]
- */
- private $nodes = [];
-
- public function hasNode(string $id): bool
- {
- return isset($this->nodes[$id]);
- }
-
- /**
- * Gets a node by identifier.
- *
- * @throws InvalidArgumentException if no node matches the supplied identifier
- */
- public function getNode(string $id): ServiceReferenceGraphNode
- {
- if (!isset($this->nodes[$id])) {
- throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id));
- }
-
- return $this->nodes[$id];
- }
-
- /**
- * Returns all nodes.
- *
- * @return ServiceReferenceGraphNode[]
- */
- public function getNodes(): array
- {
- return $this->nodes;
- }
-
- /**
- * Clears all nodes.
- */
- public function clear()
- {
- foreach ($this->nodes as $node) {
- $node->clear();
- }
- $this->nodes = [];
- }
-
- /**
- * Connects 2 nodes together in the Graph.
- */
- public function connect(?string $sourceId, $sourceValue, ?string $destId, $destValue = null, $reference = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false)
- {
- if (null === $sourceId || null === $destId) {
- return;
- }
-
- $sourceNode = $this->createNode($sourceId, $sourceValue);
- $destNode = $this->createNode($destId, $destValue);
- $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor);
-
- $sourceNode->addOutEdge($edge);
- $destNode->addInEdge($edge);
- }
-
- private function createNode(string $id, $value): ServiceReferenceGraphNode
- {
- if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) {
- return $this->nodes[$id];
- }
-
- return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
deleted file mode 100644
index 9861456..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-/**
- * Represents an edge in your service graph.
- *
- * Value is typically a reference.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ServiceReferenceGraphEdge
-{
- private $sourceNode;
- private $destNode;
- private $value;
- private $lazy;
- private $weak;
- private $byConstructor;
-
- public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false)
- {
- $this->sourceNode = $sourceNode;
- $this->destNode = $destNode;
- $this->value = $value;
- $this->lazy = $lazy;
- $this->weak = $weak;
- $this->byConstructor = $byConstructor;
- }
-
- /**
- * Returns the value of the edge.
- *
- * @return mixed
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Returns the source node.
- *
- * @return ServiceReferenceGraphNode
- */
- public function getSourceNode()
- {
- return $this->sourceNode;
- }
-
- /**
- * Returns the destination node.
- *
- * @return ServiceReferenceGraphNode
- */
- public function getDestNode()
- {
- return $this->destNode;
- }
-
- /**
- * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation.
- *
- * @return bool
- */
- public function isLazy()
- {
- return $this->lazy;
- }
-
- /**
- * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service.
- *
- * @return bool
- */
- public function isWeak()
- {
- return $this->weak;
- }
-
- /**
- * Returns true if the edge links with a constructor argument.
- *
- * @return bool
- */
- public function isReferencedByConstructor()
- {
- return $this->byConstructor;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
deleted file mode 100644
index fec1424..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * Represents a node in your service graph.
- *
- * Value is typically a definition, or an alias.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ServiceReferenceGraphNode
-{
- private $id;
- private $inEdges = [];
- private $outEdges = [];
- private $value;
-
- /**
- * @param string $id The node identifier
- * @param mixed $value The node value
- */
- public function __construct(string $id, $value)
- {
- $this->id = $id;
- $this->value = $value;
- }
-
- public function addInEdge(ServiceReferenceGraphEdge $edge)
- {
- $this->inEdges[] = $edge;
- }
-
- public function addOutEdge(ServiceReferenceGraphEdge $edge)
- {
- $this->outEdges[] = $edge;
- }
-
- /**
- * Checks if the value of this node is an Alias.
- *
- * @return bool True if the value is an Alias instance
- */
- public function isAlias()
- {
- return $this->value instanceof Alias;
- }
-
- /**
- * Checks if the value of this node is a Definition.
- *
- * @return bool True if the value is a Definition instance
- */
- public function isDefinition()
- {
- return $this->value instanceof Definition;
- }
-
- /**
- * Returns the identifier.
- *
- * @return string
- */
- public function getId()
- {
- return $this->id;
- }
-
- /**
- * Returns the in edges.
- *
- * @return ServiceReferenceGraphEdge[]
- */
- public function getInEdges()
- {
- return $this->inEdges;
- }
-
- /**
- * Returns the out edges.
- *
- * @return ServiceReferenceGraphEdge[]
- */
- public function getOutEdges()
- {
- return $this->outEdges;
- }
-
- /**
- * Returns the value of this Node.
- *
- * @return mixed The value
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Clears all edges.
- */
- public function clear()
- {
- $this->inEdges = $this->outEdges = [];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php
deleted file mode 100644
index 8fd84fa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Compiler;
-
-use Symfony\Component\Config\Definition\BaseNode;
-use Symfony\Component\Config\Definition\Exception\TreeWithoutRootNodeException;
-use Symfony\Component\Config\Definition\Processor;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
-use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-
-/**
- * Validates environment variable placeholders used in extension configuration with dummy values.
- *
- * @author Roland Franssen <franssen.roland@gmail.com>
- */
-class ValidateEnvPlaceholdersPass implements CompilerPassInterface
-{
- private static $typeFixtures = ['array' => [], 'bool' => false, 'float' => 0.0, 'int' => 0, 'string' => ''];
-
- private $extensionConfig = [];
-
- /**
- * {@inheritdoc}
- */
- public function process(ContainerBuilder $container)
- {
- $this->extensionConfig = [];
-
- if (!class_exists(BaseNode::class) || !$extensions = $container->getExtensions()) {
- return;
- }
-
- $resolvingBag = $container->getParameterBag();
- if (!$resolvingBag instanceof EnvPlaceholderParameterBag) {
- return;
- }
-
- $defaultBag = new ParameterBag($resolvingBag->all());
- $envTypes = $resolvingBag->getProvidedTypes();
- try {
- foreach ($resolvingBag->getEnvPlaceholders() + $resolvingBag->getUnusedEnvPlaceholders() as $env => $placeholders) {
- $values = [];
- if (false === $i = strpos($env, ':')) {
- $default = $defaultBag->has("env($env)") ? $defaultBag->get("env($env)") : self::$typeFixtures['string'];
- $defaultType = null !== $default ? self::getType($default) : 'string';
- $values[$defaultType] = $default;
- } else {
- $prefix = substr($env, 0, $i);
- foreach ($envTypes[$prefix] ?? ['string'] as $type) {
- $values[$type] = self::$typeFixtures[$type] ?? null;
- }
- }
- foreach ($placeholders as $placeholder) {
- BaseNode::setPlaceholder($placeholder, $values);
- }
- }
-
- $processor = new Processor();
-
- foreach ($extensions as $name => $extension) {
- if (!$extension instanceof ConfigurationExtensionInterface || !$config = array_filter($container->getExtensionConfig($name))) {
- // this extension has no semantic configuration or was not called
- continue;
- }
-
- $config = $resolvingBag->resolveValue($config);
-
- if (null === $configuration = $extension->getConfiguration($config, $container)) {
- continue;
- }
-
- try {
- $this->extensionConfig[$name] = $processor->processConfiguration($configuration, $config);
- } catch (TreeWithoutRootNodeException $e) {
- }
- }
- } finally {
- BaseNode::resetPlaceholders();
- }
-
- $resolvingBag->clearUnusedEnvPlaceholders();
- }
-
- /**
- * @internal
- */
- public function getExtensionConfig(): array
- {
- try {
- return $this->extensionConfig;
- } finally {
- $this->extensionConfig = [];
- }
- }
-
- private static function getType($value): string
- {
- switch ($type = \gettype($value)) {
- case 'boolean':
- return 'bool';
- case 'double':
- return 'float';
- case 'integer':
- return 'int';
- }
-
- return $type;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
deleted file mode 100644
index e9a4fff..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Config;
-
-use Symfony\Component\Config\Resource\ResourceInterface;
-
-/**
- * Tracks container parameters.
- *
- * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
- *
- * @final since Symfony 4.3
- */
-class ContainerParametersResource implements ResourceInterface
-{
- private $parameters;
-
- /**
- * @param array $parameters The container parameters to track
- */
- public function __construct(array $parameters)
- {
- $this->parameters = $parameters;
- }
-
- /**
- * {@inheritdoc}
- */
- public function __toString()
- {
- return 'container_parameters_'.md5(serialize($this->parameters));
- }
-
- /**
- * @return array Tracked parameters
- */
- public function getParameters()
- {
- return $this->parameters;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
deleted file mode 100644
index 6ed77e3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Config;
-
-use Symfony\Component\Config\Resource\ResourceInterface;
-use Symfony\Component\Config\ResourceCheckerInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
-/**
- * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
- */
-class ContainerParametersResourceChecker implements ResourceCheckerInterface
-{
- /** @var ContainerInterface */
- private $container;
-
- public function __construct(ContainerInterface $container)
- {
- $this->container = $container;
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports(ResourceInterface $metadata)
- {
- return $metadata instanceof ContainerParametersResource;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isFresh(ResourceInterface $resource, $timestamp)
- {
- foreach ($resource->getParameters() as $key => $value) {
- if (!$this->container->hasParameter($key) || $this->container->getParameter($key) !== $value) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Container.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Container.php
deleted file mode 100644
index 00bacd2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Container.php
+++ /dev/null
@@ -1,456 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * Container is a dependency injection container.
- *
- * It gives access to object instances (services).
- * Services and parameters are simple key/pair stores.
- * The container can have four possible behaviors when a service
- * does not exist (or is not initialized for the last case):
- *
- * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception (the default)
- * * NULL_ON_INVALID_REFERENCE: Returns null
- * * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the reference
- * (for instance, ignore a setter if the service does not exist)
- * * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized services or invalid references
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class Container implements ResettableContainerInterface
-{
- protected $parameterBag;
- protected $services = [];
- protected $privates = [];
- protected $fileMap = [];
- protected $methodMap = [];
- protected $factories = [];
- protected $aliases = [];
- protected $loading = [];
- protected $resolving = [];
- protected $syntheticIds = [];
-
- private $envCache = [];
- private $compiled = false;
- private $getEnv;
-
- public function __construct(ParameterBagInterface $parameterBag = null)
- {
- $this->parameterBag = $parameterBag ?: new EnvPlaceholderParameterBag();
- }
-
- /**
- * Compiles the container.
- *
- * This method does two things:
- *
- * * Parameter values are resolved;
- * * The parameter bag is frozen.
- */
- public function compile()
- {
- $this->parameterBag->resolve();
-
- $this->parameterBag = new FrozenParameterBag($this->parameterBag->all());
-
- $this->compiled = true;
- }
-
- /**
- * Returns true if the container is compiled.
- *
- * @return bool
- */
- public function isCompiled()
- {
- return $this->compiled;
- }
-
- /**
- * Gets the service container parameter bag.
- *
- * @return ParameterBagInterface A ParameterBagInterface instance
- */
- public function getParameterBag()
- {
- return $this->parameterBag;
- }
-
- /**
- * Gets a parameter.
- *
- * @param string $name The parameter name
- *
- * @return mixed The parameter value
- *
- * @throws InvalidArgumentException if the parameter is not defined
- */
- public function getParameter($name)
- {
- return $this->parameterBag->get($name);
- }
-
- /**
- * Checks if a parameter exists.
- *
- * @param string $name The parameter name
- *
- * @return bool The presence of parameter in container
- */
- public function hasParameter($name)
- {
- return $this->parameterBag->has($name);
- }
-
- /**
- * Sets a parameter.
- *
- * @param string $name The parameter name
- * @param mixed $value The parameter value
- */
- public function setParameter($name, $value)
- {
- $this->parameterBag->set($name, $value);
- }
-
- /**
- * Sets a service.
- *
- * Setting a synthetic service to null resets it: has() returns false and get()
- * behaves in the same way as if the service was never created.
- *
- * @param string $id The service identifier
- * @param object|null $service The service instance
- */
- public function set($id, $service)
- {
- // Runs the internal initializer; used by the dumped container to include always-needed files
- if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) {
- $initialize = $this->privates['service_container'];
- unset($this->privates['service_container']);
- $initialize();
- }
-
- if ('service_container' === $id) {
- throw new InvalidArgumentException('You cannot set service "service_container".');
- }
-
- if (!(isset($this->fileMap[$id]) || isset($this->methodMap[$id]))) {
- if (isset($this->syntheticIds[$id]) || !isset($this->getRemovedIds()[$id])) {
- // no-op
- } elseif (null === $service) {
- throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot unset it.', $id));
- } else {
- throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot replace it.', $id));
- }
- } elseif (isset($this->services[$id])) {
- throw new InvalidArgumentException(sprintf('The "%s" service is already initialized, you cannot replace it.', $id));
- }
-
- if (isset($this->aliases[$id])) {
- unset($this->aliases[$id]);
- }
-
- if (null === $service) {
- unset($this->services[$id]);
-
- return;
- }
-
- $this->services[$id] = $service;
- }
-
- /**
- * Returns true if the given service is defined.
- *
- * @param string $id The service identifier
- *
- * @return bool true if the service is defined, false otherwise
- */
- public function has($id)
- {
- if (isset($this->aliases[$id])) {
- $id = $this->aliases[$id];
- }
- if (isset($this->services[$id])) {
- return true;
- }
- if ('service_container' === $id) {
- return true;
- }
-
- return isset($this->fileMap[$id]) || isset($this->methodMap[$id]);
- }
-
- /**
- * Gets a service.
- *
- * @param string $id The service identifier
- * @param int $invalidBehavior The behavior when the service does not exist
- *
- * @return object|null The associated service
- *
- * @throws ServiceCircularReferenceException When a circular reference is detected
- * @throws ServiceNotFoundException When the service is not defined
- * @throws \Exception if an exception has been thrown when the service has been resolved
- *
- * @see Reference
- */
- public function get($id, $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
- {
- $service = $this->services[$id]
- ?? $this->services[$id = $this->aliases[$id] ?? $id]
- ?? ('service_container' === $id ? $this : ($this->factories[$id] ?? [$this, 'make'])($id, $invalidBehavior));
-
- if (!\is_object($service) && null !== $service) {
- @trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.', $id, \gettype($service)), E_USER_DEPRECATED);
- }
-
- return $service;
- }
-
- /**
- * Creates a service.
- *
- * As a separate method to allow "get()" to use the really fast `??` operator.
- */
- private function make(string $id, int $invalidBehavior)
- {
- if (isset($this->loading[$id])) {
- throw new ServiceCircularReferenceException($id, array_merge(array_keys($this->loading), [$id]));
- }
-
- $this->loading[$id] = true;
-
- try {
- if (isset($this->fileMap[$id])) {
- return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->load($this->fileMap[$id]);
- } elseif (isset($this->methodMap[$id])) {
- return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->{$this->methodMap[$id]}();
- }
- } catch (\Exception $e) {
- unset($this->services[$id]);
-
- throw $e;
- } finally {
- unset($this->loading[$id]);
- }
-
- if (/* self::EXCEPTION_ON_INVALID_REFERENCE */ 1 === $invalidBehavior) {
- if (!$id) {
- throw new ServiceNotFoundException($id);
- }
- if (isset($this->syntheticIds[$id])) {
- throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id));
- }
- if (isset($this->getRemovedIds()[$id])) {
- throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id));
- }
-
- $alternatives = [];
- foreach ($this->getServiceIds() as $knownId) {
- if ('' === $knownId || '.' === $knownId[0]) {
- continue;
- }
- $lev = levenshtein($id, $knownId);
- if ($lev <= \strlen($id) / 3 || false !== strpos($knownId, $id)) {
- $alternatives[] = $knownId;
- }
- }
-
- throw new ServiceNotFoundException($id, null, null, $alternatives);
- }
-
- return null;
- }
-
- /**
- * Returns true if the given service has actually been initialized.
- *
- * @param string $id The service identifier
- *
- * @return bool true if service has already been initialized, false otherwise
- */
- public function initialized($id)
- {
- if (isset($this->aliases[$id])) {
- $id = $this->aliases[$id];
- }
-
- if ('service_container' === $id) {
- return false;
- }
-
- return isset($this->services[$id]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- $services = $this->services + $this->privates;
- $this->services = $this->factories = $this->privates = [];
-
- foreach ($services as $service) {
- try {
- if ($service instanceof ResetInterface) {
- $service->reset();
- }
- } catch (\Throwable $e) {
- continue;
- }
- }
- }
-
- /**
- * Gets all service ids.
- *
- * @return string[] An array of all defined service ids
- */
- public function getServiceIds()
- {
- return array_map('strval', array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->aliases), array_keys($this->services))));
- }
-
- /**
- * Gets service ids that existed at compile time.
- *
- * @return array
- */
- public function getRemovedIds()
- {
- return [];
- }
-
- /**
- * Camelizes a string.
- *
- * @param string $id A string to camelize
- *
- * @return string The camelized string
- */
- public static function camelize($id)
- {
- return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']);
- }
-
- /**
- * A string to underscore.
- *
- * @param string $id The string to underscore
- *
- * @return string The underscored string
- */
- public static function underscore($id)
- {
- return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], str_replace('_', '.', $id)));
- }
-
- /**
- * Creates a service by requiring its factory file.
- */
- protected function load($file)
- {
- return require $file;
- }
-
- /**
- * Fetches a variable from the environment.
- *
- * @param string $name The name of the environment variable
- *
- * @return mixed The value to use for the provided environment variable name
- *
- * @throws EnvNotFoundException When the environment variable is not found and has no default value
- */
- protected function getEnv($name)
- {
- if (isset($this->resolving[$envName = "env($name)"])) {
- throw new ParameterCircularReferenceException(array_keys($this->resolving));
- }
- if (isset($this->envCache[$name]) || \array_key_exists($name, $this->envCache)) {
- return $this->envCache[$name];
- }
- if (!$this->has($id = 'container.env_var_processors_locator')) {
- $this->set($id, new ServiceLocator([]));
- }
- if (!$this->getEnv) {
- $this->getEnv = new \ReflectionMethod($this, __FUNCTION__);
- $this->getEnv->setAccessible(true);
- $this->getEnv = $this->getEnv->getClosure($this);
- }
- $processors = $this->get($id);
-
- if (false !== $i = strpos($name, ':')) {
- $prefix = substr($name, 0, $i);
- $localName = substr($name, 1 + $i);
- } else {
- $prefix = 'string';
- $localName = $name;
- }
- $processor = $processors->has($prefix) ? $processors->get($prefix) : new EnvVarProcessor($this);
-
- $this->resolving[$envName] = true;
- try {
- return $this->envCache[$name] = $processor->getEnv($prefix, $localName, $this->getEnv);
- } finally {
- unset($this->resolving[$envName]);
- }
- }
-
- /**
- * @param string|false $registry
- * @param string|bool $load
- *
- * @return mixed
- *
- * @internal
- */
- final protected function getService($registry, string $id, ?string $method, $load)
- {
- if ('service_container' === $id) {
- return $this;
- }
- if (\is_string($load)) {
- throw new RuntimeException($load);
- }
- if (null === $method) {
- return false !== $registry ? $this->{$registry}[$id] ?? null : null;
- }
- if (false !== $registry) {
- return $this->{$registry}[$id] ?? $this->{$registry}[$id] = $load ? $this->load($method) : $this->{$method}();
- }
- if (!$load) {
- return $this->{$method}();
- }
-
- return ($factory = $this->factories[$id] ?? $this->factories['service_container'][$id] ?? null) ? $factory() : $this->load($method);
- }
-
- private function __clone()
- {
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareInterface.php
deleted file mode 100644
index e7b9d57..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * ContainerAwareInterface should be implemented by classes that depends on a Container.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface ContainerAwareInterface
-{
- /**
- * Sets the container.
- */
- public function setContainer(ContainerInterface $container = null);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareTrait.php
deleted file mode 100644
index ee1ea2c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerAwareTrait.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * ContainerAware trait.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-trait ContainerAwareTrait
-{
- /**
- * @var ContainerInterface
- */
- protected $container;
-
- public function setContainer(ContainerInterface $container = null)
- {
- $this->container = $container;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerBuilder.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerBuilder.php
deleted file mode 100644
index 247a021..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerBuilder.php
+++ /dev/null
@@ -1,1672 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Psr\Container\ContainerInterface as PsrContainerInterface;
-use Symfony\Component\Config\Resource\ClassExistenceResource;
-use Symfony\Component\Config\Resource\ComposerResource;
-use Symfony\Component\Config\Resource\DirectoryResource;
-use Symfony\Component\Config\Resource\FileExistenceResource;
-use Symfony\Component\Config\Resource\FileResource;
-use Symfony\Component\Config\Resource\GlobResource;
-use Symfony\Component\Config\Resource\ReflectionClassResource;
-use Symfony\Component\Config\Resource\ResourceInterface;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocator;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Compiler\Compiler;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\Compiler\PassConfig;
-use Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass;
-use Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface;
-use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator;
-use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
-use Symfony\Component\ExpressionLanguage\Expression;
-use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
-
-/**
- * ContainerBuilder is a DI container that provides an API to easily describe services.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ContainerBuilder extends Container implements TaggedContainerInterface
-{
- /**
- * @var ExtensionInterface[]
- */
- private $extensions = [];
-
- /**
- * @var ExtensionInterface[]
- */
- private $extensionsByNs = [];
-
- /**
- * @var Definition[]
- */
- private $definitions = [];
-
- /**
- * @var Alias[]
- */
- private $aliasDefinitions = [];
-
- /**
- * @var ResourceInterface[]
- */
- private $resources = [];
-
- private $extensionConfigs = [];
-
- /**
- * @var Compiler
- */
- private $compiler;
-
- private $trackResources;
-
- /**
- * @var InstantiatorInterface|null
- */
- private $proxyInstantiator;
-
- /**
- * @var ExpressionLanguage|null
- */
- private $expressionLanguage;
-
- /**
- * @var ExpressionFunctionProviderInterface[]
- */
- private $expressionLanguageProviders = [];
-
- /**
- * @var string[] with tag names used by findTaggedServiceIds
- */
- private $usedTags = [];
-
- /**
- * @var string[][] a map of env var names to their placeholders
- */
- private $envPlaceholders = [];
-
- /**
- * @var int[] a map of env vars to their resolution counter
- */
- private $envCounters = [];
-
- /**
- * @var string[] the list of vendor directories
- */
- private $vendors;
-
- private $autoconfiguredInstanceof = [];
-
- private $removedIds = [];
-
- private $removedBindingIds = [];
-
- private static $internalTypes = [
- 'int' => true,
- 'float' => true,
- 'string' => true,
- 'bool' => true,
- 'resource' => true,
- 'object' => true,
- 'array' => true,
- 'null' => true,
- 'callable' => true,
- 'iterable' => true,
- 'mixed' => true,
- ];
-
- public function __construct(ParameterBagInterface $parameterBag = null)
- {
- parent::__construct($parameterBag);
-
- $this->trackResources = interface_exists('Symfony\Component\Config\Resource\ResourceInterface');
- $this->setDefinition('service_container', (new Definition(ContainerInterface::class))->setSynthetic(true)->setPublic(true));
- $this->setAlias(PsrContainerInterface::class, new Alias('service_container', false));
- $this->setAlias(ContainerInterface::class, new Alias('service_container', false));
- }
-
- /**
- * @var \ReflectionClass[] a list of class reflectors
- */
- private $classReflectors;
-
- /**
- * Sets the track resources flag.
- *
- * If you are not using the loaders and therefore don't want
- * to depend on the Config component, set this flag to false.
- *
- * @param bool $track True if you want to track resources, false otherwise
- */
- public function setResourceTracking($track)
- {
- $this->trackResources = (bool) $track;
- }
-
- /**
- * Checks if resources are tracked.
- *
- * @return bool true If resources are tracked, false otherwise
- */
- public function isTrackingResources()
- {
- return $this->trackResources;
- }
-
- /**
- * Sets the instantiator to be used when fetching proxies.
- */
- public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator)
- {
- $this->proxyInstantiator = $proxyInstantiator;
- }
-
- public function registerExtension(ExtensionInterface $extension)
- {
- $this->extensions[$extension->getAlias()] = $extension;
-
- if (false !== $extension->getNamespace()) {
- $this->extensionsByNs[$extension->getNamespace()] = $extension;
- }
- }
-
- /**
- * Returns an extension by alias or namespace.
- *
- * @param string $name An alias or a namespace
- *
- * @return ExtensionInterface An extension instance
- *
- * @throws LogicException if the extension is not registered
- */
- public function getExtension($name)
- {
- if (isset($this->extensions[$name])) {
- return $this->extensions[$name];
- }
-
- if (isset($this->extensionsByNs[$name])) {
- return $this->extensionsByNs[$name];
- }
-
- throw new LogicException(sprintf('Container extension "%s" is not registered', $name));
- }
-
- /**
- * Returns all registered extensions.
- *
- * @return ExtensionInterface[] An array of ExtensionInterface
- */
- public function getExtensions()
- {
- return $this->extensions;
- }
-
- /**
- * Checks if we have an extension.
- *
- * @param string $name The name of the extension
- *
- * @return bool If the extension exists
- */
- public function hasExtension($name)
- {
- return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]);
- }
-
- /**
- * Returns an array of resources loaded to build this configuration.
- *
- * @return ResourceInterface[] An array of resources
- */
- public function getResources()
- {
- return array_values($this->resources);
- }
-
- /**
- * @return $this
- */
- public function addResource(ResourceInterface $resource)
- {
- if (!$this->trackResources) {
- return $this;
- }
-
- if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) {
- return $this;
- }
-
- $this->resources[(string) $resource] = $resource;
-
- return $this;
- }
-
- /**
- * Sets the resources for this configuration.
- *
- * @param ResourceInterface[] $resources An array of resources
- *
- * @return $this
- */
- public function setResources(array $resources)
- {
- if (!$this->trackResources) {
- return $this;
- }
-
- $this->resources = $resources;
-
- return $this;
- }
-
- /**
- * Adds the object class hierarchy as resources.
- *
- * @param object|string $object An object instance or class name
- *
- * @return $this
- */
- public function addObjectResource($object)
- {
- if ($this->trackResources) {
- if (\is_object($object)) {
- $object = \get_class($object);
- }
- if (!isset($this->classReflectors[$object])) {
- $this->classReflectors[$object] = new \ReflectionClass($object);
- }
- $class = $this->classReflectors[$object];
-
- foreach ($class->getInterfaceNames() as $name) {
- if (null === $interface = &$this->classReflectors[$name]) {
- $interface = new \ReflectionClass($name);
- }
- $file = $interface->getFileName();
- if (false !== $file && file_exists($file)) {
- $this->fileExists($file);
- }
- }
- do {
- $file = $class->getFileName();
- if (false !== $file && file_exists($file)) {
- $this->fileExists($file);
- }
- foreach ($class->getTraitNames() as $name) {
- $this->addObjectResource($name);
- }
- } while ($class = $class->getParentClass());
- }
-
- return $this;
- }
-
- /**
- * Retrieves the requested reflection class and registers it for resource tracking.
- *
- * @throws \ReflectionException when a parent class/interface/trait is not found and $throw is true
- *
- * @final
- */
- public function getReflectionClass(?string $class, bool $throw = true): ?\ReflectionClass
- {
- if (!$class = $this->getParameterBag()->resolveValue($class)) {
- return null;
- }
-
- if (isset(self::$internalTypes[$class])) {
- return null;
- }
-
- $resource = $classReflector = null;
-
- try {
- if (isset($this->classReflectors[$class])) {
- $classReflector = $this->classReflectors[$class];
- } elseif (class_exists(ClassExistenceResource::class)) {
- $resource = new ClassExistenceResource($class, false);
- $classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
- } else {
- $classReflector = class_exists($class) ? new \ReflectionClass($class) : false;
- }
- } catch (\ReflectionException $e) {
- if ($throw) {
- throw $e;
- }
- }
-
- if ($this->trackResources) {
- if (!$classReflector) {
- $this->addResource($resource ?: new ClassExistenceResource($class, false));
- } elseif (!$classReflector->isInternal()) {
- $path = $classReflector->getFileName();
-
- if (!$this->inVendors($path)) {
- $this->addResource(new ReflectionClassResource($classReflector, $this->vendors));
- }
- }
- $this->classReflectors[$class] = $classReflector;
- }
-
- return $classReflector ?: null;
- }
-
- /**
- * Checks whether the requested file or directory exists and registers the result for resource tracking.
- *
- * @param string $path The file or directory path for which to check the existence
- * @param bool|string $trackContents Whether to track contents of the given resource. If a string is passed,
- * it will be used as pattern for tracking contents of the requested directory
- *
- * @final
- */
- public function fileExists(string $path, $trackContents = true): bool
- {
- $exists = file_exists($path);
-
- if (!$this->trackResources || $this->inVendors($path)) {
- return $exists;
- }
-
- if (!$exists) {
- $this->addResource(new FileExistenceResource($path));
-
- return $exists;
- }
-
- if (is_dir($path)) {
- if ($trackContents) {
- $this->addResource(new DirectoryResource($path, \is_string($trackContents) ? $trackContents : null));
- } else {
- $this->addResource(new GlobResource($path, '/*', false));
- }
- } elseif ($trackContents) {
- $this->addResource(new FileResource($path));
- }
-
- return $exists;
- }
-
- /**
- * Loads the configuration for an extension.
- *
- * @param string $extension The extension alias or namespace
- * @param array $values An array of values that customizes the extension
- *
- * @return $this
- *
- * @throws BadMethodCallException When this ContainerBuilder is compiled
- * @throws \LogicException if the extension is not registered
- */
- public function loadFromExtension($extension, array $values = null)
- {
- if ($this->isCompiled()) {
- throw new BadMethodCallException('Cannot load from an extension on a compiled container.');
- }
-
- if (\func_num_args() < 2) {
- $values = [];
- }
-
- $namespace = $this->getExtension($extension)->getAlias();
-
- $this->extensionConfigs[$namespace][] = $values;
-
- return $this;
- }
-
- /**
- * Adds a compiler pass.
- *
- * @param string $type The type of compiler pass
- * @param int $priority Used to sort the passes
- *
- * @return $this
- */
- public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
- {
- $this->getCompiler()->addPass($pass, $type, $priority);
-
- $this->addObjectResource($pass);
-
- return $this;
- }
-
- /**
- * Returns the compiler pass config which can then be modified.
- *
- * @return PassConfig The compiler pass config
- */
- public function getCompilerPassConfig()
- {
- return $this->getCompiler()->getPassConfig();
- }
-
- /**
- * Returns the compiler.
- *
- * @return Compiler The compiler
- */
- public function getCompiler()
- {
- if (null === $this->compiler) {
- $this->compiler = new Compiler();
- }
-
- return $this->compiler;
- }
-
- /**
- * Sets a service.
- *
- * @param string $id The service identifier
- * @param object|null $service The service instance
- *
- * @throws BadMethodCallException When this ContainerBuilder is compiled
- */
- public function set($id, $service)
- {
- if (!\is_object($service) && null !== $service) {
- @trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, setting the "%s" service to a value of type "%s" should be avoided.', $id, \gettype($service)), E_USER_DEPRECATED);
- }
-
- $id = (string) $id;
-
- if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) {
- // setting a synthetic service on a compiled container is alright
- throw new BadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id));
- }
-
- unset($this->definitions[$id], $this->aliasDefinitions[$id], $this->removedIds[$id]);
-
- parent::set($id, $service);
- }
-
- /**
- * Removes a service definition.
- *
- * @param string $id The service identifier
- */
- public function removeDefinition($id)
- {
- if (isset($this->definitions[$id = (string) $id])) {
- unset($this->definitions[$id]);
- $this->removedIds[$id] = true;
- }
- }
-
- /**
- * Returns true if the given service is defined.
- *
- * @param string $id The service identifier
- *
- * @return bool true if the service is defined, false otherwise
- */
- public function has($id)
- {
- $id = (string) $id;
-
- return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id);
- }
-
- /**
- * Gets a service.
- *
- * @param string $id The service identifier
- * @param int $invalidBehavior The behavior when the service does not exist
- *
- * @return object|null The associated service
- *
- * @throws InvalidArgumentException when no definitions are available
- * @throws ServiceCircularReferenceException When a circular reference is detected
- * @throws ServiceNotFoundException When the service is not defined
- * @throws \Exception
- *
- * @see Reference
- */
- public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
- {
- if ($this->isCompiled() && isset($this->removedIds[$id = (string) $id]) && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $invalidBehavior) {
- return parent::get($id);
- }
-
- $service = $this->doGet($id, $invalidBehavior);
-
- if (!\is_object($service) && null !== $service) {
- @trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.', $id, \gettype($service)), E_USER_DEPRECATED);
- }
-
- return $service;
- }
-
- private function doGet(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, array &$inlineServices = null, bool $isConstructorArgument = false)
- {
- if (isset($inlineServices[$id])) {
- return $inlineServices[$id];
- }
- if (null === $inlineServices) {
- $isConstructorArgument = true;
- $inlineServices = [];
- }
- try {
- if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) {
- return parent::get($id, $invalidBehavior);
- }
- if ($service = parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) {
- return $service;
- }
- } catch (ServiceCircularReferenceException $e) {
- if ($isConstructorArgument) {
- throw $e;
- }
- }
-
- if (!isset($this->definitions[$id]) && isset($this->aliasDefinitions[$id])) {
- $alias = $this->aliasDefinitions[$id];
-
- if ($alias->isDeprecated()) {
- @trigger_error($alias->getDeprecationMessage($id), E_USER_DEPRECATED);
- }
-
- return $this->doGet((string) $alias, $invalidBehavior, $inlineServices, $isConstructorArgument);
- }
-
- try {
- $definition = $this->getDefinition($id);
- } catch (ServiceNotFoundException $e) {
- if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $invalidBehavior) {
- return null;
- }
-
- throw $e;
- }
-
- if ($definition->hasErrors() && $e = $definition->getErrors()) {
- throw new RuntimeException(reset($e));
- }
-
- if ($isConstructorArgument) {
- $this->loading[$id] = true;
- }
-
- try {
- return $this->createService($definition, $inlineServices, $isConstructorArgument, $id);
- } finally {
- if ($isConstructorArgument) {
- unset($this->loading[$id]);
- }
- }
- }
-
- /**
- * Merges a ContainerBuilder with the current ContainerBuilder configuration.
- *
- * Service definitions overrides the current defined ones.
- *
- * But for parameters, they are overridden by the current ones. It allows
- * the parameters passed to the container constructor to have precedence
- * over the loaded ones.
- *
- * $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar']));
- * $loader = new LoaderXXX($container);
- * $loader->load('resource_name');
- * $container->register('foo', 'stdClass');
- *
- * In the above example, even if the loaded resource defines a foo
- * parameter, the value will still be 'bar' as defined in the ContainerBuilder
- * constructor.
- *
- * @throws BadMethodCallException When this ContainerBuilder is compiled
- */
- public function merge(self $container)
- {
- if ($this->isCompiled()) {
- throw new BadMethodCallException('Cannot merge on a compiled container.');
- }
-
- $this->addDefinitions($container->getDefinitions());
- $this->addAliases($container->getAliases());
- $this->getParameterBag()->add($container->getParameterBag()->all());
-
- if ($this->trackResources) {
- foreach ($container->getResources() as $resource) {
- $this->addResource($resource);
- }
- }
-
- foreach ($this->extensions as $name => $extension) {
- if (!isset($this->extensionConfigs[$name])) {
- $this->extensionConfigs[$name] = [];
- }
-
- $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name));
- }
-
- if ($this->getParameterBag() instanceof EnvPlaceholderParameterBag && $container->getParameterBag() instanceof EnvPlaceholderParameterBag) {
- $envPlaceholders = $container->getParameterBag()->getEnvPlaceholders();
- $this->getParameterBag()->mergeEnvPlaceholders($container->getParameterBag());
- } else {
- $envPlaceholders = [];
- }
-
- foreach ($container->envCounters as $env => $count) {
- if (!$count && !isset($envPlaceholders[$env])) {
- continue;
- }
- if (!isset($this->envCounters[$env])) {
- $this->envCounters[$env] = $count;
- } else {
- $this->envCounters[$env] += $count;
- }
- }
-
- foreach ($container->getAutoconfiguredInstanceof() as $interface => $childDefinition) {
- if (isset($this->autoconfiguredInstanceof[$interface])) {
- throw new InvalidArgumentException(sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface));
- }
-
- $this->autoconfiguredInstanceof[$interface] = $childDefinition;
- }
- }
-
- /**
- * Returns the configuration array for the given extension.
- *
- * @param string $name The name of the extension
- *
- * @return array An array of configuration
- */
- public function getExtensionConfig($name)
- {
- if (!isset($this->extensionConfigs[$name])) {
- $this->extensionConfigs[$name] = [];
- }
-
- return $this->extensionConfigs[$name];
- }
-
- /**
- * Prepends a config array to the configs of the given extension.
- *
- * @param string $name The name of the extension
- * @param array $config The config to set
- */
- public function prependExtensionConfig($name, array $config)
- {
- if (!isset($this->extensionConfigs[$name])) {
- $this->extensionConfigs[$name] = [];
- }
-
- array_unshift($this->extensionConfigs[$name], $config);
- }
-
- /**
- * Compiles the container.
- *
- * This method passes the container to compiler
- * passes whose job is to manipulate and optimize
- * the container.
- *
- * The main compiler passes roughly do four things:
- *
- * * The extension configurations are merged;
- * * Parameter values are resolved;
- * * The parameter bag is frozen;
- * * Extension loading is disabled.
- *
- * @param bool $resolveEnvPlaceholders Whether %env()% parameters should be resolved using the current
- * env vars or be replaced by uniquely identifiable placeholders.
- * Set to "true" when you want to use the current ContainerBuilder
- * directly, keep to "false" when the container is dumped instead.
- */
- public function compile(bool $resolveEnvPlaceholders = false)
- {
- $compiler = $this->getCompiler();
-
- if ($this->trackResources) {
- foreach ($compiler->getPassConfig()->getPasses() as $pass) {
- $this->addObjectResource($pass);
- }
- }
- $bag = $this->getParameterBag();
-
- if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) {
- $compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000);
- }
-
- $compiler->compile($this);
-
- foreach ($this->definitions as $id => $definition) {
- if ($this->trackResources && $definition->isLazy()) {
- $this->getReflectionClass($definition->getClass());
- }
- }
-
- $this->extensionConfigs = [];
-
- if ($bag instanceof EnvPlaceholderParameterBag) {
- if ($resolveEnvPlaceholders) {
- $this->parameterBag = new ParameterBag($this->resolveEnvPlaceholders($bag->all(), true));
- }
-
- $this->envPlaceholders = $bag->getEnvPlaceholders();
- }
-
- parent::compile();
-
- foreach ($this->definitions + $this->aliasDefinitions as $id => $definition) {
- if (!$definition->isPublic() || $definition->isPrivate()) {
- $this->removedIds[$id] = true;
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getServiceIds()
- {
- return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds())));
- }
-
- /**
- * Gets removed service or alias ids.
- *
- * @return array
- */
- public function getRemovedIds()
- {
- return $this->removedIds;
- }
-
- /**
- * Adds the service aliases.
- */
- public function addAliases(array $aliases)
- {
- foreach ($aliases as $alias => $id) {
- $this->setAlias($alias, $id);
- }
- }
-
- /**
- * Sets the service aliases.
- */
- public function setAliases(array $aliases)
- {
- $this->aliasDefinitions = [];
- $this->addAliases($aliases);
- }
-
- /**
- * Sets an alias for an existing service.
- *
- * @param string $alias The alias to create
- * @param string|Alias $id The service to alias
- *
- * @return Alias
- *
- * @throws InvalidArgumentException if the id is not a string or an Alias
- * @throws InvalidArgumentException if the alias is for itself
- */
- public function setAlias($alias, $id)
- {
- $alias = (string) $alias;
-
- if ('' === $alias || '\\' === $alias[-1] || \strlen($alias) !== strcspn($alias, "\0\r\n'")) {
- throw new InvalidArgumentException(sprintf('Invalid alias id: "%s"', $alias));
- }
-
- if (\is_string($id)) {
- $id = new Alias($id);
- } elseif (!$id instanceof Alias) {
- throw new InvalidArgumentException('$id must be a string, or an Alias object.');
- }
-
- if ($alias === (string) $id) {
- throw new InvalidArgumentException(sprintf('An alias can not reference itself, got a circular reference on "%s".', $alias));
- }
-
- unset($this->definitions[$alias], $this->removedIds[$alias]);
-
- return $this->aliasDefinitions[$alias] = $id;
- }
-
- /**
- * Removes an alias.
- *
- * @param string $alias The alias to remove
- */
- public function removeAlias($alias)
- {
- if (isset($this->aliasDefinitions[$alias = (string) $alias])) {
- unset($this->aliasDefinitions[$alias]);
- $this->removedIds[$alias] = true;
- }
- }
-
- /**
- * Returns true if an alias exists under the given identifier.
- *
- * @param string $id The service identifier
- *
- * @return bool true if the alias exists, false otherwise
- */
- public function hasAlias($id)
- {
- return isset($this->aliasDefinitions[$id = (string) $id]);
- }
-
- /**
- * Gets all defined aliases.
- *
- * @return Alias[] An array of aliases
- */
- public function getAliases()
- {
- return $this->aliasDefinitions;
- }
-
- /**
- * Gets an alias.
- *
- * @param string $id The service identifier
- *
- * @return Alias An Alias instance
- *
- * @throws InvalidArgumentException if the alias does not exist
- */
- public function getAlias($id)
- {
- $id = (string) $id;
-
- if (!isset($this->aliasDefinitions[$id])) {
- throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id));
- }
-
- return $this->aliasDefinitions[$id];
- }
-
- /**
- * Registers a service definition.
- *
- * This methods allows for simple registration of service definition
- * with a fluid interface.
- *
- * @param string $id The service identifier
- * @param string|null $class The service class
- *
- * @return Definition A Definition instance
- */
- public function register($id, $class = null)
- {
- return $this->setDefinition($id, new Definition($class));
- }
-
- /**
- * Registers an autowired service definition.
- *
- * This method implements a shortcut for using setDefinition() with
- * an autowired definition.
- *
- * @param string $id The service identifier
- * @param string|null $class The service class
- *
- * @return Definition The created definition
- */
- public function autowire($id, $class = null)
- {
- return $this->setDefinition($id, (new Definition($class))->setAutowired(true));
- }
-
- /**
- * Adds the service definitions.
- *
- * @param Definition[] $definitions An array of service definitions
- */
- public function addDefinitions(array $definitions)
- {
- foreach ($definitions as $id => $definition) {
- $this->setDefinition($id, $definition);
- }
- }
-
- /**
- * Sets the service definitions.
- *
- * @param Definition[] $definitions An array of service definitions
- */
- public function setDefinitions(array $definitions)
- {
- $this->definitions = [];
- $this->addDefinitions($definitions);
- }
-
- /**
- * Gets all service definitions.
- *
- * @return Definition[] An array of Definition instances
- */
- public function getDefinitions()
- {
- return $this->definitions;
- }
-
- /**
- * Sets a service definition.
- *
- * @param string $id The service identifier
- *
- * @return Definition the service definition
- *
- * @throws BadMethodCallException When this ContainerBuilder is compiled
- */
- public function setDefinition($id, Definition $definition)
- {
- if ($this->isCompiled()) {
- throw new BadMethodCallException('Adding definition to a compiled container is not allowed');
- }
-
- $id = (string) $id;
-
- if ('' === $id || '\\' === $id[-1] || \strlen($id) !== strcspn($id, "\0\r\n'")) {
- throw new InvalidArgumentException(sprintf('Invalid service id: "%s"', $id));
- }
-
- unset($this->aliasDefinitions[$id], $this->removedIds[$id]);
-
- return $this->definitions[$id] = $definition;
- }
-
- /**
- * Returns true if a service definition exists under the given identifier.
- *
- * @param string $id The service identifier
- *
- * @return bool true if the service definition exists, false otherwise
- */
- public function hasDefinition($id)
- {
- return isset($this->definitions[(string) $id]);
- }
-
- /**
- * Gets a service definition.
- *
- * @param string $id The service identifier
- *
- * @return Definition A Definition instance
- *
- * @throws ServiceNotFoundException if the service definition does not exist
- */
- public function getDefinition($id)
- {
- $id = (string) $id;
-
- if (!isset($this->definitions[$id])) {
- throw new ServiceNotFoundException($id);
- }
-
- return $this->definitions[$id];
- }
-
- /**
- * Gets a service definition by id or alias.
- *
- * The method "unaliases" recursively to return a Definition instance.
- *
- * @param string $id The service identifier or alias
- *
- * @return Definition A Definition instance
- *
- * @throws ServiceNotFoundException if the service definition does not exist
- */
- public function findDefinition($id)
- {
- $id = (string) $id;
-
- $seen = [];
- while (isset($this->aliasDefinitions[$id])) {
- $id = (string) $this->aliasDefinitions[$id];
-
- if (isset($seen[$id])) {
- $seen = array_values($seen);
- $seen = \array_slice($seen, array_search($id, $seen));
- $seen[] = $id;
-
- throw new ServiceCircularReferenceException($id, $seen);
- }
-
- $seen[$id] = $id;
- }
-
- return $this->getDefinition($id);
- }
-
- /**
- * Creates a service for a service definition.
- *
- * @return mixed The service described by the service definition
- *
- * @throws RuntimeException When the factory definition is incomplete
- * @throws RuntimeException When the service is a synthetic service
- * @throws InvalidArgumentException When configure callable is not callable
- */
- private function createService(Definition $definition, array &$inlineServices, bool $isConstructorArgument = false, string $id = null, bool $tryProxy = true)
- {
- if (null === $id && isset($inlineServices[$h = spl_object_hash($definition)])) {
- return $inlineServices[$h];
- }
-
- if ($definition instanceof ChildDefinition) {
- throw new RuntimeException(sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id));
- }
-
- if ($definition->isSynthetic()) {
- throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id));
- }
-
- if ($definition->isDeprecated()) {
- @trigger_error($definition->getDeprecationMessage($id), E_USER_DEPRECATED);
- }
-
- if ($tryProxy && $definition->isLazy() && !$tryProxy = !($proxy = $this->proxyInstantiator) || $proxy instanceof RealServiceInstantiator) {
- $proxy = $proxy->instantiateProxy(
- $this,
- $definition,
- $id, function () use ($definition, &$inlineServices, $id) {
- return $this->createService($definition, $inlineServices, true, $id, false);
- }
- );
- $this->shareService($definition, $proxy, $id, $inlineServices);
-
- return $proxy;
- }
-
- $parameterBag = $this->getParameterBag();
-
- if (null !== $definition->getFile()) {
- require_once $parameterBag->resolveValue($definition->getFile());
- }
-
- $arguments = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())), $inlineServices, $isConstructorArgument);
-
- if (null !== $factory = $definition->getFactory()) {
- if (\is_array($factory)) {
- $factory = [$this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]];
- } elseif (!\is_string($factory)) {
- throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory', $id));
- }
- }
-
- if (null !== $id && $definition->isShared() && isset($this->services[$id]) && ($tryProxy || !$definition->isLazy())) {
- return $this->services[$id];
- }
-
- if (null !== $factory) {
- $service = $factory(...$arguments);
-
- if (!$definition->isDeprecated() && \is_array($factory) && \is_string($factory[0])) {
- $r = new \ReflectionClass($factory[0]);
-
- if (0 < strpos($r->getDocComment(), "\n * @deprecated ")) {
- @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name), E_USER_DEPRECATED);
- }
- }
- } else {
- $r = new \ReflectionClass($parameterBag->resolveValue($definition->getClass()));
-
- $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
-
- if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ")) {
- @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), E_USER_DEPRECATED);
- }
- }
-
- $lastWitherIndex = null;
- foreach ($definition->getMethodCalls() as $k => $call) {
- if ($call[2] ?? false) {
- $lastWitherIndex = $k;
- }
- }
-
- if (null === $lastWitherIndex && ($tryProxy || !$definition->isLazy())) {
- // share only if proxying failed, or if not a proxy, and if no withers are found
- $this->shareService($definition, $service, $id, $inlineServices);
- }
-
- $properties = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties())), $inlineServices);
- foreach ($properties as $name => $value) {
- $service->$name = $value;
- }
-
- foreach ($definition->getMethodCalls() as $k => $call) {
- $service = $this->callMethod($service, $call, $inlineServices);
-
- if ($lastWitherIndex === $k && ($tryProxy || !$definition->isLazy())) {
- // share only if proxying failed, or if not a proxy, and this is the last wither
- $this->shareService($definition, $service, $id, $inlineServices);
- }
- }
-
- if ($callable = $definition->getConfigurator()) {
- if (\is_array($callable)) {
- $callable[0] = $parameterBag->resolveValue($callable[0]);
-
- if ($callable[0] instanceof Reference) {
- $callable[0] = $this->doGet((string) $callable[0], $callable[0]->getInvalidBehavior(), $inlineServices);
- } elseif ($callable[0] instanceof Definition) {
- $callable[0] = $this->createService($callable[0], $inlineServices);
- }
- }
-
- if (!\is_callable($callable)) {
- throw new InvalidArgumentException(sprintf('The configure callable for class "%s" is not a callable.', \get_class($service)));
- }
-
- $callable($service);
- }
-
- return $service;
- }
-
- /**
- * Replaces service references by the real service instance and evaluates expressions.
- *
- * @param mixed $value A value
- *
- * @return mixed The same value with all service references replaced by
- * the real service instances and all expressions evaluated
- */
- public function resolveServices($value)
- {
- return $this->doResolveServices($value);
- }
-
- private function doResolveServices($value, array &$inlineServices = [], bool $isConstructorArgument = false)
- {
- if (\is_array($value)) {
- foreach ($value as $k => $v) {
- $value[$k] = $this->doResolveServices($v, $inlineServices, $isConstructorArgument);
- }
- } elseif ($value instanceof ServiceClosureArgument) {
- $reference = $value->getValues()[0];
- $value = function () use ($reference) {
- return $this->resolveServices($reference);
- };
- } elseif ($value instanceof IteratorArgument) {
- $value = new RewindableGenerator(function () use ($value) {
- foreach ($value->getValues() as $k => $v) {
- foreach (self::getServiceConditionals($v) as $s) {
- if (!$this->has($s)) {
- continue 2;
- }
- }
- foreach (self::getInitializedConditionals($v) as $s) {
- if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
- continue 2;
- }
- }
-
- yield $k => $this->resolveServices($v);
- }
- }, function () use ($value): int {
- $count = 0;
- foreach ($value->getValues() as $v) {
- foreach (self::getServiceConditionals($v) as $s) {
- if (!$this->has($s)) {
- continue 2;
- }
- }
- foreach (self::getInitializedConditionals($v) as $s) {
- if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
- continue 2;
- }
- }
-
- ++$count;
- }
-
- return $count;
- });
- } elseif ($value instanceof ServiceLocatorArgument) {
- $refs = $types = [];
- foreach ($value->getValues() as $k => $v) {
- if ($v) {
- $refs[$k] = [$v];
- $types[$k] = $v instanceof TypedReference ? $v->getType() : '?';
- }
- }
- $value = new ServiceLocator(\Closure::fromCallable([$this, 'resolveServices']), $refs, $types);
- } elseif ($value instanceof Reference) {
- $value = $this->doGet((string) $value, $value->getInvalidBehavior(), $inlineServices, $isConstructorArgument);
- } elseif ($value instanceof Definition) {
- $value = $this->createService($value, $inlineServices, $isConstructorArgument);
- } elseif ($value instanceof Parameter) {
- $value = $this->getParameter((string) $value);
- } elseif ($value instanceof Expression) {
- $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]);
- }
-
- return $value;
- }
-
- /**
- * Returns service ids for a given tag.
- *
- * Example:
- *
- * $container->register('foo')->addTag('my.tag', ['hello' => 'world']);
- *
- * $serviceIds = $container->findTaggedServiceIds('my.tag');
- * foreach ($serviceIds as $serviceId => $tags) {
- * foreach ($tags as $tag) {
- * echo $tag['hello'];
- * }
- * }
- *
- * @param string $name
- * @param bool $throwOnAbstract
- *
- * @return array An array of tags with the tagged service as key, holding a list of attribute arrays
- */
- public function findTaggedServiceIds($name, $throwOnAbstract = false)
- {
- $this->usedTags[] = $name;
- $tags = [];
- foreach ($this->getDefinitions() as $id => $definition) {
- if ($definition->hasTag($name)) {
- if ($throwOnAbstract && $definition->isAbstract()) {
- throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name));
- }
- $tags[$id] = $definition->getTag($name);
- }
- }
-
- return $tags;
- }
-
- /**
- * Returns all tags the defined services use.
- *
- * @return array An array of tags
- */
- public function findTags()
- {
- $tags = [];
- foreach ($this->getDefinitions() as $id => $definition) {
- $tags = array_merge(array_keys($definition->getTags()), $tags);
- }
-
- return array_unique($tags);
- }
-
- /**
- * Returns all tags not queried by findTaggedServiceIds.
- *
- * @return string[] An array of tags
- */
- public function findUnusedTags()
- {
- return array_values(array_diff($this->findTags(), $this->usedTags));
- }
-
- public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
- {
- $this->expressionLanguageProviders[] = $provider;
- }
-
- /**
- * @return ExpressionFunctionProviderInterface[]
- */
- public function getExpressionLanguageProviders()
- {
- return $this->expressionLanguageProviders;
- }
-
- /**
- * Returns a ChildDefinition that will be used for autoconfiguring the interface/class.
- *
- * @param string $interface The class or interface to match
- *
- * @return ChildDefinition
- */
- public function registerForAutoconfiguration($interface)
- {
- if (!isset($this->autoconfiguredInstanceof[$interface])) {
- $this->autoconfiguredInstanceof[$interface] = new ChildDefinition('');
- }
-
- return $this->autoconfiguredInstanceof[$interface];
- }
-
- /**
- * Registers an autowiring alias that only binds to a specific argument name.
- *
- * The argument name is derived from $name if provided (from $id otherwise)
- * using camel case: "foo.bar" or "foo_bar" creates an alias bound to
- * "$fooBar"-named arguments with $type as type-hint. Such arguments will
- * receive the service $id when autowiring is used.
- */
- public function registerAliasForArgument(string $id, string $type, string $name = null): Alias
- {
- $name = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $name ?? $id))));
-
- if (!preg_match('/^[a-zA-Z_\x7f-\xff]/', $name)) {
- throw new InvalidArgumentException(sprintf('Invalid argument name "%s" for service "%s": the first character must be a letter.', $name, $id));
- }
-
- return $this->setAlias($type.' $'.$name, $id);
- }
-
- /**
- * Returns an array of ChildDefinition[] keyed by interface.
- *
- * @return ChildDefinition[]
- */
- public function getAutoconfiguredInstanceof()
- {
- return $this->autoconfiguredInstanceof;
- }
-
- /**
- * Resolves env parameter placeholders in a string or an array.
- *
- * @param mixed $value The value to resolve
- * @param string|true|null $format A sprintf() format returning the replacement for each env var name or
- * null to resolve back to the original "%env(VAR)%" format or
- * true to resolve to the actual values of the referenced env vars
- * @param array &$usedEnvs Env vars found while resolving are added to this array
- *
- * @return mixed The value with env parameters resolved if a string or an array is passed
- */
- public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null)
- {
- if (null === $format) {
- $format = '%%env(%s)%%';
- }
-
- $bag = $this->getParameterBag();
- if (true === $format) {
- $value = $bag->resolveValue($value);
- }
-
- if ($value instanceof Definition) {
- $value = (array) $value;
- }
-
- if (\is_array($value)) {
- $result = [];
- foreach ($value as $k => $v) {
- $result[\is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs);
- }
-
- return $result;
- }
-
- if (!\is_string($value) || 38 > \strlen($value)) {
- return $value;
- }
- $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
-
- $completed = false;
- foreach ($envPlaceholders as $env => $placeholders) {
- foreach ($placeholders as $placeholder) {
- if (false !== stripos($value, $placeholder)) {
- if (true === $format) {
- $resolved = $bag->escapeValue($this->getEnv($env));
- } else {
- $resolved = sprintf($format, $env);
- }
- if ($placeholder === $value) {
- $value = $resolved;
- $completed = true;
- } else {
- if (!\is_string($resolved) && !is_numeric($resolved)) {
- throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "env(%s)" of type %s inside string value "%s".', $env, \gettype($resolved), $this->resolveEnvPlaceholders($value)));
- }
- $value = str_ireplace($placeholder, $resolved, $value);
- }
- $usedEnvs[$env] = $env;
- $this->envCounters[$env] = isset($this->envCounters[$env]) ? 1 + $this->envCounters[$env] : 1;
-
- if ($completed) {
- break 2;
- }
- }
- }
- }
-
- return $value;
- }
-
- /**
- * Get statistics about env usage.
- *
- * @return int[] The number of time each env vars has been resolved
- */
- public function getEnvCounters()
- {
- $bag = $this->getParameterBag();
- $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
-
- foreach ($envPlaceholders as $env => $placeholders) {
- if (!isset($this->envCounters[$env])) {
- $this->envCounters[$env] = 0;
- }
- }
-
- return $this->envCounters;
- }
-
- /**
- * @final
- */
- public function log(CompilerPassInterface $pass, string $message)
- {
- $this->getCompiler()->log($pass, $this->resolveEnvPlaceholders($message));
- }
-
- /**
- * Gets removed binding ids.
- *
- * @internal
- */
- public function getRemovedBindingIds(): array
- {
- return $this->removedBindingIds;
- }
-
- /**
- * Removes bindings for a service.
- *
- * @internal
- */
- public function removeBindings(string $id)
- {
- if ($this->hasDefinition($id)) {
- foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
- list(, $bindingId) = $binding->getValues();
- $this->removedBindingIds[(int) $bindingId] = true;
- }
- }
- }
-
- /**
- * Returns the Service Conditionals.
- *
- * @param mixed $value An array of conditionals to return
- *
- * @internal
- */
- public static function getServiceConditionals($value): array
- {
- $services = [];
-
- if (\is_array($value)) {
- foreach ($value as $v) {
- $services = array_unique(array_merge($services, self::getServiceConditionals($v)));
- }
- } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
- $services[] = (string) $value;
- }
-
- return $services;
- }
-
- /**
- * Returns the initialized conditionals.
- *
- * @param mixed $value An array of conditionals to return
- *
- * @internal
- */
- public static function getInitializedConditionals($value): array
- {
- $services = [];
-
- if (\is_array($value)) {
- foreach ($value as $v) {
- $services = array_unique(array_merge($services, self::getInitializedConditionals($v)));
- }
- } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()) {
- $services[] = (string) $value;
- }
-
- return $services;
- }
-
- /**
- * Computes a reasonably unique hash of a value.
- *
- * @param mixed $value A serializable value
- *
- * @return string
- */
- public static function hash($value)
- {
- $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7);
-
- return str_replace(['/', '+'], ['.', '_'], $hash);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getEnv($name)
- {
- $value = parent::getEnv($name);
- $bag = $this->getParameterBag();
-
- if (!\is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) {
- return $value;
- }
-
- $envPlaceholders = $bag->getEnvPlaceholders();
- if (isset($envPlaceholders[$name][$value])) {
- $bag = new ParameterBag($bag->all());
-
- return $bag->unescapeValue($bag->get("env($name)"));
- }
- foreach ($envPlaceholders as $env => $placeholders) {
- if (isset($placeholders[$value])) {
- return $this->getEnv($env);
- }
- }
-
- $this->resolving["env($name)"] = true;
- try {
- return $bag->unescapeValue($this->resolveEnvPlaceholders($bag->escapeValue($value), true));
- } finally {
- unset($this->resolving["env($name)"]);
- }
- }
-
- private function callMethod($service, array $call, array &$inlineServices)
- {
- foreach (self::getServiceConditionals($call[1]) as $s) {
- if (!$this->has($s)) {
- return $service;
- }
- }
- foreach (self::getInitializedConditionals($call[1]) as $s) {
- if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) {
- return $service;
- }
- }
-
- $result = $service->{$call[0]}(...$this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices));
-
- return empty($call[2]) ? $service : $result;
- }
-
- /**
- * Shares a given service in the container.
- *
- * @param mixed $service
- */
- private function shareService(Definition $definition, $service, ?string $id, array &$inlineServices)
- {
- $inlineServices[null !== $id ? $id : spl_object_hash($definition)] = $service;
-
- if (null !== $id && $definition->isShared()) {
- $this->services[$id] = $service;
- unset($this->loading[$id]);
- }
- }
-
- private function getExpressionLanguage(): ExpressionLanguage
- {
- if (null === $this->expressionLanguage) {
- if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) {
- throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
- }
- $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders);
- }
-
- return $this->expressionLanguage;
- }
-
- private function inVendors(string $path): bool
- {
- if (null === $this->vendors) {
- $resource = new ComposerResource();
- $this->vendors = $resource->getVendors();
- $this->addResource($resource);
- }
- $path = realpath($path) ?: $path;
-
- foreach ($this->vendors as $vendor) {
- if (0 === strpos($path, $vendor) && false !== strpbrk(substr($path, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerInterface.php
deleted file mode 100644
index 0a7f018..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ContainerInterface.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Psr\Container\ContainerInterface as PsrContainerInterface;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-
-/**
- * ContainerInterface is the interface implemented by service container classes.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-interface ContainerInterface extends PsrContainerInterface
-{
- const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0;
- const EXCEPTION_ON_INVALID_REFERENCE = 1;
- const NULL_ON_INVALID_REFERENCE = 2;
- const IGNORE_ON_INVALID_REFERENCE = 3;
- const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
-
- /**
- * Sets a service.
- *
- * @param string $id The service identifier
- * @param object|null $service The service instance
- */
- public function set($id, $service);
-
- /**
- * Gets a service.
- *
- * @param string $id The service identifier
- * @param int $invalidBehavior The behavior when the service does not exist
- *
- * @return object|null The associated service
- *
- * @throws ServiceCircularReferenceException When a circular reference is detected
- * @throws ServiceNotFoundException When the service is not defined
- *
- * @see Reference
- */
- public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
-
- /**
- * Returns true if the given service is defined.
- *
- * @param string $id The service identifier
- *
- * @return bool true if the service is defined, false otherwise
- */
- public function has($id);
-
- /**
- * Check for whether or not a service has been initialized.
- *
- * @param string $id
- *
- * @return bool true if the service has been initialized, false otherwise
- */
- public function initialized($id);
-
- /**
- * Gets a parameter.
- *
- * @param string $name The parameter name
- *
- * @return mixed The parameter value
- *
- * @throws InvalidArgumentException if the parameter is not defined
- */
- public function getParameter($name);
-
- /**
- * Checks if a parameter exists.
- *
- * @param string $name The parameter name
- *
- * @return bool The presence of parameter in container
- */
- public function hasParameter($name);
-
- /**
- * Sets a parameter.
- *
- * @param string $name The parameter name
- * @param mixed $value The parameter value
- */
- public function setParameter($name, $value);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Definition.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Definition.php
deleted file mode 100644
index e2bc713..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Definition.php
+++ /dev/null
@@ -1,940 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Argument\BoundArgument;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
-
-/**
- * Definition represents a service definition.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Definition
-{
- private $class;
- private $file;
- private $factory;
- private $shared = true;
- private $deprecated = false;
- private $deprecationTemplate;
- private $properties = [];
- private $calls = [];
- private $instanceof = [];
- private $autoconfigured = false;
- private $configurator;
- private $tags = [];
- private $public = true;
- private $private = true;
- private $synthetic = false;
- private $abstract = false;
- private $lazy = false;
- private $decoratedService;
- private $autowired = false;
- private $changes = [];
- private $bindings = [];
- private $errors = [];
-
- protected $arguments = [];
-
- private static $defaultDeprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will be removed in the future.';
-
- /**
- * @internal
- *
- * Used to store the name of the inner id when using service decoration together with autowiring
- */
- public $innerServiceId;
-
- /**
- * @internal
- *
- * Used to store the behavior to follow when using service decoration and the decorated service is invalid
- */
- public $decorationOnInvalid;
-
- /**
- * @param string|null $class The service class
- * @param array $arguments An array of arguments to pass to the service constructor
- */
- public function __construct($class = null, array $arguments = [])
- {
- if (null !== $class) {
- $this->setClass($class);
- }
- $this->arguments = $arguments;
- }
-
- /**
- * Returns all changes tracked for the Definition object.
- *
- * @return array An array of changes for this Definition
- */
- public function getChanges()
- {
- return $this->changes;
- }
-
- /**
- * Sets the tracked changes for the Definition object.
- *
- * @param array $changes An array of changes for this Definition
- *
- * @return $this
- */
- public function setChanges(array $changes)
- {
- $this->changes = $changes;
-
- return $this;
- }
-
- /**
- * Sets a factory.
- *
- * @param string|array|Reference $factory A PHP function, reference or an array containing a class/Reference and a method to call
- *
- * @return $this
- */
- public function setFactory($factory)
- {
- $this->changes['factory'] = true;
-
- if (\is_string($factory) && false !== strpos($factory, '::')) {
- $factory = explode('::', $factory, 2);
- } elseif ($factory instanceof Reference) {
- $factory = [$factory, '__invoke'];
- }
-
- $this->factory = $factory;
-
- return $this;
- }
-
- /**
- * Gets the factory.
- *
- * @return string|array|null The PHP function or an array containing a class/Reference and a method to call
- */
- public function getFactory()
- {
- return $this->factory;
- }
-
- /**
- * Sets the service that this service is decorating.
- *
- * @param string|null $id The decorated service id, use null to remove decoration
- * @param string|null $renamedId The new decorated service id
- * @param int $priority The priority of decoration
- * @param int $invalidBehavior The behavior to adopt when decorated is invalid
- *
- * @return $this
- *
- * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals
- */
- public function setDecoratedService($id, $renamedId = null, $priority = 0/*, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE*/)
- {
- if ($renamedId && $id === $renamedId) {
- throw new InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id));
- }
-
- $invalidBehavior = 3 < \func_num_args() ? (int) func_get_arg(3) : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
-
- $this->changes['decorated_service'] = true;
-
- if (null === $id) {
- $this->decoratedService = null;
- } else {
- $this->decoratedService = [$id, $renamedId, (int) $priority];
-
- if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
- $this->decoratedService[] = $invalidBehavior;
- }
- }
-
- return $this;
- }
-
- /**
- * Gets the service that this service is decorating.
- *
- * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated
- */
- public function getDecoratedService()
- {
- return $this->decoratedService;
- }
-
- /**
- * Sets the service class.
- *
- * @param string $class The service class
- *
- * @return $this
- */
- public function setClass($class)
- {
- if ($class instanceof Parameter) {
- @trigger_error(sprintf('Passing an instance of %s as class name to %s in deprecated in Symfony 4.4 and will result in a TypeError in 5.0. Please pass the string "%%%s%%" instead.', Parameter::class, __CLASS__, (string) $class), E_USER_DEPRECATED);
- }
- if (null !== $class && !\is_string($class)) {
- @trigger_error(sprintf('The class name passed to %s is expected to be a string. Passing a %s is deprecated in Symfony 4.4 and will result in a TypeError in 5.0.', __CLASS__, \is_object($class) ? \get_class($class) : \gettype($class)), E_USER_DEPRECATED);
- }
-
- $this->changes['class'] = true;
-
- $this->class = $class;
-
- return $this;
- }
-
- /**
- * Gets the service class.
- *
- * @return string|null The service class
- */
- public function getClass()
- {
- return $this->class;
- }
-
- /**
- * Sets the arguments to pass to the service constructor/factory method.
- *
- * @return $this
- */
- public function setArguments(array $arguments)
- {
- $this->arguments = $arguments;
-
- return $this;
- }
-
- /**
- * Sets the properties to define when creating the service.
- *
- * @return $this
- */
- public function setProperties(array $properties)
- {
- $this->properties = $properties;
-
- return $this;
- }
-
- /**
- * Gets the properties to define when creating the service.
- *
- * @return array
- */
- public function getProperties()
- {
- return $this->properties;
- }
-
- /**
- * Sets a specific property.
- *
- * @param string $name
- * @param mixed $value
- *
- * @return $this
- */
- public function setProperty($name, $value)
- {
- $this->properties[$name] = $value;
-
- return $this;
- }
-
- /**
- * Adds an argument to pass to the service constructor/factory method.
- *
- * @param mixed $argument An argument
- *
- * @return $this
- */
- public function addArgument($argument)
- {
- $this->arguments[] = $argument;
-
- return $this;
- }
-
- /**
- * Replaces a specific argument.
- *
- * @param int|string $index
- * @param mixed $argument
- *
- * @return $this
- *
- * @throws OutOfBoundsException When the replaced argument does not exist
- */
- public function replaceArgument($index, $argument)
- {
- if (0 === \count($this->arguments)) {
- throw new OutOfBoundsException('Cannot replace arguments if none have been configured yet.');
- }
-
- if (\is_int($index) && ($index < 0 || $index > \count($this->arguments) - 1)) {
- throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, \count($this->arguments) - 1));
- }
-
- if (!\array_key_exists($index, $this->arguments)) {
- throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index));
- }
-
- $this->arguments[$index] = $argument;
-
- return $this;
- }
-
- /**
- * Sets a specific argument.
- *
- * @param int|string $key
- * @param mixed $value
- *
- * @return $this
- */
- public function setArgument($key, $value)
- {
- $this->arguments[$key] = $value;
-
- return $this;
- }
-
- /**
- * Gets the arguments to pass to the service constructor/factory method.
- *
- * @return array The array of arguments
- */
- public function getArguments()
- {
- return $this->arguments;
- }
-
- /**
- * Gets an argument to pass to the service constructor/factory method.
- *
- * @param int|string $index
- *
- * @return mixed The argument value
- *
- * @throws OutOfBoundsException When the argument does not exist
- */
- public function getArgument($index)
- {
- if (!\array_key_exists($index, $this->arguments)) {
- throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index));
- }
-
- return $this->arguments[$index];
- }
-
- /**
- * Sets the methods to call after service initialization.
- *
- * @return $this
- */
- public function setMethodCalls(array $calls = [])
- {
- $this->calls = [];
- foreach ($calls as $call) {
- $this->addMethodCall($call[0], $call[1], $call[2] ?? false);
- }
-
- return $this;
- }
-
- /**
- * Adds a method to call after service initialization.
- *
- * @param string $method The method name to call
- * @param array $arguments An array of arguments to pass to the method call
- * @param bool $returnsClone Whether the call returns the service instance or not
- *
- * @return $this
- *
- * @throws InvalidArgumentException on empty $method param
- */
- public function addMethodCall($method, array $arguments = []/*, bool $returnsClone = false*/)
- {
- if (empty($method)) {
- throw new InvalidArgumentException('Method name cannot be empty.');
- }
- $this->calls[] = 2 < \func_num_args() && func_get_arg(2) ? [$method, $arguments, true] : [$method, $arguments];
-
- return $this;
- }
-
- /**
- * Removes a method to call after service initialization.
- *
- * @param string $method The method name to remove
- *
- * @return $this
- */
- public function removeMethodCall($method)
- {
- foreach ($this->calls as $i => $call) {
- if ($call[0] === $method) {
- unset($this->calls[$i]);
- break;
- }
- }
-
- return $this;
- }
-
- /**
- * Check if the current definition has a given method to call after service initialization.
- *
- * @param string $method The method name to search for
- *
- * @return bool
- */
- public function hasMethodCall($method)
- {
- foreach ($this->calls as $call) {
- if ($call[0] === $method) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Gets the methods to call after service initialization.
- *
- * @return array An array of method calls
- */
- public function getMethodCalls()
- {
- return $this->calls;
- }
-
- /**
- * Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
- *
- * @param ChildDefinition[] $instanceof
- *
- * @return $this
- */
- public function setInstanceofConditionals(array $instanceof)
- {
- $this->instanceof = $instanceof;
-
- return $this;
- }
-
- /**
- * Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
- *
- * @return ChildDefinition[]
- */
- public function getInstanceofConditionals()
- {
- return $this->instanceof;
- }
-
- /**
- * Sets whether or not instanceof conditionals should be prepended with a global set.
- *
- * @param bool $autoconfigured
- *
- * @return $this
- */
- public function setAutoconfigured($autoconfigured)
- {
- $this->changes['autoconfigured'] = true;
-
- $this->autoconfigured = $autoconfigured;
-
- return $this;
- }
-
- /**
- * @return bool
- */
- public function isAutoconfigured()
- {
- return $this->autoconfigured;
- }
-
- /**
- * Sets tags for this definition.
- *
- * @return $this
- */
- public function setTags(array $tags)
- {
- $this->tags = $tags;
-
- return $this;
- }
-
- /**
- * Returns all tags.
- *
- * @return array An array of tags
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * Gets a tag by name.
- *
- * @param string $name The tag name
- *
- * @return array An array of attributes
- */
- public function getTag($name)
- {
- return isset($this->tags[$name]) ? $this->tags[$name] : [];
- }
-
- /**
- * Adds a tag for this definition.
- *
- * @param string $name The tag name
- * @param array $attributes An array of attributes
- *
- * @return $this
- */
- public function addTag($name, array $attributes = [])
- {
- $this->tags[$name][] = $attributes;
-
- return $this;
- }
-
- /**
- * Whether this definition has a tag with the given name.
- *
- * @param string $name
- *
- * @return bool
- */
- public function hasTag($name)
- {
- return isset($this->tags[$name]);
- }
-
- /**
- * Clears all tags for a given name.
- *
- * @param string $name The tag name
- *
- * @return $this
- */
- public function clearTag($name)
- {
- unset($this->tags[$name]);
-
- return $this;
- }
-
- /**
- * Clears the tags for this definition.
- *
- * @return $this
- */
- public function clearTags()
- {
- $this->tags = [];
-
- return $this;
- }
-
- /**
- * Sets a file to require before creating the service.
- *
- * @param string $file A full pathname to include
- *
- * @return $this
- */
- public function setFile($file)
- {
- $this->changes['file'] = true;
-
- $this->file = $file;
-
- return $this;
- }
-
- /**
- * Gets the file to require before creating the service.
- *
- * @return string|null The full pathname to include
- */
- public function getFile()
- {
- return $this->file;
- }
-
- /**
- * Sets if the service must be shared or not.
- *
- * @param bool $shared Whether the service must be shared or not
- *
- * @return $this
- */
- public function setShared($shared)
- {
- $this->changes['shared'] = true;
-
- $this->shared = (bool) $shared;
-
- return $this;
- }
-
- /**
- * Whether this service is shared.
- *
- * @return bool
- */
- public function isShared()
- {
- return $this->shared;
- }
-
- /**
- * Sets the visibility of this service.
- *
- * @param bool $boolean
- *
- * @return $this
- */
- public function setPublic($boolean)
- {
- $this->changes['public'] = true;
-
- $this->public = (bool) $boolean;
- $this->private = false;
-
- return $this;
- }
-
- /**
- * Whether this service is public facing.
- *
- * @return bool
- */
- public function isPublic()
- {
- return $this->public;
- }
-
- /**
- * Sets if this service is private.
- *
- * When set, the "private" state has a higher precedence than "public".
- * In version 3.4, a "private" service always remains publicly accessible,
- * but triggers a deprecation notice when accessed from the container,
- * so that the service can be made really private in 4.0.
- *
- * @param bool $boolean
- *
- * @return $this
- */
- public function setPrivate($boolean)
- {
- $this->private = (bool) $boolean;
-
- return $this;
- }
-
- /**
- * Whether this service is private.
- *
- * @return bool
- */
- public function isPrivate()
- {
- return $this->private;
- }
-
- /**
- * Sets the lazy flag of this service.
- *
- * @param bool $lazy
- *
- * @return $this
- */
- public function setLazy($lazy)
- {
- $this->changes['lazy'] = true;
-
- $this->lazy = (bool) $lazy;
-
- return $this;
- }
-
- /**
- * Whether this service is lazy.
- *
- * @return bool
- */
- public function isLazy()
- {
- return $this->lazy;
- }
-
- /**
- * Sets whether this definition is synthetic, that is not constructed by the
- * container, but dynamically injected.
- *
- * @param bool $boolean
- *
- * @return $this
- */
- public function setSynthetic($boolean)
- {
- $this->synthetic = (bool) $boolean;
-
- return $this;
- }
-
- /**
- * Whether this definition is synthetic, that is not constructed by the
- * container, but dynamically injected.
- *
- * @return bool
- */
- public function isSynthetic()
- {
- return $this->synthetic;
- }
-
- /**
- * Whether this definition is abstract, that means it merely serves as a
- * template for other definitions.
- *
- * @param bool $boolean
- *
- * @return $this
- */
- public function setAbstract($boolean)
- {
- $this->abstract = (bool) $boolean;
-
- return $this;
- }
-
- /**
- * Whether this definition is abstract, that means it merely serves as a
- * template for other definitions.
- *
- * @return bool
- */
- public function isAbstract()
- {
- return $this->abstract;
- }
-
- /**
- * Whether this definition is deprecated, that means it should not be called
- * anymore.
- *
- * @param bool $status
- * @param string $template Template message to use if the definition is deprecated
- *
- * @return $this
- *
- * @throws InvalidArgumentException when the message template is invalid
- */
- public function setDeprecated($status = true, $template = null)
- {
- if (null !== $template) {
- if (preg_match('#[\r\n]|\*/#', $template)) {
- throw new InvalidArgumentException('Invalid characters found in deprecation template.');
- }
-
- if (false === strpos($template, '%service_id%')) {
- throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.');
- }
-
- $this->deprecationTemplate = $template;
- }
-
- $this->changes['deprecated'] = true;
-
- $this->deprecated = (bool) $status;
-
- return $this;
- }
-
- /**
- * Whether this definition is deprecated, that means it should not be called
- * anymore.
- *
- * @return bool
- */
- public function isDeprecated()
- {
- return $this->deprecated;
- }
-
- /**
- * Message to use if this definition is deprecated.
- *
- * @param string $id Service id relying on this definition
- *
- * @return string
- */
- public function getDeprecationMessage($id)
- {
- return str_replace('%service_id%', $id, $this->deprecationTemplate ?: self::$defaultDeprecationTemplate);
- }
-
- /**
- * Sets a configurator to call after the service is fully initialized.
- *
- * @param string|array|Reference $configurator A PHP function, reference or an array containing a class/Reference and a method to call
- *
- * @return $this
- */
- public function setConfigurator($configurator)
- {
- $this->changes['configurator'] = true;
-
- if (\is_string($configurator) && false !== strpos($configurator, '::')) {
- $configurator = explode('::', $configurator, 2);
- } elseif ($configurator instanceof Reference) {
- $configurator = [$configurator, '__invoke'];
- }
-
- $this->configurator = $configurator;
-
- return $this;
- }
-
- /**
- * Gets the configurator to call after the service is fully initialized.
- *
- * @return callable|array|null
- */
- public function getConfigurator()
- {
- return $this->configurator;
- }
-
- /**
- * Is the definition autowired?
- *
- * @return bool
- */
- public function isAutowired()
- {
- return $this->autowired;
- }
-
- /**
- * Enables/disables autowiring.
- *
- * @param bool $autowired
- *
- * @return $this
- */
- public function setAutowired($autowired)
- {
- $this->changes['autowired'] = true;
-
- $this->autowired = (bool) $autowired;
-
- return $this;
- }
-
- /**
- * Gets bindings.
- *
- * @return array|BoundArgument[]
- */
- public function getBindings()
- {
- return $this->bindings;
- }
-
- /**
- * Sets bindings.
- *
- * Bindings map $named or FQCN arguments to values that should be
- * injected in the matching parameters (of the constructor, of methods
- * called and of controller actions).
- *
- * @return $this
- */
- public function setBindings(array $bindings)
- {
- foreach ($bindings as $key => $binding) {
- if (0 < strpos($key, '$') && $key !== $k = preg_replace('/[ \t]*\$/', ' $', $key)) {
- unset($bindings[$key]);
- $bindings[$key = $k] = $binding;
- }
- if (!$binding instanceof BoundArgument) {
- $bindings[$key] = new BoundArgument($binding);
- }
- }
-
- $this->bindings = $bindings;
-
- return $this;
- }
-
- /**
- * Add an error that occurred when building this Definition.
- *
- * @param string|\Closure|self $error
- *
- * @return $this
- */
- public function addError($error)
- {
- if ($error instanceof self) {
- $this->errors = array_merge($this->errors, $error->errors);
- } else {
- $this->errors[] = $error;
- }
-
- return $this;
- }
-
- /**
- * Returns any errors that occurred while building this Definition.
- *
- * @return array
- */
- public function getErrors()
- {
- foreach ($this->errors as $i => $error) {
- if ($error instanceof \Closure) {
- $this->errors[$i] = (string) $error();
- } elseif (!\is_string($error)) {
- $this->errors[$i] = (string) $error;
- }
- }
-
- return $this->errors;
- }
-
- public function hasErrors(): bool
- {
- return (bool) $this->errors;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Dumper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Dumper.php
deleted file mode 100644
index e7407b0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Dumper.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * Dumper is the abstract class for all built-in dumpers.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-abstract class Dumper implements DumperInterface
-{
- protected $container;
-
- public function __construct(ContainerBuilder $container)
- {
- $this->container = $container;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/DumperInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/DumperInterface.php
deleted file mode 100644
index 8abc192..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/DumperInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-/**
- * DumperInterface is the interface implemented by service container dumper classes.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface DumperInterface
-{
- /**
- * Dumps the service container.
- *
- * @return string|array The representation of the service container
- */
- public function dump(array $options = []);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
deleted file mode 100644
index c21dd91..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
+++ /dev/null
@@ -1,251 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-use Symfony\Component\DependencyInjection\Parameter;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-use Symfony\Component\DependencyInjection\Reference;
-
-/**
- * GraphvizDumper dumps a service container as a graphviz file.
- *
- * You can convert the generated dot file with the dot utility (http://www.graphviz.org/):
- *
- * dot -Tpng container.dot > foo.png
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class GraphvizDumper extends Dumper
-{
- private $nodes;
- private $edges;
- private $options = [
- 'graph' => ['ratio' => 'compress'],
- 'node' => ['fontsize' => 11, 'fontname' => 'Arial', 'shape' => 'record'],
- 'edge' => ['fontsize' => 9, 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => 0.5],
- 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'],
- 'node.definition' => ['fillcolor' => '#eeeeee'],
- 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'],
- ];
-
- /**
- * Dumps the service container as a graphviz graph.
- *
- * Available options:
- *
- * * graph: The default options for the whole graph
- * * node: The default options for nodes
- * * edge: The default options for edges
- * * node.instance: The default options for services that are defined directly by object instances
- * * node.definition: The default options for services that are defined via service definition instances
- * * node.missing: The default options for missing services
- *
- * @return string The dot representation of the service container
- */
- public function dump(array $options = [])
- {
- foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) {
- if (isset($options[$key])) {
- $this->options[$key] = array_merge($this->options[$key], $options[$key]);
- }
- }
-
- $this->nodes = $this->findNodes();
-
- $this->edges = [];
- foreach ($this->container->getDefinitions() as $id => $definition) {
- $this->edges[$id] = array_merge(
- $this->findEdges($id, $definition->getArguments(), true, ''),
- $this->findEdges($id, $definition->getProperties(), false, '')
- );
-
- foreach ($definition->getMethodCalls() as $call) {
- $this->edges[$id] = array_merge(
- $this->edges[$id],
- $this->findEdges($id, $call[1], false, $call[0].'()')
- );
- }
- }
-
- return $this->container->resolveEnvPlaceholders($this->startDot().$this->addNodes().$this->addEdges().$this->endDot(), '__ENV_%s__');
- }
-
- private function addNodes(): string
- {
- $code = '';
- foreach ($this->nodes as $id => $node) {
- $aliases = $this->getAliases($id);
-
- $code .= sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes']));
- }
-
- return $code;
- }
-
- private function addEdges(): string
- {
- $code = '';
- foreach ($this->edges as $id => $edges) {
- foreach ($edges as $edge) {
- $code .= sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : '');
- }
- }
-
- return $code;
- }
-
- /**
- * Finds all edges belonging to a specific service id.
- */
- private function findEdges(string $id, array $arguments, bool $required, string $name, bool $lazy = false): array
- {
- $edges = [];
- foreach ($arguments as $argument) {
- if ($argument instanceof Parameter) {
- $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null;
- } elseif (\is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) {
- $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null;
- }
-
- if ($argument instanceof Reference) {
- $lazyEdge = $lazy;
-
- if (!$this->container->has((string) $argument)) {
- $this->nodes[(string) $argument] = ['name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']];
- } elseif ('service_container' !== (string) $argument) {
- $lazyEdge = $lazy || $this->container->getDefinition((string) $argument)->isLazy();
- }
-
- $edges[] = ['name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge];
- } elseif ($argument instanceof ArgumentInterface) {
- $edges = array_merge($edges, $this->findEdges($id, $argument->getValues(), $required, $name, true));
- } elseif ($argument instanceof Definition) {
- $edges = array_merge($edges,
- $this->findEdges($id, $argument->getArguments(), $required, ''),
- $this->findEdges($id, $argument->getProperties(), false, '')
- );
- foreach ($argument->getMethodCalls() as $call) {
- $edges = array_merge($edges, $this->findEdges($id, $call[1], false, $call[0].'()'));
- }
- } elseif (\is_array($argument)) {
- $edges = array_merge($edges, $this->findEdges($id, $argument, $required, $name, $lazy));
- }
- }
-
- return $edges;
- }
-
- private function findNodes(): array
- {
- $nodes = [];
-
- $container = $this->cloneContainer();
-
- foreach ($container->getDefinitions() as $id => $definition) {
- $class = $definition->getClass();
-
- if ('\\' === substr($class, 0, 1)) {
- $class = substr($class, 1);
- }
-
- try {
- $class = $this->container->getParameterBag()->resolveValue($class);
- } catch (ParameterNotFoundException $e) {
- }
-
- $nodes[$id] = ['class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], ['style' => $definition->isShared() ? 'filled' : 'dotted'])];
- $container->setDefinition($id, new Definition('stdClass'));
- }
-
- foreach ($container->getServiceIds() as $id) {
- if (\array_key_exists($id, $container->getAliases())) {
- continue;
- }
-
- if (!$container->hasDefinition($id)) {
- $nodes[$id] = ['class' => str_replace('\\', '\\\\', \get_class($container->get($id))), 'attributes' => $this->options['node.instance']];
- }
- }
-
- return $nodes;
- }
-
- private function cloneContainer(): ContainerBuilder
- {
- $parameterBag = new ParameterBag($this->container->getParameterBag()->all());
-
- $container = new ContainerBuilder($parameterBag);
- $container->setDefinitions($this->container->getDefinitions());
- $container->setAliases($this->container->getAliases());
- $container->setResources($this->container->getResources());
- foreach ($this->container->getExtensions() as $extension) {
- $container->registerExtension($extension);
- }
-
- return $container;
- }
-
- private function startDot(): string
- {
- return sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n",
- $this->addOptions($this->options['graph']),
- $this->addOptions($this->options['node']),
- $this->addOptions($this->options['edge'])
- );
- }
-
- private function endDot(): string
- {
- return "}\n";
- }
-
- private function addAttributes(array $attributes): string
- {
- $code = [];
- foreach ($attributes as $k => $v) {
- $code[] = sprintf('%s="%s"', $k, $v);
- }
-
- return $code ? ', '.implode(', ', $code) : '';
- }
-
- private function addOptions(array $options): string
- {
- $code = [];
- foreach ($options as $k => $v) {
- $code[] = sprintf('%s="%s"', $k, $v);
- }
-
- return implode(' ', $code);
- }
-
- private function dotize(string $id): string
- {
- return preg_replace('/\W/i', '_', $id);
- }
-
- private function getAliases(string $id): array
- {
- $aliases = [];
- foreach ($this->container->getAliases() as $alias => $origin) {
- if ($id == $origin) {
- $aliases[] = $alias;
- }
- }
-
- return $aliases;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
deleted file mode 100644
index 15d5c09..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
+++ /dev/null
@@ -1,2062 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-use Composer\Autoload\ClassLoader;
-use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader;
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocator;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
-use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass;
-use Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode;
-use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\ExpressionLanguage;
-use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface as ProxyDumper;
-use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper;
-use Symfony\Component\DependencyInjection\Loader\FileLoader;
-use Symfony\Component\DependencyInjection\Parameter;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\ServiceLocator as BaseServiceLocator;
-use Symfony\Component\DependencyInjection\TypedReference;
-use Symfony\Component\DependencyInjection\Variable;
-use Symfony\Component\ErrorHandler\DebugClassLoader;
-use Symfony\Component\ExpressionLanguage\Expression;
-use Symfony\Component\HttpKernel\Kernel;
-
-/**
- * PhpDumper dumps a service container as a PHP class.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class PhpDumper extends Dumper
-{
- /**
- * Characters that might appear in the generated variable name as first character.
- */
- const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz';
-
- /**
- * Characters that might appear in the generated variable name as any but the first character.
- */
- const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_';
-
- private $definitionVariables;
- private $referenceVariables;
- private $variableCount;
- private $inlinedDefinitions;
- private $serviceCalls;
- private $reservedVariables = ['instance', 'class', 'this'];
- private $expressionLanguage;
- private $targetDirRegex;
- private $targetDirMaxMatches;
- private $docStar;
- private $serviceIdToMethodNameMap;
- private $usedMethodNames;
- private $namespace;
- private $asFiles;
- private $hotPathTag;
- private $inlineFactories;
- private $inlineRequires;
- private $inlinedRequires = [];
- private $circularReferences = [];
- private $singleUsePrivateIds = [];
- private $addThrow = false;
- private $addGetService = false;
- private $locatedIds = [];
- private $serviceLocatorTag;
- private $exportedVariables = [];
- private $baseClass;
-
- /**
- * @var ProxyDumper
- */
- private $proxyDumper;
-
- /**
- * {@inheritdoc}
- */
- public function __construct(ContainerBuilder $container)
- {
- if (!$container->isCompiled()) {
- throw new LogicException('Cannot dump an uncompiled container.');
- }
-
- parent::__construct($container);
- }
-
- /**
- * Sets the dumper to be used when dumping proxies in the generated container.
- */
- public function setProxyDumper(ProxyDumper $proxyDumper)
- {
- $this->proxyDumper = $proxyDumper;
- }
-
- /**
- * Dumps the service container as a PHP class.
- *
- * Available options:
- *
- * * class: The class name
- * * base_class: The base class name
- * * namespace: The class namespace
- * * as_files: To split the container in several files
- *
- * @return string|array A PHP class representing the service container or an array of PHP files if the "as_files" option is set
- *
- * @throws EnvParameterException When an env var exists but has not been dumped
- */
- public function dump(array $options = [])
- {
- $this->locatedIds = [];
- $this->targetDirRegex = null;
- $this->inlinedRequires = [];
- $this->exportedVariables = [];
- $options = array_merge([
- 'class' => 'ProjectServiceContainer',
- 'base_class' => 'Container',
- 'namespace' => '',
- 'as_files' => false,
- 'debug' => true,
- 'hot_path_tag' => 'container.hot_path',
- 'inline_factories_parameter' => 'container.dumper.inline_factories',
- 'inline_class_loader_parameter' => 'container.dumper.inline_class_loader',
- 'service_locator_tag' => 'container.service_locator',
- 'build_time' => time(),
- ], $options);
-
- $this->addThrow = $this->addGetService = false;
- $this->namespace = $options['namespace'];
- $this->asFiles = $options['as_files'];
- $this->hotPathTag = $options['hot_path_tag'];
- $this->inlineFactories = $this->asFiles && $options['inline_factories_parameter'] && $this->container->hasParameter($options['inline_factories_parameter']) && $this->container->getParameter($options['inline_factories_parameter']);
- $this->inlineRequires = $options['inline_class_loader_parameter'] && $this->container->hasParameter($options['inline_class_loader_parameter']) && $this->container->getParameter($options['inline_class_loader_parameter']);
- $this->serviceLocatorTag = $options['service_locator_tag'];
-
- if (0 !== strpos($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) {
- $baseClass = sprintf('%s\%s', $options['namespace'] ? '\\'.$options['namespace'] : '', $baseClass);
- $this->baseClass = $baseClass;
- } elseif ('Container' === $baseClass) {
- $this->baseClass = Container::class;
- } else {
- $this->baseClass = $baseClass;
- }
-
- $this->initializeMethodNamesMap('Container' === $baseClass ? Container::class : $baseClass);
-
- if ($this->getProxyDumper() instanceof NullDumper) {
- (new AnalyzeServiceReferencesPass(true, false))->process($this->container);
- try {
- (new CheckCircularReferencesPass())->process($this->container);
- } catch (ServiceCircularReferenceException $e) {
- $path = $e->getPath();
- end($path);
- $path[key($path)] .= '". Try running "composer require symfony/proxy-manager-bridge';
-
- throw new ServiceCircularReferenceException($e->getServiceId(), $path);
- }
- }
-
- (new AnalyzeServiceReferencesPass(false, !$this->getProxyDumper() instanceof NullDumper))->process($this->container);
- $checkedNodes = [];
- $this->circularReferences = [];
- $this->singleUsePrivateIds = [];
- foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) {
- if (!$node->getValue() instanceof Definition) {
- continue;
- }
- if (!isset($checkedNodes[$id])) {
- $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes);
- }
- if ($this->isSingleUsePrivateNode($node)) {
- $this->singleUsePrivateIds[$id] = $id;
- }
- }
- $this->container->getCompiler()->getServiceReferenceGraph()->clear();
- $checkedNodes = [];
- $this->singleUsePrivateIds = array_diff_key($this->singleUsePrivateIds, $this->circularReferences);
-
- $this->docStar = $options['debug'] ? '*' : '';
-
- if (!empty($options['file']) && is_dir($dir = \dirname($options['file']))) {
- // Build a regexp where the first root dirs are mandatory,
- // but every other sub-dir is optional up to the full path in $dir
- // Mandate at least 1 root dir and not more than 5 optional dirs.
-
- $dir = explode(\DIRECTORY_SEPARATOR, realpath($dir));
- $i = \count($dir);
-
- if (2 + (int) ('\\' === \DIRECTORY_SEPARATOR) <= $i) {
- $regex = '';
- $lastOptionalDir = $i > 8 ? $i - 5 : (2 + (int) ('\\' === \DIRECTORY_SEPARATOR));
- $this->targetDirMaxMatches = $i - $lastOptionalDir;
-
- while (--$i >= $lastOptionalDir) {
- $regex = sprintf('(%s%s)?', preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#'), $regex);
- }
-
- do {
- $regex = preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#').$regex;
- } while (0 < --$i);
-
- $this->targetDirRegex = '#'.preg_quote($dir[0], '#').$regex.'#';
- }
- }
-
- $proxyClasses = $this->inlineFactories ? $this->generateProxyClasses() : null;
-
- $code =
- $this->startClass($options['class'], $baseClass, $preload).
- $this->addServices($services).
- $this->addDeprecatedAliases().
- $this->addDefaultParametersMethod()
- ;
-
- $proxyClasses = $proxyClasses ?? $this->generateProxyClasses();
-
- if ($this->addGetService) {
- $code = preg_replace(
- "/(\r?\n\r?\n public function __construct.+?\\{\r?\n)/s",
- "\n private \$getService;$1 \$this->getService = \\Closure::fromCallable([\$this, 'getService']);\n",
- $code,
- 1
- );
- }
-
- if ($this->asFiles) {
- $fileStart = <<<EOF
-<?php
-
-use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
-
-EOF;
- $files = [];
-
- $ids = $this->container->getRemovedIds();
- foreach ($this->container->getDefinitions() as $id => $definition) {
- if (!$definition->isPublic()) {
- $ids[$id] = true;
- }
- }
- if ($ids = array_keys($ids)) {
- sort($ids);
- $c = "<?php\n\nreturn [\n";
- foreach ($ids as $id) {
- $c .= ' '.$this->doExport($id)." => true,\n";
- }
- $files['removed-ids.php'] = $c."];\n";
- }
-
- if (!$this->inlineFactories) {
- foreach ($this->generateServiceFiles($services) as $file => $c) {
- $files[$file] = $fileStart.$c;
- }
- foreach ($proxyClasses as $file => $c) {
- $files[$file] = "<?php\n".$c;
- }
- }
-
- $code .= $this->endClass();
-
- if ($this->inlineFactories) {
- foreach ($proxyClasses as $c) {
- $code .= $c;
- }
- }
-
- $files[$options['class'].'.php'] = $code;
- $hash = ucfirst(strtr(ContainerBuilder::hash($files), '._', 'xx'));
- $code = [];
-
- foreach ($files as $file => $c) {
- $code["Container{$hash}/{$file}"] = $c;
- }
- array_pop($code);
- $code["Container{$hash}/{$options['class']}.php"] = substr_replace($files[$options['class'].'.php'], "<?php\n\nnamespace Container{$hash};\n", 0, 6);
- $namespaceLine = $this->namespace ? "\nnamespace {$this->namespace};\n" : '';
- $time = $options['build_time'];
- $id = hash('crc32', $hash.$time);
- $this->asFiles = false;
-
- if ($preload && null !== $autoloadFile = $this->getAutoloadFile()) {
- $autoloadFile = substr($this->export($autoloadFile), 2, -1);
-
- $code[$options['class'].'.preload.php'] = <<<EOF
-<?php
-
-// This file has been auto-generated by the Symfony Dependency Injection Component
-// You can reference it in the "opcache.preload" php.ini setting on PHP >= 7.4 when preloading is desired
-
-use Symfony\Component\DependencyInjection\Dumper\Preloader;
-
-require $autoloadFile;
-require __DIR__.'/Container{$hash}/{$options['class']}.php';
-
-\$classes = [];
-
-EOF;
-
- foreach ($preload as $class) {
- $code[$options['class'].'.preload.php'] .= sprintf("\$classes[] = '%s';\n", $class);
- }
-
- $code[$options['class'].'.preload.php'] .= <<<'EOF'
-
-Preloader::preload($classes);
-
-EOF;
- }
-
- $code[$options['class'].'.php'] = <<<EOF
-<?php
-{$namespaceLine}
-// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
-
-if (\\class_exists(\\Container{$hash}\\{$options['class']}::class, false)) {
- // no-op
-} elseif (!include __DIR__.'/Container{$hash}/{$options['class']}.php') {
- touch(__DIR__.'/Container{$hash}.legacy');
-
- return;
-}
-
-if (!\\class_exists({$options['class']}::class, false)) {
- \\class_alias(\\Container{$hash}\\{$options['class']}::class, {$options['class']}::class, false);
-}
-
-return new \\Container{$hash}\\{$options['class']}([
- 'container.build_hash' => '$hash',
- 'container.build_id' => '$id',
- 'container.build_time' => $time,
-], __DIR__.\\DIRECTORY_SEPARATOR.'Container{$hash}');
-
-EOF;
- } else {
- $code .= $this->endClass();
- foreach ($proxyClasses as $c) {
- $code .= $c;
- }
- }
-
- $this->targetDirRegex = null;
- $this->inlinedRequires = [];
- $this->circularReferences = [];
- $this->locatedIds = [];
- $this->exportedVariables = [];
-
- $unusedEnvs = [];
- foreach ($this->container->getEnvCounters() as $env => $use) {
- if (!$use) {
- $unusedEnvs[] = $env;
- }
- }
- if ($unusedEnvs) {
- throw new EnvParameterException($unusedEnvs, null, 'Environment variables "%s" are never used. Please, check your container\'s configuration.');
- }
-
- return $code;
- }
-
- /**
- * Retrieves the currently set proxy dumper or instantiates one.
- */
- private function getProxyDumper(): ProxyDumper
- {
- if (!$this->proxyDumper) {
- $this->proxyDumper = new NullDumper();
- }
-
- return $this->proxyDumper;
- }
-
- private function analyzeCircularReferences(string $sourceId, array $edges, array &$checkedNodes, array &$currentPath = [], bool $byConstructor = true)
- {
- $checkedNodes[$sourceId] = true;
- $currentPath[$sourceId] = $byConstructor;
-
- foreach ($edges as $edge) {
- $node = $edge->getDestNode();
- $id = $node->getId();
-
- if (!$node->getValue() instanceof Definition || $sourceId === $id || $edge->isLazy() || $edge->isWeak()) {
- // no-op
- } elseif (isset($currentPath[$id])) {
- $this->addCircularReferences($id, $currentPath, $edge->isReferencedByConstructor());
- } elseif (!isset($checkedNodes[$id])) {
- $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes, $currentPath, $edge->isReferencedByConstructor());
- } elseif (isset($this->circularReferences[$id])) {
- $this->connectCircularReferences($id, $currentPath, $edge->isReferencedByConstructor());
- }
- }
- unset($currentPath[$sourceId]);
- }
-
- private function connectCircularReferences(string $sourceId, array &$currentPath, bool $byConstructor, array &$subPath = [])
- {
- $currentPath[$sourceId] = $subPath[$sourceId] = $byConstructor;
-
- foreach ($this->circularReferences[$sourceId] as $id => $byConstructor) {
- if (isset($currentPath[$id])) {
- $this->addCircularReferences($id, $currentPath, $byConstructor);
- } elseif (!isset($subPath[$id]) && isset($this->circularReferences[$id])) {
- $this->connectCircularReferences($id, $currentPath, $byConstructor, $subPath);
- }
- }
- unset($currentPath[$sourceId], $subPath[$sourceId]);
- }
-
- private function addCircularReferences(string $id, array $currentPath, bool $byConstructor)
- {
- $currentPath[$id] = $byConstructor;
- $circularRefs = [];
-
- foreach (array_reverse($currentPath) as $parentId => $v) {
- $byConstructor = $byConstructor && $v;
- $circularRefs[] = $parentId;
-
- if ($parentId === $id) {
- break;
- }
- }
-
- $currentId = $id;
- foreach ($circularRefs as $parentId) {
- if (empty($this->circularReferences[$parentId][$currentId])) {
- $this->circularReferences[$parentId][$currentId] = $byConstructor;
- }
-
- $currentId = $parentId;
- }
- }
-
- private function collectLineage(string $class, array &$lineage)
- {
- if (isset($lineage[$class])) {
- return;
- }
- if (!$r = $this->container->getReflectionClass($class, false)) {
- return;
- }
- if (is_a($class, $this->baseClass, true)) {
- return;
- }
- $file = $r->getFileName();
- if (!$file || $this->doExport($file) === $exportedFile = $this->export($file)) {
- return;
- }
-
- $lineage[$class] = substr($exportedFile, 1, -1);
-
- if ($parent = $r->getParentClass()) {
- $this->collectLineage($parent->name, $lineage);
- }
-
- foreach ($r->getInterfaces() as $parent) {
- $this->collectLineage($parent->name, $lineage);
- }
-
- foreach ($r->getTraits() as $parent) {
- $this->collectLineage($parent->name, $lineage);
- }
-
- unset($lineage[$class]);
- $lineage[$class] = substr($exportedFile, 1, -1);
- }
-
- private function generateProxyClasses(): array
- {
- $proxyClasses = [];
- $alreadyGenerated = [];
- $definitions = $this->container->getDefinitions();
- $strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments');
- $proxyDumper = $this->getProxyDumper();
- ksort($definitions);
- foreach ($definitions as $definition) {
- if (!$proxyDumper->isProxyCandidate($definition)) {
- continue;
- }
- if (isset($alreadyGenerated[$class = $definition->getClass()])) {
- continue;
- }
- $alreadyGenerated[$class] = true;
- // register class' reflector for resource tracking
- $this->container->getReflectionClass($class);
- if ("\n" === $proxyCode = "\n".$proxyDumper->getProxyCode($definition)) {
- continue;
- }
-
- if ($this->inlineRequires) {
- $lineage = [];
- $this->collectLineage($class, $lineage);
-
- $code = '';
- foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) {
- if ($this->inlineFactories) {
- $this->inlinedRequires[$file] = true;
- }
- $code .= sprintf("include_once %s;\n", $file);
- }
-
- $proxyCode = $code.$proxyCode;
- }
-
- if ($strip) {
- $proxyCode = "<?php\n".$proxyCode;
- $proxyCode = substr(Kernel::stripComments($proxyCode), 5);
- }
-
- $proxyClasses[sprintf('%s.php', explode(' ', $this->inlineRequires ? substr($proxyCode, \strlen($code)) : $proxyCode, 3)[1])] = $proxyCode;
- }
-
- return $proxyClasses;
- }
-
- private function addServiceInclude(string $cId, Definition $definition): string
- {
- $code = '';
-
- if ($this->inlineRequires && (!$this->isHotPath($definition) || $this->getProxyDumper()->isProxyCandidate($definition))) {
- $lineage = [];
- foreach ($this->inlinedDefinitions as $def) {
- if (!$def->isDeprecated() && \is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) {
- $this->collectLineage($class, $lineage);
- }
- }
-
- foreach ($this->serviceCalls as $id => list($callCount, $behavior)) {
- if ('service_container' !== $id && $id !== $cId
- && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $behavior
- && $this->container->has($id)
- && $this->isTrivialInstance($def = $this->container->findDefinition($id))
- && \is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())
- ) {
- $this->collectLineage($class, $lineage);
- }
- }
-
- foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) {
- $code .= sprintf(" include_once %s;\n", $file);
- }
- }
-
- foreach ($this->inlinedDefinitions as $def) {
- if ($file = $def->getFile()) {
- $file = $this->dumpValue($file);
- $file = '(' === $file[0] ? substr($file, 1, -1) : $file;
- $code .= sprintf(" include_once %s;\n", $file);
- }
- }
-
- if ('' !== $code) {
- $code .= "\n";
- }
-
- return $code;
- }
-
- /**
- * @throws InvalidArgumentException
- * @throws RuntimeException
- */
- private function addServiceInstance(string $id, Definition $definition, bool $isSimpleInstance): string
- {
- $class = $this->dumpValue($definition->getClass());
-
- if (0 === strpos($class, "'") && false === strpos($class, '$') && !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) {
- throw new InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id));
- }
-
- $isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition);
- $instantiation = '';
-
- $lastWitherIndex = null;
- foreach ($definition->getMethodCalls() as $k => $call) {
- if ($call[2] ?? false) {
- $lastWitherIndex = $k;
- }
- }
-
- if (!$isProxyCandidate && $definition->isShared() && !isset($this->singleUsePrivateIds[$id]) && null === $lastWitherIndex) {
- $instantiation = sprintf('$this->%s[%s] = %s', $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', $this->doExport($id), $isSimpleInstance ? '' : '$instance');
- } elseif (!$isSimpleInstance) {
- $instantiation = '$instance';
- }
-
- $return = '';
- if ($isSimpleInstance) {
- $return = 'return ';
- } else {
- $instantiation .= ' = ';
- }
-
- return $this->addNewInstance($definition, ' '.$return.$instantiation, $id);
- }
-
- private function isTrivialInstance(Definition $definition): bool
- {
- if ($definition->hasErrors()) {
- return true;
- }
- if ($definition->isSynthetic() || $definition->getFile() || $definition->getMethodCalls() || $definition->getProperties() || $definition->getConfigurator()) {
- return false;
- }
- if ($definition->isDeprecated() || $definition->isLazy() || $definition->getFactory() || 3 < \count($definition->getArguments())) {
- return false;
- }
-
- foreach ($definition->getArguments() as $arg) {
- if (!$arg || $arg instanceof Parameter) {
- continue;
- }
- if (\is_array($arg) && 3 >= \count($arg)) {
- foreach ($arg as $k => $v) {
- if ($this->dumpValue($k) !== $this->dumpValue($k, false)) {
- return false;
- }
- if (!$v || $v instanceof Parameter) {
- continue;
- }
- if ($v instanceof Reference && $this->container->has($id = (string) $v) && $this->container->findDefinition($id)->isSynthetic()) {
- continue;
- }
- if (!is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, false)) {
- return false;
- }
- }
- } elseif ($arg instanceof Reference && $this->container->has($id = (string) $arg) && $this->container->findDefinition($id)->isSynthetic()) {
- continue;
- } elseif (!is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, false)) {
- return false;
- }
- }
-
- return true;
- }
-
- private function addServiceMethodCalls(Definition $definition, string $variableName, ?string $sharedNonLazyId): string
- {
- $lastWitherIndex = null;
- foreach ($definition->getMethodCalls() as $k => $call) {
- if ($call[2] ?? false) {
- $lastWitherIndex = $k;
- }
- }
-
- $calls = '';
- foreach ($definition->getMethodCalls() as $k => $call) {
- $arguments = [];
- foreach ($call[1] as $value) {
- $arguments[] = $this->dumpValue($value);
- }
-
- $witherAssignation = '';
-
- if ($call[2] ?? false) {
- if (null !== $sharedNonLazyId && $lastWitherIndex === $k) {
- $witherAssignation = sprintf('$this->%s[\'%s\'] = ', $definition->isPublic() ? 'services' : 'privates', $sharedNonLazyId);
- }
- $witherAssignation .= sprintf('$%s = ', $variableName);
- }
-
- $calls .= $this->wrapServiceConditionals($call[1], sprintf(" %s\$%s->%s(%s);\n", $witherAssignation, $variableName, $call[0], implode(', ', $arguments)));
- }
-
- return $calls;
- }
-
- private function addServiceProperties(Definition $definition, string $variableName = 'instance'): string
- {
- $code = '';
- foreach ($definition->getProperties() as $name => $value) {
- $code .= sprintf(" \$%s->%s = %s;\n", $variableName, $name, $this->dumpValue($value));
- }
-
- return $code;
- }
-
- private function addServiceConfigurator(Definition $definition, string $variableName = 'instance'): string
- {
- if (!$callable = $definition->getConfigurator()) {
- return '';
- }
-
- if (\is_array($callable)) {
- if ($callable[0] instanceof Reference
- || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))
- ) {
- return sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
- }
-
- $class = $this->dumpValue($callable[0]);
- // If the class is a string we can optimize away
- if (0 === strpos($class, "'") && false === strpos($class, '$')) {
- return sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $callable[1], $variableName);
- }
-
- if (0 === strpos($class, 'new ')) {
- return sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
- }
-
- return sprintf(" [%s, '%s'](\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
- }
-
- return sprintf(" %s(\$%s);\n", $callable, $variableName);
- }
-
- private function addService(string $id, Definition $definition): array
- {
- $this->definitionVariables = new \SplObjectStorage();
- $this->referenceVariables = [];
- $this->variableCount = 0;
- $this->referenceVariables[$id] = new Variable('instance');
-
- $return = [];
-
- if ($class = $definition->getClass()) {
- $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class);
- $return[] = sprintf(0 === strpos($class, '%') ? '@return object A %1$s instance' : '@return \%s', ltrim($class, '\\'));
- } elseif ($definition->getFactory()) {
- $factory = $definition->getFactory();
- if (\is_string($factory)) {
- $return[] = sprintf('@return object An instance returned by %s()', $factory);
- } elseif (\is_array($factory) && (\is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) {
- $class = $factory[0] instanceof Definition ? $factory[0]->getClass() : (string) $factory[0];
- $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class);
- $return[] = sprintf('@return object An instance returned by %s::%s()', $class, $factory[1]);
- }
- }
-
- if ($definition->isDeprecated()) {
- if ($return && 0 === strpos($return[\count($return) - 1], '@return')) {
- $return[] = '';
- }
-
- $return[] = sprintf('@deprecated %s', $definition->getDeprecationMessage($id));
- }
-
- $return = str_replace("\n * \n", "\n *\n", implode("\n * ", $return));
- $return = $this->container->resolveEnvPlaceholders($return);
-
- $shared = $definition->isShared() ? ' shared' : '';
- $public = $definition->isPublic() ? 'public' : 'private';
- $autowired = $definition->isAutowired() ? ' autowired' : '';
-
- if ($definition->isLazy()) {
- $lazyInitialization = '$lazyLoad = true';
- } else {
- $lazyInitialization = '';
- }
-
- $asFile = $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition);
- $methodName = $this->generateMethodName($id);
- if ($asFile) {
- $file = $methodName.'.php';
- $code = " // Returns the $public '$id'$shared$autowired service.\n\n";
- } else {
- $file = null;
- $code = <<<EOF
-
- /*{$this->docStar}
- * Gets the $public '$id'$shared$autowired service.
- *
- * $return
-EOF;
- $code = str_replace('*/', ' ', $code).<<<EOF
-
- */
- protected function {$methodName}($lazyInitialization)
- {
-
-EOF;
- }
-
- $this->serviceCalls = [];
- $this->inlinedDefinitions = $this->getDefinitionsFromArguments([$definition], null, $this->serviceCalls);
-
- if ($definition->isDeprecated()) {
- $code .= sprintf(" @trigger_error(%s, E_USER_DEPRECATED);\n\n", $this->export($definition->getDeprecationMessage($id)));
- }
-
- if ($this->getProxyDumper()->isProxyCandidate($definition)) {
- $factoryCode = $asFile ? ($definition->isShared() ? "\$this->load('%s.php', false)" : '$this->factories[%2$s](false)') : '$this->%s(false)';
- $code .= $this->getProxyDumper()->getProxyFactoryCode($definition, $id, sprintf($factoryCode, $methodName, $this->doExport($id)));
- }
-
- $code .= $this->addServiceInclude($id, $definition);
- $code .= $this->addInlineService($id, $definition);
-
- if ($asFile) {
- $code = implode("\n", array_map(function ($line) { return $line ? substr($line, 8) : $line; }, explode("\n", $code)));
- } else {
- $code .= " }\n";
- }
-
- $this->definitionVariables = $this->inlinedDefinitions = null;
- $this->referenceVariables = $this->serviceCalls = null;
-
- return [$file, $code];
- }
-
- private function addInlineVariables(string $id, Definition $definition, array $arguments, bool $forConstructor): string
- {
- $code = '';
-
- foreach ($arguments as $argument) {
- if (\is_array($argument)) {
- $code .= $this->addInlineVariables($id, $definition, $argument, $forConstructor);
- } elseif ($argument instanceof Reference) {
- $code .= $this->addInlineReference($id, $definition, $argument, $forConstructor);
- } elseif ($argument instanceof Definition) {
- $code .= $this->addInlineService($id, $definition, $argument, $forConstructor);
- }
- }
-
- return $code;
- }
-
- private function addInlineReference(string $id, Definition $definition, string $targetId, bool $forConstructor): string
- {
- while ($this->container->hasAlias($targetId)) {
- $targetId = (string) $this->container->getAlias($targetId);
- }
-
- list($callCount, $behavior) = $this->serviceCalls[$targetId];
-
- if ($id === $targetId) {
- return $this->addInlineService($id, $definition, $definition);
- }
-
- if ('service_container' === $targetId || isset($this->referenceVariables[$targetId])) {
- return '';
- }
-
- $hasSelfRef = isset($this->circularReferences[$id][$targetId]) && !isset($this->definitionVariables[$definition]);
-
- if ($hasSelfRef && !$forConstructor && !$forConstructor = !$this->circularReferences[$id][$targetId]) {
- $code = $this->addInlineService($id, $definition, $definition);
- } else {
- $code = '';
- }
-
- if (isset($this->referenceVariables[$targetId]) || (2 > $callCount && (!$hasSelfRef || !$forConstructor))) {
- return $code;
- }
-
- $name = $this->getNextVariableName();
- $this->referenceVariables[$targetId] = new Variable($name);
-
- $reference = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $behavior ? new Reference($targetId, $behavior) : null;
- $code .= sprintf(" \$%s = %s;\n", $name, $this->getServiceCall($targetId, $reference));
-
- if (!$hasSelfRef || !$forConstructor) {
- return $code;
- }
-
- $code .= sprintf(<<<'EOTXT'
-
- if (isset($this->%s[%s])) {
- return $this->%1$s[%2$s];
- }
-
-EOTXT
- ,
- $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates',
- $this->doExport($id)
- );
-
- return $code;
- }
-
- private function addInlineService(string $id, Definition $definition, Definition $inlineDef = null, bool $forConstructor = true): string
- {
- $code = '';
-
- if ($isSimpleInstance = $isRootInstance = null === $inlineDef) {
- foreach ($this->serviceCalls as $targetId => list($callCount, $behavior, $byConstructor)) {
- if ($byConstructor && isset($this->circularReferences[$id][$targetId]) && !$this->circularReferences[$id][$targetId]) {
- $code .= $this->addInlineReference($id, $definition, $targetId, $forConstructor);
- }
- }
- }
-
- if (isset($this->definitionVariables[$inlineDef = $inlineDef ?: $definition])) {
- return $code;
- }
-
- $arguments = [$inlineDef->getArguments(), $inlineDef->getFactory()];
-
- $code .= $this->addInlineVariables($id, $definition, $arguments, $forConstructor);
-
- if ($arguments = array_filter([$inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()])) {
- $isSimpleInstance = false;
- } elseif ($definition !== $inlineDef && 2 > $this->inlinedDefinitions[$inlineDef]) {
- return $code;
- }
-
- if (isset($this->definitionVariables[$inlineDef])) {
- $isSimpleInstance = false;
- } else {
- $name = $definition === $inlineDef ? 'instance' : $this->getNextVariableName();
- $this->definitionVariables[$inlineDef] = new Variable($name);
- $code .= '' !== $code ? "\n" : '';
-
- if ('instance' === $name) {
- $code .= $this->addServiceInstance($id, $definition, $isSimpleInstance);
- } else {
- $code .= $this->addNewInstance($inlineDef, ' $'.$name.' = ', $id);
- }
-
- if ('' !== $inline = $this->addInlineVariables($id, $definition, $arguments, false)) {
- $code .= "\n".$inline."\n";
- } elseif ($arguments && 'instance' === $name) {
- $code .= "\n";
- }
-
- $code .= $this->addServiceProperties($inlineDef, $name);
- $code .= $this->addServiceMethodCalls($inlineDef, $name, !$this->getProxyDumper()->isProxyCandidate($inlineDef) && $inlineDef->isShared() && !isset($this->singleUsePrivateIds[$id]) ? $id : null);
- $code .= $this->addServiceConfigurator($inlineDef, $name);
- }
-
- if ($isRootInstance && !$isSimpleInstance) {
- $code .= "\n return \$instance;\n";
- }
-
- return $code;
- }
-
- private function addServices(array &$services = null): string
- {
- $publicServices = $privateServices = '';
- $definitions = $this->container->getDefinitions();
- ksort($definitions);
- foreach ($definitions as $id => $definition) {
- $services[$id] = $definition->isSynthetic() ? null : $this->addService($id, $definition);
- }
-
- foreach ($definitions as $id => $definition) {
- if (!(list($file, $code) = $services[$id]) || null !== $file) {
- continue;
- }
- if ($definition->isPublic()) {
- $publicServices .= $code;
- } elseif (!$this->isTrivialInstance($definition) || isset($this->locatedIds[$id])) {
- $privateServices .= $code;
- }
- }
-
- return $publicServices.$privateServices;
- }
-
- private function generateServiceFiles(array $services): iterable
- {
- $definitions = $this->container->getDefinitions();
- ksort($definitions);
- foreach ($definitions as $id => $definition) {
- if ((list($file, $code) = $services[$id]) && null !== $file && ($definition->isPublic() || !$this->isTrivialInstance($definition) || isset($this->locatedIds[$id]))) {
- if (!$definition->isShared()) {
- $i = strpos($code, "\n\ninclude_once ");
- if (false !== $i && false !== $i = strpos($code, "\n\n", 2 + $i)) {
- $code = [substr($code, 0, 2 + $i), substr($code, 2 + $i)];
- } else {
- $code = ["\n", $code];
- }
- $code[1] = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $code[1])));
- $factory = sprintf('$this->factories%s[%s]', $definition->isPublic() ? '' : "['service_container']", $this->doExport($id));
- $lazyloadInitialization = $definition->isLazy() ? '$lazyLoad = true' : '';
-
- $code[1] = sprintf("%s = function (%s) {\n%s};\n\nreturn %1\$s();\n", $factory, $lazyloadInitialization, $code[1]);
- $code = $code[0].$code[1];
- }
-
- yield $file => $code;
- }
- }
- }
-
- private function addNewInstance(Definition $definition, string $return = '', string $id = null): string
- {
- $tail = $return ? ";\n" : '';
-
- if (BaseServiceLocator::class === $definition->getClass() && $definition->hasTag($this->serviceLocatorTag)) {
- $arguments = [];
- foreach ($definition->getArgument(0) as $k => $argument) {
- $arguments[$k] = $argument->getValues()[0];
- }
-
- return $return.$this->dumpValue(new ServiceLocatorArgument($arguments)).$tail;
- }
-
- $arguments = [];
- foreach ($definition->getArguments() as $value) {
- $arguments[] = $this->dumpValue($value);
- }
-
- if (null !== $definition->getFactory()) {
- $callable = $definition->getFactory();
-
- if (\is_array($callable)) {
- if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $callable[1])) {
- throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s)', $callable[1] ?: 'n/a'));
- }
-
- if ($callable[0] instanceof Reference
- || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))) {
- return $return.sprintf('%s->%s(%s)', $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail;
- }
-
- $class = $this->dumpValue($callable[0]);
- // If the class is a string we can optimize away
- if (0 === strpos($class, "'") && false === strpos($class, '$')) {
- if ("''" === $class) {
- throw new RuntimeException(sprintf('Cannot dump definition: %s service is defined to be created by a factory but is missing the service reference, did you forget to define the factory service id or class?', $id ? 'The "'.$id.'"' : 'inline'));
- }
-
- return $return.sprintf('%s::%s(%s)', $this->dumpLiteralClass($class), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail;
- }
-
- if (0 === strpos($class, 'new ')) {
- return $return.sprintf('(%s)->%s(%s)', $class, $callable[1], $arguments ? implode(', ', $arguments) : '').$tail;
- }
-
- return $return.sprintf("[%s, '%s'](%s)", $class, $callable[1], $arguments ? implode(', ', $arguments) : '').$tail;
- }
-
- return $return.sprintf('%s(%s)', $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? implode(', ', $arguments) : '').$tail;
- }
-
- if (null === $class = $definition->getClass()) {
- throw new RuntimeException('Cannot dump definitions which have no class nor factory.');
- }
-
- return $return.sprintf('new %s(%s)', $this->dumpLiteralClass($this->dumpValue($class)), implode(', ', $arguments)).$tail;
- }
-
- private function startClass(string $class, string $baseClass, ?array &$preload): string
- {
- $namespaceLine = !$this->asFiles && $this->namespace ? "\nnamespace {$this->namespace};\n" : '';
-
- $code = <<<EOF
-<?php
-$namespaceLine
-use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
-
-/*{$this->docStar}
- * This class has been auto-generated
- * by the Symfony Dependency Injection Component.
- *
- * @final
- */
-class $class extends $baseClass
-{
- private \$parameters = [];
-
- public function __construct()
- {
-
-EOF;
- if ($this->asFiles) {
- $code = str_replace('$parameters', "\$buildParameters;\n private \$containerDir;\n private \$parameters", $code);
- $code = str_replace('__construct()', '__construct(array $buildParameters = [], $containerDir = __DIR__)', $code);
- $code .= " \$this->buildParameters = \$buildParameters;\n";
- $code .= " \$this->containerDir = \$containerDir;\n";
-
- if (null !== $this->targetDirRegex) {
- $code = str_replace('$parameters', "\$targetDir;\n private \$parameters", $code);
- $code .= ' $this->targetDir = \\dirname($containerDir);'."\n";
- }
- }
-
- if (Container::class !== $this->baseClass) {
- $r = $this->container->getReflectionClass($this->baseClass, false);
- if (null !== $r
- && (null !== $constructor = $r->getConstructor())
- && 0 === $constructor->getNumberOfRequiredParameters()
- && Container::class !== $constructor->getDeclaringClass()->name
- ) {
- $code .= " parent::__construct();\n";
- $code .= " \$this->parameterBag = null;\n\n";
- }
- }
-
- if ($this->container->getParameterBag()->all()) {
- $code .= " \$this->parameters = \$this->getDefaultParameters();\n\n";
- }
- $code .= " \$this->services = \$this->privates = [];\n";
-
- $code .= $this->addSyntheticIds();
- $code .= $this->addMethodMap();
- $code .= $this->asFiles && !$this->inlineFactories ? $this->addFileMap() : '';
- $code .= $this->addAliases();
- $code .= $this->addInlineRequires($preload);
- $code .= <<<EOF
- }
-
- public function compile(): void
- {
- throw new LogicException('You cannot compile a dumped container that was already compiled.');
- }
-
- public function isCompiled(): bool
- {
- return true;
- }
-
-EOF;
- $code .= $this->addRemovedIds();
-
- if ($this->asFiles && !$this->inlineFactories) {
- $code .= <<<EOF
-
- protected function load(\$file, \$lazyLoad = true)
- {
- return require \$this->containerDir.\\DIRECTORY_SEPARATOR.\$file;
- }
-
-EOF;
- }
-
- $proxyDumper = $this->getProxyDumper();
- foreach ($this->container->getDefinitions() as $definition) {
- if (!$proxyDumper->isProxyCandidate($definition)) {
- continue;
- }
- if ($this->asFiles && !$this->inlineFactories) {
- $proxyLoader = '$this->load("{$class}.php")';
- } elseif ($this->namespace || $this->inlineFactories) {
- $proxyLoader = 'class_alias(__NAMESPACE__."\\\\$class", $class, false)';
- } else {
- $proxyLoader = '';
- }
- if ($proxyLoader) {
- $proxyLoader = "class_exists(\$class, false) || {$proxyLoader};\n\n ";
- }
- $code .= <<<EOF
-
- protected function createProxy(\$class, \Closure \$factory)
- {
- {$proxyLoader}return \$factory();
- }
-
-EOF;
- break;
- }
-
- return $code;
- }
-
- private function addSyntheticIds(): string
- {
- $code = '';
- $definitions = $this->container->getDefinitions();
- ksort($definitions);
- foreach ($definitions as $id => $definition) {
- if ($definition->isSynthetic() && 'service_container' !== $id) {
- $code .= ' '.$this->doExport($id)." => true,\n";
- }
- }
-
- return $code ? " \$this->syntheticIds = [\n{$code} ];\n" : '';
- }
-
- private function addRemovedIds(): string
- {
- $ids = $this->container->getRemovedIds();
- foreach ($this->container->getDefinitions() as $id => $definition) {
- if (!$definition->isPublic()) {
- $ids[$id] = true;
- }
- }
- if (!$ids) {
- return '';
- }
- if ($this->asFiles) {
- $code = "require \$this->containerDir.\\DIRECTORY_SEPARATOR.'removed-ids.php'";
- } else {
- $code = '';
- $ids = array_keys($ids);
- sort($ids);
- foreach ($ids as $id) {
- if (preg_match(FileLoader::ANONYMOUS_ID_REGEXP, $id)) {
- continue;
- }
- $code .= ' '.$this->doExport($id)." => true,\n";
- }
-
- $code = "[\n{$code} ]";
- }
-
- return <<<EOF
-
- public function getRemovedIds(): array
- {
- return {$code};
- }
-
-EOF;
- }
-
- private function addMethodMap(): string
- {
- $code = '';
- $definitions = $this->container->getDefinitions();
- ksort($definitions);
- foreach ($definitions as $id => $definition) {
- if (!$definition->isSynthetic() && $definition->isPublic() && (!$this->asFiles || $this->inlineFactories || $this->isHotPath($definition))) {
- $code .= ' '.$this->doExport($id).' => '.$this->doExport($this->generateMethodName($id)).",\n";
- }
- }
-
- $aliases = $this->container->getAliases();
- foreach ($aliases as $alias => $id) {
- if (!$id->isDeprecated()) {
- continue;
- }
- $code .= ' '.$this->doExport($alias).' => '.$this->doExport($this->generateMethodName($alias)).",\n";
- }
-
- return $code ? " \$this->methodMap = [\n{$code} ];\n" : '';
- }
-
- private function addFileMap(): string
- {
- $code = '';
- $definitions = $this->container->getDefinitions();
- ksort($definitions);
- foreach ($definitions as $id => $definition) {
- if (!$definition->isSynthetic() && $definition->isPublic() && !$this->isHotPath($definition)) {
- $code .= sprintf(" %s => '%s.php',\n", $this->doExport($id), $this->generateMethodName($id));
- }
- }
-
- return $code ? " \$this->fileMap = [\n{$code} ];\n" : '';
- }
-
- private function addAliases(): string
- {
- if (!$aliases = $this->container->getAliases()) {
- return "\n \$this->aliases = [];\n";
- }
-
- $code = " \$this->aliases = [\n";
- ksort($aliases);
- foreach ($aliases as $alias => $id) {
- if ($id->isDeprecated()) {
- continue;
- }
-
- $id = (string) $id;
- while (isset($aliases[$id])) {
- $id = (string) $aliases[$id];
- }
- $code .= ' '.$this->doExport($alias).' => '.$this->doExport($id).",\n";
- }
-
- return $code." ];\n";
- }
-
- private function addDeprecatedAliases(): string
- {
- $code = '';
- $aliases = $this->container->getAliases();
- foreach ($aliases as $alias => $definition) {
- if (!$definition->isDeprecated()) {
- continue;
- }
- $public = $definition->isPublic() ? 'public' : 'private';
- $id = (string) $definition;
- $methodNameAlias = $this->generateMethodName($alias);
- $idExported = $this->export($id);
- $messageExported = $this->export($definition->getDeprecationMessage($alias));
- $code .= <<<EOF
-
- /*{$this->docStar}
- * Gets the $public '$alias' alias.
- *
- * @return object The "$id" service.
- */
- protected function {$methodNameAlias}()
- {
- @trigger_error($messageExported, E_USER_DEPRECATED);
-
- return \$this->get($idExported);
- }
-
-EOF;
- }
-
- return $code;
- }
-
- private function addInlineRequires(?array &$preload): string
- {
- if (!$this->hotPathTag || !$this->inlineRequires) {
- return '';
- }
-
- $lineage = [];
-
- foreach ($this->container->findTaggedServiceIds($this->hotPathTag) as $id => $tags) {
- $definition = $this->container->getDefinition($id);
-
- if ($this->getProxyDumper()->isProxyCandidate($definition)) {
- continue;
- }
-
- $inlinedDefinitions = $this->getDefinitionsFromArguments([$definition]);
-
- foreach ($inlinedDefinitions as $def) {
- if (\is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) {
- $preload[$class] = $class;
- $this->collectLineage($class, $lineage);
- }
- }
- }
-
- $code = '';
-
- foreach ($lineage as $file) {
- if (!isset($this->inlinedRequires[$file])) {
- $this->inlinedRequires[$file] = true;
- $code .= sprintf("\n include_once %s;", $file);
- }
- }
-
- return $code ? sprintf("\n \$this->privates['service_container'] = function () {%s\n };\n", $code) : '';
- }
-
- private function addDefaultParametersMethod(): string
- {
- if (!$this->container->getParameterBag()->all()) {
- return '';
- }
-
- $php = [];
- $dynamicPhp = [];
-
- foreach ($this->container->getParameterBag()->all() as $key => $value) {
- if ($key !== $resolvedKey = $this->container->resolveEnvPlaceholders($key)) {
- throw new InvalidArgumentException(sprintf('Parameter name cannot use env parameters: %s.', $resolvedKey));
- }
- $export = $this->exportParameters([$value]);
- $export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2);
-
- if (preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDir\.'')/", $export[1])) {
- $dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]);
- } else {
- $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]);
- }
- }
- $parameters = sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', 8));
-
- $code = <<<'EOF'
-
- public function getParameter($name)
- {
- $name = (string) $name;
- if (isset($this->buildParameters[$name])) {
- return $this->buildParameters[$name];
- }
-
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
- throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
- }
- if (isset($this->loadedDynamicParameters[$name])) {
- return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
- }
-
- return $this->parameters[$name];
- }
-
- public function hasParameter($name): bool
- {
- $name = (string) $name;
- if (isset($this->buildParameters[$name])) {
- return true;
- }
-
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
- }
-
- public function setParameter($name, $value): void
- {
- throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
- }
-
- public function getParameterBag(): ParameterBagInterface
- {
- if (null === $this->parameterBag) {
- $parameters = $this->parameters;
- foreach ($this->loadedDynamicParameters as $name => $loaded) {
- $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
- }
- foreach ($this->buildParameters as $name => $value) {
- $parameters[$name] = $value;
- }
- $this->parameterBag = new FrozenParameterBag($parameters);
- }
-
- return $this->parameterBag;
- }
-
-EOF;
- if (!$this->asFiles) {
- $code = preg_replace('/^.*buildParameters.*\n.*\n.*\n/m', '', $code);
- }
-
- if ($dynamicPhp) {
- $loadedDynamicParameters = $this->exportParameters(array_combine(array_keys($dynamicPhp), array_fill(0, \count($dynamicPhp), false)), '', 8);
- $getDynamicParameter = <<<'EOF'
- switch ($name) {
-%s
- default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%%s" must be defined.', $name));
- }
- $this->loadedDynamicParameters[$name] = true;
-
- return $this->dynamicParameters[$name] = $value;
-EOF;
- $getDynamicParameter = sprintf($getDynamicParameter, implode("\n", $dynamicPhp));
- } else {
- $loadedDynamicParameters = '[]';
- $getDynamicParameter = str_repeat(' ', 8).'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));';
- }
-
- $code .= <<<EOF
-
- private \$loadedDynamicParameters = {$loadedDynamicParameters};
- private \$dynamicParameters = [];
-
- private function getDynamicParameter(string \$name)
- {
-{$getDynamicParameter}
- }
-
- protected function getDefaultParameters(): array
- {
- return $parameters;
- }
-
-EOF;
-
- return $code;
- }
-
- /**
- * @throws InvalidArgumentException
- */
- private function exportParameters(array $parameters, string $path = '', int $indent = 12): string
- {
- $php = [];
- foreach ($parameters as $key => $value) {
- if (\is_array($value)) {
- $value = $this->exportParameters($value, $path.'/'.$key, $indent + 4);
- } elseif ($value instanceof ArgumentInterface) {
- throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain special arguments. "%s" found in "%s".', \get_class($value), $path.'/'.$key));
- } elseif ($value instanceof Variable) {
- throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain variable references. Variable "%s" found in "%s".', $value, $path.'/'.$key));
- } elseif ($value instanceof Definition) {
- throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found in "%s".', $value->getClass(), $path.'/'.$key));
- } elseif ($value instanceof Reference) {
- throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain references to other services (reference to service "%s" found in "%s").', $value, $path.'/'.$key));
- } elseif ($value instanceof Expression) {
- throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path.'/'.$key));
- } else {
- $value = $this->export($value);
- }
-
- $php[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), $this->export($key), $value);
- }
-
- return sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', $indent - 4));
- }
-
- private function endClass(): string
- {
- if ($this->addThrow) {
- return <<<'EOF'
-
- protected function throw($message)
- {
- throw new RuntimeException($message);
- }
-}
-
-EOF;
- }
-
- return <<<'EOF'
-}
-
-EOF;
- }
-
- private function wrapServiceConditionals($value, string $code): string
- {
- if (!$condition = $this->getServiceConditionals($value)) {
- return $code;
- }
-
- // re-indent the wrapped code
- $code = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $code)));
-
- return sprintf(" if (%s) {\n%s }\n", $condition, $code);
- }
-
- private function getServiceConditionals($value): string
- {
- $conditions = [];
- foreach (ContainerBuilder::getInitializedConditionals($value) as $service) {
- if (!$this->container->hasDefinition($service)) {
- return 'false';
- }
- $conditions[] = sprintf('isset($this->%s[%s])', $this->container->getDefinition($service)->isPublic() ? 'services' : 'privates', $this->doExport($service));
- }
- foreach (ContainerBuilder::getServiceConditionals($value) as $service) {
- if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) {
- continue;
- }
-
- $conditions[] = sprintf('$this->has(%s)', $this->doExport($service));
- }
-
- if (!$conditions) {
- return '';
- }
-
- return implode(' && ', $conditions);
- }
-
- private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage $definitions = null, array &$calls = [], bool $byConstructor = null): \SplObjectStorage
- {
- if (null === $definitions) {
- $definitions = new \SplObjectStorage();
- }
-
- foreach ($arguments as $argument) {
- if (\is_array($argument)) {
- $this->getDefinitionsFromArguments($argument, $definitions, $calls, $byConstructor);
- } elseif ($argument instanceof Reference) {
- $id = (string) $argument;
-
- while ($this->container->hasAlias($id)) {
- $id = (string) $this->container->getAlias($id);
- }
-
- if (!isset($calls[$id])) {
- $calls[$id] = [0, $argument->getInvalidBehavior(), $byConstructor];
- } else {
- $calls[$id][1] = min($calls[$id][1], $argument->getInvalidBehavior());
- }
-
- ++$calls[$id][0];
- } elseif (!$argument instanceof Definition) {
- // no-op
- } elseif (isset($definitions[$argument])) {
- $definitions[$argument] = 1 + $definitions[$argument];
- } else {
- $definitions[$argument] = 1;
- $arguments = [$argument->getArguments(), $argument->getFactory()];
- $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null === $byConstructor || $byConstructor);
- $arguments = [$argument->getProperties(), $argument->getMethodCalls(), $argument->getConfigurator()];
- $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null !== $byConstructor && $byConstructor);
- }
- }
-
- return $definitions;
- }
-
- /**
- * @throws RuntimeException
- */
- private function dumpValue($value, bool $interpolate = true): string
- {
- if (\is_array($value)) {
- if ($value && $interpolate && false !== $param = array_search($value, $this->container->getParameterBag()->all(), true)) {
- return $this->dumpValue("%$param%");
- }
- $code = [];
- foreach ($value as $k => $v) {
- $code[] = sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate));
- }
-
- return sprintf('[%s]', implode(', ', $code));
- } elseif ($value instanceof ArgumentInterface) {
- $scope = [$this->definitionVariables, $this->referenceVariables];
- $this->definitionVariables = $this->referenceVariables = null;
-
- try {
- if ($value instanceof ServiceClosureArgument) {
- $value = $value->getValues()[0];
- $code = $this->dumpValue($value, $interpolate);
-
- $returnedType = '';
- if ($value instanceof TypedReference) {
- $returnedType = sprintf(': %s\%s', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $value->getInvalidBehavior() ? '' : '?', $value->getType());
- }
-
- $code = sprintf('return %s;', $code);
-
- return sprintf("function ()%s {\n %s\n }", $returnedType, $code);
- }
-
- if ($value instanceof IteratorArgument) {
- $operands = [0];
- $code = [];
- $code[] = 'new RewindableGenerator(function () {';
-
- if (!$values = $value->getValues()) {
- $code[] = ' return new \EmptyIterator();';
- } else {
- $countCode = [];
- $countCode[] = 'function () {';
-
- foreach ($values as $k => $v) {
- ($c = $this->getServiceConditionals($v)) ? $operands[] = "(int) ($c)" : ++$operands[0];
- $v = $this->wrapServiceConditionals($v, sprintf(" yield %s => %s;\n", $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)));
- foreach (explode("\n", $v) as $v) {
- if ($v) {
- $code[] = ' '.$v;
- }
- }
- }
-
- $countCode[] = sprintf(' return %s;', implode(' + ', $operands));
- $countCode[] = ' }';
- }
-
- $code[] = sprintf(' }, %s)', \count($operands) > 1 ? implode("\n", $countCode) : $operands[0]);
-
- return implode("\n", $code);
- }
-
- if ($value instanceof ServiceLocatorArgument) {
- $serviceMap = '';
- $serviceTypes = '';
- foreach ($value->getValues() as $k => $v) {
- if (!$v) {
- continue;
- }
- $definition = $this->container->findDefinition($id = (string) $v);
- $load = !($definition->hasErrors() && $e = $definition->getErrors()) ? $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition) : reset($e);
- $serviceMap .= sprintf("\n %s => [%s, %s, %s, %s],",
- $this->export($k),
- $this->export($definition->isShared() ? ($definition->isPublic() ? 'services' : 'privates') : false),
- $this->doExport($id),
- $this->export(ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $v->getInvalidBehavior() && !\is_string($load) ? $this->generateMethodName($id).($load ? '.php' : '') : null),
- $this->export($load)
- );
- $serviceTypes .= sprintf("\n %s => %s,", $this->export($k), $this->export($v instanceof TypedReference ? $v->getType() : '?'));
- $this->locatedIds[$id] = true;
- }
- $this->addGetService = true;
-
- return sprintf('new \%s($this->getService, [%s%s], [%s%s])', ServiceLocator::class, $serviceMap, $serviceMap ? "\n " : '', $serviceTypes, $serviceTypes ? "\n " : '');
- }
- } finally {
- list($this->definitionVariables, $this->referenceVariables) = $scope;
- }
- } elseif ($value instanceof Definition) {
- if ($value->hasErrors() && $e = $value->getErrors()) {
- $this->addThrow = true;
-
- return sprintf('$this->throw(%s)', $this->export(reset($e)));
- }
- if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) {
- return $this->dumpValue($this->definitionVariables[$value], $interpolate);
- }
- if ($value->getMethodCalls()) {
- throw new RuntimeException('Cannot dump definitions which have method calls.');
- }
- if ($value->getProperties()) {
- throw new RuntimeException('Cannot dump definitions which have properties.');
- }
- if (null !== $value->getConfigurator()) {
- throw new RuntimeException('Cannot dump definitions which have a configurator.');
- }
-
- return $this->addNewInstance($value);
- } elseif ($value instanceof Variable) {
- return '$'.$value;
- } elseif ($value instanceof Reference) {
- $id = (string) $value;
-
- while ($this->container->hasAlias($id)) {
- $id = (string) $this->container->getAlias($id);
- }
-
- if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) {
- return $this->dumpValue($this->referenceVariables[$id], $interpolate);
- }
-
- return $this->getServiceCall($id, $value);
- } elseif ($value instanceof Expression) {
- return $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
- } elseif ($value instanceof Parameter) {
- return $this->dumpParameter($value);
- } elseif (true === $interpolate && \is_string($value)) {
- if (preg_match('/^%([^%]+)%$/', $value, $match)) {
- // we do this to deal with non string values (Boolean, integer, ...)
- // the preg_replace_callback converts them to strings
- return $this->dumpParameter($match[1]);
- } else {
- $replaceParameters = function ($match) {
- return "'.".$this->dumpParameter($match[2]).".'";
- };
-
- $code = str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters, $this->export($value)));
-
- return $code;
- }
- } elseif (\is_object($value) || \is_resource($value)) {
- throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
- }
-
- return $this->export($value);
- }
-
- /**
- * Dumps a string to a literal (aka PHP Code) class value.
- *
- * @throws RuntimeException
- */
- private function dumpLiteralClass(string $class): string
- {
- if (false !== strpos($class, '$')) {
- return sprintf('${($_ = %s) && false ?: "_"}', $class);
- }
- if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) {
- throw new RuntimeException(sprintf('Cannot dump definition because of invalid class name (%s)', $class ?: 'n/a'));
- }
-
- $class = substr(str_replace('\\\\', '\\', $class), 1, -1);
-
- return 0 === strpos($class, '\\') ? $class : '\\'.$class;
- }
-
- private function dumpParameter(string $name): string
- {
- if ($this->container->hasParameter($name)) {
- $value = $this->container->getParameter($name);
- $dumpedValue = $this->dumpValue($value, false);
-
- if (!$value || !\is_array($value)) {
- return $dumpedValue;
- }
-
- if (!preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDir\.'')/", $dumpedValue)) {
- return sprintf('$this->parameters[%s]', $this->doExport($name));
- }
- }
-
- return sprintf('$this->getParameter(%s)', $this->doExport($name));
- }
-
- private function getServiceCall(string $id, Reference $reference = null): string
- {
- while ($this->container->hasAlias($id)) {
- $id = (string) $this->container->getAlias($id);
- }
-
- if ('service_container' === $id) {
- return '$this';
- }
-
- if ($this->container->hasDefinition($id) && $definition = $this->container->getDefinition($id)) {
- if ($definition->isSynthetic()) {
- $code = sprintf('$this->get(%s%s)', $this->doExport($id), null !== $reference ? ', '.$reference->getInvalidBehavior() : '');
- } elseif (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
- $code = 'null';
- if (!$definition->isShared()) {
- return $code;
- }
- } elseif ($this->isTrivialInstance($definition)) {
- if ($definition->hasErrors() && $e = $definition->getErrors()) {
- $this->addThrow = true;
-
- return sprintf('$this->throw(%s)', $this->export(reset($e)));
- }
- $code = $this->addNewInstance($definition, '', $id);
- if ($definition->isShared() && !isset($this->singleUsePrivateIds[$id])) {
- $code = sprintf('$this->%s[%s] = %s', $definition->isPublic() ? 'services' : 'privates', $this->doExport($id), $code);
- }
- $code = "($code)";
- } elseif ($this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition)) {
- $code = sprintf("\$this->load('%s.php')", $this->generateMethodName($id));
- if (!$definition->isShared()) {
- $factory = sprintf('$this->factories%s[%s]', $definition->isPublic() ? '' : "['service_container']", $this->doExport($id));
- $code = sprintf('(isset(%s) ? %1$s() : %s)', $factory, $code);
- }
- } else {
- $code = sprintf('$this->%s()', $this->generateMethodName($id));
- }
- if ($definition->isShared() && !isset($this->singleUsePrivateIds[$id])) {
- $code = sprintf('($this->%s[%s] ?? %s)', $definition->isPublic() ? 'services' : 'privates', $this->doExport($id), $code);
- }
-
- return $code;
- }
- if (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
- return 'null';
- }
- if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $reference->getInvalidBehavior()) {
- $code = sprintf('$this->get(%s, /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ %d)', $this->doExport($id), ContainerInterface::NULL_ON_INVALID_REFERENCE);
- } else {
- $code = sprintf('$this->get(%s)', $this->doExport($id));
- }
-
- return sprintf('($this->services[%s] ?? %s)', $this->doExport($id), $code);
- }
-
- /**
- * Initializes the method names map to avoid conflicts with the Container methods.
- */
- private function initializeMethodNamesMap(string $class)
- {
- $this->serviceIdToMethodNameMap = [];
- $this->usedMethodNames = [];
-
- if ($reflectionClass = $this->container->getReflectionClass($class)) {
- foreach ($reflectionClass->getMethods() as $method) {
- $this->usedMethodNames[strtolower($method->getName())] = true;
- }
- }
- }
-
- /**
- * @throws InvalidArgumentException
- */
- private function generateMethodName(string $id): string
- {
- if (isset($this->serviceIdToMethodNameMap[$id])) {
- return $this->serviceIdToMethodNameMap[$id];
- }
-
- $i = strrpos($id, '\\');
- $name = Container::camelize(false !== $i && isset($id[1 + $i]) ? substr($id, 1 + $i) : $id);
- $name = preg_replace('/[^a-zA-Z0-9_\x7f-\xff]/', '', $name);
- $methodName = 'get'.$name.'Service';
- $suffix = 1;
-
- while (isset($this->usedMethodNames[strtolower($methodName)])) {
- ++$suffix;
- $methodName = 'get'.$name.$suffix.'Service';
- }
-
- $this->serviceIdToMethodNameMap[$id] = $methodName;
- $this->usedMethodNames[strtolower($methodName)] = true;
-
- return $methodName;
- }
-
- private function getNextVariableName(): string
- {
- $firstChars = self::FIRST_CHARS;
- $firstCharsLength = \strlen($firstChars);
- $nonFirstChars = self::NON_FIRST_CHARS;
- $nonFirstCharsLength = \strlen($nonFirstChars);
-
- while (true) {
- $name = '';
- $i = $this->variableCount;
-
- if ('' === $name) {
- $name .= $firstChars[$i % $firstCharsLength];
- $i = (int) ($i / $firstCharsLength);
- }
-
- while ($i > 0) {
- --$i;
- $name .= $nonFirstChars[$i % $nonFirstCharsLength];
- $i = (int) ($i / $nonFirstCharsLength);
- }
-
- ++$this->variableCount;
-
- // check that the name is not reserved
- if (\in_array($name, $this->reservedVariables, true)) {
- continue;
- }
-
- return $name;
- }
- }
-
- private function getExpressionLanguage(): ExpressionLanguage
- {
- if (null === $this->expressionLanguage) {
- if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) {
- throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
- }
- $providers = $this->container->getExpressionLanguageProviders();
- $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) {
- $id = '""' === substr_replace($arg, '', 1, -1) ? stripcslashes(substr($arg, 1, -1)) : null;
-
- if (null !== $id && ($this->container->hasAlias($id) || $this->container->hasDefinition($id))) {
- return $this->getServiceCall($id);
- }
-
- return sprintf('$this->get(%s)', $arg);
- });
-
- if ($this->container->isTrackingResources()) {
- foreach ($providers as $provider) {
- $this->container->addObjectResource($provider);
- }
- }
- }
-
- return $this->expressionLanguage;
- }
-
- private function isHotPath(Definition $definition): bool
- {
- return $this->hotPathTag && $definition->hasTag($this->hotPathTag) && !$definition->isDeprecated();
- }
-
- private function isSingleUsePrivateNode(ServiceReferenceGraphNode $node): bool
- {
- if ($node->getValue()->isPublic()) {
- return false;
- }
- $ids = [];
- foreach ($node->getInEdges() as $edge) {
- if (!$value = $edge->getSourceNode()->getValue()) {
- continue;
- }
- if ($edge->isLazy() || !$value instanceof Definition || !$value->isShared()) {
- return false;
- }
- $ids[$edge->getSourceNode()->getId()] = true;
- }
-
- return 1 === \count($ids);
- }
-
- /**
- * @return mixed
- */
- private function export($value)
- {
- if (null !== $this->targetDirRegex && \is_string($value) && preg_match($this->targetDirRegex, $value, $matches, PREG_OFFSET_CAPTURE)) {
- $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true).'.' : '';
- $suffix = $matches[0][1] + \strlen($matches[0][0]);
- $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix), true) : '';
- $dirname = $this->asFiles ? '$this->containerDir' : '__DIR__';
- $offset = 1 + $this->targetDirMaxMatches - \count($matches);
-
- if (0 < $offset) {
- $dirname = sprintf('\dirname(__DIR__, %d)', $offset + (int) $this->asFiles);
- } elseif ($this->asFiles) {
- $dirname = "\$this->targetDir.''"; // empty string concatenation on purpose
- }
-
- if ($prefix || $suffix) {
- return sprintf('(%s%s%s)', $prefix, $dirname, $suffix);
- }
-
- return $dirname;
- }
-
- return $this->doExport($value, true);
- }
-
- /**
- * @return mixed
- */
- private function doExport($value, bool $resolveEnv = false)
- {
- $shouldCacheValue = $resolveEnv && \is_string($value);
- if ($shouldCacheValue && isset($this->exportedVariables[$value])) {
- return $this->exportedVariables[$value];
- }
- if (\is_string($value) && false !== strpos($value, "\n")) {
- $cleanParts = explode("\n", $value);
- $cleanParts = array_map(function ($part) { return var_export($part, true); }, $cleanParts);
- $export = implode('."\n".', $cleanParts);
- } else {
- $export = var_export($value, true);
- }
-
- if ($resolveEnv && "'" === $export[0] && $export !== $resolvedExport = $this->container->resolveEnvPlaceholders($export, "'.\$this->getEnv('string:%s').'")) {
- $export = $resolvedExport;
- if (".''" === substr($export, -3)) {
- $export = substr($export, 0, -3);
- if ("'" === $export[1]) {
- $export = substr_replace($export, '', 18, 7);
- }
- }
- if ("'" === $export[1]) {
- $export = substr($export, 3);
- }
- }
-
- if ($shouldCacheValue) {
- $this->exportedVariables[$value] = $export;
- }
-
- return $export;
- }
-
- private function getAutoloadFile(): ?string
- {
- if (null === $this->targetDirRegex) {
- return null;
- }
-
- foreach (spl_autoload_functions() as $autoloader) {
- if (!\is_array($autoloader)) {
- continue;
- }
-
- if ($autoloader[0] instanceof DebugClassLoader || $autoloader[0] instanceof LegacyDebugClassLoader) {
- $autoloader = $autoloader[0]->getClassLoader();
- }
-
- if (!\is_array($autoloader) || !$autoloader[0] instanceof ClassLoader || !$autoloader[0]->findFile(__CLASS__)) {
- continue;
- }
-
- foreach (get_declared_classes() as $class) {
- if (0 === strpos($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) {
- $file = \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php';
-
- if (preg_match($this->targetDirRegex.'A', $file)) {
- return $file;
- }
- }
- }
- }
-
- return null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Preloader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Preloader.php
deleted file mode 100644
index abb7d90..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/Preloader.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class Preloader
-{
- public static function preload(array $classes)
- {
- set_error_handler(function ($t, $m, $f, $l) {
- if (error_reporting() & $t) {
- if (__FILE__ !== $f) {
- throw new \ErrorException($m, 0, $t, $f, $l);
- }
-
- throw new \ReflectionException($m);
- }
- });
-
- $prev = [];
- $preloaded = [];
-
- try {
- while ($prev !== $classes) {
- $prev = $classes;
- foreach ($classes as $c) {
- if (!isset($preloaded[$c])) {
- self::doPreload($c, $preloaded);
- }
- }
- $classes = array_merge(get_declared_classes(), get_declared_interfaces(), get_declared_traits());
- }
- } finally {
- restore_error_handler();
- }
- }
-
- private static function doPreload(string $class, array &$preloaded)
- {
- if (isset($preloaded[$class]) || \in_array($class, ['self', 'static', 'parent'], true)) {
- return;
- }
-
- $preloaded[$class] = true;
-
- try {
- $r = new \ReflectionClass($class);
-
- if ($r->isInternal()) {
- return;
- }
-
- $r->getConstants();
- $r->getDefaultProperties();
-
- if (\PHP_VERSION_ID >= 70400) {
- foreach ($r->getProperties(\ReflectionProperty::IS_PUBLIC) as $p) {
- if (($t = $p->getType()) && !$t->isBuiltin()) {
- self::doPreload($t->getName(), $preloaded);
- }
- }
- }
-
- foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) {
- foreach ($m->getParameters() as $p) {
- if ($p->isDefaultValueAvailable() && $p->isDefaultValueConstant()) {
- $c = $p->getDefaultValueConstantName();
-
- if ($i = strpos($c, '::')) {
- self::doPreload(substr($c, 0, $i), $preloaded);
- }
- }
-
- if (($t = $p->getType()) && !$t->isBuiltin()) {
- self::doPreload($t->getName(), $preloaded);
- }
- }
-
- if (($t = $m->getReturnType()) && !$t->isBuiltin()) {
- self::doPreload($t->getName(), $preloaded);
- }
- }
- } catch (\ReflectionException $e) {
- // ignore missing classes
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/XmlDumper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
deleted file mode 100644
index fb5d827..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
+++ /dev/null
@@ -1,374 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Parameter;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\ExpressionLanguage\Expression;
-
-/**
- * XmlDumper dumps a service container as an XML string.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Martin Hasoň <martin.hason@gmail.com>
- */
-class XmlDumper extends Dumper
-{
- /**
- * @var \DOMDocument
- */
- private $document;
-
- /**
- * Dumps the service container as an XML string.
- *
- * @return string An xml string representing of the service container
- */
- public function dump(array $options = [])
- {
- $this->document = new \DOMDocument('1.0', 'utf-8');
- $this->document->formatOutput = true;
-
- $container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container');
- $container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
- $container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd');
-
- $this->addParameters($container);
- $this->addServices($container);
-
- $this->document->appendChild($container);
- $xml = $this->document->saveXML();
- $this->document = null;
-
- return $this->container->resolveEnvPlaceholders($xml);
- }
-
- private function addParameters(\DOMElement $parent)
- {
- $data = $this->container->getParameterBag()->all();
- if (!$data) {
- return;
- }
-
- if ($this->container->isCompiled()) {
- $data = $this->escape($data);
- }
-
- $parameters = $this->document->createElement('parameters');
- $parent->appendChild($parameters);
- $this->convertParameters($data, 'parameter', $parameters);
- }
-
- private function addMethodCalls(array $methodcalls, \DOMElement $parent)
- {
- foreach ($methodcalls as $methodcall) {
- $call = $this->document->createElement('call');
- $call->setAttribute('method', $methodcall[0]);
- if (\count($methodcall[1])) {
- $this->convertParameters($methodcall[1], 'argument', $call);
- }
- if ($methodcall[2] ?? false) {
- $call->setAttribute('returns-clone', 'true');
- }
- $parent->appendChild($call);
- }
- }
-
- private function addService(Definition $definition, ?string $id, \DOMElement $parent)
- {
- $service = $this->document->createElement('service');
- if (null !== $id) {
- $service->setAttribute('id', $id);
- }
- if ($class = $definition->getClass()) {
- if ('\\' === substr($class, 0, 1)) {
- $class = substr($class, 1);
- }
-
- $service->setAttribute('class', $class);
- }
- if (!$definition->isShared()) {
- $service->setAttribute('shared', 'false');
- }
- if (!$definition->isPrivate()) {
- $service->setAttribute('public', $definition->isPublic() ? 'true' : 'false');
- }
- if ($definition->isSynthetic()) {
- $service->setAttribute('synthetic', 'true');
- }
- if ($definition->isLazy()) {
- $service->setAttribute('lazy', 'true');
- }
- if (null !== $decoratedService = $definition->getDecoratedService()) {
- list($decorated, $renamedId, $priority) = $decoratedService;
- $service->setAttribute('decorates', $decorated);
-
- $decorationOnInvalid = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- if (\in_array($decorationOnInvalid, [ContainerInterface::IGNORE_ON_INVALID_REFERENCE, ContainerInterface::NULL_ON_INVALID_REFERENCE], true)) {
- $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE === $decorationOnInvalid ? 'null' : 'ignore';
- $service->setAttribute('decoration-on-invalid', $invalidBehavior);
- }
- if (null !== $renamedId) {
- $service->setAttribute('decoration-inner-name', $renamedId);
- }
- if (0 !== $priority) {
- $service->setAttribute('decoration-priority', $priority);
- }
- }
-
- foreach ($definition->getTags() as $name => $tags) {
- foreach ($tags as $attributes) {
- $tag = $this->document->createElement('tag');
- $tag->setAttribute('name', $name);
- foreach ($attributes as $key => $value) {
- $tag->setAttribute($key, $value);
- }
- $service->appendChild($tag);
- }
- }
-
- if ($definition->getFile()) {
- $file = $this->document->createElement('file');
- $file->appendChild($this->document->createTextNode($definition->getFile()));
- $service->appendChild($file);
- }
-
- if ($parameters = $definition->getArguments()) {
- $this->convertParameters($parameters, 'argument', $service);
- }
-
- if ($parameters = $definition->getProperties()) {
- $this->convertParameters($parameters, 'property', $service, 'name');
- }
-
- $this->addMethodCalls($definition->getMethodCalls(), $service);
-
- if ($callable = $definition->getFactory()) {
- $factory = $this->document->createElement('factory');
-
- if (\is_array($callable) && $callable[0] instanceof Definition) {
- $this->addService($callable[0], null, $factory);
- $factory->setAttribute('method', $callable[1]);
- } elseif (\is_array($callable)) {
- if (null !== $callable[0]) {
- $factory->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]);
- }
- $factory->setAttribute('method', $callable[1]);
- } else {
- $factory->setAttribute('function', $callable);
- }
- $service->appendChild($factory);
- }
-
- if ($definition->isDeprecated()) {
- $deprecated = $this->document->createElement('deprecated');
- $deprecated->appendChild($this->document->createTextNode($definition->getDeprecationMessage('%service_id%')));
-
- $service->appendChild($deprecated);
- }
-
- if ($definition->isAutowired()) {
- $service->setAttribute('autowire', 'true');
- }
-
- if ($definition->isAutoconfigured()) {
- $service->setAttribute('autoconfigure', 'true');
- }
-
- if ($definition->isAbstract()) {
- $service->setAttribute('abstract', 'true');
- }
-
- if ($callable = $definition->getConfigurator()) {
- $configurator = $this->document->createElement('configurator');
-
- if (\is_array($callable) && $callable[0] instanceof Definition) {
- $this->addService($callable[0], null, $configurator);
- $configurator->setAttribute('method', $callable[1]);
- } elseif (\is_array($callable)) {
- $configurator->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]);
- $configurator->setAttribute('method', $callable[1]);
- } else {
- $configurator->setAttribute('function', $callable);
- }
- $service->appendChild($configurator);
- }
-
- $parent->appendChild($service);
- }
-
- private function addServiceAlias(string $alias, Alias $id, \DOMElement $parent)
- {
- $service = $this->document->createElement('service');
- $service->setAttribute('id', $alias);
- $service->setAttribute('alias', $id);
- if (!$id->isPrivate()) {
- $service->setAttribute('public', $id->isPublic() ? 'true' : 'false');
- }
-
- if ($id->isDeprecated()) {
- $deprecated = $this->document->createElement('deprecated');
- $deprecated->appendChild($this->document->createTextNode($id->getDeprecationMessage('%alias_id%')));
-
- $service->appendChild($deprecated);
- }
-
- $parent->appendChild($service);
- }
-
- private function addServices(\DOMElement $parent)
- {
- $definitions = $this->container->getDefinitions();
- if (!$definitions) {
- return;
- }
-
- $services = $this->document->createElement('services');
- foreach ($definitions as $id => $definition) {
- $this->addService($definition, $id, $services);
- }
-
- $aliases = $this->container->getAliases();
- foreach ($aliases as $alias => $id) {
- while (isset($aliases[(string) $id])) {
- $id = $aliases[(string) $id];
- }
- $this->addServiceAlias($alias, $id, $services);
- }
- $parent->appendChild($services);
- }
-
- private function convertParameters(array $parameters, string $type, \DOMElement $parent, string $keyAttribute = 'key')
- {
- $withKeys = array_keys($parameters) !== range(0, \count($parameters) - 1);
- foreach ($parameters as $key => $value) {
- $element = $this->document->createElement($type);
- if ($withKeys) {
- $element->setAttribute($keyAttribute, $key);
- }
-
- if ($value instanceof ServiceClosureArgument) {
- $value = $value->getValues()[0];
- }
- if (\is_array($tag = $value)) {
- $element->setAttribute('type', 'collection');
- $this->convertParameters($value, $type, $element, 'key');
- } elseif ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) {
- $element->setAttribute('type', $value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator');
- $element->setAttribute('tag', $tag->getTag());
-
- if (null !== $tag->getIndexAttribute()) {
- $element->setAttribute('index-by', $tag->getIndexAttribute());
-
- if (null !== $tag->getDefaultIndexMethod()) {
- $element->setAttribute('default-index-method', $tag->getDefaultIndexMethod());
- }
- if (null !== $tag->getDefaultPriorityMethod()) {
- $element->setAttribute('default-priority-method', $tag->getDefaultPriorityMethod());
- }
- }
- } elseif ($value instanceof IteratorArgument) {
- $element->setAttribute('type', 'iterator');
- $this->convertParameters($value->getValues(), $type, $element, 'key');
- } elseif ($value instanceof ServiceLocatorArgument) {
- $element->setAttribute('type', 'service_locator');
- $this->convertParameters($value->getValues(), $type, $element, 'key');
- } elseif ($value instanceof Reference) {
- $element->setAttribute('type', 'service');
- $element->setAttribute('id', (string) $value);
- $behavior = $value->getInvalidBehavior();
- if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) {
- $element->setAttribute('on-invalid', 'null');
- } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) {
- $element->setAttribute('on-invalid', 'ignore');
- } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) {
- $element->setAttribute('on-invalid', 'ignore_uninitialized');
- }
- } elseif ($value instanceof Definition) {
- $element->setAttribute('type', 'service');
- $this->addService($value, null, $element);
- } elseif ($value instanceof Expression) {
- $element->setAttribute('type', 'expression');
- $text = $this->document->createTextNode(self::phpToXml((string) $value));
- $element->appendChild($text);
- } elseif (\is_string($value) && !preg_match('/^[^\x00-\x08\x0B\x0E-\x1A\x1C-\x1F\x7F]*+$/u', $value)) {
- $element->setAttribute('type', 'binary');
- $text = $this->document->createTextNode(self::phpToXml(base64_encode($value)));
- $element->appendChild($text);
- } else {
- if (\in_array($value, ['null', 'true', 'false'], true)) {
- $element->setAttribute('type', 'string');
- }
-
- if (\is_string($value) && (is_numeric($value) || preg_match('/^0b[01]*$/', $value) || preg_match('/^0x[0-9a-f]++$/i', $value))) {
- $element->setAttribute('type', 'string');
- }
-
- $text = $this->document->createTextNode(self::phpToXml($value));
- $element->appendChild($text);
- }
- $parent->appendChild($element);
- }
- }
-
- /**
- * Escapes arguments.
- */
- private function escape(array $arguments): array
- {
- $args = [];
- foreach ($arguments as $k => $v) {
- if (\is_array($v)) {
- $args[$k] = $this->escape($v);
- } elseif (\is_string($v)) {
- $args[$k] = str_replace('%', '%%', $v);
- } else {
- $args[$k] = $v;
- }
- }
-
- return $args;
- }
-
- /**
- * Converts php types to xml types.
- *
- * @param mixed $value Value to convert
- *
- * @throws RuntimeException When trying to dump object or resource
- */
- public static function phpToXml($value): string
- {
- switch (true) {
- case null === $value:
- return 'null';
- case true === $value:
- return 'true';
- case false === $value:
- return 'false';
- case $value instanceof Parameter:
- return '%'.$value.'%';
- case \is_object($value) || \is_resource($value):
- throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
- default:
- return (string) $value;
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/YamlDumper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
deleted file mode 100644
index ccb68ee..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
+++ /dev/null
@@ -1,349 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Dumper;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Parameter;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\ExpressionLanguage\Expression;
-use Symfony\Component\Yaml\Dumper as YmlDumper;
-use Symfony\Component\Yaml\Parser;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-use Symfony\Component\Yaml\Yaml;
-
-/**
- * YamlDumper dumps a service container as a YAML string.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class YamlDumper extends Dumper
-{
- private $dumper;
-
- /**
- * Dumps the service container as an YAML string.
- *
- * @return string A YAML string representing of the service container
- */
- public function dump(array $options = [])
- {
- if (!class_exists('Symfony\Component\Yaml\Dumper')) {
- throw new LogicException('Unable to dump the container as the Symfony Yaml Component is not installed.');
- }
-
- if (null === $this->dumper) {
- $this->dumper = new YmlDumper();
- }
-
- return $this->container->resolveEnvPlaceholders($this->addParameters()."\n".$this->addServices());
- }
-
- private function addService(string $id, Definition $definition): string
- {
- $code = " $id:\n";
- if ($class = $definition->getClass()) {
- if ('\\' === substr($class, 0, 1)) {
- $class = substr($class, 1);
- }
-
- $code .= sprintf(" class: %s\n", $this->dumper->dump($class));
- }
-
- if (!$definition->isPrivate()) {
- $code .= sprintf(" public: %s\n", $definition->isPublic() ? 'true' : 'false');
- }
-
- $tagsCode = '';
- foreach ($definition->getTags() as $name => $tags) {
- foreach ($tags as $attributes) {
- $att = [];
- foreach ($attributes as $key => $value) {
- $att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value));
- }
- $att = $att ? ', '.implode(', ', $att) : '';
-
- $tagsCode .= sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att);
- }
- }
- if ($tagsCode) {
- $code .= " tags:\n".$tagsCode;
- }
-
- if ($definition->getFile()) {
- $code .= sprintf(" file: %s\n", $this->dumper->dump($definition->getFile()));
- }
-
- if ($definition->isSynthetic()) {
- $code .= " synthetic: true\n";
- }
-
- if ($definition->isDeprecated()) {
- $code .= sprintf(" deprecated: %s\n", $this->dumper->dump($definition->getDeprecationMessage('%service_id%')));
- }
-
- if ($definition->isAutowired()) {
- $code .= " autowire: true\n";
- }
-
- if ($definition->isAutoconfigured()) {
- $code .= " autoconfigure: true\n";
- }
-
- if ($definition->isAbstract()) {
- $code .= " abstract: true\n";
- }
-
- if ($definition->isLazy()) {
- $code .= " lazy: true\n";
- }
-
- if ($definition->getArguments()) {
- $code .= sprintf(" arguments: %s\n", $this->dumper->dump($this->dumpValue($definition->getArguments()), 0));
- }
-
- if ($definition->getProperties()) {
- $code .= sprintf(" properties: %s\n", $this->dumper->dump($this->dumpValue($definition->getProperties()), 0));
- }
-
- if ($definition->getMethodCalls()) {
- $code .= sprintf(" calls:\n%s\n", $this->dumper->dump($this->dumpValue($definition->getMethodCalls()), 1, 12));
- }
-
- if (!$definition->isShared()) {
- $code .= " shared: false\n";
- }
-
- if (null !== $decoratedService = $definition->getDecoratedService()) {
- list($decorated, $renamedId, $priority) = $decoratedService;
- $code .= sprintf(" decorates: %s\n", $decorated);
- if (null !== $renamedId) {
- $code .= sprintf(" decoration_inner_name: %s\n", $renamedId);
- }
- if (0 !== $priority) {
- $code .= sprintf(" decoration_priority: %s\n", $priority);
- }
-
- $decorationOnInvalid = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- if (\in_array($decorationOnInvalid, [ContainerInterface::IGNORE_ON_INVALID_REFERENCE, ContainerInterface::NULL_ON_INVALID_REFERENCE])) {
- $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE === $decorationOnInvalid ? 'null' : 'ignore';
- $code .= sprintf(" decoration_on_invalid: %s\n", $invalidBehavior);
- }
- }
-
- if ($callable = $definition->getFactory()) {
- $code .= sprintf(" factory: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0));
- }
-
- if ($callable = $definition->getConfigurator()) {
- $code .= sprintf(" configurator: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0));
- }
-
- return $code;
- }
-
- private function addServiceAlias(string $alias, Alias $id): string
- {
- $deprecated = $id->isDeprecated() ? sprintf(" deprecated: %s\n", $id->getDeprecationMessage('%alias_id%')) : '';
-
- if ($id->isPrivate()) {
- return sprintf(" %s: '@%s'\n%s", $alias, $id, $deprecated);
- }
-
- return sprintf(" %s:\n alias: %s\n public: %s\n%s", $alias, $id, $id->isPublic() ? 'true' : 'false', $deprecated);
- }
-
- private function addServices(): string
- {
- if (!$this->container->getDefinitions()) {
- return '';
- }
-
- $code = "services:\n";
- foreach ($this->container->getDefinitions() as $id => $definition) {
- $code .= $this->addService($id, $definition);
- }
-
- $aliases = $this->container->getAliases();
- foreach ($aliases as $alias => $id) {
- while (isset($aliases[(string) $id])) {
- $id = $aliases[(string) $id];
- }
- $code .= $this->addServiceAlias($alias, $id);
- }
-
- return $code;
- }
-
- private function addParameters(): string
- {
- if (!$this->container->getParameterBag()->all()) {
- return '';
- }
-
- $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isCompiled());
-
- return $this->dumper->dump(['parameters' => $parameters], 2);
- }
-
- /**
- * Dumps callable to YAML format.
- *
- * @param mixed $callable
- *
- * @return mixed
- */
- private function dumpCallable($callable)
- {
- if (\is_array($callable)) {
- if ($callable[0] instanceof Reference) {
- $callable = [$this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]];
- } else {
- $callable = [$callable[0], $callable[1]];
- }
- }
-
- return $callable;
- }
-
- /**
- * Dumps the value to YAML format.
- *
- * @return mixed
- *
- * @throws RuntimeException When trying to dump object or resource
- */
- private function dumpValue($value)
- {
- if ($value instanceof ServiceClosureArgument) {
- $value = $value->getValues()[0];
- }
- if ($value instanceof ArgumentInterface) {
- $tag = $value;
-
- if ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) {
- if (null === $tag->getIndexAttribute()) {
- $content = $tag->getTag();
- } else {
- $content = [
- 'tag' => $tag->getTag(),
- 'index_by' => $tag->getIndexAttribute(),
- ];
-
- if (null !== $tag->getDefaultIndexMethod()) {
- $content['default_index_method'] = $tag->getDefaultIndexMethod();
- }
- if (null !== $tag->getDefaultPriorityMethod()) {
- $content['default_priority_method'] = $tag->getDefaultPriorityMethod();
- }
- }
-
- return new TaggedValue($value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator', $content);
- }
-
- if ($value instanceof IteratorArgument) {
- $tag = 'iterator';
- } elseif ($value instanceof ServiceLocatorArgument) {
- $tag = 'service_locator';
- } else {
- throw new RuntimeException(sprintf('Unspecified Yaml tag for type "%s".', \get_class($value)));
- }
-
- return new TaggedValue($tag, $this->dumpValue($value->getValues()));
- }
-
- if (\is_array($value)) {
- $code = [];
- foreach ($value as $k => $v) {
- $code[$k] = $this->dumpValue($v);
- }
-
- return $code;
- } elseif ($value instanceof Reference) {
- return $this->getServiceCall((string) $value, $value);
- } elseif ($value instanceof Parameter) {
- return $this->getParameterCall((string) $value);
- } elseif ($value instanceof Expression) {
- return $this->getExpressionCall((string) $value);
- } elseif ($value instanceof Definition) {
- return new TaggedValue('service', (new Parser())->parse("_:\n".$this->addService('_', $value), Yaml::PARSE_CUSTOM_TAGS)['_']['_']);
- } elseif (\is_object($value) || \is_resource($value)) {
- throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
- }
-
- return $value;
- }
-
- private function getServiceCall(string $id, Reference $reference = null): string
- {
- if (null !== $reference) {
- switch ($reference->getInvalidBehavior()) {
- case ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE: break;
- case ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE: break;
- case ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE: return sprintf('@!%s', $id);
- default: return sprintf('@?%s', $id);
- }
- }
-
- return sprintf('@%s', $id);
- }
-
- private function getParameterCall(string $id): string
- {
- return sprintf('%%%s%%', $id);
- }
-
- private function getExpressionCall(string $expression): string
- {
- return sprintf('@=%s', $expression);
- }
-
- private function prepareParameters(array $parameters, bool $escape = true): array
- {
- $filtered = [];
- foreach ($parameters as $key => $value) {
- if (\is_array($value)) {
- $value = $this->prepareParameters($value, $escape);
- } elseif ($value instanceof Reference || \is_string($value) && 0 === strpos($value, '@')) {
- $value = '@'.$value;
- }
-
- $filtered[$key] = $value;
- }
-
- return $escape ? $this->escape($filtered) : $filtered;
- }
-
- private function escape(array $arguments): array
- {
- $args = [];
- foreach ($arguments as $k => $v) {
- if (\is_array($v)) {
- $args[$k] = $this->escape($v);
- } elseif (\is_string($v)) {
- $args[$k] = str_replace('%', '%%', $v);
- } else {
- $args[$k] = $v;
- }
- }
-
- return $args;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php
deleted file mode 100644
index 0c547f8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * EnvVarLoaderInterface objects return key/value pairs that are added to the list of available env vars.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface EnvVarLoaderInterface
-{
- /**
- * @return string[] Key/value pairs that can be accessed using the regular "%env()%" syntax
- */
- public function loadEnvVars(): array;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessor.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessor.php
deleted file mode 100644
index 724187b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessor.php
+++ /dev/null
@@ -1,280 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
-use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class EnvVarProcessor implements EnvVarProcessorInterface
-{
- private $container;
- private $loaders;
- private $loadedVars = [];
-
- /**
- * @param EnvVarLoaderInterface[] $loaders
- */
- public function __construct(ContainerInterface $container, \Traversable $loaders = null)
- {
- $this->container = $container;
- $this->loaders = new \IteratorIterator($loaders ?? new \ArrayIterator());
- $this->loaders = $this->loaders->getInnerIterator();
- }
-
- /**
- * {@inheritdoc}
- */
- public static function getProvidedTypes()
- {
- return [
- 'base64' => 'string',
- 'bool' => 'bool',
- 'const' => 'bool|int|float|string|array',
- 'csv' => 'array',
- 'file' => 'string',
- 'float' => 'float',
- 'int' => 'int',
- 'json' => 'array',
- 'key' => 'bool|int|float|string|array',
- 'url' => 'array',
- 'query_string' => 'array',
- 'resolve' => 'string',
- 'default' => 'bool|int|float|string|array',
- 'string' => 'string',
- 'trim' => 'string',
- 'require' => 'bool|int|float|string|array',
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function getEnv($prefix, $name, \Closure $getEnv)
- {
- $i = strpos($name, ':');
-
- if ('key' === $prefix) {
- if (false === $i) {
- throw new RuntimeException(sprintf('Invalid env "key:%s": a key specifier should be provided.', $name));
- }
-
- $next = substr($name, $i + 1);
- $key = substr($name, 0, $i);
- $array = $getEnv($next);
-
- if (!\is_array($array)) {
- throw new RuntimeException(sprintf('Resolved value of "%s" did not result in an array value.', $next));
- }
-
- if (!isset($array[$key]) && !\array_key_exists($key, $array)) {
- throw new EnvNotFoundException(sprintf('Key "%s" not found in "%s" (resolved from "%s").', $key, json_encode($array), $next));
- }
-
- return $array[$key];
- }
-
- if ('default' === $prefix) {
- if (false === $i) {
- throw new RuntimeException(sprintf('Invalid env "default:%s": a fallback parameter should be provided.', $name));
- }
-
- $next = substr($name, $i + 1);
- $default = substr($name, 0, $i);
-
- if ('' !== $default && !$this->container->hasParameter($default)) {
- throw new RuntimeException(sprintf('Invalid env fallback in "default:%s": parameter "%s" not found.', $name, $default));
- }
-
- try {
- $env = $getEnv($next);
-
- if ('' !== $env && null !== $env) {
- return $env;
- }
- } catch (EnvNotFoundException $e) {
- // no-op
- }
-
- return '' === $default ? null : $this->container->getParameter($default);
- }
-
- if ('file' === $prefix || 'require' === $prefix) {
- if (!is_scalar($file = $getEnv($name))) {
- throw new RuntimeException(sprintf('Invalid file name: env var "%s" is non-scalar.', $name));
- }
- if (!file_exists($file)) {
- throw new EnvNotFoundException(sprintf('File "%s" not found (resolved from "%s").', $file, $name));
- }
-
- if ('file' === $prefix) {
- return file_get_contents($file);
- } else {
- return require $file;
- }
- }
-
- if (false !== $i || 'string' !== $prefix) {
- if (null === $env = $getEnv($name)) {
- return null;
- }
- } elseif (isset($_ENV[$name])) {
- $env = $_ENV[$name];
- } elseif (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) {
- $env = $_SERVER[$name];
- } elseif (false === ($env = getenv($name)) || null === $env) { // null is a possible value because of thread safety issues
- foreach ($this->loadedVars as $vars) {
- if (false !== $env = ($vars[$name] ?? false)) {
- break;
- }
- }
-
- $loaders = $this->loaders;
- $this->loaders = new \ArrayIterator();
-
- try {
- while ((false === $env || null === $env) && $loaders->valid()) {
- $loader = $loaders->current();
- $loaders->next();
- $this->loadedVars[] = $vars = $loader->loadEnvVars();
- $env = $vars[$name] ?? false;
- }
- } catch (ParameterCircularReferenceException $e) {
- // skip loaders that need an env var that is not defined
- } finally {
- $this->loaders = $loaders;
- }
-
- if (false === $env || null === $env) {
- if (!$this->container->hasParameter("env($name)")) {
- throw new EnvNotFoundException(sprintf('Environment variable not found: "%s".', $name));
- }
-
- if (null === $env = $this->container->getParameter("env($name)")) {
- return null;
- }
- }
- }
-
- if (!is_scalar($env)) {
- throw new RuntimeException(sprintf('Non-scalar env var "%s" cannot be cast to %s.', $name, $prefix));
- }
-
- if ('string' === $prefix) {
- return (string) $env;
- }
-
- if ('bool' === $prefix) {
- return (bool) (filter_var($env, FILTER_VALIDATE_BOOLEAN) ?: filter_var($env, FILTER_VALIDATE_INT) ?: filter_var($env, FILTER_VALIDATE_FLOAT));
- }
-
- if ('int' === $prefix) {
- if (false === $env = filter_var($env, FILTER_VALIDATE_INT) ?: filter_var($env, FILTER_VALIDATE_FLOAT)) {
- throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to int.', $name));
- }
-
- return (int) $env;
- }
-
- if ('float' === $prefix) {
- if (false === $env = filter_var($env, FILTER_VALIDATE_FLOAT)) {
- throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to float.', $name));
- }
-
- return (float) $env;
- }
-
- if ('const' === $prefix) {
- if (!\defined($env)) {
- throw new RuntimeException(sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env));
- }
-
- return \constant($env);
- }
-
- if ('base64' === $prefix) {
- return base64_decode(strtr($env, '-_', '+/'));
- }
-
- if ('json' === $prefix) {
- $env = json_decode($env, true);
-
- if (JSON_ERROR_NONE !== json_last_error()) {
- throw new RuntimeException(sprintf('Invalid JSON in env var "%s": '.json_last_error_msg(), $name));
- }
-
- if (null !== $env && !\is_array($env)) {
- throw new RuntimeException(sprintf('Invalid JSON env var "%s": array or null expected, %s given.', $name, \gettype($env)));
- }
-
- return $env;
- }
-
- if ('url' === $prefix) {
- $parsedEnv = parse_url($env);
-
- if (false === $parsedEnv) {
- throw new RuntimeException(sprintf('Invalid URL in env var "%s"', $name));
- }
- if (!isset($parsedEnv['scheme'], $parsedEnv['host'])) {
- throw new RuntimeException(sprintf('Invalid URL env var "%s": schema and host expected, %s given.', $name, $env));
- }
- $parsedEnv += [
- 'port' => null,
- 'user' => null,
- 'pass' => null,
- 'path' => null,
- 'query' => null,
- 'fragment' => null,
- ];
-
- // remove the '/' separator
- $parsedEnv['path'] = '/' === $parsedEnv['path'] ? null : substr($parsedEnv['path'], 1);
-
- return $parsedEnv;
- }
-
- if ('query_string' === $prefix) {
- $queryString = parse_url($env, PHP_URL_QUERY) ?: $env;
- parse_str($queryString, $result);
-
- return $result;
- }
-
- if ('resolve' === $prefix) {
- return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($name) {
- if (!isset($match[1])) {
- return '%';
- }
- $value = $this->container->getParameter($match[1]);
- if (!is_scalar($value)) {
- throw new RuntimeException(sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, \gettype($value)));
- }
-
- return $value;
- }, $env);
- }
-
- if ('csv' === $prefix) {
- return str_getcsv($env, ',', '"', \PHP_VERSION_ID >= 70400 ? '' : '\\');
- }
-
- if ('trim' === $prefix) {
- return trim($env);
- }
-
- throw new RuntimeException(sprintf('Unsupported env var prefix "%s".', $prefix));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
deleted file mode 100644
index 654fe55..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * The EnvVarProcessorInterface is implemented by objects that manage environment-like variables.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface EnvVarProcessorInterface
-{
- /**
- * Returns the value of the given variable as managed by the current instance.
- *
- * @param string $prefix The namespace of the variable
- * @param string $name The name of the variable within the namespace
- * @param \Closure $getEnv A closure that allows fetching more env vars
- *
- * @return mixed
- *
- * @throws RuntimeException on error
- */
- public function getEnv($prefix, $name, \Closure $getEnv);
-
- /**
- * @return string[] The PHP-types managed by getEnv(), keyed by prefixes
- */
- public static function getProvidedTypes();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
deleted file mode 100644
index c203b85..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Thrown when a definition cannot be autowired.
- */
-class AutowiringFailedException extends RuntimeException
-{
- private $serviceId;
- private $messageCallback;
-
- public function __construct(string $serviceId, $message = '', int $code = 0, \Throwable $previous = null)
- {
- $this->serviceId = $serviceId;
-
- if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) {
- $message = $message();
- }
-
- if (!$message instanceof \Closure) {
- parent::__construct($message, $code, $previous);
-
- return;
- }
-
- $this->messageCallback = $message;
- parent::__construct('', $code, $previous);
-
- $this->message = new class($this->message, $this->messageCallback) {
- private $message;
- private $messageCallback;
-
- public function __construct(&$message, &$messageCallback)
- {
- $this->message = &$message;
- $this->messageCallback = &$messageCallback;
- }
-
- public function __toString(): string
- {
- $messageCallback = $this->messageCallback;
- $this->messageCallback = null;
-
- try {
- return $this->message = $messageCallback();
- } catch (\Throwable $e) {
- return $this->message = $e->getMessage();
- }
- }
- };
- }
-
- public function getMessageCallback(): ?\Closure
- {
- return $this->messageCallback;
- }
-
- public function getServiceId()
- {
- return $this->serviceId;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
deleted file mode 100644
index 959238e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Base BadMethodCallException for Dependency Injection component.
- */
-class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
deleted file mode 100644
index 04ac848..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * This exception is thrown when an environment variable is not found.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class EnvNotFoundException extends InvalidArgumentException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
deleted file mode 100644
index 48b5e48..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * This exception wraps exceptions whose messages contain a reference to an env parameter.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class EnvParameterException extends InvalidArgumentException
-{
- public function __construct(array $envs, \Throwable $previous = null, string $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.')
- {
- parent::__construct(sprintf($message, implode('", "', $envs)), 0, $previous);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
deleted file mode 100644
index 6202df7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-use Psr\Container\ContainerExceptionInterface;
-
-/**
- * Base ExceptionInterface for Dependency Injection component.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Bulat Shakirzyanov <bulat@theopenskyproject.com>
- */
-interface ExceptionInterface extends ContainerExceptionInterface, \Throwable
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
deleted file mode 100644
index 119bb7d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Base InvalidArgumentException for Dependency Injection component.
- *
- * @author Bulat Shakirzyanov <bulat@theopenskyproject.com>
- */
-class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php
deleted file mode 100644
index 206561f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Thrown when trying to inject a parameter into a constructor/method with an incompatible type.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author Julien Maulny <jmaulny@darkmira.fr>
- */
-class InvalidParameterTypeException extends InvalidArgumentException
-{
- public function __construct(string $serviceId, string $type, \ReflectionParameter $parameter)
- {
- parent::__construct(sprintf('Invalid definition for service "%s": argument %d of "%s::%s" accepts "%s", "%s" passed.', $serviceId, 1 + $parameter->getPosition(), $parameter->getDeclaringClass()->getName(), $parameter->getDeclaringFunction()->getName(), $parameter->getType()->getName(), $type));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php
deleted file mode 100644
index 17a070c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Base LogicException for Dependency Injection component.
- */
-class LogicException extends \LogicException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
deleted file mode 100644
index a61f143..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Base OutOfBoundsException for Dependency Injection component.
- */
-class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
deleted file mode 100644
index 2450ccb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * This exception is thrown when a circular reference in a parameter is detected.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ParameterCircularReferenceException extends RuntimeException
-{
- private $parameters;
-
- public function __construct(array $parameters, \Throwable $previous = null)
- {
- parent::__construct(sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous);
-
- $this->parameters = $parameters;
- }
-
- public function getParameters()
- {
- return $this->parameters;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
deleted file mode 100644
index 7c0c5e3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-use Psr\Container\NotFoundExceptionInterface;
-
-/**
- * This exception is thrown when a non-existent parameter is used.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ParameterNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
-{
- private $key;
- private $sourceId;
- private $sourceKey;
- private $alternatives;
- private $nonNestedAlternative;
-
- /**
- * @param string $key The requested parameter key
- * @param string $sourceId The service id that references the non-existent parameter
- * @param string $sourceKey The parameter key that references the non-existent parameter
- * @param \Throwable $previous The previous exception
- * @param string[] $alternatives Some parameter name alternatives
- * @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters
- */
- public function __construct(string $key, string $sourceId = null, string $sourceKey = null, \Throwable $previous = null, array $alternatives = [], string $nonNestedAlternative = null)
- {
- $this->key = $key;
- $this->sourceId = $sourceId;
- $this->sourceKey = $sourceKey;
- $this->alternatives = $alternatives;
- $this->nonNestedAlternative = $nonNestedAlternative;
-
- parent::__construct('', 0, $previous);
-
- $this->updateRepr();
- }
-
- public function updateRepr()
- {
- if (null !== $this->sourceId) {
- $this->message = sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key);
- } elseif (null !== $this->sourceKey) {
- $this->message = sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key);
- } else {
- $this->message = sprintf('You have requested a non-existent parameter "%s".', $this->key);
- }
-
- if ($this->alternatives) {
- if (1 == \count($this->alternatives)) {
- $this->message .= ' Did you mean this: "';
- } else {
- $this->message .= ' Did you mean one of these: "';
- }
- $this->message .= implode('", "', $this->alternatives).'"?';
- } elseif (null !== $this->nonNestedAlternative) {
- $this->message .= ' You cannot access nested array items, do you want to inject "'.$this->nonNestedAlternative.'" instead?';
- }
- }
-
- public function getKey()
- {
- return $this->key;
- }
-
- public function getSourceId()
- {
- return $this->sourceId;
- }
-
- public function getSourceKey()
- {
- return $this->sourceKey;
- }
-
- public function setSourceId($sourceId)
- {
- $this->sourceId = $sourceId;
-
- $this->updateRepr();
- }
-
- public function setSourceKey($sourceKey)
- {
- $this->sourceKey = $sourceKey;
-
- $this->updateRepr();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php
deleted file mode 100644
index 5c24541..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * Base RuntimeException for Dependency Injection component.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class RuntimeException extends \RuntimeException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
deleted file mode 100644
index a38671b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-/**
- * This exception is thrown when a circular reference is detected.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ServiceCircularReferenceException extends RuntimeException
-{
- private $serviceId;
- private $path;
-
- public function __construct(string $serviceId, array $path, \Throwable $previous = null)
- {
- parent::__construct(sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous);
-
- $this->serviceId = $serviceId;
- $this->path = $path;
- }
-
- public function getServiceId()
- {
- return $this->serviceId;
- }
-
- public function getPath()
- {
- return $this->path;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
deleted file mode 100644
index f91afae..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Exception;
-
-use Psr\Container\NotFoundExceptionInterface;
-
-/**
- * This exception is thrown when a non-existent service is requested.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class ServiceNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
-{
- private $id;
- private $sourceId;
- private $alternatives;
-
- public function __construct(string $id, string $sourceId = null, \Throwable $previous = null, array $alternatives = [], string $msg = null)
- {
- if (null !== $msg) {
- // no-op
- } elseif (null === $sourceId) {
- $msg = sprintf('You have requested a non-existent service "%s".', $id);
- } else {
- $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id);
- }
-
- if ($alternatives) {
- if (1 == \count($alternatives)) {
- $msg .= ' Did you mean this: "';
- } else {
- $msg .= ' Did you mean one of these: "';
- }
- $msg .= implode('", "', $alternatives).'"?';
- }
-
- parent::__construct($msg, 0, $previous);
-
- $this->id = $id;
- $this->sourceId = $sourceId;
- $this->alternatives = $alternatives;
- }
-
- public function getId()
- {
- return $this->id;
- }
-
- public function getSourceId()
- {
- return $this->sourceId;
- }
-
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguage.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguage.php
deleted file mode 100644
index 961c737..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguage.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
-
-if (!class_exists(BaseExpressionLanguage::class)) {
- return;
-}
-
-/**
- * Adds some function to the default ExpressionLanguage.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @see ExpressionLanguageProvider
- */
-class ExpressionLanguage extends BaseExpressionLanguage
-{
- /**
- * {@inheritdoc}
- */
- public function __construct(CacheItemPoolInterface $cache = null, array $providers = [], callable $serviceCompiler = null)
- {
- // prepend the default provider to let users override it easily
- array_unshift($providers, new ExpressionLanguageProvider($serviceCompiler));
-
- parent::__construct($cache, $providers);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php
deleted file mode 100644
index 9198ca0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Component\ExpressionLanguage\ExpressionFunction;
-use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
-
-/**
- * Define some ExpressionLanguage functions.
- *
- * To get a service, use service('request').
- * To get a parameter, use parameter('kernel.debug').
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface
-{
- private $serviceCompiler;
-
- public function __construct(callable $serviceCompiler = null)
- {
- $this->serviceCompiler = $serviceCompiler;
- }
-
- public function getFunctions()
- {
- return [
- new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) {
- return sprintf('$this->get(%s)', $arg);
- }, function (array $variables, $value) {
- return $variables['container']->get($value);
- }),
-
- new ExpressionFunction('parameter', function ($arg) {
- return sprintf('$this->getParameter(%s)', $arg);
- }, function (array $variables, $value) {
- return $variables['container']->getParameter($value);
- }),
- ];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php
deleted file mode 100644
index c3bd842..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Extension;
-
-use Symfony\Component\Config\Definition\ConfigurationInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * ConfigurationExtensionInterface is the interface implemented by container extension classes.
- *
- * @author Kevin Bond <kevinbond@gmail.com>
- */
-interface ConfigurationExtensionInterface
-{
- /**
- * Returns extension configuration.
- *
- * @return ConfigurationInterface|null The configuration or null
- */
- public function getConfiguration(array $config, ContainerBuilder $container);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/Extension.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/Extension.php
deleted file mode 100644
index 21580f6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/Extension.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Extension;
-
-use Symfony\Component\Config\Definition\ConfigurationInterface;
-use Symfony\Component\Config\Definition\Processor;
-use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * Provides useful features shared by many extensions.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface
-{
- private $processedConfigs = [];
-
- /**
- * {@inheritdoc}
- */
- public function getXsdValidationBasePath()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getNamespace()
- {
- return 'http://example.org/schema/dic/'.$this->getAlias();
- }
-
- /**
- * Returns the recommended alias to use in XML.
- *
- * This alias is also the mandatory prefix to use when using YAML.
- *
- * This convention is to remove the "Extension" postfix from the class
- * name and then lowercase and underscore the result. So:
- *
- * AcmeHelloExtension
- *
- * becomes
- *
- * acme_hello
- *
- * This can be overridden in a sub-class to specify the alias manually.
- *
- * @return string The alias
- *
- * @throws BadMethodCallException When the extension name does not follow conventions
- */
- public function getAlias()
- {
- $className = \get_class($this);
- if ('Extension' != substr($className, -9)) {
- throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');
- }
- $classBaseName = substr(strrchr($className, '\\'), 1, -9);
-
- return Container::underscore($classBaseName);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getConfiguration(array $config, ContainerBuilder $container)
- {
- $class = \get_class($this);
-
- if (false !== strpos($class, "\0")) {
- return null; // ignore anonymous classes
- }
-
- $class = substr_replace($class, '\Configuration', strrpos($class, '\\'));
- $class = $container->getReflectionClass($class);
-
- if (!$class) {
- return null;
- }
-
- if (!$class->implementsInterface(ConfigurationInterface::class)) {
- @trigger_error(sprintf('Not implementing "%s" in the extension configuration class "%s" is deprecated since Symfony 4.1.', ConfigurationInterface::class, $class->getName()), E_USER_DEPRECATED);
- //throw new LogicException(sprintf('The extension configuration class "%s" must implement "%s".', $class->getName(), ConfigurationInterface::class));
-
- return null;
- }
-
- if (!($constructor = $class->getConstructor()) || !$constructor->getNumberOfRequiredParameters()) {
- return $class->newInstance();
- }
-
- return null;
- }
-
- final protected function processConfiguration(ConfigurationInterface $configuration, array $configs): array
- {
- $processor = new Processor();
-
- return $this->processedConfigs[] = $processor->processConfiguration($configuration, $configs);
- }
-
- /**
- * @internal
- */
- final public function getProcessedConfigs(): array
- {
- try {
- return $this->processedConfigs;
- } finally {
- $this->processedConfigs = [];
- }
- }
-
- /**
- * @return bool Whether the configuration is enabled
- *
- * @throws InvalidArgumentException When the config is not enableable
- */
- protected function isConfigEnabled(ContainerBuilder $container, array $config)
- {
- if (!\array_key_exists('enabled', $config)) {
- throw new InvalidArgumentException("The config array has no 'enabled' key.");
- }
-
- return (bool) $container->getParameterBag()->resolveValue($config['enabled']);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php
deleted file mode 100644
index 6a7a2cf..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Extension;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * ExtensionInterface is the interface implemented by container extension classes.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface ExtensionInterface
-{
- /**
- * Loads a specific configuration.
- *
- * @throws \InvalidArgumentException When provided tag is not defined in this extension
- */
- public function load(array $configs, ContainerBuilder $container);
-
- /**
- * Returns the namespace to be used for this extension (XML namespace).
- *
- * @return string The XML namespace
- */
- public function getNamespace();
-
- /**
- * Returns the base path for the XSD files.
- *
- * @return string|false
- */
- public function getXsdValidationBasePath();
-
- /**
- * Returns the recommended alias to use in XML.
- *
- * This alias is also the mandatory prefix to use when using YAML.
- *
- * @return string The alias
- */
- public function getAlias();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php
deleted file mode 100644
index 5bd18d7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Extension;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-interface PrependExtensionInterface
-{
- /**
- * Allow an extension to prepend the extension configurations.
- */
- public function prepend(ContainerBuilder $container);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LICENSE b/srcs/phpmyadmin/vendor/symfony/dependency-injection/LICENSE
deleted file mode 100644
index a677f43..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php
deleted file mode 100644
index 96104e4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator;
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * Lazy proxy instantiator, capable of instantiating a proxy given a container, the
- * service definitions and a callback that produces the real service instance.
- *
- * @author Marco Pivetta <ocramius@gmail.com>
- */
-interface InstantiatorInterface
-{
- /**
- * Instantiates a proxy object.
- *
- * @param string $id Identifier of the requested service
- * @param callable $realInstantiator Zero-argument callback that is capable of producing the real service instance
- *
- * @return object
- */
- public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php
deleted file mode 100644
index 2e36704..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator;
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * {@inheritdoc}
- *
- * Noop proxy instantiator - produces the real service instead of a proxy instance.
- *
- * @author Marco Pivetta <ocramius@gmail.com>
- */
-class RealServiceInstantiator implements InstantiatorInterface
-{
- /**
- * {@inheritdoc}
- */
- public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator)
- {
- return $realInstantiator();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php
deleted file mode 100644
index f592e6c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper;
-
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services.
- *
- * @author Marco Pivetta <ocramius@gmail.com>
- */
-interface DumperInterface
-{
- /**
- * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container.
- *
- * @return bool
- */
- public function isProxyCandidate(Definition $definition);
-
- /**
- * Generates the code to be used to instantiate a proxy in the dumped factory code.
- *
- * @param string $id Service identifier
- * @param string $factoryCode The code to execute to create the service
- *
- * @return string
- */
- public function getProxyFactoryCode(Definition $definition, $id, $factoryCode);
-
- /**
- * Generates the code for the lazy proxy.
- *
- * @return string
- */
- public function getProxyCode(Definition $definition);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php
deleted file mode 100644
index ebc6a5d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper;
-
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * Null dumper, negates any proxy code generation for any given service definition.
- *
- * @author Marco Pivetta <ocramius@gmail.com>
- *
- * @final
- */
-class NullDumper implements DumperInterface
-{
- /**
- * {@inheritdoc}
- */
- public function isProxyCandidate(Definition $definition): bool
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getProxyFactoryCode(Definition $definition, $id, $factoryCode = null): string
- {
- return '';
- }
-
- /**
- * {@inheritdoc}
- */
- public function getProxyCode(Definition $definition): string
- {
- return '';
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php
deleted file mode 100644
index e5611bc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\LazyProxy;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class ProxyHelper
-{
- /**
- * @return string|null The FQCN or builtin name of the type hint, or null when the type hint references an invalid self|parent context
- */
- public static function getTypeHint(\ReflectionFunctionAbstract $r, \ReflectionParameter $p = null, bool $noBuiltin = false): ?string
- {
- if ($p instanceof \ReflectionParameter) {
- $type = $p->getType();
- } else {
- $type = $r->getReturnType();
- }
- if (!$type) {
- return null;
- }
- if (!\is_string($type)) {
- $name = $type->getName();
-
- if ($type->isBuiltin()) {
- return $noBuiltin ? null : $name;
- }
- }
- $lcName = strtolower($name);
- $prefix = $noBuiltin ? '' : '\\';
-
- if ('self' !== $lcName && 'parent' !== $lcName) {
- return $prefix.$name;
- }
- if (!$r instanceof \ReflectionMethod) {
- return null;
- }
- if ('self' === $lcName) {
- return $prefix.$r->getDeclaringClass()->name;
- }
-
- return ($parent = $r->getDeclaringClass()->getParentClass()) ? $prefix.$parent->name : null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/ClosureLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/ClosureLoader.php
deleted file mode 100644
index 939dd7c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/ClosureLoader.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-use Symfony\Component\Config\Loader\Loader;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * ClosureLoader loads service definitions from a PHP closure.
- *
- * The Closure has access to the container as its first argument.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ClosureLoader extends Loader
-{
- private $container;
-
- public function __construct(ContainerBuilder $container)
- {
- $this->container = $container;
- }
-
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- $resource($this->container);
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- return $resource instanceof \Closure;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php
deleted file mode 100644
index c29ca7f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Parameter;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\ExpressionLanguage\Expression;
-
-abstract class AbstractConfigurator
-{
- const FACTORY = 'unknown';
-
- /** @internal */
- protected $definition;
-
- public function __call($method, $args)
- {
- if (method_exists($this, 'set'.$method)) {
- return $this->{'set'.$method}(...$args);
- }
-
- throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', \get_class($this), $method));
- }
-
- /**
- * Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.
- *
- * @param mixed $value
- * @param bool $allowServices whether Definition and Reference are allowed; by default, only scalars and arrays are
- *
- * @return mixed the value, optionally cast to a Definition/Reference
- */
- public static function processValue($value, $allowServices = false)
- {
- if (\is_array($value)) {
- foreach ($value as $k => $v) {
- $value[$k] = static::processValue($v, $allowServices);
- }
-
- return $value;
- }
-
- if ($value instanceof ReferenceConfigurator) {
- return new Reference($value->id, $value->invalidBehavior);
- }
-
- if ($value instanceof InlineServiceConfigurator) {
- $def = $value->definition;
- $value->definition = null;
-
- return $def;
- }
-
- if ($value instanceof self) {
- throw new InvalidArgumentException(sprintf('"%s()" can be used only at the root of service configuration files.', $value::FACTORY));
- }
-
- switch (true) {
- case null === $value:
- case is_scalar($value):
- return $value;
-
- case $value instanceof ArgumentInterface:
- case $value instanceof Definition:
- case $value instanceof Expression:
- case $value instanceof Parameter:
- case $value instanceof Reference:
- if ($allowServices) {
- return $value;
- }
- }
-
- throw new InvalidArgumentException(sprintf('Cannot use values of type "%s" in service configuration files.', \is_object($value) ? \get_class($value) : \gettype($value)));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php
deleted file mode 100644
index 9d3305e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-
-abstract class AbstractServiceConfigurator extends AbstractConfigurator
-{
- protected $parent;
- protected $id;
- private $defaultTags = [];
-
- public function __construct(ServicesConfigurator $parent, Definition $definition, string $id = null, array $defaultTags = [])
- {
- $this->parent = $parent;
- $this->definition = $definition;
- $this->id = $id;
- $this->defaultTags = $defaultTags;
- }
-
- public function __destruct()
- {
- // default tags should be added last
- foreach ($this->defaultTags as $name => $attributes) {
- foreach ($attributes as $attributes) {
- $this->definition->addTag($name, $attributes);
- }
- }
- $this->defaultTags = [];
- }
-
- /**
- * Registers a service.
- */
- final public function set(string $id, string $class = null): ServiceConfigurator
- {
- $this->__destruct();
-
- return $this->parent->set($id, $class);
- }
-
- /**
- * Creates an alias.
- */
- final public function alias(string $id, string $referencedId): AliasConfigurator
- {
- $this->__destruct();
-
- return $this->parent->alias($id, $referencedId);
- }
-
- /**
- * Registers a PSR-4 namespace using a glob pattern.
- */
- final public function load(string $namespace, string $resource): PrototypeConfigurator
- {
- $this->__destruct();
-
- return $this->parent->load($namespace, $resource);
- }
-
- /**
- * Gets an already defined service definition.
- *
- * @throws ServiceNotFoundException if the service definition does not exist
- */
- final public function get(string $id): ServiceConfigurator
- {
- $this->__destruct();
-
- return $this->parent->get($id);
- }
-
- /**
- * Registers a service.
- */
- final public function __invoke(string $id, string $class = null): ServiceConfigurator
- {
- $this->__destruct();
-
- return $this->parent->set($id, $class);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php
deleted file mode 100644
index cb00f58..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Alias;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class AliasConfigurator extends AbstractServiceConfigurator
-{
- const FACTORY = 'alias';
-
- use Traits\PublicTrait;
-
- public function __construct(ServicesConfigurator $parent, Alias $alias)
- {
- $this->parent = $parent;
- $this->definition = $alias;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
deleted file mode 100644
index 712d8c9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
-use Symfony\Component\ExpressionLanguage\Expression;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ContainerConfigurator extends AbstractConfigurator
-{
- const FACTORY = 'container';
-
- private $container;
- private $loader;
- private $instanceof;
- private $path;
- private $file;
- private $anonymousCount = 0;
-
- public function __construct(ContainerBuilder $container, PhpFileLoader $loader, array &$instanceof, string $path, string $file)
- {
- $this->container = $container;
- $this->loader = $loader;
- $this->instanceof = &$instanceof;
- $this->path = $path;
- $this->file = $file;
- }
-
- final public function extension(string $namespace, array $config)
- {
- if (!$this->container->hasExtension($namespace)) {
- $extensions = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getAlias(); }, $this->container->getExtensions()));
- throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', $namespace, $this->file, $namespace, $extensions ? sprintf('"%s"', implode('", "', $extensions)) : 'none'));
- }
-
- $this->container->loadFromExtension($namespace, static::processValue($config));
- }
-
- final public function import(string $resource, string $type = null, $ignoreErrors = false)
- {
- $this->loader->setCurrentDir(\dirname($this->path));
- $this->loader->import($resource, $type, $ignoreErrors, $this->file);
- }
-
- final public function parameters(): ParametersConfigurator
- {
- return new ParametersConfigurator($this->container);
- }
-
- final public function services(): ServicesConfigurator
- {
- return new ServicesConfigurator($this->container, $this->loader, $this->instanceof, $this->path, $this->anonymousCount);
- }
-}
-
-/**
- * Creates a service reference.
- */
-function ref(string $id): ReferenceConfigurator
-{
- return new ReferenceConfigurator($id);
-}
-
-/**
- * Creates an inline service.
- */
-function inline(string $class = null): InlineServiceConfigurator
-{
- return new InlineServiceConfigurator(new Definition($class));
-}
-
-/**
- * Creates a service locator.
- *
- * @param ReferenceConfigurator[] $values
- */
-function service_locator(array $values): ServiceLocatorArgument
-{
- return new ServiceLocatorArgument(AbstractConfigurator::processValue($values, true));
-}
-
-/**
- * Creates a lazy iterator.
- *
- * @param ReferenceConfigurator[] $values
- */
-function iterator(array $values): IteratorArgument
-{
- return new IteratorArgument(AbstractConfigurator::processValue($values, true));
-}
-
-/**
- * Creates a lazy iterator by tag name.
- *
- * @deprecated since Symfony 4.4, to be removed in 5.0, use "tagged_iterator" instead.
- */
-function tagged(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null): TaggedIteratorArgument
-{
- @trigger_error(__NAMESPACE__.'\tagged() is deprecated since Symfony 4.4 and will be removed in 5.0, use '.__NAMESPACE__.'\tagged_iterator() instead.', E_USER_DEPRECATED);
-
- return new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod);
-}
-
-/**
- * Creates a lazy iterator by tag name.
- */
-function tagged_iterator(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null, string $defaultPriorityMethod = null): TaggedIteratorArgument
-{
- return new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, false, $defaultPriorityMethod);
-}
-
-/**
- * Creates a service locator by tag name.
- */
-function tagged_locator(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null): ServiceLocatorArgument
-{
- return new ServiceLocatorArgument(new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, true));
-}
-
-/**
- * Creates an expression.
- */
-function expr(string $expression): Expression
-{
- return new Expression($expression);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php
deleted file mode 100644
index cd9088f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class DefaultsConfigurator extends AbstractServiceConfigurator
-{
- const FACTORY = 'defaults';
-
- use Traits\AutoconfigureTrait;
- use Traits\AutowireTrait;
- use Traits\BindTrait;
- use Traits\PublicTrait;
-
- private $path;
-
- public function __construct(ServicesConfigurator $parent, Definition $definition, string $path = null)
- {
- parent::__construct($parent, $definition, null, []);
-
- $this->path = $path;
- }
-
- /**
- * Adds a tag for this definition.
- *
- * @return $this
- *
- * @throws InvalidArgumentException when an invalid tag name or attribute is provided
- */
- final public function tag(string $name, array $attributes = []): self
- {
- if ('' === $name) {
- throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
- }
-
- foreach ($attributes as $attribute => $value) {
- if (null !== $value && !is_scalar($value)) {
- throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
- }
- }
-
- $this->definition->addTag($name, $attributes);
-
- return $this;
- }
-
- /**
- * Defines an instanceof-conditional to be applied to following service definitions.
- */
- final public function instanceof(string $fqcn): InstanceofConfigurator
- {
- return $this->parent->instanceof($fqcn);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php
deleted file mode 100644
index 362b374..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class InlineServiceConfigurator extends AbstractConfigurator
-{
- const FACTORY = 'inline';
-
- use Traits\ArgumentTrait;
- use Traits\AutowireTrait;
- use Traits\BindTrait;
- use Traits\FactoryTrait;
- use Traits\FileTrait;
- use Traits\LazyTrait;
- use Traits\ParentTrait;
- use Traits\TagTrait;
-
- public function __construct(Definition $definition)
- {
- $this->definition = $definition;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php
deleted file mode 100644
index f75e176..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class InstanceofConfigurator extends AbstractServiceConfigurator
-{
- const FACTORY = 'instanceof';
-
- use Traits\AutowireTrait;
- use Traits\CallTrait;
- use Traits\ConfiguratorTrait;
- use Traits\LazyTrait;
- use Traits\PropertyTrait;
- use Traits\PublicTrait;
- use Traits\ShareTrait;
- use Traits\TagTrait;
- use Traits\BindTrait;
-
- private $path;
-
- public function __construct(ServicesConfigurator $parent, Definition $definition, string $id, string $path = null)
- {
- parent::__construct($parent, $definition, $id, []);
-
- $this->path = $path;
- }
-
- /**
- * Defines an instanceof-conditional to be applied to following service definitions.
- */
- final public function instanceof(string $fqcn): self
- {
- return $this->parent->instanceof($fqcn);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php
deleted file mode 100644
index a88d28e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ParametersConfigurator extends AbstractConfigurator
-{
- const FACTORY = 'parameters';
-
- private $container;
-
- public function __construct(ContainerBuilder $container)
- {
- $this->container = $container;
- }
-
- /**
- * Creates a parameter.
- *
- * @return $this
- */
- final public function set(string $name, $value): self
- {
- $this->container->setParameter($name, static::processValue($value, true));
-
- return $this;
- }
-
- /**
- * Creates a parameter.
- *
- * @return $this
- */
- final public function __invoke(string $name, $value): self
- {
- return $this->set($name, $value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php
deleted file mode 100644
index 3cd56e0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class PrototypeConfigurator extends AbstractServiceConfigurator
-{
- const FACTORY = 'load';
-
- use Traits\AbstractTrait;
- use Traits\ArgumentTrait;
- use Traits\AutoconfigureTrait;
- use Traits\AutowireTrait;
- use Traits\BindTrait;
- use Traits\CallTrait;
- use Traits\ConfiguratorTrait;
- use Traits\DeprecateTrait;
- use Traits\FactoryTrait;
- use Traits\LazyTrait;
- use Traits\ParentTrait;
- use Traits\PropertyTrait;
- use Traits\PublicTrait;
- use Traits\ShareTrait;
- use Traits\TagTrait;
-
- private $loader;
- private $resource;
- private $excludes;
- private $allowParent;
-
- public function __construct(ServicesConfigurator $parent, PhpFileLoader $loader, Definition $defaults, string $namespace, string $resource, bool $allowParent)
- {
- $definition = new Definition();
- $definition->setPublic($defaults->isPublic());
- $definition->setAutowired($defaults->isAutowired());
- $definition->setAutoconfigured($defaults->isAutoconfigured());
- $definition->setBindings($defaults->getBindings());
- $definition->setChanges([]);
-
- $this->loader = $loader;
- $this->resource = $resource;
- $this->allowParent = $allowParent;
-
- parent::__construct($parent, $definition, $namespace, $defaults->getTags());
- }
-
- public function __destruct()
- {
- parent::__destruct();
-
- if ($this->loader) {
- $this->loader->registerClasses($this->definition, $this->id, $this->resource, $this->excludes);
- }
- $this->loader = null;
- }
-
- /**
- * Excludes files from registration using glob patterns.
- *
- * @param string[]|string $excludes
- *
- * @return $this
- */
- final public function exclude($excludes): self
- {
- $this->excludes = (array) $excludes;
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php
deleted file mode 100644
index fa04253..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ReferenceConfigurator extends AbstractConfigurator
-{
- /** @internal */
- protected $id;
-
- /** @internal */
- protected $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
-
- public function __construct(string $id)
- {
- $this->id = $id;
- }
-
- /**
- * @return $this
- */
- final public function ignoreOnInvalid(): self
- {
- $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- final public function nullOnInvalid(): self
- {
- $this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- final public function ignoreOnUninitialized(): self
- {
- $this->invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- return $this->id;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php
deleted file mode 100644
index f1a6af7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ServiceConfigurator extends AbstractServiceConfigurator
-{
- const FACTORY = 'services';
-
- use Traits\AbstractTrait;
- use Traits\ArgumentTrait;
- use Traits\AutoconfigureTrait;
- use Traits\AutowireTrait;
- use Traits\BindTrait;
- use Traits\CallTrait;
- use Traits\ClassTrait;
- use Traits\ConfiguratorTrait;
- use Traits\DecorateTrait;
- use Traits\DeprecateTrait;
- use Traits\FactoryTrait;
- use Traits\FileTrait;
- use Traits\LazyTrait;
- use Traits\ParentTrait;
- use Traits\PropertyTrait;
- use Traits\PublicTrait;
- use Traits\ShareTrait;
- use Traits\SyntheticTrait;
- use Traits\TagTrait;
-
- private $container;
- private $instanceof;
- private $allowParent;
- private $path;
-
- public function __construct(ContainerBuilder $container, array $instanceof, bool $allowParent, ServicesConfigurator $parent, Definition $definition, $id, array $defaultTags, string $path = null)
- {
- $this->container = $container;
- $this->instanceof = $instanceof;
- $this->allowParent = $allowParent;
- $this->path = $path;
-
- parent::__construct($parent, $definition, $id, $defaultTags);
- }
-
- public function __destruct()
- {
- parent::__destruct();
-
- $this->container->removeBindings($this->id);
-
- if (!$this->definition instanceof ChildDefinition) {
- $this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
- } else {
- $this->container->setDefinition($this->id, $this->definition);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php
deleted file mode 100644
index f0fdde8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ServicesConfigurator extends AbstractConfigurator
-{
- const FACTORY = 'services';
-
- private $defaults;
- private $container;
- private $loader;
- private $instanceof;
- private $path;
- private $anonymousHash;
- private $anonymousCount;
-
- public function __construct(ContainerBuilder $container, PhpFileLoader $loader, array &$instanceof, string $path = null, int &$anonymousCount = 0)
- {
- $this->defaults = new Definition();
- $this->container = $container;
- $this->loader = $loader;
- $this->instanceof = &$instanceof;
- $this->path = $path;
- $this->anonymousHash = ContainerBuilder::hash($path ?: mt_rand());
- $this->anonymousCount = &$anonymousCount;
- $instanceof = [];
- }
-
- /**
- * Defines a set of defaults for following service definitions.
- */
- final public function defaults(): DefaultsConfigurator
- {
- return new DefaultsConfigurator($this, $this->defaults = new Definition(), $this->path);
- }
-
- /**
- * Defines an instanceof-conditional to be applied to following service definitions.
- */
- final public function instanceof(string $fqcn): InstanceofConfigurator
- {
- $this->instanceof[$fqcn] = $definition = new ChildDefinition('');
-
- return new InstanceofConfigurator($this, $definition, $fqcn, $this->path);
- }
-
- /**
- * Registers a service.
- *
- * @param string|null $id The service id, or null to create an anonymous service
- * @param string|null $class The class of the service, or null when $id is also the class name
- */
- final public function set(?string $id, string $class = null): ServiceConfigurator
- {
- $defaults = $this->defaults;
- $allowParent = !$defaults->getChanges() && empty($this->instanceof);
-
- $definition = new Definition();
-
- if (null === $id) {
- if (!$class) {
- throw new \LogicException('Anonymous services must have a class name.');
- }
-
- $id = sprintf('.%d_%s', ++$this->anonymousCount, preg_replace('/^.*\\\\/', '', $class).'~'.$this->anonymousHash);
- $definition->setPublic(false);
- } else {
- $definition->setPublic($defaults->isPublic());
- }
-
- $definition->setAutowired($defaults->isAutowired());
- $definition->setAutoconfigured($defaults->isAutoconfigured());
- $definition->setBindings($defaults->getBindings());
- $definition->setChanges([]);
-
- $configurator = new ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags(), $this->path);
-
- return null !== $class ? $configurator->class($class) : $configurator;
- }
-
- /**
- * Creates an alias.
- */
- final public function alias(string $id, string $referencedId): AliasConfigurator
- {
- $ref = static::processValue($referencedId, true);
- $alias = new Alias((string) $ref, $this->defaults->isPublic());
- $this->container->setAlias($id, $alias);
-
- return new AliasConfigurator($this, $alias);
- }
-
- /**
- * Registers a PSR-4 namespace using a glob pattern.
- */
- final public function load(string $namespace, string $resource): PrototypeConfigurator
- {
- $allowParent = !$this->defaults->getChanges() && empty($this->instanceof);
-
- return new PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, $allowParent);
- }
-
- /**
- * Gets an already defined service definition.
- *
- * @throws ServiceNotFoundException if the service definition does not exist
- */
- final public function get(string $id): ServiceConfigurator
- {
- $allowParent = !$this->defaults->getChanges() && empty($this->instanceof);
- $definition = $this->container->getDefinition($id);
-
- return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, []);
- }
-
- /**
- * Registers a service.
- */
- final public function __invoke(string $id, string $class = null): ServiceConfigurator
- {
- return $this->set($id, $class);
- }
-
- public function __destruct()
- {
- $this->loader->registerAliasesForSinglyImplementedInterfaces();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php
deleted file mode 100644
index 82ba21d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait AbstractTrait
-{
- /**
- * Whether this definition is abstract, that means it merely serves as a
- * template for other definitions.
- *
- * @return $this
- */
- final public function abstract(bool $abstract = true): self
- {
- $this->definition->setAbstract($abstract);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php
deleted file mode 100644
index 5c9a475..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait ArgumentTrait
-{
- /**
- * Sets the arguments to pass to the service constructor/factory method.
- *
- * @return $this
- */
- final public function args(array $arguments): self
- {
- $this->definition->setArguments(static::processValue($arguments, true));
-
- return $this;
- }
-
- /**
- * Sets one argument to pass to the service constructor/factory method.
- *
- * @param string|int $key
- * @param mixed $value
- *
- * @return $this
- */
- final public function arg($key, $value): self
- {
- $this->definition->setArgument($key, static::processValue($value, true));
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php
deleted file mode 100644
index 836f458..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait AutoconfigureTrait
-{
- /**
- * Sets whether or not instanceof conditionals should be prepended with a global set.
- *
- * @return $this
- *
- * @throws InvalidArgumentException when a parent is already set
- */
- final public function autoconfigure(bool $autoconfigured = true): self
- {
- if ($autoconfigured && $this->definition instanceof ChildDefinition) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
- }
- $this->definition->setAutoconfigured($autoconfigured);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php
deleted file mode 100644
index 2837a02..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait AutowireTrait
-{
- /**
- * Enables/disables autowiring.
- *
- * @return $this
- */
- final public function autowire(bool $autowired = true): self
- {
- $this->definition->setAutowired($autowired);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php
deleted file mode 100644
index 1328494..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\Argument\BoundArgument;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Loader\Configurator\DefaultsConfigurator;
-use Symfony\Component\DependencyInjection\Loader\Configurator\InstanceofConfigurator;
-use Symfony\Component\DependencyInjection\Reference;
-
-trait BindTrait
-{
- /**
- * Sets bindings.
- *
- * Bindings map $named or FQCN arguments to values that should be
- * injected in the matching parameters (of the constructor, of methods
- * called and of controller actions).
- *
- * @param string $nameOrFqcn A parameter name with its "$" prefix, or a FQCN
- * @param mixed $valueOrRef The value or reference to bind
- *
- * @return $this
- */
- final public function bind(string $nameOrFqcn, $valueOrRef): self
- {
- $valueOrRef = static::processValue($valueOrRef, true);
- if (!preg_match('/^(?:(?:array|bool|float|int|string)[ \t]*+)?\$/', $nameOrFqcn) && !$valueOrRef instanceof Reference) {
- throw new InvalidArgumentException(sprintf('Invalid binding for service "%s": named arguments must start with a "$", and FQCN must map to references. Neither applies to binding "%s".', $this->id, $nameOrFqcn));
- }
- $bindings = $this->definition->getBindings();
- $type = $this instanceof DefaultsConfigurator ? BoundArgument::DEFAULTS_BINDING : ($this instanceof InstanceofConfigurator ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING);
- $bindings[$nameOrFqcn] = new BoundArgument($valueOrRef, true, $type, $this->path ?? null);
- $this->definition->setBindings($bindings);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php
deleted file mode 100644
index 28f92d2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait CallTrait
-{
- /**
- * Adds a method to call after service initialization.
- *
- * @param string $method The method name to call
- * @param array $arguments An array of arguments to pass to the method call
- * @param bool $returnsClone Whether the call returns the service instance or not
- *
- * @return $this
- *
- * @throws InvalidArgumentException on empty $method param
- */
- final public function call(string $method, array $arguments = [], bool $returnsClone = false): self
- {
- $this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php
deleted file mode 100644
index 20da791..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait ClassTrait
-{
- /**
- * Sets the service class.
- *
- * @return $this
- */
- final public function class(?string $class): self
- {
- $this->definition->setClass($class);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php
deleted file mode 100644
index 25d363c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait ConfiguratorTrait
-{
- /**
- * Sets a configurator to call after the service is fully initialized.
- *
- * @param string|array $configurator A PHP callable reference
- *
- * @return $this
- */
- final public function configurator($configurator): self
- {
- $this->definition->setConfigurator(static::processValue($configurator, true));
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php
deleted file mode 100644
index 222cf75..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait DecorateTrait
-{
- /**
- * Sets the service that this service is decorating.
- *
- * @param string|null $id The decorated service id, use null to remove decoration
- * @param string|null $renamedId The new decorated service id
- * @param int $priority The priority of decoration
- * @param int $invalidBehavior The behavior to adopt when decorated is invalid
- *
- * @return $this
- *
- * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals
- */
- final public function decorate(?string $id, string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): self
- {
- $this->definition->setDecoratedService($id, $renamedId, $priority, $invalidBehavior);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php
deleted file mode 100644
index b2d5b0e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait DeprecateTrait
-{
- /**
- * Whether this definition is deprecated, that means it should not be called anymore.
- *
- * @param string $template Template message to use if the definition is deprecated
- *
- * @return $this
- *
- * @throws InvalidArgumentException when the message template is invalid
- */
- final public function deprecate(string $template = null): self
- {
- $this->definition->setDeprecated(true, $template);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php
deleted file mode 100644
index 3834d72..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait FactoryTrait
-{
- /**
- * Sets a factory.
- *
- * @param string|array $factory A PHP callable reference
- *
- * @return $this
- */
- final public function factory($factory): self
- {
- if (\is_string($factory) && 1 === substr_count($factory, ':')) {
- $factoryParts = explode(':', $factory);
-
- throw new InvalidArgumentException(sprintf('Invalid factory "%s": the "service:method" notation is not available when using PHP-based DI configuration. Use "[ref(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1]));
- }
-
- $this->definition->setFactory(static::processValue($factory, true));
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php
deleted file mode 100644
index 5f42aef..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait FileTrait
-{
- /**
- * Sets a file to require before creating the service.
- *
- * @return $this
- */
- final public function file(string $file): self
- {
- $this->definition->setFile($file);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php
deleted file mode 100644
index 2829def..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait LazyTrait
-{
- /**
- * Sets the lazy flag of this service.
- *
- * @param bool|string $lazy A FQCN to derivate the lazy proxy from or `true` to make it extend from the definition's class
- *
- * @return $this
- */
- final public function lazy($lazy = true): self
- {
- $this->definition->setLazy((bool) $lazy);
- if (\is_string($lazy)) {
- $this->definition->addTag('proxy', ['interface' => $lazy]);
- }
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php
deleted file mode 100644
index 7488a38..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait ParentTrait
-{
- /**
- * Sets the Definition to inherit from.
- *
- * @return $this
- *
- * @throws InvalidArgumentException when parent cannot be set
- */
- final public function parent(string $parent): self
- {
- if (!$this->allowParent) {
- throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id));
- }
-
- if ($this->definition instanceof ChildDefinition) {
- $this->definition->setParent($parent);
- } elseif ($this->definition->isAutoconfigured()) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
- } elseif ($this->definition->getBindings()) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also "bind" arguments.', $this->id));
- } else {
- // cast Definition to ChildDefinition
- $definition = serialize($this->definition);
- $definition = substr_replace($definition, '53', 2, 2);
- $definition = substr_replace($definition, 'Child', 44, 0);
- $definition = unserialize($definition);
-
- $this->definition = $definition->setParent($parent);
- }
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php
deleted file mode 100644
index 10fdcfb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait PropertyTrait
-{
- /**
- * Sets a specific property.
- *
- * @return $this
- */
- final public function property(string $name, $value): self
- {
- $this->definition->setProperty($name, static::processValue($value, true));
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php
deleted file mode 100644
index f15756c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait PublicTrait
-{
- /**
- * @return $this
- */
- final public function public(): self
- {
- $this->definition->setPublic(true);
-
- return $this;
- }
-
- /**
- * @return $this
- */
- final public function private(): self
- {
- $this->definition->setPublic(false);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php
deleted file mode 100644
index 16fde0f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait ShareTrait
-{
- /**
- * Sets if the service must be shared or not.
- *
- * @return $this
- */
- final public function share(bool $shared = true): self
- {
- $this->definition->setShared($shared);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php
deleted file mode 100644
index cb08b11..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-trait SyntheticTrait
-{
- /**
- * Sets whether this definition is synthetic, that is not constructed by the
- * container, but dynamically injected.
- *
- * @return $this
- */
- final public function synthetic(bool $synthetic = true): self
- {
- $this->definition->setSynthetic($synthetic);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php
deleted file mode 100644
index f4d5f00..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-trait TagTrait
-{
- /**
- * Adds a tag for this definition.
- *
- * @return $this
- */
- final public function tag(string $name, array $attributes = []): self
- {
- if ('' === $name) {
- throw new InvalidArgumentException(sprintf('The tag name for service "%s" must be a non-empty string.', $this->id));
- }
-
- foreach ($attributes as $attribute => $value) {
- if (!is_scalar($value) && null !== $value) {
- throw new InvalidArgumentException(sprintf('A tag attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $this->id, $name, $attribute));
- }
- }
-
- $this->definition->addTag($name, $attributes);
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php
deleted file mode 100644
index a57cac3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-/**
- * DirectoryLoader is a recursive loader to go through directories.
- *
- * @author Sebastien Lavoie <seb@wemakecustom.com>
- */
-class DirectoryLoader extends FileLoader
-{
- /**
- * {@inheritdoc}
- */
- public function load($file, $type = null)
- {
- $file = rtrim($file, '/');
- $path = $this->locator->locate($file);
- $this->container->fileExists($path, false);
-
- foreach (scandir($path) as $dir) {
- if ('.' !== $dir[0]) {
- if (is_dir($path.'/'.$dir)) {
- $dir .= '/'; // append / to allow recursion
- }
-
- $this->setCurrentDir($path);
-
- $this->import($dir, null, false, $path);
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- if ('directory' === $type) {
- return true;
- }
-
- return null === $type && \is_string($resource) && '/' === substr($resource, -1);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/FileLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/FileLoader.php
deleted file mode 100644
index d6f6fae..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/FileLoader.php
+++ /dev/null
@@ -1,227 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
-use Symfony\Component\Config\Exception\LoaderLoadException;
-use Symfony\Component\Config\FileLocatorInterface;
-use Symfony\Component\Config\Loader\FileLoader as BaseFileLoader;
-use Symfony\Component\Config\Loader\Loader;
-use Symfony\Component\Config\Resource\GlobResource;
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * FileLoader is the abstract class used by all built-in loaders that are file based.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-abstract class FileLoader extends BaseFileLoader
-{
- public const ANONYMOUS_ID_REGEXP = '/^\.\d+_[^~]*+~[._a-zA-Z\d]{7}$/';
-
- protected $container;
- protected $isLoadingInstanceof = false;
- protected $instanceof = [];
- protected $interfaces = [];
- protected $singlyImplemented = [];
- protected $autoRegisterAliasesForSinglyImplementedInterfaces = true;
-
- public function __construct(ContainerBuilder $container, FileLocatorInterface $locator)
- {
- $this->container = $container;
-
- parent::__construct($locator);
- }
-
- /**
- * {@inheritdoc}
- *
- * @param bool|string $ignoreErrors Whether errors should be ignored; pass "not_found" to ignore only when the loaded resource is not found
- * @param string|string[]|null $exclude Glob patterns to exclude from the import
- */
- public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null/*, $exclude = null*/)
- {
- $args = \func_get_args();
-
- if ($ignoreNotFound = 'not_found' === $ignoreErrors) {
- $args[2] = false;
- } elseif (!\is_bool($ignoreErrors)) {
- @trigger_error(sprintf('Invalid argument $ignoreErrors provided to %s::import(): boolean or "not_found" expected, %s given.', \get_class($this), \gettype($ignoreErrors)), E_USER_DEPRECATED);
- $args[2] = (bool) $ignoreErrors;
- }
-
- try {
- parent::import(...$args);
- } catch (LoaderLoadException $e) {
- if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) {
- throw $e;
- }
-
- foreach ($prev->getTrace() as $frame) {
- if ('import' === ($frame['function'] ?? null) && is_a($frame['class'] ?? '', Loader::class, true)) {
- break;
- }
- }
-
- if (__FILE__ !== $frame['file']) {
- throw $e;
- }
- }
- }
-
- /**
- * Registers a set of classes as services using PSR-4 for discovery.
- *
- * @param Definition $prototype A definition to use as template
- * @param string $namespace The namespace prefix of classes in the scanned directory
- * @param string $resource The directory to look for classes, glob-patterns allowed
- * @param string|string[]|null $exclude A globbed path of files to exclude or an array of globbed paths of files to exclude
- */
- public function registerClasses(Definition $prototype, $namespace, $resource, $exclude = null)
- {
- if ('\\' !== substr($namespace, -1)) {
- throw new InvalidArgumentException(sprintf('Namespace prefix must end with a "\\": %s.', $namespace));
- }
- if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\\)++$/', $namespace)) {
- throw new InvalidArgumentException(sprintf('Namespace is not a valid PSR-4 prefix: %s.', $namespace));
- }
-
- $classes = $this->findClasses($namespace, $resource, (array) $exclude);
- // prepare for deep cloning
- $serializedPrototype = serialize($prototype);
-
- foreach ($classes as $class => $errorMessage) {
- if (interface_exists($class, false)) {
- $this->interfaces[] = $class;
- } else {
- $this->setDefinition($class, $definition = unserialize($serializedPrototype));
- if (null !== $errorMessage) {
- $definition->addError($errorMessage);
-
- continue;
- }
- foreach (class_implements($class, false) as $interface) {
- $this->singlyImplemented[$interface] = ($this->singlyImplemented[$interface] ?? $class) !== $class ? false : $class;
- }
- }
- }
-
- if ($this->autoRegisterAliasesForSinglyImplementedInterfaces) {
- $this->registerAliasesForSinglyImplementedInterfaces();
- }
- }
-
- public function registerAliasesForSinglyImplementedInterfaces()
- {
- foreach ($this->interfaces as $interface) {
- if (!empty($this->singlyImplemented[$interface]) && !$this->container->has($interface)) {
- $this->container->setAlias($interface, $this->singlyImplemented[$interface])->setPublic(false);
- }
- }
-
- $this->interfaces = $this->singlyImplemented = [];
- }
-
- /**
- * Registers a definition in the container with its instanceof-conditionals.
- *
- * @param string $id
- */
- protected function setDefinition($id, Definition $definition)
- {
- $this->container->removeBindings($id);
-
- if ($this->isLoadingInstanceof) {
- if (!$definition instanceof ChildDefinition) {
- throw new InvalidArgumentException(sprintf('Invalid type definition "%s": ChildDefinition expected, "%s" given.', $id, \get_class($definition)));
- }
- $this->instanceof[$id] = $definition;
- } else {
- $this->container->setDefinition($id, $definition instanceof ChildDefinition ? $definition : $definition->setInstanceofConditionals($this->instanceof));
- }
- }
-
- private function findClasses(string $namespace, string $pattern, array $excludePatterns): array
- {
- $parameterBag = $this->container->getParameterBag();
-
- $excludePaths = [];
- $excludePrefix = null;
- $excludePatterns = $parameterBag->unescapeValue($parameterBag->resolveValue($excludePatterns));
- foreach ($excludePatterns as $excludePattern) {
- foreach ($this->glob($excludePattern, true, $resource, false, true) as $path => $info) {
- if (null === $excludePrefix) {
- $excludePrefix = $resource->getPrefix();
- }
-
- // normalize Windows slashes
- $excludePaths[str_replace('\\', '/', $path)] = true;
- }
- }
-
- $pattern = $parameterBag->unescapeValue($parameterBag->resolveValue($pattern));
- $classes = [];
- $extRegexp = '/\\.php$/';
- $prefixLen = null;
- foreach ($this->glob($pattern, true, $resource, false, false, $excludePaths) as $path => $info) {
- if (null === $prefixLen) {
- $prefixLen = \strlen($resource->getPrefix());
-
- if ($excludePrefix && 0 !== strpos($excludePrefix, $resource->getPrefix())) {
- throw new InvalidArgumentException(sprintf('Invalid "exclude" pattern when importing classes for "%s": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s)', $namespace, $excludePattern, $pattern));
- }
- }
-
- if (isset($excludePaths[str_replace('\\', '/', $path)])) {
- continue;
- }
-
- if (!preg_match($extRegexp, $path, $m) || !$info->isReadable()) {
- continue;
- }
- $class = $namespace.ltrim(str_replace('/', '\\', substr($path, $prefixLen, -\strlen($m[0]))), '\\');
-
- if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)*+$/', $class)) {
- continue;
- }
-
- try {
- $r = $this->container->getReflectionClass($class);
- } catch (\ReflectionException $e) {
- $classes[$class] = $e->getMessage();
- continue;
- }
- // check to make sure the expected class exists
- if (!$r) {
- throw new InvalidArgumentException(sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern));
- }
-
- if ($r->isInstantiable() || $r->isInterface()) {
- $classes[$class] = null;
- }
- }
-
- // track only for new & removed files
- if ($resource instanceof GlobResource) {
- $this->container->addResource($resource);
- } else {
- foreach ($resource as $path) {
- $this->container->fileExists($path, false);
- }
- }
-
- return $classes;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php
deleted file mode 100644
index 4b25610..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-/**
- * GlobFileLoader loads files from a glob pattern.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class GlobFileLoader extends FileLoader
-{
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- foreach ($this->glob($resource, false, $globResource) as $path => $info) {
- $this->import($path);
- }
-
- $this->container->addResource($globResource);
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- return 'glob' === $type;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/IniFileLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/IniFileLoader.php
deleted file mode 100644
index 40137b1..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/IniFileLoader.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-use Symfony\Component\Config\Util\XmlUtils;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-
-/**
- * IniFileLoader loads parameters from INI files.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class IniFileLoader extends FileLoader
-{
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- $path = $this->locator->locate($resource);
-
- $this->container->fileExists($path);
-
- // first pass to catch parsing errors
- $result = parse_ini_file($path, true);
- if (false === $result || [] === $result) {
- throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource));
- }
-
- // real raw parsing
- $result = parse_ini_file($path, true, INI_SCANNER_RAW);
-
- if (isset($result['parameters']) && \is_array($result['parameters'])) {
- foreach ($result['parameters'] as $key => $value) {
- $this->container->setParameter($key, $this->phpize($value));
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- if (!\is_string($resource)) {
- return false;
- }
-
- if (null === $type && 'ini' === pathinfo($resource, PATHINFO_EXTENSION)) {
- return true;
- }
-
- return 'ini' === $type;
- }
-
- /**
- * Note that the following features are not supported:
- * * strings with escaped quotes are not supported "foo\"bar";
- * * string concatenation ("foo" "bar").
- *
- * @return mixed
- */
- private function phpize(string $value)
- {
- // trim on the right as comments removal keep whitespaces
- if ($value !== $v = rtrim($value)) {
- $value = '""' === substr_replace($v, '', 1, -1) ? substr($v, 1, -1) : $v;
- }
- $lowercaseValue = strtolower($value);
-
- switch (true) {
- case \defined($value):
- return \constant($value);
- case 'yes' === $lowercaseValue || 'on' === $lowercaseValue:
- return true;
- case 'no' === $lowercaseValue || 'off' === $lowercaseValue || 'none' === $lowercaseValue:
- return false;
- case isset($value[1]) && (
- ("'" === $value[0] && "'" === $value[\strlen($value) - 1]) ||
- ('"' === $value[0] && '"' === $value[\strlen($value) - 1])
- ):
- // quoted string
- return substr($value, 1, -1);
- default:
- return XmlUtils::phpize($value);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
deleted file mode 100644
index f1477ec..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
-
-/**
- * PhpFileLoader loads service definitions from a PHP file.
- *
- * The PHP file is required and the $container variable can be
- * used within the file to change the container.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class PhpFileLoader extends FileLoader
-{
- protected $autoRegisterAliasesForSinglyImplementedInterfaces = false;
-
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- // the container and loader variables are exposed to the included file below
- $container = $this->container;
- $loader = $this;
-
- $path = $this->locator->locate($resource);
- $this->setCurrentDir(\dirname($path));
- $this->container->fileExists($path);
-
- // the closure forbids access to the private scope in the included file
- $load = \Closure::bind(function ($path) use ($container, $loader, $resource, $type) {
- return include $path;
- }, $this, ProtectedPhpFileLoader::class);
-
- try {
- $callback = $load($path);
-
- if (\is_object($callback) && \is_callable($callback)) {
- $callback(new ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource), $this->container, $this);
- }
- } finally {
- $this->instanceof = [];
- $this->registerAliasesForSinglyImplementedInterfaces();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- if (!\is_string($resource)) {
- return false;
- }
-
- if (null === $type && 'php' === pathinfo($resource, PATHINFO_EXTENSION)) {
- return true;
- }
-
- return 'php' === $type;
- }
-}
-
-/**
- * @internal
- */
-final class ProtectedPhpFileLoader extends PhpFileLoader
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php
deleted file mode 100644
index 41a9f0a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php
+++ /dev/null
@@ -1,728 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-use Symfony\Component\Config\Util\XmlUtils;
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\Argument\BoundArgument;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\ExpressionLanguage\Expression;
-
-/**
- * XmlFileLoader loads XML files service definitions.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class XmlFileLoader extends FileLoader
-{
- const NS = 'http://symfony.com/schema/dic/services';
-
- protected $autoRegisterAliasesForSinglyImplementedInterfaces = false;
-
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- $path = $this->locator->locate($resource);
-
- $xml = $this->parseFileToDOM($path);
-
- $this->container->fileExists($path);
-
- $defaults = $this->getServiceDefaults($xml, $path);
-
- // anonymous services
- $this->processAnonymousServices($xml, $path);
-
- // imports
- $this->parseImports($xml, $path);
-
- // parameters
- $this->parseParameters($xml, $path);
-
- // extensions
- $this->loadFromExtensions($xml);
-
- // services
- try {
- $this->parseDefinitions($xml, $path, $defaults);
- } finally {
- $this->instanceof = [];
- $this->registerAliasesForSinglyImplementedInterfaces();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- if (!\is_string($resource)) {
- return false;
- }
-
- if (null === $type && 'xml' === pathinfo($resource, PATHINFO_EXTENSION)) {
- return true;
- }
-
- return 'xml' === $type;
- }
-
- private function parseParameters(\DOMDocument $xml, string $file)
- {
- if ($parameters = $this->getChildren($xml->documentElement, 'parameters')) {
- $this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter', $file));
- }
- }
-
- private function parseImports(\DOMDocument $xml, string $file)
- {
- $xpath = new \DOMXPath($xml);
- $xpath->registerNamespace('container', self::NS);
-
- if (false === $imports = $xpath->query('//container:imports/container:import')) {
- return;
- }
-
- $defaultDirectory = \dirname($file);
- foreach ($imports as $import) {
- $this->setCurrentDir($defaultDirectory);
- $this->import($import->getAttribute('resource'), XmlUtils::phpize($import->getAttribute('type')) ?: null, XmlUtils::phpize($import->getAttribute('ignore-errors')) ?: false, $file);
- }
- }
-
- private function parseDefinitions(\DOMDocument $xml, string $file, array $defaults)
- {
- $xpath = new \DOMXPath($xml);
- $xpath->registerNamespace('container', self::NS);
-
- if (false === $services = $xpath->query('//container:services/container:service|//container:services/container:prototype')) {
- return;
- }
- $this->setCurrentDir(\dirname($file));
-
- $this->instanceof = [];
- $this->isLoadingInstanceof = true;
- $instanceof = $xpath->query('//container:services/container:instanceof');
- foreach ($instanceof as $service) {
- $this->setDefinition((string) $service->getAttribute('id'), $this->parseDefinition($service, $file, []));
- }
-
- $this->isLoadingInstanceof = false;
- foreach ($services as $service) {
- if (null !== $definition = $this->parseDefinition($service, $file, $defaults)) {
- if ('prototype' === $service->tagName) {
- $excludes = array_column($this->getChildren($service, 'exclude'), 'nodeValue');
- if ($service->hasAttribute('exclude')) {
- if (\count($excludes) > 0) {
- throw new InvalidArgumentException('You cannot use both the attribute "exclude" and <exclude> tags at the same time.');
- }
- $excludes = [$service->getAttribute('exclude')];
- }
- $this->registerClasses($definition, (string) $service->getAttribute('namespace'), (string) $service->getAttribute('resource'), $excludes);
- } else {
- $this->setDefinition((string) $service->getAttribute('id'), $definition);
- }
- }
- }
- }
-
- /**
- * Get service defaults.
- */
- private function getServiceDefaults(\DOMDocument $xml, string $file): array
- {
- $xpath = new \DOMXPath($xml);
- $xpath->registerNamespace('container', self::NS);
-
- if (null === $defaultsNode = $xpath->query('//container:services/container:defaults')->item(0)) {
- return [];
- }
-
- $bindings = [];
- foreach ($this->getArgumentsAsPhp($defaultsNode, 'bind', $file) as $argument => $value) {
- $bindings[$argument] = new BoundArgument($value, true, BoundArgument::DEFAULTS_BINDING, $file);
- }
-
- $defaults = [
- 'tags' => $this->getChildren($defaultsNode, 'tag'),
- 'bind' => $bindings,
- ];
-
- foreach ($defaults['tags'] as $tag) {
- if ('' === $tag->getAttribute('name')) {
- throw new InvalidArgumentException(sprintf('The tag name for tag "<defaults>" in %s must be a non-empty string.', $file));
- }
- }
-
- if ($defaultsNode->hasAttribute('autowire')) {
- $defaults['autowire'] = XmlUtils::phpize($defaultsNode->getAttribute('autowire'));
- }
- if ($defaultsNode->hasAttribute('public')) {
- $defaults['public'] = XmlUtils::phpize($defaultsNode->getAttribute('public'));
- }
- if ($defaultsNode->hasAttribute('autoconfigure')) {
- $defaults['autoconfigure'] = XmlUtils::phpize($defaultsNode->getAttribute('autoconfigure'));
- }
-
- return $defaults;
- }
-
- /**
- * Parses an individual Definition.
- */
- private function parseDefinition(\DOMElement $service, string $file, array $defaults): ?Definition
- {
- if ($alias = $service->getAttribute('alias')) {
- $this->validateAlias($service, $file);
-
- $this->container->setAlias((string) $service->getAttribute('id'), $alias = new Alias($alias));
- if ($publicAttr = $service->getAttribute('public')) {
- $alias->setPublic(XmlUtils::phpize($publicAttr));
- } elseif (isset($defaults['public'])) {
- $alias->setPublic($defaults['public']);
- }
-
- if ($deprecated = $this->getChildren($service, 'deprecated')) {
- $alias->setDeprecated(true, $deprecated[0]->nodeValue ?: null);
- }
-
- return null;
- }
-
- if ($this->isLoadingInstanceof) {
- $definition = new ChildDefinition('');
- } elseif ($parent = $service->getAttribute('parent')) {
- if (!empty($this->instanceof)) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot use the "parent" option in the same file where "instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $service->getAttribute('id')));
- }
-
- foreach ($defaults as $k => $v) {
- if ('tags' === $k) {
- // since tags are never inherited from parents, there is no confusion
- // thus we can safely add them as defaults to ChildDefinition
- continue;
- }
- if ('bind' === $k) {
- if ($defaults['bind']) {
- throw new InvalidArgumentException(sprintf('Bound values on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file.', $service->getAttribute('id')));
- }
-
- continue;
- }
- if (!$service->hasAttribute($k)) {
- throw new InvalidArgumentException(sprintf('Attribute "%s" on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $service->getAttribute('id')));
- }
- }
-
- $definition = new ChildDefinition($parent);
- } else {
- $definition = new Definition();
-
- if (isset($defaults['public'])) {
- $definition->setPublic($defaults['public']);
- }
- if (isset($defaults['autowire'])) {
- $definition->setAutowired($defaults['autowire']);
- }
- if (isset($defaults['autoconfigure'])) {
- $definition->setAutoconfigured($defaults['autoconfigure']);
- }
-
- $definition->setChanges([]);
- }
-
- foreach (['class', 'public', 'shared', 'synthetic', 'abstract'] as $key) {
- if ($value = $service->getAttribute($key)) {
- $method = 'set'.$key;
- $definition->$method($value = XmlUtils::phpize($value));
- }
- }
-
- if ($value = $service->getAttribute('lazy')) {
- $definition->setLazy((bool) $value = XmlUtils::phpize($value));
- if (\is_string($value)) {
- $definition->addTag('proxy', ['interface' => $value]);
- }
- }
-
- if ($value = $service->getAttribute('autowire')) {
- $definition->setAutowired(XmlUtils::phpize($value));
- }
-
- if ($value = $service->getAttribute('autoconfigure')) {
- if (!$definition instanceof ChildDefinition) {
- $definition->setAutoconfigured(XmlUtils::phpize($value));
- } elseif ($value = XmlUtils::phpize($value)) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting autoconfigure="false" for the service.', $service->getAttribute('id')));
- }
- }
-
- if ($files = $this->getChildren($service, 'file')) {
- $definition->setFile($files[0]->nodeValue);
- }
-
- if ($deprecated = $this->getChildren($service, 'deprecated')) {
- $definition->setDeprecated(true, $deprecated[0]->nodeValue ?: null);
- }
-
- $definition->setArguments($this->getArgumentsAsPhp($service, 'argument', $file, $definition instanceof ChildDefinition));
- $definition->setProperties($this->getArgumentsAsPhp($service, 'property', $file));
-
- if ($factories = $this->getChildren($service, 'factory')) {
- $factory = $factories[0];
- if ($function = $factory->getAttribute('function')) {
- $definition->setFactory($function);
- } else {
- if ($childService = $factory->getAttribute('service')) {
- $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
- } else {
- $class = $factory->hasAttribute('class') ? $factory->getAttribute('class') : null;
- }
-
- $definition->setFactory([$class, $factory->getAttribute('method') ?: '__invoke']);
- }
- }
-
- if ($configurators = $this->getChildren($service, 'configurator')) {
- $configurator = $configurators[0];
- if ($function = $configurator->getAttribute('function')) {
- $definition->setConfigurator($function);
- } else {
- if ($childService = $configurator->getAttribute('service')) {
- $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
- } else {
- $class = $configurator->getAttribute('class');
- }
-
- $definition->setConfigurator([$class, $configurator->getAttribute('method') ?: '__invoke']);
- }
- }
-
- foreach ($this->getChildren($service, 'call') as $call) {
- $definition->addMethodCall($call->getAttribute('method'), $this->getArgumentsAsPhp($call, 'argument', $file), XmlUtils::phpize($call->getAttribute('returns-clone')));
- }
-
- $tags = $this->getChildren($service, 'tag');
-
- if (!empty($defaults['tags'])) {
- $tags = array_merge($tags, $defaults['tags']);
- }
-
- foreach ($tags as $tag) {
- $parameters = [];
- foreach ($tag->attributes as $name => $node) {
- if ('name' === $name) {
- continue;
- }
-
- if (false !== strpos($name, '-') && false === strpos($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) {
- $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue);
- }
- // keep not normalized key
- $parameters[$name] = XmlUtils::phpize($node->nodeValue);
- }
-
- if ('' === $tag->getAttribute('name')) {
- throw new InvalidArgumentException(sprintf('The tag name for service "%s" in %s must be a non-empty string.', (string) $service->getAttribute('id'), $file));
- }
-
- $definition->addTag($tag->getAttribute('name'), $parameters);
- }
-
- $bindings = $this->getArgumentsAsPhp($service, 'bind', $file);
- $bindingType = $this->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING;
- foreach ($bindings as $argument => $value) {
- $bindings[$argument] = new BoundArgument($value, true, $bindingType, $file);
- }
-
- if (isset($defaults['bind'])) {
- // deep clone, to avoid multiple process of the same instance in the passes
- $bindings = array_merge(unserialize(serialize($defaults['bind'])), $bindings);
- }
- if ($bindings) {
- $definition->setBindings($bindings);
- }
-
- if ($decorates = $service->getAttribute('decorates')) {
- $decorationOnInvalid = $service->getAttribute('decoration-on-invalid') ?: 'exception';
- if ('exception' === $decorationOnInvalid) {
- $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- } elseif ('ignore' === $decorationOnInvalid) {
- $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
- } elseif ('null' === $decorationOnInvalid) {
- $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
- } else {
- throw new InvalidArgumentException(sprintf('Invalid value "%s" for attribute "decoration-on-invalid" on service "%s". Did you mean "exception", "ignore" or "null" in "%s"?', $decorationOnInvalid, (string) $service->getAttribute('id'), $file));
- }
-
- $renameId = $service->hasAttribute('decoration-inner-name') ? $service->getAttribute('decoration-inner-name') : null;
- $priority = $service->hasAttribute('decoration-priority') ? $service->getAttribute('decoration-priority') : 0;
-
- $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior);
- }
-
- return $definition;
- }
-
- /**
- * Parses a XML file to a \DOMDocument.
- *
- * @throws InvalidArgumentException When loading of XML file returns error
- */
- private function parseFileToDOM(string $file): \DOMDocument
- {
- try {
- $dom = XmlUtils::loadFile($file, [$this, 'validateSchema']);
- } catch (\InvalidArgumentException $e) {
- throw new InvalidArgumentException(sprintf('Unable to parse file "%s": %s', $file, $e->getMessage()), $e->getCode(), $e);
- }
-
- $this->validateExtensions($dom, $file);
-
- return $dom;
- }
-
- /**
- * Processes anonymous services.
- */
- private function processAnonymousServices(\DOMDocument $xml, string $file)
- {
- $definitions = [];
- $count = 0;
- $suffix = '~'.ContainerBuilder::hash($file);
-
- $xpath = new \DOMXPath($xml);
- $xpath->registerNamespace('container', self::NS);
-
- // anonymous services as arguments/properties
- if (false !== $nodes = $xpath->query('//container:argument[@type="service"][not(@id)]|//container:property[@type="service"][not(@id)]|//container:bind[not(@id)]|//container:factory[not(@service)]|//container:configurator[not(@service)]')) {
- foreach ($nodes as $node) {
- if ($services = $this->getChildren($node, 'service')) {
- // give it a unique name
- $id = sprintf('.%d_%s', ++$count, preg_replace('/^.*\\\\/', '', $services[0]->getAttribute('class')).$suffix);
- $node->setAttribute('id', $id);
- $node->setAttribute('service', $id);
-
- $definitions[$id] = [$services[0], $file];
- $services[0]->setAttribute('id', $id);
-
- // anonymous services are always private
- // we could not use the constant false here, because of XML parsing
- $services[0]->setAttribute('public', 'false');
- }
- }
- }
-
- // anonymous services "in the wild"
- if (false !== $nodes = $xpath->query('//container:services/container:service[not(@id)]')) {
- foreach ($nodes as $node) {
- throw new InvalidArgumentException(sprintf('Top-level services must have "id" attribute, none found in %s at line %d.', $file, $node->getLineNo()));
- }
- }
-
- // resolve definitions
- uksort($definitions, 'strnatcmp');
- foreach (array_reverse($definitions) as $id => list($domElement, $file)) {
- if (null !== $definition = $this->parseDefinition($domElement, $file, [])) {
- $this->setDefinition($id, $definition);
- }
- }
- }
-
- private function getArgumentsAsPhp(\DOMElement $node, string $name, string $file, bool $isChildDefinition = false): array
- {
- $arguments = [];
- foreach ($this->getChildren($node, $name) as $arg) {
- if ($arg->hasAttribute('name')) {
- $arg->setAttribute('key', $arg->getAttribute('name'));
- }
-
- // this is used by ChildDefinition to overwrite a specific
- // argument of the parent definition
- if ($arg->hasAttribute('index')) {
- $key = ($isChildDefinition ? 'index_' : '').$arg->getAttribute('index');
- } elseif (!$arg->hasAttribute('key')) {
- // Append an empty argument, then fetch its key to overwrite it later
- $arguments[] = null;
- $keys = array_keys($arguments);
- $key = array_pop($keys);
- } else {
- $key = $arg->getAttribute('key');
- }
-
- $onInvalid = $arg->getAttribute('on-invalid');
- $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- if ('ignore' == $onInvalid) {
- $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
- } elseif ('ignore_uninitialized' == $onInvalid) {
- $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
- } elseif ('null' == $onInvalid) {
- $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
- }
-
- switch ($arg->getAttribute('type')) {
- case 'service':
- if ('' === $arg->getAttribute('id')) {
- throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file));
- }
-
- $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior);
- break;
- case 'expression':
- if (!class_exists(Expression::class)) {
- throw new \LogicException(sprintf('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
- }
-
- $arguments[$key] = new Expression($arg->nodeValue);
- break;
- case 'collection':
- $arguments[$key] = $this->getArgumentsAsPhp($arg, $name, $file);
- break;
- case 'iterator':
- $arg = $this->getArgumentsAsPhp($arg, $name, $file);
- try {
- $arguments[$key] = new IteratorArgument($arg);
- } catch (InvalidArgumentException $e) {
- throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="iterator" only accepts collections of type="service" references in "%s".', $name, $file));
- }
- break;
- case 'service_locator':
- $arg = $this->getArgumentsAsPhp($arg, $name, $file);
- try {
- $arguments[$key] = new ServiceLocatorArgument($arg);
- } catch (InvalidArgumentException $e) {
- throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service_locator" only accepts maps of type="service" references in "%s".', $name, $file));
- }
- break;
- case 'tagged':
- case 'tagged_iterator':
- case 'tagged_locator':
- $type = $arg->getAttribute('type');
- $forLocator = 'tagged_locator' === $type;
-
- if (!$arg->getAttribute('tag')) {
- throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="%s" has no or empty "tag" attribute in "%s".', $name, $type, $file));
- }
-
- $arguments[$key] = new TaggedIteratorArgument($arg->getAttribute('tag'), $arg->getAttribute('index-by') ?: null, $arg->getAttribute('default-index-method') ?: null, $forLocator, $arg->getAttribute('default-priority-method') ?: null);
-
- if ($forLocator) {
- $arguments[$key] = new ServiceLocatorArgument($arguments[$key]);
- }
- break;
- case 'binary':
- if (false === $value = base64_decode($arg->nodeValue)) {
- throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="binary" is not a valid base64 encoded string.', $name));
- }
- $arguments[$key] = $value;
- break;
- case 'string':
- $arguments[$key] = $arg->nodeValue;
- break;
- case 'constant':
- $arguments[$key] = \constant(trim($arg->nodeValue));
- break;
- default:
- $arguments[$key] = XmlUtils::phpize($arg->nodeValue);
- }
- }
-
- return $arguments;
- }
-
- /**
- * Get child elements by name.
- *
- * @return \DOMElement[]
- */
- private function getChildren(\DOMNode $node, string $name): array
- {
- $children = [];
- foreach ($node->childNodes as $child) {
- if ($child instanceof \DOMElement && $child->localName === $name && self::NS === $child->namespaceURI) {
- $children[] = $child;
- }
- }
-
- return $children;
- }
-
- /**
- * Validates a documents XML schema.
- *
- * @return bool
- *
- * @throws RuntimeException When extension references a non-existent XSD file
- */
- public function validateSchema(\DOMDocument $dom)
- {
- $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')];
-
- if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) {
- $items = preg_split('/\s+/', $element);
- for ($i = 0, $nb = \count($items); $i < $nb; $i += 2) {
- if (!$this->container->hasExtension($items[$i])) {
- continue;
- }
-
- if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) {
- $ns = $extension->getNamespace();
- $path = str_replace([$ns, str_replace('http://', 'https://', $ns)], str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]);
-
- if (!is_file($path)) {
- throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s"', \get_class($extension), $path));
- }
-
- $schemaLocations[$items[$i]] = $path;
- }
- }
- }
-
- $tmpfiles = [];
- $imports = '';
- foreach ($schemaLocations as $namespace => $location) {
- $parts = explode('/', $location);
- $locationstart = 'file:///';
- if (0 === stripos($location, 'phar://')) {
- $tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
- if ($tmpfile) {
- copy($location, $tmpfile);
- $tmpfiles[] = $tmpfile;
- $parts = explode('/', str_replace('\\', '/', $tmpfile));
- } else {
- array_shift($parts);
- $locationstart = 'phar:///';
- }
- }
- $drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
- $location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));
-
- $imports .= sprintf(' <xsd:import namespace="%s" schemaLocation="%s" />'."\n", $namespace, $location);
- }
-
- $source = <<<EOF
-<?xml version="1.0" encoding="utf-8" ?>
-<xsd:schema xmlns="http://symfony.com/schema"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://symfony.com/schema"
- elementFormDefault="qualified">
-
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
-$imports
-</xsd:schema>
-EOF
- ;
-
- $disableEntities = libxml_disable_entity_loader(false);
- $valid = @$dom->schemaValidateSource($source);
- libxml_disable_entity_loader($disableEntities);
-
- foreach ($tmpfiles as $tmpfile) {
- @unlink($tmpfile);
- }
-
- return $valid;
- }
-
- private function validateAlias(\DOMElement $alias, string $file)
- {
- foreach ($alias->attributes as $name => $node) {
- if (!\in_array($name, ['alias', 'id', 'public'])) {
- throw new InvalidArgumentException(sprintf('Invalid attribute "%s" defined for alias "%s" in "%s".', $name, $alias->getAttribute('id'), $file));
- }
- }
-
- foreach ($alias->childNodes as $child) {
- if (!$child instanceof \DOMElement || self::NS !== $child->namespaceURI) {
- continue;
- }
- if (!\in_array($child->localName, ['deprecated'], true)) {
- throw new InvalidArgumentException(sprintf('Invalid child element "%s" defined for alias "%s" in "%s".', $child->localName, $alias->getAttribute('id'), $file));
- }
- }
- }
-
- /**
- * Validates an extension.
- *
- * @throws InvalidArgumentException When no extension is found corresponding to a tag
- */
- private function validateExtensions(\DOMDocument $dom, string $file)
- {
- foreach ($dom->documentElement->childNodes as $node) {
- if (!$node instanceof \DOMElement || 'http://symfony.com/schema/dic/services' === $node->namespaceURI) {
- continue;
- }
-
- // can it be handled by an extension?
- if (!$this->container->hasExtension($node->namespaceURI)) {
- $extensionNamespaces = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getNamespace(); }, $this->container->getExtensions()));
- throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', $node->tagName, $file, $node->namespaceURI, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none'));
- }
- }
- }
-
- /**
- * Loads from an extension.
- */
- private function loadFromExtensions(\DOMDocument $xml)
- {
- foreach ($xml->documentElement->childNodes as $node) {
- if (!$node instanceof \DOMElement || self::NS === $node->namespaceURI) {
- continue;
- }
-
- $values = static::convertDomElementToArray($node);
- if (!\is_array($values)) {
- $values = [];
- }
-
- $this->container->loadFromExtension($node->namespaceURI, $values);
- }
- }
-
- /**
- * Converts a \DOMElement object to a PHP array.
- *
- * The following rules applies during the conversion:
- *
- * * Each tag is converted to a key value or an array
- * if there is more than one "value"
- *
- * * The content of a tag is set under a "value" key (<foo>bar</foo>)
- * if the tag also has some nested tags
- *
- * * The attributes are converted to keys (<foo foo="bar"/>)
- *
- * * The nested-tags are converted to keys (<foo><foo>bar</foo></foo>)
- *
- * @param \DOMElement $element A \DOMElement instance
- *
- * @return mixed
- */
- public static function convertDomElementToArray(\DOMElement $element)
- {
- return XmlUtils::convertDomElementToArray($element);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php
deleted file mode 100644
index ee8c140..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php
+++ /dev/null
@@ -1,880 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\Loader;
-
-use Symfony\Component\DependencyInjection\Alias;
-use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
-use Symfony\Component\DependencyInjection\Argument\BoundArgument;
-use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
-use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
-use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
-use Symfony\Component\DependencyInjection\ChildDefinition;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\ExpressionLanguage\Expression;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Parser as YamlParser;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-use Symfony\Component\Yaml\Yaml;
-
-/**
- * YamlFileLoader loads YAML files service definitions.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class YamlFileLoader extends FileLoader
-{
- private static $serviceKeywords = [
- 'alias' => 'alias',
- 'parent' => 'parent',
- 'class' => 'class',
- 'shared' => 'shared',
- 'synthetic' => 'synthetic',
- 'lazy' => 'lazy',
- 'public' => 'public',
- 'abstract' => 'abstract',
- 'deprecated' => 'deprecated',
- 'factory' => 'factory',
- 'file' => 'file',
- 'arguments' => 'arguments',
- 'properties' => 'properties',
- 'configurator' => 'configurator',
- 'calls' => 'calls',
- 'tags' => 'tags',
- 'decorates' => 'decorates',
- 'decoration_inner_name' => 'decoration_inner_name',
- 'decoration_priority' => 'decoration_priority',
- 'decoration_on_invalid' => 'decoration_on_invalid',
- 'autowire' => 'autowire',
- 'autoconfigure' => 'autoconfigure',
- 'bind' => 'bind',
- ];
-
- private static $prototypeKeywords = [
- 'resource' => 'resource',
- 'namespace' => 'namespace',
- 'exclude' => 'exclude',
- 'parent' => 'parent',
- 'shared' => 'shared',
- 'lazy' => 'lazy',
- 'public' => 'public',
- 'abstract' => 'abstract',
- 'deprecated' => 'deprecated',
- 'factory' => 'factory',
- 'arguments' => 'arguments',
- 'properties' => 'properties',
- 'configurator' => 'configurator',
- 'calls' => 'calls',
- 'tags' => 'tags',
- 'autowire' => 'autowire',
- 'autoconfigure' => 'autoconfigure',
- 'bind' => 'bind',
- ];
-
- private static $instanceofKeywords = [
- 'shared' => 'shared',
- 'lazy' => 'lazy',
- 'public' => 'public',
- 'properties' => 'properties',
- 'configurator' => 'configurator',
- 'calls' => 'calls',
- 'tags' => 'tags',
- 'autowire' => 'autowire',
- 'bind' => 'bind',
- ];
-
- private static $defaultsKeywords = [
- 'public' => 'public',
- 'tags' => 'tags',
- 'autowire' => 'autowire',
- 'autoconfigure' => 'autoconfigure',
- 'bind' => 'bind',
- ];
-
- private $yamlParser;
-
- private $anonymousServicesCount;
- private $anonymousServicesSuffix;
-
- protected $autoRegisterAliasesForSinglyImplementedInterfaces = false;
-
- /**
- * {@inheritdoc}
- */
- public function load($resource, $type = null)
- {
- $path = $this->locator->locate($resource);
-
- $content = $this->loadFile($path);
-
- $this->container->fileExists($path);
-
- // empty file
- if (null === $content) {
- return;
- }
-
- // imports
- $this->parseImports($content, $path);
-
- // parameters
- if (isset($content['parameters'])) {
- if (!\is_array($content['parameters'])) {
- throw new InvalidArgumentException(sprintf('The "parameters" key should contain an array in %s. Check your YAML syntax.', $path));
- }
-
- foreach ($content['parameters'] as $key => $value) {
- $this->container->setParameter($key, $this->resolveServices($value, $path, true));
- }
- }
-
- // extensions
- $this->loadFromExtensions($content);
-
- // services
- $this->anonymousServicesCount = 0;
- $this->anonymousServicesSuffix = '~'.ContainerBuilder::hash($path);
- $this->setCurrentDir(\dirname($path));
- try {
- $this->parseDefinitions($content, $path);
- } finally {
- $this->instanceof = [];
- $this->registerAliasesForSinglyImplementedInterfaces();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function supports($resource, $type = null)
- {
- if (!\is_string($resource)) {
- return false;
- }
-
- if (null === $type && \in_array(pathinfo($resource, PATHINFO_EXTENSION), ['yaml', 'yml'], true)) {
- return true;
- }
-
- return \in_array($type, ['yaml', 'yml'], true);
- }
-
- private function parseImports(array $content, string $file)
- {
- if (!isset($content['imports'])) {
- return;
- }
-
- if (!\is_array($content['imports'])) {
- throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file));
- }
-
- $defaultDirectory = \dirname($file);
- foreach ($content['imports'] as $import) {
- if (!\is_array($import)) {
- $import = ['resource' => $import];
- }
- if (!isset($import['resource'])) {
- throw new InvalidArgumentException(sprintf('An import should provide a resource in %s. Check your YAML syntax.', $file));
- }
-
- $this->setCurrentDir($defaultDirectory);
- $this->import($import['resource'], $import['type'] ?? null, $import['ignore_errors'] ?? false, $file);
- }
- }
-
- private function parseDefinitions(array $content, string $file)
- {
- if (!isset($content['services'])) {
- return;
- }
-
- if (!\is_array($content['services'])) {
- throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file));
- }
-
- if (\array_key_exists('_instanceof', $content['services'])) {
- $instanceof = $content['services']['_instanceof'];
- unset($content['services']['_instanceof']);
-
- if (!\is_array($instanceof)) {
- throw new InvalidArgumentException(sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".', \gettype($instanceof), $file));
- }
- $this->instanceof = [];
- $this->isLoadingInstanceof = true;
- foreach ($instanceof as $id => $service) {
- if (!$service || !\is_array($service)) {
- throw new InvalidArgumentException(sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in %s. Check your YAML syntax.', $id, $file));
- }
- if (\is_string($service) && 0 === strpos($service, '@')) {
- throw new InvalidArgumentException(sprintf('Type definition "%s" cannot be an alias within "_instanceof" in %s. Check your YAML syntax.', $id, $file));
- }
- $this->parseDefinition($id, $service, $file, []);
- }
- }
-
- $this->isLoadingInstanceof = false;
- $defaults = $this->parseDefaults($content, $file);
- foreach ($content['services'] as $id => $service) {
- $this->parseDefinition($id, $service, $file, $defaults);
- }
- }
-
- /**
- * @throws InvalidArgumentException
- */
- private function parseDefaults(array &$content, string $file): array
- {
- if (!\array_key_exists('_defaults', $content['services'])) {
- return [];
- }
- $defaults = $content['services']['_defaults'];
- unset($content['services']['_defaults']);
-
- if (!\is_array($defaults)) {
- throw new InvalidArgumentException(sprintf('Service "_defaults" key must be an array, "%s" given in "%s".', \gettype($defaults), $file));
- }
-
- foreach ($defaults as $key => $default) {
- if (!isset(self::$defaultsKeywords[$key])) {
- throw new InvalidArgumentException(sprintf('The configuration key "%s" cannot be used to define a default value in "%s". Allowed keys are "%s".', $key, $file, implode('", "', self::$defaultsKeywords)));
- }
- }
-
- if (isset($defaults['tags'])) {
- if (!\is_array($tags = $defaults['tags'])) {
- throw new InvalidArgumentException(sprintf('Parameter "tags" in "_defaults" must be an array in %s. Check your YAML syntax.', $file));
- }
-
- foreach ($tags as $tag) {
- if (!\is_array($tag)) {
- $tag = ['name' => $tag];
- }
-
- if (!isset($tag['name'])) {
- throw new InvalidArgumentException(sprintf('A "tags" entry in "_defaults" is missing a "name" key in %s.', $file));
- }
- $name = $tag['name'];
- unset($tag['name']);
-
- if (!\is_string($name) || '' === $name) {
- throw new InvalidArgumentException(sprintf('The tag name in "_defaults" must be a non-empty string in %s.', $file));
- }
-
- foreach ($tag as $attribute => $value) {
- if (!is_scalar($value) && null !== $value) {
- throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in %s. Check your YAML syntax.', $name, $attribute, $file));
- }
- }
- }
- }
-
- if (isset($defaults['bind'])) {
- if (!\is_array($defaults['bind'])) {
- throw new InvalidArgumentException(sprintf('Parameter "bind" in "_defaults" must be an array in %s. Check your YAML syntax.', $file));
- }
-
- foreach ($this->resolveServices($defaults['bind'], $file) as $argument => $value) {
- $defaults['bind'][$argument] = new BoundArgument($value, true, BoundArgument::DEFAULTS_BINDING, $file);
- }
- }
-
- return $defaults;
- }
-
- private function isUsingShortSyntax(array $service): bool
- {
- foreach ($service as $key => $value) {
- if (\is_string($key) && ('' === $key || '$' !== $key[0])) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Parses a definition.
- *
- * @param array|string $service
- *
- * @throws InvalidArgumentException When tags are invalid
- */
- private function parseDefinition(string $id, $service, string $file, array $defaults)
- {
- if (preg_match('/^_[a-zA-Z0-9_]*$/', $id)) {
- throw new InvalidArgumentException(sprintf('Service names that start with an underscore are reserved. Rename the "%s" service or define it in XML instead.', $id));
- }
-
- if (\is_string($service) && 0 === strpos($service, '@')) {
- $this->container->setAlias($id, $alias = new Alias(substr($service, 1)));
- if (isset($defaults['public'])) {
- $alias->setPublic($defaults['public']);
- }
-
- return;
- }
-
- if (\is_array($service) && $this->isUsingShortSyntax($service)) {
- $service = ['arguments' => $service];
- }
-
- if (null === $service) {
- $service = [];
- }
-
- if (!\is_array($service)) {
- throw new InvalidArgumentException(sprintf('A service definition must be an array or a string starting with "@" but %s found for service "%s" in %s. Check your YAML syntax.', \gettype($service), $id, $file));
- }
-
- $this->checkDefinition($id, $service, $file);
-
- if (isset($service['alias'])) {
- $this->container->setAlias($id, $alias = new Alias($service['alias']));
- if (\array_key_exists('public', $service)) {
- $alias->setPublic($service['public']);
- } elseif (isset($defaults['public'])) {
- $alias->setPublic($defaults['public']);
- }
-
- foreach ($service as $key => $value) {
- if (!\in_array($key, ['alias', 'public', 'deprecated'])) {
- throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias", "public" and "deprecated".', $key, $id, $file));
- }
-
- if ('deprecated' === $key) {
- $alias->setDeprecated(true, $value);
- }
- }
-
- return;
- }
-
- if ($this->isLoadingInstanceof) {
- $definition = new ChildDefinition('');
- } elseif (isset($service['parent'])) {
- if (!empty($this->instanceof)) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot use the "parent" option in the same file where "_instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $id));
- }
-
- foreach ($defaults as $k => $v) {
- if ('tags' === $k) {
- // since tags are never inherited from parents, there is no confusion
- // thus we can safely add them as defaults to ChildDefinition
- continue;
- }
- if ('bind' === $k) {
- throw new InvalidArgumentException(sprintf('Attribute "bind" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file.', $id));
- }
- if (!isset($service[$k])) {
- throw new InvalidArgumentException(sprintf('Attribute "%s" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $id));
- }
- }
-
- if ('' !== $service['parent'] && '@' === $service['parent'][0]) {
- throw new InvalidArgumentException(sprintf('The value of the "parent" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['parent'], substr($service['parent'], 1)));
- }
-
- $definition = new ChildDefinition($service['parent']);
- } else {
- $definition = new Definition();
-
- if (isset($defaults['public'])) {
- $definition->setPublic($defaults['public']);
- }
- if (isset($defaults['autowire'])) {
- $definition->setAutowired($defaults['autowire']);
- }
- if (isset($defaults['autoconfigure'])) {
- $definition->setAutoconfigured($defaults['autoconfigure']);
- }
-
- $definition->setChanges([]);
- }
-
- if (isset($service['class'])) {
- $definition->setClass($service['class']);
- }
-
- if (isset($service['shared'])) {
- $definition->setShared($service['shared']);
- }
-
- if (isset($service['synthetic'])) {
- $definition->setSynthetic($service['synthetic']);
- }
-
- if (isset($service['lazy'])) {
- $definition->setLazy((bool) $service['lazy']);
- if (\is_string($service['lazy'])) {
- $definition->addTag('proxy', ['interface' => $service['lazy']]);
- }
- }
-
- if (isset($service['public'])) {
- $definition->setPublic($service['public']);
- }
-
- if (isset($service['abstract'])) {
- $definition->setAbstract($service['abstract']);
- }
-
- if (\array_key_exists('deprecated', $service)) {
- $definition->setDeprecated(true, $service['deprecated']);
- }
-
- if (isset($service['factory'])) {
- $definition->setFactory($this->parseCallable($service['factory'], 'factory', $id, $file));
- }
-
- if (isset($service['file'])) {
- $definition->setFile($service['file']);
- }
-
- if (isset($service['arguments'])) {
- $definition->setArguments($this->resolveServices($service['arguments'], $file));
- }
-
- if (isset($service['properties'])) {
- $definition->setProperties($this->resolveServices($service['properties'], $file));
- }
-
- if (isset($service['configurator'])) {
- $definition->setConfigurator($this->parseCallable($service['configurator'], 'configurator', $id, $file));
- }
-
- if (isset($service['calls'])) {
- if (!\is_array($service['calls'])) {
- throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file));
- }
-
- foreach ($service['calls'] as $k => $call) {
- if (!\is_array($call) && (!\is_string($k) || !$call instanceof TaggedValue)) {
- throw new InvalidArgumentException(sprintf('Invalid method call for service "%s": expected map or array, %s given in %s.', $id, $call instanceof TaggedValue ? '!'.$call->getTag() : \gettype($call), $file));
- }
-
- if (\is_string($k)) {
- throw new InvalidArgumentException(sprintf('Invalid method call for service "%s", did you forgot a leading dash before "%s: ..." in %s?', $id, $k, $file));
- }
-
- if (isset($call['method'])) {
- $method = $call['method'];
- $args = $call['arguments'] ?? [];
- $returnsClone = $call['returns_clone'] ?? false;
- } else {
- if (1 === \count($call) && \is_string(key($call))) {
- $method = key($call);
- $args = $call[$method];
-
- if ($args instanceof TaggedValue) {
- if ('returns_clone' !== $args->getTag()) {
- throw new InvalidArgumentException(sprintf('Unsupported tag "!%s", did you mean "!returns_clone" for service "%s" in %s?', $args->getTag(), $id, $file));
- }
-
- $returnsClone = true;
- $args = $args->getValue();
- } else {
- $returnsClone = false;
- }
- } elseif (empty($call[0])) {
- throw new InvalidArgumentException(sprintf('Invalid call for service "%s": the method must be defined as the first index of an array or as the only key of a map in %s.', $id, $file));
- } else {
- $method = $call[0];
- $args = $call[1] ?? [];
- $returnsClone = $call[2] ?? false;
- }
- }
-
- if (!\is_array($args)) {
- throw new InvalidArgumentException(sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in %s. Check your YAML syntax.', $method, $id, $file));
- }
-
- $args = $this->resolveServices($args, $file);
- $definition->addMethodCall($method, $args, $returnsClone);
- }
- }
-
- $tags = isset($service['tags']) ? $service['tags'] : [];
- if (!\is_array($tags)) {
- throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file));
- }
-
- if (isset($defaults['tags'])) {
- $tags = array_merge($tags, $defaults['tags']);
- }
-
- foreach ($tags as $tag) {
- if (!\is_array($tag)) {
- $tag = ['name' => $tag];
- }
-
- if (!isset($tag['name'])) {
- throw new InvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in %s.', $id, $file));
- }
- $name = $tag['name'];
- unset($tag['name']);
-
- if (!\is_string($name) || '' === $name) {
- throw new InvalidArgumentException(sprintf('The tag name for service "%s" in %s must be a non-empty string.', $id, $file));
- }
-
- foreach ($tag as $attribute => $value) {
- if (!is_scalar($value) && null !== $value) {
- throw new InvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in %s. Check your YAML syntax.', $id, $name, $attribute, $file));
- }
- }
-
- $definition->addTag($name, $tag);
- }
-
- if (null !== $decorates = $service['decorates'] ?? null) {
- if ('' !== $decorates && '@' === $decorates[0]) {
- throw new InvalidArgumentException(sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], substr($decorates, 1)));
- }
-
- $decorationOnInvalid = \array_key_exists('decoration_on_invalid', $service) ? $service['decoration_on_invalid'] : 'exception';
- if ('exception' === $decorationOnInvalid) {
- $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- } elseif ('ignore' === $decorationOnInvalid) {
- $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
- } elseif (null === $decorationOnInvalid) {
- $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
- } elseif ('null' === $decorationOnInvalid) {
- throw new InvalidArgumentException(sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean null (without quotes) in "%s"?', $decorationOnInvalid, $id, $file));
- } else {
- throw new InvalidArgumentException(sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean "exception", "ignore" or null in "%s"?', $decorationOnInvalid, $id, $file));
- }
-
- $renameId = isset($service['decoration_inner_name']) ? $service['decoration_inner_name'] : null;
- $priority = isset($service['decoration_priority']) ? $service['decoration_priority'] : 0;
-
- $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior);
- }
-
- if (isset($service['autowire'])) {
- $definition->setAutowired($service['autowire']);
- }
-
- if (isset($defaults['bind']) || isset($service['bind'])) {
- // deep clone, to avoid multiple process of the same instance in the passes
- $bindings = isset($defaults['bind']) ? unserialize(serialize($defaults['bind'])) : [];
-
- if (isset($service['bind'])) {
- if (!\is_array($service['bind'])) {
- throw new InvalidArgumentException(sprintf('Parameter "bind" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file));
- }
-
- $bindings = array_merge($bindings, $this->resolveServices($service['bind'], $file));
- $bindingType = $this->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING;
- foreach ($bindings as $argument => $value) {
- if (!$value instanceof BoundArgument) {
- $bindings[$argument] = new BoundArgument($value, true, $bindingType, $file);
- }
- }
- }
-
- $definition->setBindings($bindings);
- }
-
- if (isset($service['autoconfigure'])) {
- if (!$definition instanceof ChildDefinition) {
- $definition->setAutoconfigured($service['autoconfigure']);
- } elseif ($service['autoconfigure']) {
- throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting "autoconfigure: false" for the service.', $id));
- }
- }
-
- if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) {
- throw new InvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in %s. Check your YAML syntax.', $id, $file));
- }
-
- if (\array_key_exists('resource', $service)) {
- if (!\is_string($service['resource'])) {
- throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in %s. Check your YAML syntax.', $id, $file));
- }
- $exclude = isset($service['exclude']) ? $service['exclude'] : null;
- $namespace = isset($service['namespace']) ? $service['namespace'] : $id;
- $this->registerClasses($definition, $namespace, $service['resource'], $exclude);
- } else {
- $this->setDefinition($id, $definition);
- }
- }
-
- /**
- * Parses a callable.
- *
- * @param string|array $callable A callable reference
- *
- * @throws InvalidArgumentException When errors occur
- *
- * @return string|array|Reference A parsed callable
- */
- private function parseCallable($callable, string $parameter, string $id, string $file)
- {
- if (\is_string($callable)) {
- if ('' !== $callable && '@' === $callable[0]) {
- if (false === strpos($callable, ':')) {
- return [$this->resolveServices($callable, $file), '__invoke'];
- }
-
- throw new InvalidArgumentException(sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s" in "%s").', $parameter, $id, $callable, substr($callable, 1), $file));
- }
-
- if (false !== strpos($callable, ':') && false === strpos($callable, '::')) {
- $parts = explode(':', $callable);
-
- @trigger_error(sprintf('Using short %s syntax for service "%s" is deprecated since Symfony 4.4, use "[\'@%s\', \'%s\']" instead.', $parameter, $id, ...$parts), E_USER_DEPRECATED);
-
- return [$this->resolveServices('@'.$parts[0], $file), $parts[1]];
- }
-
- return $callable;
- }
-
- if (\is_array($callable)) {
- if (isset($callable[0]) && isset($callable[1])) {
- return [$this->resolveServices($callable[0], $file), $callable[1]];
- }
-
- if ('factory' === $parameter && isset($callable[1]) && null === $callable[0]) {
- return $callable;
- }
-
- throw new InvalidArgumentException(sprintf('Parameter "%s" must contain an array with two elements for service "%s" in %s. Check your YAML syntax.', $parameter, $id, $file));
- }
-
- throw new InvalidArgumentException(sprintf('Parameter "%s" must be a string or an array for service "%s" in %s. Check your YAML syntax.', $parameter, $id, $file));
- }
-
- /**
- * Loads a YAML file.
- *
- * @param string $file
- *
- * @return array The file content
- *
- * @throws InvalidArgumentException when the given file is not a local file or when it does not exist
- */
- protected function loadFile($file)
- {
- if (!class_exists('Symfony\Component\Yaml\Parser')) {
- throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.');
- }
-
- if (!stream_is_local($file)) {
- throw new InvalidArgumentException(sprintf('This is not a local file "%s".', $file));
- }
-
- if (!file_exists($file)) {
- throw new InvalidArgumentException(sprintf('The file "%s" does not exist.', $file));
- }
-
- if (null === $this->yamlParser) {
- $this->yamlParser = new YamlParser();
- }
-
- try {
- $configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
- } catch (ParseException $e) {
- throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: %s', $file, $e->getMessage()), 0, $e);
- }
-
- return $this->validate($configuration, $file);
- }
-
- /**
- * Validates a YAML file.
- *
- * @throws InvalidArgumentException When service file is not valid
- */
- private function validate($content, string $file): ?array
- {
- if (null === $content) {
- return $content;
- }
-
- if (!\is_array($content)) {
- throw new InvalidArgumentException(sprintf('The service file "%s" is not valid. It should contain an array. Check your YAML syntax.', $file));
- }
-
- foreach ($content as $namespace => $data) {
- if (\in_array($namespace, ['imports', 'parameters', 'services'])) {
- continue;
- }
-
- if (!$this->container->hasExtension($namespace)) {
- $extensionNamespaces = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getAlias(); }, $this->container->getExtensions()));
- throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s', $namespace, $file, $namespace, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none'));
- }
- }
-
- return $content;
- }
-
- /**
- * Resolves services.
- *
- * @return array|string|Reference|ArgumentInterface
- */
- private function resolveServices($value, string $file, bool $isParameter = false)
- {
- if ($value instanceof TaggedValue) {
- $argument = $value->getValue();
- if ('iterator' === $value->getTag()) {
- if (!\is_array($argument)) {
- throw new InvalidArgumentException(sprintf('"!iterator" tag only accepts sequences in "%s".', $file));
- }
- $argument = $this->resolveServices($argument, $file, $isParameter);
- try {
- return new IteratorArgument($argument);
- } catch (InvalidArgumentException $e) {
- throw new InvalidArgumentException(sprintf('"!iterator" tag only accepts arrays of "@service" references in "%s".', $file));
- }
- }
- if ('service_locator' === $value->getTag()) {
- if (!\is_array($argument)) {
- throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps in "%s".', $file));
- }
-
- $argument = $this->resolveServices($argument, $file, $isParameter);
-
- try {
- return new ServiceLocatorArgument($argument);
- } catch (InvalidArgumentException $e) {
- throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps of "@service" references in "%s".', $file));
- }
- }
- if (\in_array($value->getTag(), ['tagged', 'tagged_iterator', 'tagged_locator'], true)) {
- $forLocator = 'tagged_locator' === $value->getTag();
-
- if (\is_array($argument) && isset($argument['tag']) && $argument['tag']) {
- if ($diff = array_diff(array_keys($argument), ['tag', 'index_by', 'default_index_method', 'default_priority_method'])) {
- throw new InvalidArgumentException(sprintf('"!%s" tag contains unsupported key "%s"; supported ones are "tag", "index_by", "default_index_method", and "default_priority_method".', $value->getTag(), implode('"", "', $diff)));
- }
-
- $argument = new TaggedIteratorArgument($argument['tag'], $argument['index_by'] ?? null, $argument['default_index_method'] ?? null, $forLocator, $argument['default_priority_method'] ?? null);
- } elseif (\is_string($argument) && $argument) {
- $argument = new TaggedIteratorArgument($argument, null, null, $forLocator);
- } else {
- throw new InvalidArgumentException(sprintf('"!%s" tags only accept a non empty string or an array with a key "tag" in "%s".', $value->getTag(), $file));
- }
-
- if ($forLocator) {
- $argument = new ServiceLocatorArgument($argument);
- }
-
- return $argument;
- }
- if ('service' === $value->getTag()) {
- if ($isParameter) {
- throw new InvalidArgumentException(sprintf('Using an anonymous service in a parameter is not allowed in "%s".', $file));
- }
-
- $isLoadingInstanceof = $this->isLoadingInstanceof;
- $this->isLoadingInstanceof = false;
- $instanceof = $this->instanceof;
- $this->instanceof = [];
-
- $id = sprintf('.%d_%s', ++$this->anonymousServicesCount, preg_replace('/^.*\\\\/', '', isset($argument['class']) ? $argument['class'] : '').$this->anonymousServicesSuffix);
- $this->parseDefinition($id, $argument, $file, []);
-
- if (!$this->container->hasDefinition($id)) {
- throw new InvalidArgumentException(sprintf('Creating an alias using the tag "!service" is not allowed in "%s".', $file));
- }
-
- $this->container->getDefinition($id)->setPublic(false);
-
- $this->isLoadingInstanceof = $isLoadingInstanceof;
- $this->instanceof = $instanceof;
-
- return new Reference($id);
- }
-
- throw new InvalidArgumentException(sprintf('Unsupported tag "!%s".', $value->getTag()));
- }
-
- if (\is_array($value)) {
- foreach ($value as $k => $v) {
- $value[$k] = $this->resolveServices($v, $file, $isParameter);
- }
- } elseif (\is_string($value) && 0 === strpos($value, '@=')) {
- if (!class_exists(Expression::class)) {
- throw new \LogicException(sprintf('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
- }
-
- return new Expression(substr($value, 2));
- } elseif (\is_string($value) && 0 === strpos($value, '@')) {
- if (0 === strpos($value, '@@')) {
- $value = substr($value, 1);
- $invalidBehavior = null;
- } elseif (0 === strpos($value, '@!')) {
- $value = substr($value, 2);
- $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
- } elseif (0 === strpos($value, '@?')) {
- $value = substr($value, 2);
- $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
- } else {
- $value = substr($value, 1);
- $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- }
-
- if (null !== $invalidBehavior) {
- $value = new Reference($value, $invalidBehavior);
- }
- }
-
- return $value;
- }
-
- /**
- * Loads from Extensions.
- */
- private function loadFromExtensions(array $content)
- {
- foreach ($content as $namespace => $values) {
- if (\in_array($namespace, ['imports', 'parameters', 'services'])) {
- continue;
- }
-
- if (!\is_array($values) && null !== $values) {
- $values = [];
- }
-
- $this->container->loadFromExtension($namespace, $values);
- }
- }
-
- /**
- * Checks the keywords used to define a service.
- */
- private function checkDefinition(string $id, array $definition, string $file)
- {
- if ($this->isLoadingInstanceof) {
- $keywords = self::$instanceofKeywords;
- } elseif (isset($definition['resource']) || isset($definition['namespace'])) {
- $keywords = self::$prototypeKeywords;
- } else {
- $keywords = self::$serviceKeywords;
- }
-
- foreach ($definition as $key => $value) {
- if (!isset($keywords[$key])) {
- throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', $keywords)));
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd
deleted file mode 100644
index 2f745c3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd
+++ /dev/null
@@ -1,305 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<xsd:schema xmlns="http://symfony.com/schema/dic/services"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://symfony.com/schema/dic/services"
- elementFormDefault="qualified">
-
- <xsd:annotation>
- <xsd:documentation><![CDATA[
- Symfony XML Services Schema, version 1.0
- Authors: Fabien Potencier
-
- This defines a way to describe PHP objects (services) and their
- dependencies.
- ]]></xsd:documentation>
- </xsd:annotation>
-
- <xsd:element name="container" type="container" />
-
- <xsd:complexType name="container">
- <xsd:annotation>
- <xsd:documentation><![CDATA[
- The root element of a service file.
- ]]></xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="foreign" />
- <xsd:sequence minOccurs="0">
- <xsd:element name="imports" type="imports" />
- <xsd:group ref="foreign" />
- </xsd:sequence>
- <xsd:sequence minOccurs="0">
- <xsd:element name="parameters" type="parameters" />
- <xsd:group ref="foreign" />
- </xsd:sequence>
- <xsd:sequence minOccurs="0">
- <xsd:element name="services" type="services" />
- <xsd:group ref="foreign" />
- </xsd:sequence>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:group name="foreign">
- <xsd:sequence>
- <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:group>
-
- <xsd:complexType name="services">
- <xsd:annotation>
- <xsd:documentation><![CDATA[
- Enclosing element for the definition of all services
- ]]></xsd:documentation>
- </xsd:annotation>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="service" type="service" minOccurs="1" />
- <xsd:element name="prototype" type="prototype" minOccurs="0" />
- <xsd:element name="defaults" type="defaults" minOccurs="0" maxOccurs="1" />
- <xsd:element name="instanceof" type="instanceof" minOccurs="0" />
- </xsd:choice>
- </xsd:complexType>
-
- <xsd:complexType name="imports">
- <xsd:annotation>
- <xsd:documentation><![CDATA[
- Enclosing element for the import elements
- ]]></xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="1" maxOccurs="unbounded">
- <xsd:element name="import" type="import" />
- </xsd:choice>
- </xsd:complexType>
-
- <xsd:complexType name="import">
- <xsd:annotation>
- <xsd:documentation><![CDATA[
- Import an external resource defining other services or parameters
- ]]></xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="resource" type="xsd:string" use="required" />
- <xsd:attribute name="ignore-errors" type="ignore_errors" />
- <xsd:attribute name="type" type="xsd:string" />
- </xsd:complexType>
-
- <xsd:complexType name="callable">
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="service" type="service" minOccurs="0" maxOccurs="1" />
- </xsd:choice>
- <xsd:attribute name="service" type="xsd:string" />
- <xsd:attribute name="class" type="xsd:string" />
- <xsd:attribute name="method" type="xsd:string" />
- <xsd:attribute name="function" type="xsd:string" />
- </xsd:complexType>
-
- <xsd:complexType name="defaults">
- <xsd:annotation>
- <xsd:documentation><![CDATA[
- Enclosing element for the service definitions' defaults for the current file
- ]]></xsd:documentation>
- </xsd:annotation>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
- </xsd:choice>
- <xsd:attribute name="public" type="boolean" />
- <xsd:attribute name="autowire" type="boolean" />
- <xsd:attribute name="autoconfigure" type="boolean" />
- </xsd:complexType>
-
- <xsd:complexType name="service">
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
- <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
- <xsd:element name="factory" type="callable" minOccurs="0" maxOccurs="1" />
- <xsd:element name="deprecated" type="xsd:string" minOccurs="0" maxOccurs="1" />
- <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:string" />
- <xsd:attribute name="class" type="xsd:string" />
- <xsd:attribute name="shared" type="boolean" />
- <xsd:attribute name="public" type="boolean" />
- <xsd:attribute name="synthetic" type="boolean" />
- <xsd:attribute name="lazy" type="xsd:string" />
- <xsd:attribute name="abstract" type="boolean" />
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="parent" type="xsd:string" />
- <xsd:attribute name="decorates" type="xsd:string" />
- <xsd:attribute name="decoration-on-invalid" type="invalid_decorated_service_sequence" />
- <xsd:attribute name="decoration-inner-name" type="xsd:string" />
- <xsd:attribute name="decoration-priority" type="xsd:integer" />
- <xsd:attribute name="autowire" type="boolean" />
- <xsd:attribute name="autoconfigure" type="boolean" />
- </xsd:complexType>
-
- <xsd:complexType name="instanceof">
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
- <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:string" use="required" />
- <xsd:attribute name="shared" type="boolean" />
- <xsd:attribute name="public" type="boolean" />
- <xsd:attribute name="lazy" type="xsd:string" />
- <xsd:attribute name="autowire" type="boolean" />
- <xsd:attribute name="autoconfigure" type="boolean" />
- </xsd:complexType>
-
- <xsd:complexType name="prototype">
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
- <xsd:element name="factory" type="callable" minOccurs="0" maxOccurs="1" />
- <xsd:element name="deprecated" type="xsd:string" minOccurs="0" maxOccurs="1" />
- <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="exclude" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
- </xsd:choice>
- <xsd:attribute name="namespace" type="xsd:string" use="required" />
- <xsd:attribute name="resource" type="xsd:string" use="required" />
- <xsd:attribute name="exclude" type="xsd:string" />
- <xsd:attribute name="shared" type="boolean" />
- <xsd:attribute name="public" type="boolean" />
- <xsd:attribute name="lazy" type="xsd:string" />
- <xsd:attribute name="abstract" type="boolean" />
- <xsd:attribute name="parent" type="xsd:string" />
- <xsd:attribute name="autowire" type="boolean" />
- <xsd:attribute name="autoconfigure" type="boolean" />
- </xsd:complexType>
-
- <xsd:complexType name="tag">
- <xsd:attribute name="name" type="xsd:string" use="required" />
- <xsd:anyAttribute namespace="##any" processContents="lax" />
- </xsd:complexType>
-
- <xsd:complexType name="parameters">
- <xsd:choice minOccurs="1" maxOccurs="unbounded">
- <xsd:element name="parameter" type="parameter" />
- </xsd:choice>
- <xsd:attribute name="type" type="parameter_type" />
- <xsd:attribute name="key" type="xsd:string" />
- </xsd:complexType>
-
- <xsd:complexType name="parameter" mixed="true">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="parameter" type="parameter" />
- </xsd:choice>
- <xsd:attribute name="type" type="parameter_type" />
- <xsd:attribute name="id" type="xsd:string" />
- <xsd:attribute name="key" type="xsd:string" />
- <xsd:attribute name="on-invalid" type="invalid_sequence" />
- </xsd:complexType>
-
- <xsd:complexType name="property" mixed="true">
- <xsd:choice minOccurs="0">
- <xsd:element name="property" type="property" maxOccurs="unbounded" />
- <xsd:element name="service" type="service" />
- </xsd:choice>
- <xsd:attribute name="type" type="argument_type" />
- <xsd:attribute name="id" type="xsd:string" />
- <xsd:attribute name="key" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="on-invalid" type="invalid_sequence" />
- <xsd:attribute name="tag" type="xsd:string" />
- </xsd:complexType>
-
- <xsd:complexType name="bind" mixed="true">
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="bind" type="argument" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="service" type="service" />
- </xsd:choice>
- <xsd:attribute name="type" type="argument_type" />
- <xsd:attribute name="id" type="xsd:string" />
- <xsd:attribute name="key" type="xsd:string" use="required" />
- <xsd:attribute name="on-invalid" type="invalid_sequence" />
- <xsd:attribute name="method" type="xsd:string" />
- <xsd:attribute name="tag" type="xsd:string" />
- </xsd:complexType>
-
- <xsd:complexType name="argument" mixed="true">
- <xsd:choice minOccurs="0">
- <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
- <xsd:element name="service" type="service" />
- </xsd:choice>
- <xsd:attribute name="type" type="argument_type" />
- <xsd:attribute name="id" type="xsd:string" />
- <xsd:attribute name="key" type="xsd:string" />
- <xsd:attribute name="index" type="xsd:integer" />
- <xsd:attribute name="on-invalid" type="invalid_sequence" />
- <xsd:attribute name="tag" type="xsd:string" />
- <xsd:attribute name="index-by" type="xsd:string" />
- <xsd:attribute name="default-index-method" type="xsd:string" />
- <xsd:attribute name="default-priority-method" type="xsd:string" />
- </xsd:complexType>
-
- <xsd:complexType name="call">
- <xsd:choice minOccurs="0">
- <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
- </xsd:choice>
- <xsd:attribute name="method" type="xsd:string" />
- <xsd:attribute name="returns-clone" type="boolean" />
- </xsd:complexType>
-
- <xsd:simpleType name="parameter_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="collection" />
- <xsd:enumeration value="string" />
- <xsd:enumeration value="constant" />
- <xsd:enumeration value="binary" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="argument_type">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="collection" />
- <xsd:enumeration value="service" />
- <xsd:enumeration value="expression" />
- <xsd:enumeration value="string" />
- <xsd:enumeration value="constant" />
- <xsd:enumeration value="iterator" />
- <xsd:enumeration value="service_locator" />
- <!-- "tagged" is an alias of "tagged_iterator", using "tagged_iterator" is preferred. -->
- <xsd:enumeration value="tagged" />
- <xsd:enumeration value="tagged_iterator" />
- <xsd:enumeration value="tagged_locator" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="ignore_errors">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="(true|false|not_found)" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="invalid_sequence">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="null" />
- <xsd:enumeration value="ignore" />
- <xsd:enumeration value="exception" />
- <xsd:enumeration value="ignore_uninitialized" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="invalid_decorated_service_sequence">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="null" />
- <xsd:enumeration value="ignore" />
- <xsd:enumeration value="exception" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="boolean">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="(%.+%|true|false)" />
- </xsd:restriction>
- </xsd:simpleType>
-</xsd:schema>
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Parameter.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Parameter.php
deleted file mode 100644
index d484ac0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Parameter.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * Parameter represents a parameter reference.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Parameter
-{
- private $id;
-
- public function __construct(string $id)
- {
- $this->id = $id;
- }
-
- /**
- * @return string The parameter key
- */
- public function __toString()
- {
- return $this->id;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php
deleted file mode 100644
index 7671dfc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\ParameterBag;
-
-use Symfony\Component\DependencyInjection\Container;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ContainerBag extends FrozenParameterBag implements ContainerBagInterface
-{
- private $container;
-
- public function __construct(Container $container)
- {
- $this->container = $container;
- }
-
- /**
- * {@inheritdoc}
- */
- public function all()
- {
- return $this->container->getParameterBag()->all();
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($name)
- {
- return $this->container->getParameter($name);
- }
-
- /**
- * {@inheritdoc}
- */
- public function has($name)
- {
- return $this->container->hasParameter($name);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php
deleted file mode 100644
index 1c1227a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\ParameterBag;
-
-use Psr\Container\ContainerInterface;
-use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-
-/**
- * ContainerBagInterface is the interface implemented by objects that manage service container parameters.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface ContainerBagInterface extends ContainerInterface
-{
- /**
- * Gets the service container parameters.
- *
- * @return array An array of parameters
- */
- public function all();
-
- /**
- * Replaces parameter placeholders (%name%) by their values.
- *
- * @param mixed $value A value
- *
- * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
- */
- public function resolveValue($value);
-
- /**
- * Escape parameter placeholders %.
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public function escapeValue($value);
-
- /**
- * Unescape parameter placeholders %.
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public function unescapeValue($value);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php
deleted file mode 100644
index 8724086..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php
+++ /dev/null
@@ -1,173 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\ParameterBag;
-
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class EnvPlaceholderParameterBag extends ParameterBag
-{
- private $envPlaceholderUniquePrefix;
- private $envPlaceholders = [];
- private $unusedEnvPlaceholders = [];
- private $providedTypes = [];
-
- private static $counter = 0;
-
- /**
- * {@inheritdoc}
- */
- public function get($name)
- {
- if (0 === strpos($name, 'env(') && ')' === substr($name, -1) && 'env()' !== $name) {
- $env = substr($name, 4, -1);
-
- if (isset($this->envPlaceholders[$env])) {
- foreach ($this->envPlaceholders[$env] as $placeholder) {
- return $placeholder; // return first result
- }
- }
- if (isset($this->unusedEnvPlaceholders[$env])) {
- foreach ($this->unusedEnvPlaceholders[$env] as $placeholder) {
- return $placeholder; // return first result
- }
- }
- if (!preg_match('/^(?:\w*+:)*+\w++$/', $env)) {
- throw new InvalidArgumentException(sprintf('Invalid %s name: only "word" characters are allowed.', $name));
- }
-
- if ($this->has($name)) {
- $defaultValue = parent::get($name);
-
- if (null !== $defaultValue && !is_scalar($defaultValue)) { // !is_string in 5.0
- //throw new RuntimeException(sprintf('The default value of an env() parameter must be a string or null, but "%s" given to "%s".', \gettype($defaultValue), $name));
- throw new RuntimeException(sprintf('The default value of an env() parameter must be scalar or null, but "%s" given to "%s".', \gettype($defaultValue), $name));
- } elseif (is_scalar($defaultValue) && !\is_string($defaultValue)) {
- @trigger_error(sprintf('A non-string default value of an env() parameter is deprecated since 4.3, cast "%s" to string instead.', $name), E_USER_DEPRECATED);
- }
- }
-
- $uniqueName = md5($name.'_'.self::$counter++);
- $placeholder = sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), str_replace(':', '_', $env), $uniqueName);
- $this->envPlaceholders[$env][$placeholder] = $placeholder;
-
- return $placeholder;
- }
-
- return parent::get($name);
- }
-
- /**
- * Gets the common env placeholder prefix for env vars created by this bag.
- */
- public function getEnvPlaceholderUniquePrefix(): string
- {
- if (null === $this->envPlaceholderUniquePrefix) {
- $reproducibleEntropy = unserialize(serialize($this->parameters));
- array_walk_recursive($reproducibleEntropy, function (&$v) { $v = null; });
- $this->envPlaceholderUniquePrefix = 'env_'.substr(md5(serialize($reproducibleEntropy)), -16);
- }
-
- return $this->envPlaceholderUniquePrefix;
- }
-
- /**
- * Returns the map of env vars used in the resolved parameter values to their placeholders.
- *
- * @return string[][] A map of env var names to their placeholders
- */
- public function getEnvPlaceholders()
- {
- return $this->envPlaceholders;
- }
-
- public function getUnusedEnvPlaceholders(): array
- {
- return $this->unusedEnvPlaceholders;
- }
-
- public function clearUnusedEnvPlaceholders()
- {
- $this->unusedEnvPlaceholders = [];
- }
-
- /**
- * Merges the env placeholders of another EnvPlaceholderParameterBag.
- */
- public function mergeEnvPlaceholders(self $bag)
- {
- if ($newPlaceholders = $bag->getEnvPlaceholders()) {
- $this->envPlaceholders += $newPlaceholders;
-
- foreach ($newPlaceholders as $env => $placeholders) {
- $this->envPlaceholders[$env] += $placeholders;
- }
- }
-
- if ($newUnusedPlaceholders = $bag->getUnusedEnvPlaceholders()) {
- $this->unusedEnvPlaceholders += $newUnusedPlaceholders;
-
- foreach ($newUnusedPlaceholders as $env => $placeholders) {
- $this->unusedEnvPlaceholders[$env] += $placeholders;
- }
- }
- }
-
- /**
- * Maps env prefixes to their corresponding PHP types.
- */
- public function setProvidedTypes(array $providedTypes)
- {
- $this->providedTypes = $providedTypes;
- }
-
- /**
- * Gets the PHP types corresponding to env() parameter prefixes.
- *
- * @return string[][]
- */
- public function getProvidedTypes()
- {
- return $this->providedTypes;
- }
-
- /**
- * {@inheritdoc}
- */
- public function resolve()
- {
- if ($this->resolved) {
- return;
- }
- parent::resolve();
-
- foreach ($this->envPlaceholders as $env => $placeholders) {
- if (!$this->has($name = "env($env)")) {
- continue;
- }
- if (is_numeric($default = $this->parameters[$name])) {
- if (!\is_string($default)) {
- @trigger_error(sprintf('A non-string default value of env parameter "%s" is deprecated since 4.3, cast it to string instead.', $env), E_USER_DEPRECATED);
- }
- $this->parameters[$name] = (string) $default;
- } elseif (null !== $default && !is_scalar($default)) { // !is_string in 5.0
- //throw new RuntimeException(sprintf('The default value of env parameter "%s" must be a string or null, %s given.', $env, \gettype($default)));
- throw new RuntimeException(sprintf('The default value of env parameter "%s" must be scalar or null, %s given.', $env, \gettype($default)));
- } elseif (is_scalar($default) && !\is_string($default)) {
- @trigger_error(sprintf('A non-string default value of env parameter "%s" is deprecated since 4.3, cast it to string instead.', $env), E_USER_DEPRECATED);
- }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
deleted file mode 100644
index a519993..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\ParameterBag;
-
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-
-/**
- * Holds read-only parameters.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class FrozenParameterBag extends ParameterBag
-{
- /**
- * For performance reasons, the constructor assumes that
- * all keys are already lowercased.
- *
- * This is always the case when used internally.
- *
- * @param array $parameters An array of parameters
- */
- public function __construct(array $parameters = [])
- {
- $this->parameters = $parameters;
- $this->resolved = true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function clear()
- {
- throw new LogicException('Impossible to call clear() on a frozen ParameterBag.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function add(array $parameters)
- {
- throw new LogicException('Impossible to call add() on a frozen ParameterBag.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function set($name, $value)
- {
- throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
- }
-
- /**
- * {@inheritdoc}
- */
- public function remove($name)
- {
- throw new LogicException('Impossible to call remove() on a frozen ParameterBag.');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php
deleted file mode 100644
index 48887c3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php
+++ /dev/null
@@ -1,289 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\ParameterBag;
-
-use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-
-/**
- * Holds parameters.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ParameterBag implements ParameterBagInterface
-{
- protected $parameters = [];
- protected $resolved = false;
-
- /**
- * @param array $parameters An array of parameters
- */
- public function __construct(array $parameters = [])
- {
- $this->add($parameters);
- }
-
- /**
- * Clears all parameters.
- */
- public function clear()
- {
- $this->parameters = [];
- }
-
- /**
- * Adds parameters to the service container parameters.
- *
- * @param array $parameters An array of parameters
- */
- public function add(array $parameters)
- {
- foreach ($parameters as $key => $value) {
- $this->set($key, $value);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function all()
- {
- return $this->parameters;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($name)
- {
- $name = (string) $name;
-
- if (!\array_key_exists($name, $this->parameters)) {
- if (!$name) {
- throw new ParameterNotFoundException($name);
- }
-
- $alternatives = [];
- foreach ($this->parameters as $key => $parameterValue) {
- $lev = levenshtein($name, $key);
- if ($lev <= \strlen($name) / 3 || false !== strpos($key, $name)) {
- $alternatives[] = $key;
- }
- }
-
- $nonNestedAlternative = null;
- if (!\count($alternatives) && false !== strpos($name, '.')) {
- $namePartsLength = array_map('strlen', explode('.', $name));
- $key = substr($name, 0, -1 * (1 + array_pop($namePartsLength)));
- while (\count($namePartsLength)) {
- if ($this->has($key)) {
- if (\is_array($this->get($key))) {
- $nonNestedAlternative = $key;
- }
- break;
- }
-
- $key = substr($key, 0, -1 * (1 + array_pop($namePartsLength)));
- }
- }
-
- throw new ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative);
- }
-
- return $this->parameters[$name];
- }
-
- /**
- * Sets a service container parameter.
- *
- * @param string $name The parameter name
- * @param mixed $value The parameter value
- */
- public function set($name, $value)
- {
- $this->parameters[(string) $name] = $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function has($name)
- {
- return \array_key_exists((string) $name, $this->parameters);
- }
-
- /**
- * Removes a parameter.
- *
- * @param string $name The parameter name
- */
- public function remove($name)
- {
- unset($this->parameters[(string) $name]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function resolve()
- {
- if ($this->resolved) {
- return;
- }
-
- $parameters = [];
- foreach ($this->parameters as $key => $value) {
- try {
- $value = $this->resolveValue($value);
- $parameters[$key] = $this->unescapeValue($value);
- } catch (ParameterNotFoundException $e) {
- $e->setSourceKey($key);
-
- throw $e;
- }
- }
-
- $this->parameters = $parameters;
- $this->resolved = true;
- }
-
- /**
- * Replaces parameter placeholders (%name%) by their values.
- *
- * @param mixed $value A value
- * @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
- *
- * @return mixed The resolved value
- *
- * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
- * @throws ParameterCircularReferenceException if a circular reference if detected
- * @throws RuntimeException when a given parameter has a type problem
- */
- public function resolveValue($value, array $resolving = [])
- {
- if (\is_array($value)) {
- $args = [];
- foreach ($value as $k => $v) {
- $args[\is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving);
- }
-
- return $args;
- }
-
- if (!\is_string($value) || 2 > \strlen($value)) {
- return $value;
- }
-
- return $this->resolveString($value, $resolving);
- }
-
- /**
- * Resolves parameters inside a string.
- *
- * @param string $value The string to resolve
- * @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
- *
- * @return mixed The resolved string
- *
- * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
- * @throws ParameterCircularReferenceException if a circular reference if detected
- * @throws RuntimeException when a given parameter has a type problem
- */
- public function resolveString($value, array $resolving = [])
- {
- // we do this to deal with non string values (Boolean, integer, ...)
- // as the preg_replace_callback throw an exception when trying
- // a non-string in a parameter value
- if (preg_match('/^%([^%\s]+)%$/', $value, $match)) {
- $key = $match[1];
-
- if (isset($resolving[$key])) {
- throw new ParameterCircularReferenceException(array_keys($resolving));
- }
-
- $resolving[$key] = true;
-
- return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving);
- }
-
- return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($resolving, $value) {
- // skip %%
- if (!isset($match[1])) {
- return '%%';
- }
-
- $key = $match[1];
- if (isset($resolving[$key])) {
- throw new ParameterCircularReferenceException(array_keys($resolving));
- }
-
- $resolved = $this->get($key);
-
- if (!\is_string($resolved) && !is_numeric($resolved)) {
- throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type %s inside string value "%s".', $key, \gettype($resolved), $value));
- }
-
- $resolved = (string) $resolved;
- $resolving[$key] = true;
-
- return $this->isResolved() ? $resolved : $this->resolveString($resolved, $resolving);
- }, $value);
- }
-
- public function isResolved()
- {
- return $this->resolved;
- }
-
- /**
- * {@inheritdoc}
- */
- public function escapeValue($value)
- {
- if (\is_string($value)) {
- return str_replace('%', '%%', $value);
- }
-
- if (\is_array($value)) {
- $result = [];
- foreach ($value as $k => $v) {
- $result[$k] = $this->escapeValue($v);
- }
-
- return $result;
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function unescapeValue($value)
- {
- if (\is_string($value)) {
- return str_replace('%%', '%', $value);
- }
-
- if (\is_array($value)) {
- $result = [];
- foreach ($value as $k => $v) {
- $result[$k] = $this->unescapeValue($v);
- }
-
- return $result;
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php
deleted file mode 100644
index 6a4e0fa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection\ParameterBag;
-
-use Symfony\Component\DependencyInjection\Exception\LogicException;
-use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-
-/**
- * ParameterBagInterface is the interface implemented by objects that manage service container parameters.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface ParameterBagInterface
-{
- /**
- * Clears all parameters.
- *
- * @throws LogicException if the ParameterBagInterface can not be cleared
- */
- public function clear();
-
- /**
- * Adds parameters to the service container parameters.
- *
- * @param array $parameters An array of parameters
- *
- * @throws LogicException if the parameter can not be added
- */
- public function add(array $parameters);
-
- /**
- * Gets the service container parameters.
- *
- * @return array An array of parameters
- */
- public function all();
-
- /**
- * Gets a service container parameter.
- *
- * @param string $name The parameter name
- *
- * @return mixed The parameter value
- *
- * @throws ParameterNotFoundException if the parameter is not defined
- */
- public function get($name);
-
- /**
- * Removes a parameter.
- *
- * @param string $name The parameter name
- */
- public function remove($name);
-
- /**
- * Sets a service container parameter.
- *
- * @param string $name The parameter name
- * @param mixed $value The parameter value
- *
- * @throws LogicException if the parameter can not be set
- */
- public function set($name, $value);
-
- /**
- * Returns true if a parameter name is defined.
- *
- * @param string $name The parameter name
- *
- * @return bool true if the parameter name is defined, false otherwise
- */
- public function has($name);
-
- /**
- * Replaces parameter placeholders (%name%) by their values for all parameters.
- */
- public function resolve();
-
- /**
- * Replaces parameter placeholders (%name%) by their values.
- *
- * @param mixed $value A value
- *
- * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
- */
- public function resolveValue($value);
-
- /**
- * Escape parameter placeholders %.
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public function escapeValue($value);
-
- /**
- * Unescape parameter placeholders %.
- *
- * @param mixed $value
- *
- * @return mixed
- */
- public function unescapeValue($value);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/README.md b/srcs/phpmyadmin/vendor/symfony/dependency-injection/README.md
deleted file mode 100644
index 932647f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-DependencyInjection Component
-=============================
-
-The DependencyInjection component allows you to standardize and centralize the
-way objects are constructed in your application.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/dependency_injection/index.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Reference.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Reference.php
deleted file mode 100644
index c13cf6f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Reference.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * Reference represents a service reference.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Reference
-{
- private $id;
- private $invalidBehavior;
-
- public function __construct(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
- {
- $this->id = $id;
- $this->invalidBehavior = $invalidBehavior;
- }
-
- /**
- * @return string The service identifier
- */
- public function __toString()
- {
- return $this->id;
- }
-
- /**
- * Returns the behavior to be used when the service does not exist.
- *
- * @return int
- */
- public function getInvalidBehavior()
- {
- return $this->invalidBehavior;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ResettableContainerInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ResettableContainerInterface.php
deleted file mode 100644
index b9714d2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ResettableContainerInterface.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * ResettableContainerInterface defines additional resetting functionality
- * for containers, allowing to release shared services when the container is
- * not needed anymore.
- *
- * @author Christophe Coevoet <stof@notk.org>
- *
- * @deprecated since Symfony 4.2, use "Symfony\Contracts\Service\ResetInterface" instead.
- */
-interface ResettableContainerInterface extends ContainerInterface, ResetInterface
-{
- /**
- * Resets shared services from the container.
- *
- * The container is not intended to be used again after being reset in a normal workflow. This method is
- * meant as a way to release references for ref-counting.
- * A subsequent call to ContainerInterface::get will recreate a new instance of the shared service.
- */
- public function reset();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ReverseContainer.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ReverseContainer.php
deleted file mode 100644
index 076e624..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ReverseContainer.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Psr\Container\ContainerInterface;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-
-/**
- * Turns public and "container.reversible" services back to their ids.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-final class ReverseContainer
-{
- private $serviceContainer;
- private $reversibleLocator;
- private $tagName;
- private $getServiceId;
-
- public function __construct(Container $serviceContainer, ContainerInterface $reversibleLocator, string $tagName = 'container.reversible')
- {
- $this->serviceContainer = $serviceContainer;
- $this->reversibleLocator = $reversibleLocator;
- $this->tagName = $tagName;
- $this->getServiceId = \Closure::bind(function ($service): ?string {
- return array_search($service, $this->services, true) ?: array_search($service, $this->privates, true) ?: null;
- }, $serviceContainer, Container::class);
- }
-
- /**
- * Returns the id of the passed object when it exists as a service.
- *
- * To be reversible, services need to be either public or be tagged with "container.reversible".
- *
- * @param object $service
- */
- public function getId($service): ?string
- {
- if ($this->serviceContainer === $service) {
- return 'service_container';
- }
-
- if (null === $id = ($this->getServiceId)($service)) {
- return null;
- }
-
- if ($this->serviceContainer->has($id) || $this->reversibleLocator->has($id)) {
- return $id;
- }
-
- return null;
- }
-
- /**
- * @return object
- *
- * @throws ServiceNotFoundException When the service is not reversible
- */
- public function getService(string $id)
- {
- if ($this->serviceContainer->has($id)) {
- return $this->serviceContainer->get($id);
- }
-
- if ($this->reversibleLocator->has($id)) {
- return $this->reversibleLocator->get($id);
- }
-
- if (isset($this->serviceContainer->getRemovedIds()[$id])) {
- throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is private and cannot be accessed by reference. You should either make it public, or tag it as "%s".', $id, $this->tagName));
- }
-
- // will throw a ServiceNotFoundException
- $this->serviceContainer->get($id);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceLocator.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceLocator.php
deleted file mode 100644
index e379f3b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceLocator.php
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Psr\Container\ContainerExceptionInterface;
-use Psr\Container\NotFoundExceptionInterface;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException;
-use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
-use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-use Symfony\Contracts\Service\ServiceLocatorTrait;
-use Symfony\Contracts\Service\ServiceProviderInterface;
-use Symfony\Contracts\Service\ServiceSubscriberInterface;
-
-/**
- * @author Robin Chalas <robin.chalas@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ServiceLocator implements ServiceProviderInterface
-{
- use ServiceLocatorTrait {
- get as private doGet;
- }
-
- private $externalId;
- private $container;
-
- public function get($id)
- {
- if (!$this->externalId) {
- return $this->doGet($id);
- }
-
- try {
- return $this->doGet($id);
- } catch (RuntimeException $e) {
- $what = sprintf('service "%s" required by "%s"', $id, $this->externalId);
- $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage());
-
- if ($e->getMessage() === $message) {
- $message = sprintf('Cannot resolve %s: %s', $what, $message);
- }
-
- $r = new \ReflectionProperty($e, 'message');
- $r->setAccessible(true);
- $r->setValue($e, $message);
-
- throw $e;
- }
- }
-
- public function __invoke($id)
- {
- return isset($this->factories[$id]) ? $this->get($id) : null;
- }
-
- /**
- * @internal
- *
- * @return static
- */
- public function withContext(string $externalId, Container $container)
- {
- $locator = clone $this;
- $locator->externalId = $externalId;
- $locator->container = $container;
-
- return $locator;
- }
-
- private function createNotFoundException(string $id): NotFoundExceptionInterface
- {
- if ($this->loading) {
- $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $this->formatAlternatives());
-
- return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], $msg);
- }
-
- $class = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 4);
- $class = isset($class[3]['object']) ? \get_class($class[3]['object']) : null;
- $externalId = $this->externalId ?: $class;
-
- $msg = [];
- $msg[] = sprintf('Service "%s" not found:', $id);
-
- if (!$this->container) {
- $class = null;
- } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) {
- $msg[] = 'even though it exists in the app\'s container,';
- } else {
- try {
- $this->container->get($id);
- $class = null;
- } catch (ServiceNotFoundException $e) {
- if ($e->getAlternatives()) {
- $msg[] = sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or'));
- } else {
- $class = null;
- }
- }
- }
- if ($externalId) {
- $msg[] = sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives());
- } else {
- $msg[] = sprintf('the current service locator %s', $this->formatAlternatives());
- }
-
- if (!$class) {
- // no-op
- } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) {
- $msg[] = sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class));
- } else {
- $msg[] = 'Try using dependency injection instead.';
- }
-
- return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], implode(' ', $msg));
- }
-
- private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface
- {
- return new ServiceCircularReferenceException($id, $path);
- }
-
- private function formatAlternatives(array $alternatives = null, string $separator = 'and'): string
- {
- $format = '"%s"%s';
- if (null === $alternatives) {
- if (!$alternatives = array_keys($this->factories)) {
- return 'is empty...';
- }
- $format = sprintf('only knows about the %s service%s.', $format, 1 < \count($alternatives) ? 's' : '');
- }
- $last = array_pop($alternatives);
-
- return sprintf($format, $alternatives ? implode('", "', $alternatives) : $last, $alternatives ? sprintf(' %s "%s"', $separator, $last) : '');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceSubscriberInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceSubscriberInterface.php
deleted file mode 100644
index a3b6ba7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/ServiceSubscriberInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-use Symfony\Contracts\Service\ServiceSubscriberInterface as BaseServiceSubscriberInterface;
-
-/**
- * {@inheritdoc}
- *
- * @deprecated since Symfony 4.2, use Symfony\Contracts\Service\ServiceSubscriberInterface instead.
- */
-interface ServiceSubscriberInterface extends BaseServiceSubscriberInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/TaggedContainerInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/TaggedContainerInterface.php
deleted file mode 100644
index 90b297f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/TaggedContainerInterface.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * TaggedContainerInterface is the interface implemented when a container knows how to deals with tags.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface TaggedContainerInterface extends ContainerInterface
-{
- /**
- * Returns service ids for a given tag.
- *
- * @param string $name The tag name
- *
- * @return array An array of tags
- */
- public function findTaggedServiceIds($name);
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/TypedReference.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/TypedReference.php
deleted file mode 100644
index 56a8788..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/TypedReference.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * Represents a PHP type-hinted service reference.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TypedReference extends Reference
-{
- private $type;
- private $name;
- private $requiringClass;
-
- /**
- * @param string $id The service identifier
- * @param string $type The PHP type of the identified service
- * @param int $invalidBehavior The behavior when the service does not exist
- * @param string $name The name of the argument targeting the service
- */
- public function __construct(string $id, string $type, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name = null)
- {
- if (\is_string($invalidBehavior ?? '') || \is_int($name)) {
- @trigger_error(sprintf('The $requiringClass argument of "%s()" is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
-
- $this->requiringClass = $invalidBehavior;
- $invalidBehavior = 3 < \func_num_args() ? func_get_arg(3) : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
- } else {
- $this->name = $type === $id ? $name : null;
- }
- parent::__construct($id, $invalidBehavior);
- $this->type = $type;
- }
-
- public function getType()
- {
- return $this->type;
- }
-
- public function getName(): ?string
- {
- return $this->name;
- }
-
- /**
- * @deprecated since Symfony 4.1
- */
- public function getRequiringClass()
- {
- @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
-
- return $this->requiringClass ?? '';
- }
-
- /**
- * @deprecated since Symfony 4.1
- */
- public function canBeAutoregistered()
- {
- @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
-
- return $this->requiringClass && (false !== $i = strpos($this->type, '\\')) && 0 === strncasecmp($this->type, $this->requiringClass, 1 + $i);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Variable.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Variable.php
deleted file mode 100644
index 21d33eb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Variable.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\DependencyInjection;
-
-/**
- * Represents a variable.
- *
- * $var = new Variable('a');
- *
- * will be dumped as
- *
- * $a
- *
- * by the PHP dumper.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- */
-class Variable
-{
- private $name;
-
- public function __construct(string $name)
- {
- $this->name = $name;
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- return $this->name;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/composer.json b/srcs/phpmyadmin/vendor/symfony/dependency-injection/composer.json
deleted file mode 100644
index df1727b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/dependency-injection/composer.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "symfony/dependency-injection",
- "type": "library",
- "description": "Symfony DependencyInjection Component",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "psr/container": "^1.0",
- "symfony/service-contracts": "^1.1.6|^2"
- },
- "require-dev": {
- "symfony/yaml": "^3.4|^4.0|^5.0",
- "symfony/config": "^4.3",
- "symfony/expression-language": "^3.4|^4.0|^5.0"
- },
- "suggest": {
- "symfony/yaml": "",
- "symfony/config": "",
- "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
- "symfony/expression-language": "For using expressions in service container configuration",
- "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them"
- },
- "conflict": {
- "symfony/config": "<4.3|>=5.0",
- "symfony/finder": "<3.4",
- "symfony/proxy-manager-bridge": "<3.4",
- "symfony/yaml": "<3.4"
- },
- "provide": {
- "psr/container-implementation": "1.0",
- "symfony/service-implementation": "1.0"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/expression-language/CHANGELOG.md
deleted file mode 100644
index 6c50b2e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/CHANGELOG.md
+++ /dev/null
@@ -1,20 +0,0 @@
-CHANGELOG
-=========
-
-4.0.0
------
-
- * the first argument of the `ExpressionLanguage` constructor must be an instance
- of `CacheItemPoolInterface`
- * removed the `ArrayParserCache` and `ParserCacheAdapter` classes
- * removed the `ParserCacheInterface`
-
-2.6.0
------
-
- * Added ExpressionFunction and ExpressionFunctionProviderInterface
-
-2.4.0
------
-
- * added the component
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Compiler.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Compiler.php
deleted file mode 100644
index 604f04c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Compiler.php
+++ /dev/null
@@ -1,148 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * Compiles a node to PHP code.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Compiler implements ResetInterface
-{
- private $source;
- private $functions;
-
- public function __construct(array $functions)
- {
- $this->functions = $functions;
- }
-
- public function getFunction($name)
- {
- return $this->functions[$name];
- }
-
- /**
- * Gets the current PHP code after compilation.
- *
- * @return string The PHP code
- */
- public function getSource()
- {
- return $this->source;
- }
-
- public function reset()
- {
- $this->source = '';
-
- return $this;
- }
-
- /**
- * Compiles a node.
- *
- * @return $this
- */
- public function compile(Node\Node $node)
- {
- $node->compile($this);
-
- return $this;
- }
-
- public function subcompile(Node\Node $node)
- {
- $current = $this->source;
- $this->source = '';
-
- $node->compile($this);
-
- $source = $this->source;
- $this->source = $current;
-
- return $source;
- }
-
- /**
- * Adds a raw string to the compiled code.
- *
- * @param string $string The string
- *
- * @return $this
- */
- public function raw($string)
- {
- $this->source .= $string;
-
- return $this;
- }
-
- /**
- * Adds a quoted string to the compiled code.
- *
- * @param string $value The string
- *
- * @return $this
- */
- public function string($value)
- {
- $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\"));
-
- return $this;
- }
-
- /**
- * Returns a PHP representation of a given value.
- *
- * @param mixed $value The value to convert
- *
- * @return $this
- */
- public function repr($value)
- {
- if (\is_int($value) || \is_float($value)) {
- if (false !== $locale = setlocale(LC_NUMERIC, 0)) {
- setlocale(LC_NUMERIC, 'C');
- }
-
- $this->raw($value);
-
- if (false !== $locale) {
- setlocale(LC_NUMERIC, $locale);
- }
- } elseif (null === $value) {
- $this->raw('null');
- } elseif (\is_bool($value)) {
- $this->raw($value ? 'true' : 'false');
- } elseif (\is_array($value)) {
- $this->raw('[');
- $first = true;
- foreach ($value as $key => $value) {
- if (!$first) {
- $this->raw(', ');
- }
- $first = false;
- $this->repr($key);
- $this->raw(' => ');
- $this->repr($value);
- }
- $this->raw(']');
- } else {
- $this->string($value);
- }
-
- return $this;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Expression.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Expression.php
deleted file mode 100644
index 59d0e2a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Expression.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Represents an expression.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Expression
-{
- protected $expression;
-
- public function __construct(string $expression)
- {
- $this->expression = $expression;
- }
-
- /**
- * Gets the expression.
- *
- * @return string The expression
- */
- public function __toString()
- {
- return $this->expression;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunction.php b/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunction.php
deleted file mode 100644
index 2bc91e8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunction.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Represents a function that can be used in an expression.
- *
- * A function is defined by two PHP callables. The callables are used
- * by the language to compile and/or evaluate the function.
- *
- * The "compiler" function is used at compilation time and must return a
- * PHP representation of the function call (it receives the function
- * arguments as arguments).
- *
- * The "evaluator" function is used for expression evaluation and must return
- * the value of the function call based on the values defined for the
- * expression (it receives the values as a first argument and the function
- * arguments as remaining arguments).
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ExpressionFunction
-{
- private $name;
- private $compiler;
- private $evaluator;
-
- /**
- * @param string $name The function name
- * @param callable $compiler A callable able to compile the function
- * @param callable $evaluator A callable able to evaluate the function
- */
- public function __construct(string $name, callable $compiler, callable $evaluator)
- {
- $this->name = $name;
- $this->compiler = $compiler;
- $this->evaluator = $evaluator;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function getCompiler()
- {
- return $this->compiler;
- }
-
- public function getEvaluator()
- {
- return $this->evaluator;
- }
-
- /**
- * Creates an ExpressionFunction from a PHP function name.
- *
- * @param string $phpFunctionName The PHP function name
- * @param string|null $expressionFunctionName The expression function name (default: same than the PHP function name)
- *
- * @return self
- *
- * @throws \InvalidArgumentException if given PHP function name does not exist
- * @throws \InvalidArgumentException if given PHP function name is in namespace
- * and expression function name is not defined
- */
- public static function fromPhp($phpFunctionName, $expressionFunctionName = null)
- {
- $phpFunctionName = ltrim($phpFunctionName, '\\');
- if (!\function_exists($phpFunctionName)) {
- throw new \InvalidArgumentException(sprintf('PHP function "%s" does not exist.', $phpFunctionName));
- }
-
- $parts = explode('\\', $phpFunctionName);
- if (!$expressionFunctionName && \count($parts) > 1) {
- throw new \InvalidArgumentException(sprintf('An expression function name must be defined when PHP function "%s" is namespaced.', $phpFunctionName));
- }
-
- $compiler = function () use ($phpFunctionName) {
- return sprintf('\%s(%s)', $phpFunctionName, implode(', ', \func_get_args()));
- };
-
- $evaluator = function () use ($phpFunctionName) {
- return $phpFunctionName(...\array_slice(\func_get_args(), 1));
- };
-
- return new self($expressionFunctionName ?: end($parts), $compiler, $evaluator);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunctionProviderInterface.php b/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunctionProviderInterface.php
deleted file mode 100644
index 414b013..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionFunctionProviderInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface ExpressionFunctionProviderInterface
-{
- /**
- * @return ExpressionFunction[] An array of Function instances
- */
- public function getFunctions();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionLanguage.php b/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionLanguage.php
deleted file mode 100644
index a257ec7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/ExpressionLanguage.php
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-use Psr\Cache\CacheItemPoolInterface;
-use Symfony\Component\Cache\Adapter\ArrayAdapter;
-
-/**
- * Allows to compile and evaluate expressions written in your own DSL.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ExpressionLanguage
-{
- private $cache;
- private $lexer;
- private $parser;
- private $compiler;
-
- protected $functions = [];
-
- /**
- * @param ExpressionFunctionProviderInterface[] $providers
- */
- public function __construct(CacheItemPoolInterface $cache = null, array $providers = [])
- {
- $this->cache = $cache ?: new ArrayAdapter();
- $this->registerFunctions();
- foreach ($providers as $provider) {
- $this->registerProvider($provider);
- }
- }
-
- /**
- * Compiles an expression source code.
- *
- * @param Expression|string $expression The expression to compile
- * @param array $names An array of valid names
- *
- * @return string The compiled PHP source code
- */
- public function compile($expression, $names = [])
- {
- return $this->getCompiler()->compile($this->parse($expression, $names)->getNodes())->getSource();
- }
-
- /**
- * Evaluate an expression.
- *
- * @param Expression|string $expression The expression to compile
- * @param array $values An array of values
- *
- * @return mixed The result of the evaluation of the expression
- */
- public function evaluate($expression, $values = [])
- {
- return $this->parse($expression, array_keys($values))->getNodes()->evaluate($this->functions, $values);
- }
-
- /**
- * Parses an expression.
- *
- * @param Expression|string $expression The expression to parse
- * @param array $names An array of valid names
- *
- * @return ParsedExpression A ParsedExpression instance
- */
- public function parse($expression, $names)
- {
- if ($expression instanceof ParsedExpression) {
- return $expression;
- }
-
- asort($names);
- $cacheKeyItems = [];
-
- foreach ($names as $nameKey => $name) {
- $cacheKeyItems[] = \is_int($nameKey) ? $name : $nameKey.':'.$name;
- }
-
- $cacheItem = $this->cache->getItem(rawurlencode($expression.'//'.implode('|', $cacheKeyItems)));
-
- if (null === $parsedExpression = $cacheItem->get()) {
- $nodes = $this->getParser()->parse($this->getLexer()->tokenize((string) $expression), $names);
- $parsedExpression = new ParsedExpression((string) $expression, $nodes);
-
- $cacheItem->set($parsedExpression);
- $this->cache->save($cacheItem);
- }
-
- return $parsedExpression;
- }
-
- /**
- * Registers a function.
- *
- * @param string $name The function name
- * @param callable $compiler A callable able to compile the function
- * @param callable $evaluator A callable able to evaluate the function
- *
- * @throws \LogicException when registering a function after calling evaluate(), compile() or parse()
- *
- * @see ExpressionFunction
- */
- public function register($name, callable $compiler, callable $evaluator)
- {
- if (null !== $this->parser) {
- throw new \LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.');
- }
-
- $this->functions[$name] = ['compiler' => $compiler, 'evaluator' => $evaluator];
- }
-
- public function addFunction(ExpressionFunction $function)
- {
- $this->register($function->getName(), $function->getCompiler(), $function->getEvaluator());
- }
-
- public function registerProvider(ExpressionFunctionProviderInterface $provider)
- {
- foreach ($provider->getFunctions() as $function) {
- $this->addFunction($function);
- }
- }
-
- protected function registerFunctions()
- {
- $this->addFunction(ExpressionFunction::fromPhp('constant'));
- }
-
- private function getLexer(): Lexer
- {
- if (null === $this->lexer) {
- $this->lexer = new Lexer();
- }
-
- return $this->lexer;
- }
-
- private function getParser(): Parser
- {
- if (null === $this->parser) {
- $this->parser = new Parser($this->functions);
- }
-
- return $this->parser;
- }
-
- private function getCompiler(): Compiler
- {
- if (null === $this->compiler) {
- $this->compiler = new Compiler($this->functions);
- }
-
- return $this->compiler->reset();
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/LICENSE b/srcs/phpmyadmin/vendor/symfony/expression-language/LICENSE
deleted file mode 100644
index a677f43..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Lexer.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Lexer.php
deleted file mode 100644
index 95b9070..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Lexer.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Lexes an expression.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Lexer
-{
- /**
- * Tokenizes an expression.
- *
- * @param string $expression The expression to tokenize
- *
- * @return TokenStream A token stream instance
- *
- * @throws SyntaxError
- */
- public function tokenize($expression)
- {
- $expression = str_replace(["\r", "\n", "\t", "\v", "\f"], ' ', $expression);
- $cursor = 0;
- $tokens = [];
- $brackets = [];
- $end = \strlen($expression);
-
- while ($cursor < $end) {
- if (' ' == $expression[$cursor]) {
- ++$cursor;
-
- continue;
- }
-
- if (preg_match('/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A', $expression, $match, 0, $cursor)) {
- // numbers
- $number = (float) $match[0]; // floats
- if (preg_match('/^[0-9]+$/', $match[0]) && $number <= PHP_INT_MAX) {
- $number = (int) $match[0]; // integers lower than the maximum
- }
- $tokens[] = new Token(Token::NUMBER_TYPE, $number, $cursor + 1);
- $cursor += \strlen($match[0]);
- } elseif (false !== strpos('([{', $expression[$cursor])) {
- // opening bracket
- $brackets[] = [$expression[$cursor], $cursor];
-
- $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
- ++$cursor;
- } elseif (false !== strpos(')]}', $expression[$cursor])) {
- // closing bracket
- if (empty($brackets)) {
- throw new SyntaxError(sprintf('Unexpected "%s"', $expression[$cursor]), $cursor, $expression);
- }
-
- list($expect, $cur) = array_pop($brackets);
- if ($expression[$cursor] != strtr($expect, '([{', ')]}')) {
- throw new SyntaxError(sprintf('Unclosed "%s"', $expect), $cur, $expression);
- }
-
- $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
- ++$cursor;
- } elseif (preg_match('/"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As', $expression, $match, 0, $cursor)) {
- // strings
- $tokens[] = new Token(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)), $cursor + 1);
- $cursor += \strlen($match[0]);
- } elseif (preg_match('/not in(?=[\s(])|\!\=\=|not(?=[\s(])|and(?=[\s(])|\=\=\=|\>\=|or(?=[\s(])|\<\=|\*\*|\.\.|in(?=[\s(])|&&|\|\||matches|\=\=|\!\=|\*|~|%|\/|\>|\||\!|\^|&|\+|\<|\-/A', $expression, $match, 0, $cursor)) {
- // operators
- $tokens[] = new Token(Token::OPERATOR_TYPE, $match[0], $cursor + 1);
- $cursor += \strlen($match[0]);
- } elseif (false !== strpos('.,?:', $expression[$cursor])) {
- // punctuation
- $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
- ++$cursor;
- } elseif (preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A', $expression, $match, 0, $cursor)) {
- // names
- $tokens[] = new Token(Token::NAME_TYPE, $match[0], $cursor + 1);
- $cursor += \strlen($match[0]);
- } else {
- // unlexable
- throw new SyntaxError(sprintf('Unexpected character "%s"', $expression[$cursor]), $cursor, $expression);
- }
- }
-
- $tokens[] = new Token(Token::EOF_TYPE, null, $cursor + 1);
-
- if (!empty($brackets)) {
- list($expect, $cur) = array_pop($brackets);
- throw new SyntaxError(sprintf('Unclosed "%s"', $expect), $cur, $expression);
- }
-
- return new TokenStream($tokens, $expression);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArgumentsNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArgumentsNode.php
deleted file mode 100644
index e9849a4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArgumentsNode.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class ArgumentsNode extends ArrayNode
-{
- public function compile(Compiler $compiler)
- {
- $this->compileArguments($compiler, false);
- }
-
- public function toArray()
- {
- $array = [];
-
- foreach ($this->getKeyValuePairs() as $pair) {
- $array[] = $pair['value'];
- $array[] = ', ';
- }
- array_pop($array);
-
- return $array;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArrayNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArrayNode.php
deleted file mode 100644
index 921319a..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ArrayNode.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class ArrayNode extends Node
-{
- protected $index;
-
- public function __construct()
- {
- $this->index = -1;
- }
-
- public function addElement(Node $value, Node $key = null)
- {
- if (null === $key) {
- $key = new ConstantNode(++$this->index);
- }
-
- array_push($this->nodes, $key, $value);
- }
-
- /**
- * Compiles the node to PHP.
- */
- public function compile(Compiler $compiler)
- {
- $compiler->raw('[');
- $this->compileArguments($compiler);
- $compiler->raw(']');
- }
-
- public function evaluate($functions, $values)
- {
- $result = [];
- foreach ($this->getKeyValuePairs() as $pair) {
- $result[$pair['key']->evaluate($functions, $values)] = $pair['value']->evaluate($functions, $values);
- }
-
- return $result;
- }
-
- public function toArray()
- {
- $value = [];
- foreach ($this->getKeyValuePairs() as $pair) {
- $value[$pair['key']->attributes['value']] = $pair['value'];
- }
-
- $array = [];
-
- if ($this->isHash($value)) {
- foreach ($value as $k => $v) {
- $array[] = ', ';
- $array[] = new ConstantNode($k);
- $array[] = ': ';
- $array[] = $v;
- }
- $array[0] = '{';
- $array[] = '}';
- } else {
- foreach ($value as $v) {
- $array[] = ', ';
- $array[] = $v;
- }
- $array[0] = '[';
- $array[] = ']';
- }
-
- return $array;
- }
-
- protected function getKeyValuePairs()
- {
- $pairs = [];
- foreach (array_chunk($this->nodes, 2) as $pair) {
- $pairs[] = ['key' => $pair[0], 'value' => $pair[1]];
- }
-
- return $pairs;
- }
-
- protected function compileArguments(Compiler $compiler, $withKeys = true)
- {
- $first = true;
- foreach ($this->getKeyValuePairs() as $pair) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $first = false;
-
- if ($withKeys) {
- $compiler
- ->compile($pair['key'])
- ->raw(' => ')
- ;
- }
-
- $compiler->compile($pair['value']);
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/BinaryNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/BinaryNode.php
deleted file mode 100644
index 11245f9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/BinaryNode.php
+++ /dev/null
@@ -1,170 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class BinaryNode extends Node
-{
- private static $operators = [
- '~' => '.',
- 'and' => '&&',
- 'or' => '||',
- ];
-
- private static $functions = [
- '**' => 'pow',
- '..' => 'range',
- 'in' => 'in_array',
- 'not in' => '!in_array',
- ];
-
- public function __construct(string $operator, Node $left, Node $right)
- {
- parent::__construct(
- ['left' => $left, 'right' => $right],
- ['operator' => $operator]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- $operator = $this->attributes['operator'];
-
- if ('matches' == $operator) {
- $compiler
- ->raw('preg_match(')
- ->compile($this->nodes['right'])
- ->raw(', ')
- ->compile($this->nodes['left'])
- ->raw(')')
- ;
-
- return;
- }
-
- if (isset(self::$functions[$operator])) {
- $compiler
- ->raw(sprintf('%s(', self::$functions[$operator]))
- ->compile($this->nodes['left'])
- ->raw(', ')
- ->compile($this->nodes['right'])
- ->raw(')')
- ;
-
- return;
- }
-
- if (isset(self::$operators[$operator])) {
- $operator = self::$operators[$operator];
- }
-
- $compiler
- ->raw('(')
- ->compile($this->nodes['left'])
- ->raw(' ')
- ->raw($operator)
- ->raw(' ')
- ->compile($this->nodes['right'])
- ->raw(')')
- ;
- }
-
- public function evaluate($functions, $values)
- {
- $operator = $this->attributes['operator'];
- $left = $this->nodes['left']->evaluate($functions, $values);
-
- if (isset(self::$functions[$operator])) {
- $right = $this->nodes['right']->evaluate($functions, $values);
-
- if ('not in' === $operator) {
- return !\in_array($left, $right);
- }
- $f = self::$functions[$operator];
-
- return $f($left, $right);
- }
-
- switch ($operator) {
- case 'or':
- case '||':
- return $left || $this->nodes['right']->evaluate($functions, $values);
- case 'and':
- case '&&':
- return $left && $this->nodes['right']->evaluate($functions, $values);
- }
-
- $right = $this->nodes['right']->evaluate($functions, $values);
-
- switch ($operator) {
- case '|':
- return $left | $right;
- case '^':
- return $left ^ $right;
- case '&':
- return $left & $right;
- case '==':
- return $left == $right;
- case '===':
- return $left === $right;
- case '!=':
- return $left != $right;
- case '!==':
- return $left !== $right;
- case '<':
- return $left < $right;
- case '>':
- return $left > $right;
- case '>=':
- return $left >= $right;
- case '<=':
- return $left <= $right;
- case 'not in':
- return !\in_array($left, $right);
- case 'in':
- return \in_array($left, $right);
- case '+':
- return $left + $right;
- case '-':
- return $left - $right;
- case '~':
- return $left.$right;
- case '*':
- return $left * $right;
- case '/':
- if (0 == $right) {
- throw new \DivisionByZeroError('Division by zero');
- }
-
- return $left / $right;
- case '%':
- if (0 == $right) {
- throw new \DivisionByZeroError('Modulo by zero');
- }
-
- return $left % $right;
- case 'matches':
- return preg_match($right, $left);
- }
- }
-
- public function toArray()
- {
- return ['(', $this->nodes['left'], ' '.$this->attributes['operator'].' ', $this->nodes['right'], ')'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConditionalNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConditionalNode.php
deleted file mode 100644
index ca1b484..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConditionalNode.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class ConditionalNode extends Node
-{
- public function __construct(Node $expr1, Node $expr2, Node $expr3)
- {
- parent::__construct(
- ['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- $compiler
- ->raw('((')
- ->compile($this->nodes['expr1'])
- ->raw(') ? (')
- ->compile($this->nodes['expr2'])
- ->raw(') : (')
- ->compile($this->nodes['expr3'])
- ->raw('))')
- ;
- }
-
- public function evaluate($functions, $values)
- {
- if ($this->nodes['expr1']->evaluate($functions, $values)) {
- return $this->nodes['expr2']->evaluate($functions, $values);
- }
-
- return $this->nodes['expr3']->evaluate($functions, $values);
- }
-
- public function toArray()
- {
- return ['(', $this->nodes['expr1'], ' ? ', $this->nodes['expr2'], ' : ', $this->nodes['expr3'], ')'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConstantNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConstantNode.php
deleted file mode 100644
index 0353f78..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/ConstantNode.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class ConstantNode extends Node
-{
- private $isIdentifier;
-
- public function __construct($value, bool $isIdentifier = false)
- {
- $this->isIdentifier = $isIdentifier;
- parent::__construct(
- [],
- ['value' => $value]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- $compiler->repr($this->attributes['value']);
- }
-
- public function evaluate($functions, $values)
- {
- return $this->attributes['value'];
- }
-
- public function toArray()
- {
- $array = [];
- $value = $this->attributes['value'];
-
- if ($this->isIdentifier) {
- $array[] = $value;
- } elseif (true === $value) {
- $array[] = 'true';
- } elseif (false === $value) {
- $array[] = 'false';
- } elseif (null === $value) {
- $array[] = 'null';
- } elseif (is_numeric($value)) {
- $array[] = $value;
- } elseif (!\is_array($value)) {
- $array[] = $this->dumpString($value);
- } elseif ($this->isHash($value)) {
- foreach ($value as $k => $v) {
- $array[] = ', ';
- $array[] = new self($k);
- $array[] = ': ';
- $array[] = new self($v);
- }
- $array[0] = '{';
- $array[] = '}';
- } else {
- foreach ($value as $v) {
- $array[] = ', ';
- $array[] = new self($v);
- }
- $array[0] = '[';
- $array[] = ']';
- }
-
- return $array;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/FunctionNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/FunctionNode.php
deleted file mode 100644
index 2a46191..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/FunctionNode.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class FunctionNode extends Node
-{
- public function __construct(string $name, Node $arguments)
- {
- parent::__construct(
- ['arguments' => $arguments],
- ['name' => $name]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- $arguments = [];
- foreach ($this->nodes['arguments']->nodes as $node) {
- $arguments[] = $compiler->subcompile($node);
- }
-
- $function = $compiler->getFunction($this->attributes['name']);
-
- $compiler->raw($function['compiler'](...$arguments));
- }
-
- public function evaluate($functions, $values)
- {
- $arguments = [$values];
- foreach ($this->nodes['arguments']->nodes as $node) {
- $arguments[] = $node->evaluate($functions, $values);
- }
-
- return $functions[$this->attributes['name']]['evaluator'](...$arguments);
- }
-
- public function toArray()
- {
- $array = [];
- $array[] = $this->attributes['name'];
-
- foreach ($this->nodes['arguments']->nodes as $node) {
- $array[] = ', ';
- $array[] = $node;
- }
- $array[1] = '(';
- $array[] = ')';
-
- return $array;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/GetAttrNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/GetAttrNode.php
deleted file mode 100644
index a28b596..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/GetAttrNode.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class GetAttrNode extends Node
-{
- const PROPERTY_CALL = 1;
- const METHOD_CALL = 2;
- const ARRAY_CALL = 3;
-
- public function __construct(Node $node, Node $attribute, ArrayNode $arguments, int $type)
- {
- parent::__construct(
- ['node' => $node, 'attribute' => $attribute, 'arguments' => $arguments],
- ['type' => $type]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- switch ($this->attributes['type']) {
- case self::PROPERTY_CALL:
- $compiler
- ->compile($this->nodes['node'])
- ->raw('->')
- ->raw($this->nodes['attribute']->attributes['value'])
- ;
- break;
-
- case self::METHOD_CALL:
- $compiler
- ->compile($this->nodes['node'])
- ->raw('->')
- ->raw($this->nodes['attribute']->attributes['value'])
- ->raw('(')
- ->compile($this->nodes['arguments'])
- ->raw(')')
- ;
- break;
-
- case self::ARRAY_CALL:
- $compiler
- ->compile($this->nodes['node'])
- ->raw('[')
- ->compile($this->nodes['attribute'])->raw(']')
- ;
- break;
- }
- }
-
- public function evaluate($functions, $values)
- {
- switch ($this->attributes['type']) {
- case self::PROPERTY_CALL:
- $obj = $this->nodes['node']->evaluate($functions, $values);
- if (!\is_object($obj)) {
- throw new \RuntimeException('Unable to get a property on a non-object.');
- }
-
- $property = $this->nodes['attribute']->attributes['value'];
-
- return $obj->$property;
-
- case self::METHOD_CALL:
- $obj = $this->nodes['node']->evaluate($functions, $values);
- if (!\is_object($obj)) {
- throw new \RuntimeException('Unable to get a property on a non-object.');
- }
- if (!\is_callable($toCall = [$obj, $this->nodes['attribute']->attributes['value']])) {
- throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj)));
- }
-
- return $toCall(...array_values($this->nodes['arguments']->evaluate($functions, $values)));
-
- case self::ARRAY_CALL:
- $array = $this->nodes['node']->evaluate($functions, $values);
- if (!\is_array($array) && !$array instanceof \ArrayAccess) {
- throw new \RuntimeException('Unable to get an item on a non-array.');
- }
-
- return $array[$this->nodes['attribute']->evaluate($functions, $values)];
- }
- }
-
- public function toArray()
- {
- switch ($this->attributes['type']) {
- case self::PROPERTY_CALL:
- return [$this->nodes['node'], '.', $this->nodes['attribute']];
-
- case self::METHOD_CALL:
- return [$this->nodes['node'], '.', $this->nodes['attribute'], '(', $this->nodes['arguments'], ')'];
-
- case self::ARRAY_CALL:
- return [$this->nodes['node'], '[', $this->nodes['attribute'], ']'];
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/NameNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/NameNode.php
deleted file mode 100644
index 1a3d994..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/NameNode.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class NameNode extends Node
-{
- public function __construct(string $name)
- {
- parent::__construct(
- [],
- ['name' => $name]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- $compiler->raw('$'.$this->attributes['name']);
- }
-
- public function evaluate($functions, $values)
- {
- return $values[$this->attributes['name']];
- }
-
- public function toArray()
- {
- return [$this->attributes['name']];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/Node.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/Node.php
deleted file mode 100644
index 61bbd0c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/Node.php
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * Represents a node in the AST.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Node
-{
- public $nodes = [];
- public $attributes = [];
-
- /**
- * @param array $nodes An array of nodes
- * @param array $attributes An array of attributes
- */
- public function __construct(array $nodes = [], array $attributes = [])
- {
- $this->nodes = $nodes;
- $this->attributes = $attributes;
- }
-
- /**
- * @return string
- */
- public function __toString()
- {
- $attributes = [];
- foreach ($this->attributes as $name => $value) {
- $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true)));
- }
-
- $repr = [str_replace('Symfony\Component\ExpressionLanguage\Node\\', '', \get_class($this)).'('.implode(', ', $attributes)];
-
- if (\count($this->nodes)) {
- foreach ($this->nodes as $node) {
- foreach (explode("\n", (string) $node) as $line) {
- $repr[] = ' '.$line;
- }
- }
-
- $repr[] = ')';
- } else {
- $repr[0] .= ')';
- }
-
- return implode("\n", $repr);
- }
-
- public function compile(Compiler $compiler)
- {
- foreach ($this->nodes as $node) {
- $node->compile($compiler);
- }
- }
-
- public function evaluate($functions, $values)
- {
- $results = [];
- foreach ($this->nodes as $node) {
- $results[] = $node->evaluate($functions, $values);
- }
-
- return $results;
- }
-
- public function toArray()
- {
- throw new \BadMethodCallException(sprintf('Dumping a "%s" instance is not supported yet.', \get_class($this)));
- }
-
- public function dump()
- {
- $dump = '';
-
- foreach ($this->toArray() as $v) {
- $dump .= is_scalar($v) ? $v : $v->dump();
- }
-
- return $dump;
- }
-
- protected function dumpString($value)
- {
- return sprintf('"%s"', addcslashes($value, "\0\t\"\\"));
- }
-
- protected function isHash(array $value)
- {
- $expectedKey = 0;
-
- foreach ($value as $key => $val) {
- if ($key !== $expectedKey++) {
- return true;
- }
- }
-
- return false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/UnaryNode.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Node/UnaryNode.php
deleted file mode 100644
index abf2cc6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Node/UnaryNode.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage\Node;
-
-use Symfony\Component\ExpressionLanguage\Compiler;
-
-/**
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class UnaryNode extends Node
-{
- private static $operators = [
- '!' => '!',
- 'not' => '!',
- '+' => '+',
- '-' => '-',
- ];
-
- public function __construct(string $operator, Node $node)
- {
- parent::__construct(
- ['node' => $node],
- ['operator' => $operator]
- );
- }
-
- public function compile(Compiler $compiler)
- {
- $compiler
- ->raw('(')
- ->raw(self::$operators[$this->attributes['operator']])
- ->compile($this->nodes['node'])
- ->raw(')')
- ;
- }
-
- public function evaluate($functions, $values)
- {
- $value = $this->nodes['node']->evaluate($functions, $values);
- switch ($this->attributes['operator']) {
- case 'not':
- case '!':
- return !$value;
- case '-':
- return -$value;
- }
-
- return $value;
- }
-
- public function toArray(): array
- {
- return ['(', $this->attributes['operator'].' ', $this->nodes['node'], ')'];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/ParsedExpression.php b/srcs/phpmyadmin/vendor/symfony/expression-language/ParsedExpression.php
deleted file mode 100644
index 1416db1..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/ParsedExpression.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-use Symfony\Component\ExpressionLanguage\Node\Node;
-
-/**
- * Represents an already parsed expression.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ParsedExpression extends Expression
-{
- private $nodes;
-
- public function __construct(string $expression, Node $nodes)
- {
- parent::__construct($expression);
-
- $this->nodes = $nodes;
- }
-
- public function getNodes()
- {
- return $this->nodes;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Parser.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Parser.php
deleted file mode 100644
index 59c4d67..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Parser.php
+++ /dev/null
@@ -1,379 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Parsers a token stream.
- *
- * This parser implements a "Precedence climbing" algorithm.
- *
- * @see http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
- * @see http://en.wikipedia.org/wiki/Operator-precedence_parser
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Parser
-{
- const OPERATOR_LEFT = 1;
- const OPERATOR_RIGHT = 2;
-
- private $stream;
- private $unaryOperators;
- private $binaryOperators;
- private $functions;
- private $names;
-
- public function __construct(array $functions)
- {
- $this->functions = $functions;
-
- $this->unaryOperators = [
- 'not' => ['precedence' => 50],
- '!' => ['precedence' => 50],
- '-' => ['precedence' => 500],
- '+' => ['precedence' => 500],
- ];
- $this->binaryOperators = [
- 'or' => ['precedence' => 10, 'associativity' => self::OPERATOR_LEFT],
- '||' => ['precedence' => 10, 'associativity' => self::OPERATOR_LEFT],
- 'and' => ['precedence' => 15, 'associativity' => self::OPERATOR_LEFT],
- '&&' => ['precedence' => 15, 'associativity' => self::OPERATOR_LEFT],
- '|' => ['precedence' => 16, 'associativity' => self::OPERATOR_LEFT],
- '^' => ['precedence' => 17, 'associativity' => self::OPERATOR_LEFT],
- '&' => ['precedence' => 18, 'associativity' => self::OPERATOR_LEFT],
- '==' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '===' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '!=' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '!==' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '<' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '>' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '>=' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '<=' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- 'not in' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- 'in' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- 'matches' => ['precedence' => 20, 'associativity' => self::OPERATOR_LEFT],
- '..' => ['precedence' => 25, 'associativity' => self::OPERATOR_LEFT],
- '+' => ['precedence' => 30, 'associativity' => self::OPERATOR_LEFT],
- '-' => ['precedence' => 30, 'associativity' => self::OPERATOR_LEFT],
- '~' => ['precedence' => 40, 'associativity' => self::OPERATOR_LEFT],
- '*' => ['precedence' => 60, 'associativity' => self::OPERATOR_LEFT],
- '/' => ['precedence' => 60, 'associativity' => self::OPERATOR_LEFT],
- '%' => ['precedence' => 60, 'associativity' => self::OPERATOR_LEFT],
- '**' => ['precedence' => 200, 'associativity' => self::OPERATOR_RIGHT],
- ];
- }
-
- /**
- * Converts a token stream to a node tree.
- *
- * The valid names is an array where the values
- * are the names that the user can use in an expression.
- *
- * If the variable name in the compiled PHP code must be
- * different, define it as the key.
- *
- * For instance, ['this' => 'container'] means that the
- * variable 'container' can be used in the expression
- * but the compiled code will use 'this'.
- *
- * @param array $names An array of valid names
- *
- * @return Node\Node A node tree
- *
- * @throws SyntaxError
- */
- public function parse(TokenStream $stream, $names = [])
- {
- $this->stream = $stream;
- $this->names = $names;
-
- $node = $this->parseExpression();
- if (!$stream->isEOF()) {
- throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s"', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
- }
-
- return $node;
- }
-
- public function parseExpression($precedence = 0)
- {
- $expr = $this->getPrimary();
- $token = $this->stream->current;
- while ($token->test(Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->value]) && $this->binaryOperators[$token->value]['precedence'] >= $precedence) {
- $op = $this->binaryOperators[$token->value];
- $this->stream->next();
-
- $expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']);
- $expr = new Node\BinaryNode($token->value, $expr, $expr1);
-
- $token = $this->stream->current;
- }
-
- if (0 === $precedence) {
- return $this->parseConditionalExpression($expr);
- }
-
- return $expr;
- }
-
- protected function getPrimary()
- {
- $token = $this->stream->current;
-
- if ($token->test(Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->value])) {
- $operator = $this->unaryOperators[$token->value];
- $this->stream->next();
- $expr = $this->parseExpression($operator['precedence']);
-
- return $this->parsePostfixExpression(new Node\UnaryNode($token->value, $expr));
- }
-
- if ($token->test(Token::PUNCTUATION_TYPE, '(')) {
- $this->stream->next();
- $expr = $this->parseExpression();
- $this->stream->expect(Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed');
-
- return $this->parsePostfixExpression($expr);
- }
-
- return $this->parsePrimaryExpression();
- }
-
- protected function parseConditionalExpression($expr)
- {
- while ($this->stream->current->test(Token::PUNCTUATION_TYPE, '?')) {
- $this->stream->next();
- if (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ':')) {
- $expr2 = $this->parseExpression();
- if ($this->stream->current->test(Token::PUNCTUATION_TYPE, ':')) {
- $this->stream->next();
- $expr3 = $this->parseExpression();
- } else {
- $expr3 = new Node\ConstantNode(null);
- }
- } else {
- $this->stream->next();
- $expr2 = $expr;
- $expr3 = $this->parseExpression();
- }
-
- $expr = new Node\ConditionalNode($expr, $expr2, $expr3);
- }
-
- return $expr;
- }
-
- public function parsePrimaryExpression()
- {
- $token = $this->stream->current;
- switch ($token->type) {
- case Token::NAME_TYPE:
- $this->stream->next();
- switch ($token->value) {
- case 'true':
- case 'TRUE':
- return new Node\ConstantNode(true);
-
- case 'false':
- case 'FALSE':
- return new Node\ConstantNode(false);
-
- case 'null':
- case 'NULL':
- return new Node\ConstantNode(null);
-
- default:
- if ('(' === $this->stream->current->value) {
- if (false === isset($this->functions[$token->value])) {
- throw new SyntaxError(sprintf('The function "%s" does not exist', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, array_keys($this->functions));
- }
-
- $node = new Node\FunctionNode($token->value, $this->parseArguments());
- } else {
- if (!\in_array($token->value, $this->names, true)) {
- throw new SyntaxError(sprintf('Variable "%s" is not valid', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, $this->names);
- }
-
- // is the name used in the compiled code different
- // from the name used in the expression?
- if (\is_int($name = array_search($token->value, $this->names))) {
- $name = $token->value;
- }
-
- $node = new Node\NameNode($name);
- }
- }
- break;
-
- case Token::NUMBER_TYPE:
- case Token::STRING_TYPE:
- $this->stream->next();
-
- return new Node\ConstantNode($token->value);
-
- default:
- if ($token->test(Token::PUNCTUATION_TYPE, '[')) {
- $node = $this->parseArrayExpression();
- } elseif ($token->test(Token::PUNCTUATION_TYPE, '{')) {
- $node = $this->parseHashExpression();
- } else {
- throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s"', $token->type, $token->value), $token->cursor, $this->stream->getExpression());
- }
- }
-
- return $this->parsePostfixExpression($node);
- }
-
- public function parseArrayExpression()
- {
- $this->stream->expect(Token::PUNCTUATION_TYPE, '[', 'An array element was expected');
-
- $node = new Node\ArrayNode();
- $first = true;
- while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ']')) {
- if (!$first) {
- $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma');
-
- // trailing ,?
- if ($this->stream->current->test(Token::PUNCTUATION_TYPE, ']')) {
- break;
- }
- }
- $first = false;
-
- $node->addElement($this->parseExpression());
- }
- $this->stream->expect(Token::PUNCTUATION_TYPE, ']', 'An opened array is not properly closed');
-
- return $node;
- }
-
- public function parseHashExpression()
- {
- $this->stream->expect(Token::PUNCTUATION_TYPE, '{', 'A hash element was expected');
-
- $node = new Node\ArrayNode();
- $first = true;
- while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, '}')) {
- if (!$first) {
- $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma');
-
- // trailing ,?
- if ($this->stream->current->test(Token::PUNCTUATION_TYPE, '}')) {
- break;
- }
- }
- $first = false;
-
- // a hash key can be:
- //
- // * a number -- 12
- // * a string -- 'a'
- // * a name, which is equivalent to a string -- a
- // * an expression, which must be enclosed in parentheses -- (1 + 2)
- if ($this->stream->current->test(Token::STRING_TYPE) || $this->stream->current->test(Token::NAME_TYPE) || $this->stream->current->test(Token::NUMBER_TYPE)) {
- $key = new Node\ConstantNode($this->stream->current->value);
- $this->stream->next();
- } elseif ($this->stream->current->test(Token::PUNCTUATION_TYPE, '(')) {
- $key = $this->parseExpression();
- } else {
- $current = $this->stream->current;
-
- throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s"', $current->type, $current->value), $current->cursor, $this->stream->getExpression());
- }
-
- $this->stream->expect(Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
- $value = $this->parseExpression();
-
- $node->addElement($value, $key);
- }
- $this->stream->expect(Token::PUNCTUATION_TYPE, '}', 'An opened hash is not properly closed');
-
- return $node;
- }
-
- public function parsePostfixExpression($node)
- {
- $token = $this->stream->current;
- while (Token::PUNCTUATION_TYPE == $token->type) {
- if ('.' === $token->value) {
- $this->stream->next();
- $token = $this->stream->current;
- $this->stream->next();
-
- if (
- Token::NAME_TYPE !== $token->type
- &&
- // Operators like "not" and "matches" are valid method or property names,
- //
- // In other words, besides NAME_TYPE, OPERATOR_TYPE could also be parsed as a property or method.
- // This is because operators are processed by the lexer prior to names. So "not" in "foo.not()" or "matches" in "foo.matches" will be recognized as an operator first.
- // But in fact, "not" and "matches" in such expressions shall be parsed as method or property names.
- //
- // And this ONLY works if the operator consists of valid characters for a property or method name.
- //
- // Other types, such as STRING_TYPE and NUMBER_TYPE, can't be parsed as property nor method names.
- //
- // As a result, if $token is NOT an operator OR $token->value is NOT a valid property or method name, an exception shall be thrown.
- (Token::OPERATOR_TYPE !== $token->type || !preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A', $token->value))
- ) {
- throw new SyntaxError('Expected name', $token->cursor, $this->stream->getExpression());
- }
-
- $arg = new Node\ConstantNode($token->value, true);
-
- $arguments = new Node\ArgumentsNode();
- if ($this->stream->current->test(Token::PUNCTUATION_TYPE, '(')) {
- $type = Node\GetAttrNode::METHOD_CALL;
- foreach ($this->parseArguments()->nodes as $n) {
- $arguments->addElement($n);
- }
- } else {
- $type = Node\GetAttrNode::PROPERTY_CALL;
- }
-
- $node = new Node\GetAttrNode($node, $arg, $arguments, $type);
- } elseif ('[' === $token->value) {
- $this->stream->next();
- $arg = $this->parseExpression();
- $this->stream->expect(Token::PUNCTUATION_TYPE, ']');
-
- $node = new Node\GetAttrNode($node, $arg, new Node\ArgumentsNode(), Node\GetAttrNode::ARRAY_CALL);
- } else {
- break;
- }
-
- $token = $this->stream->current;
- }
-
- return $node;
- }
-
- /**
- * Parses arguments.
- */
- public function parseArguments()
- {
- $args = [];
- $this->stream->expect(Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis');
- while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ')')) {
- if (!empty($args)) {
- $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma');
- }
-
- $args[] = $this->parseExpression();
- }
- $this->stream->expect(Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis');
-
- return new Node\Node($args);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/README.md b/srcs/phpmyadmin/vendor/symfony/expression-language/README.md
deleted file mode 100644
index 08b310d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-ExpressionLanguage Component
-============================
-
-The ExpressionLanguage component provides an engine that can compile and
-evaluate expressions. An expression is a one-liner that returns a value
-(mostly, but not limited to, Booleans).
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/expression_language/introduction.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/SerializedParsedExpression.php b/srcs/phpmyadmin/vendor/symfony/expression-language/SerializedParsedExpression.php
deleted file mode 100644
index a1f838c..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/SerializedParsedExpression.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Represents an already parsed expression.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class SerializedParsedExpression extends ParsedExpression
-{
- private $nodes;
-
- /**
- * @param string $expression An expression
- * @param string $nodes The serialized nodes for the expression
- */
- public function __construct(string $expression, string $nodes)
- {
- $this->expression = $expression;
- $this->nodes = $nodes;
- }
-
- public function getNodes()
- {
- return unserialize($this->nodes);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/SyntaxError.php b/srcs/phpmyadmin/vendor/symfony/expression-language/SyntaxError.php
deleted file mode 100644
index d3313b8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/SyntaxError.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-class SyntaxError extends \LogicException
-{
- public function __construct(string $message, int $cursor = 0, string $expression = '', string $subject = null, array $proposals = null)
- {
- $message = sprintf('%s around position %d', $message, $cursor);
- if ($expression) {
- $message = sprintf('%s for expression `%s`', $message, $expression);
- }
- $message .= '.';
-
- if (null !== $subject && null !== $proposals) {
- $minScore = INF;
- foreach ($proposals as $proposal) {
- $distance = levenshtein($subject, $proposal);
- if ($distance < $minScore) {
- $guess = $proposal;
- $minScore = $distance;
- }
- }
-
- if (isset($guess) && $minScore < 3) {
- $message .= sprintf(' Did you mean "%s"?', $guess);
- }
- }
-
- parent::__construct($message);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/Token.php b/srcs/phpmyadmin/vendor/symfony/expression-language/Token.php
deleted file mode 100644
index 40bb755..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/Token.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Represents a Token.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Token
-{
- public $value;
- public $type;
- public $cursor;
-
- const EOF_TYPE = 'end of expression';
- const NAME_TYPE = 'name';
- const NUMBER_TYPE = 'number';
- const STRING_TYPE = 'string';
- const OPERATOR_TYPE = 'operator';
- const PUNCTUATION_TYPE = 'punctuation';
-
- /**
- * @param string $type The type of the token (self::*_TYPE)
- * @param string|int|float|null $value The token value
- * @param int $cursor The cursor position in the source
- */
- public function __construct(string $type, $value, ?int $cursor)
- {
- $this->type = $type;
- $this->value = $value;
- $this->cursor = $cursor;
- }
-
- /**
- * Returns a string representation of the token.
- *
- * @return string A string representation of the token
- */
- public function __toString()
- {
- return sprintf('%3d %-11s %s', $this->cursor, strtoupper($this->type), $this->value);
- }
-
- /**
- * Tests the current token for a type and/or a value.
- *
- * @param array|int $type The type to test
- * @param string|null $value The token value
- *
- * @return bool
- */
- public function test($type, $value = null)
- {
- return $this->type === $type && (null === $value || $this->value == $value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/TokenStream.php b/srcs/phpmyadmin/vendor/symfony/expression-language/TokenStream.php
deleted file mode 100644
index 01277dc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/TokenStream.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\ExpressionLanguage;
-
-/**
- * Represents a token stream.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class TokenStream
-{
- public $current;
-
- private $tokens;
- private $position = 0;
- private $expression;
-
- public function __construct(array $tokens, string $expression = '')
- {
- $this->tokens = $tokens;
- $this->current = $tokens[0];
- $this->expression = $expression;
- }
-
- /**
- * Returns a string representation of the token stream.
- *
- * @return string
- */
- public function __toString()
- {
- return implode("\n", $this->tokens);
- }
-
- /**
- * Sets the pointer to the next token and returns the old one.
- */
- public function next()
- {
- ++$this->position;
-
- if (!isset($this->tokens[$this->position])) {
- throw new SyntaxError('Unexpected end of expression', $this->current->cursor, $this->expression);
- }
-
- $this->current = $this->tokens[$this->position];
- }
-
- /**
- * Tests a token.
- *
- * @param array|int $type The type to test
- * @param string|null $value The token value
- * @param string|null $message The syntax error message
- */
- public function expect($type, $value = null, $message = null)
- {
- $token = $this->current;
- if (!$token->test($type, $value)) {
- throw new SyntaxError(sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s)', $message ? $message.'. ' : '', $token->type, $token->value, $type, $value ? sprintf(' with value "%s"', $value) : ''), $token->cursor, $this->expression);
- }
- $this->next();
- }
-
- /**
- * Checks if end of stream was reached.
- *
- * @return bool
- */
- public function isEOF()
- {
- return Token::EOF_TYPE === $this->current->type;
- }
-
- /**
- * @internal
- */
- public function getExpression(): string
- {
- return $this->expression;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/expression-language/composer.json b/srcs/phpmyadmin/vendor/symfony/expression-language/composer.json
deleted file mode 100644
index 6843975..0000000
--- a/srcs/phpmyadmin/vendor/symfony/expression-language/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "symfony/expression-language",
- "type": "library",
- "description": "Symfony ExpressionLanguage Component",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "symfony/cache": "^3.4|^4.0|^5.0",
- "symfony/service-contracts": "^1.1|^2"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\ExpressionLanguage\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/filesystem/CHANGELOG.md
deleted file mode 100644
index 0b633ef..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/CHANGELOG.md
+++ /dev/null
@@ -1,70 +0,0 @@
-CHANGELOG
-=========
-
-4.4.0
------
-
- * support for passing a `null` value to `Filesystem::isAbsolutePath()` is deprecated and will be removed in 5.0
-
-4.3.0
------
-
- * support for passing arrays to `Filesystem::dumpFile()` is deprecated and will be removed in 5.0
- * support for passing arrays to `Filesystem::appendToFile()` is deprecated and will be removed in 5.0
-
-4.0.0
------
-
- * removed `LockHandler`
- * Support for passing relative paths to `Filesystem::makePathRelative()` has been removed.
-
-3.4.0
------
-
- * support for passing relative paths to `Filesystem::makePathRelative()` is deprecated and will be removed in 4.0
-
-3.3.0
------
-
- * added `appendToFile()` to append contents to existing files
-
-3.2.0
------
-
- * added `readlink()` as a platform independent method to read links
-
-3.0.0
------
-
- * removed `$mode` argument from `Filesystem::dumpFile()`
-
-2.8.0
------
-
- * added tempnam() a stream aware version of PHP's native tempnam()
-
-2.6.0
------
-
- * added LockHandler
-
-2.3.12
-------
-
- * deprecated dumpFile() file mode argument.
-
-2.3.0
------
-
- * added the dumpFile() method to atomically write files
-
-2.2.0
------
-
- * added a delete option for the mirror() method
-
-2.1.0
------
-
- * 24eb396 : BC Break : mkdir() function now throws exception in case of failure instead of returning Boolean value
- * created the component
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/ExceptionInterface.php b/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/ExceptionInterface.php
deleted file mode 100644
index fc438d9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Filesystem\Exception;
-
-/**
- * Exception interface for all exceptions thrown by the component.
- *
- * @author Romain Neutron <imprec@gmail.com>
- */
-interface ExceptionInterface extends \Throwable
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/FileNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/FileNotFoundException.php
deleted file mode 100644
index 48b6408..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/FileNotFoundException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Filesystem\Exception;
-
-/**
- * Exception class thrown when a file couldn't be found.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Christian Gärtner <christiangaertner.film@googlemail.com>
- */
-class FileNotFoundException extends IOException
-{
- public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null)
- {
- if (null === $message) {
- if (null === $path) {
- $message = 'File could not be found.';
- } else {
- $message = sprintf('File "%s" could not be found.', $path);
- }
- }
-
- parent::__construct($message, $code, $previous, $path);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOException.php b/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOException.php
deleted file mode 100644
index fea26e4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOException.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Filesystem\Exception;
-
-/**
- * Exception class thrown when a filesystem operation failure happens.
- *
- * @author Romain Neutron <imprec@gmail.com>
- * @author Christian Gärtner <christiangaertner.film@googlemail.com>
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class IOException extends \RuntimeException implements IOExceptionInterface
-{
- private $path;
-
- public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null)
- {
- $this->path = $path;
-
- parent::__construct($message, $code, $previous);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getPath()
- {
- return $this->path;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOExceptionInterface.php b/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
deleted file mode 100644
index f9d4644..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Filesystem\Exception;
-
-/**
- * IOException interface for file and input/output stream related exceptions thrown by the component.
- *
- * @author Christian Gärtner <christiangaertner.film@googlemail.com>
- */
-interface IOExceptionInterface extends ExceptionInterface
-{
- /**
- * Returns the associated path for the exception.
- *
- * @return string|null The path
- */
- public function getPath();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/InvalidArgumentException.php b/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/InvalidArgumentException.php
deleted file mode 100644
index abadc20..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/Exception/InvalidArgumentException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Filesystem\Exception;
-
-/**
- * @author Christian Flothmann <christian.flothmann@sensiolabs.de>
- */
-class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/Filesystem.php b/srcs/phpmyadmin/vendor/symfony/filesystem/Filesystem.php
deleted file mode 100644
index f44a5d3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/Filesystem.php
+++ /dev/null
@@ -1,769 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Filesystem;
-
-use Symfony\Component\Filesystem\Exception\FileNotFoundException;
-use Symfony\Component\Filesystem\Exception\InvalidArgumentException;
-use Symfony\Component\Filesystem\Exception\IOException;
-
-/**
- * Provides basic utility to manipulate the file system.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Filesystem
-{
- private static $lastError;
-
- /**
- * Copies a file.
- *
- * If the target file is older than the origin file, it's always overwritten.
- * If the target file is newer, it is overwritten only when the
- * $overwriteNewerFiles option is set to true.
- *
- * @param string $originFile The original filename
- * @param string $targetFile The target filename
- * @param bool $overwriteNewerFiles If true, target files newer than origin files are overwritten
- *
- * @throws FileNotFoundException When originFile doesn't exist
- * @throws IOException When copy fails
- */
- public function copy($originFile, $targetFile, $overwriteNewerFiles = false)
- {
- $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://');
- if ($originIsLocal && !is_file($originFile)) {
- throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
- }
-
- $this->mkdir(\dirname($targetFile));
-
- $doCopy = true;
- if (!$overwriteNewerFiles && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) {
- $doCopy = filemtime($originFile) > filemtime($targetFile);
- }
-
- if ($doCopy) {
- // https://bugs.php.net/64634
- if (false === $source = @fopen($originFile, 'r')) {
- throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
- }
-
- // Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
- if (false === $target = @fopen($targetFile, 'w', null, stream_context_create(['ftp' => ['overwrite' => true]]))) {
- throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);
- }
-
- $bytesCopied = stream_copy_to_stream($source, $target);
- fclose($source);
- fclose($target);
- unset($source, $target);
-
- if (!is_file($targetFile)) {
- throw new IOException(sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile);
- }
-
- if ($originIsLocal) {
- // Like `cp`, preserve executable permission bits
- @chmod($targetFile, fileperms($targetFile) | (fileperms($originFile) & 0111));
-
- if ($bytesCopied !== $bytesOrigin = filesize($originFile)) {
- throw new IOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
- }
- }
- }
- }
-
- /**
- * Creates a directory recursively.
- *
- * @param string|iterable $dirs The directory path
- * @param int $mode The directory mode
- *
- * @throws IOException On any directory creation failure
- */
- public function mkdir($dirs, $mode = 0777)
- {
- foreach ($this->toIterable($dirs) as $dir) {
- if (is_dir($dir)) {
- continue;
- }
-
- if (!self::box('mkdir', $dir, $mode, true)) {
- if (!is_dir($dir)) {
- // The directory was not created by a concurrent process. Let's throw an exception with a developer friendly error message if we have one
- if (self::$lastError) {
- throw new IOException(sprintf('Failed to create "%s": %s.', $dir, self::$lastError), 0, null, $dir);
- }
- throw new IOException(sprintf('Failed to create "%s"', $dir), 0, null, $dir);
- }
- }
- }
- }
-
- /**
- * Checks the existence of files or directories.
- *
- * @param string|iterable $files A filename, an array of files, or a \Traversable instance to check
- *
- * @return bool true if the file exists, false otherwise
- */
- public function exists($files)
- {
- $maxPathLength = PHP_MAXPATHLEN - 2;
-
- foreach ($this->toIterable($files) as $file) {
- if (\strlen($file) > $maxPathLength) {
- throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
- }
-
- if (!file_exists($file)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Sets access and modification time of file.
- *
- * @param string|iterable $files A filename, an array of files, or a \Traversable instance to create
- * @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used
- * @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used
- *
- * @throws IOException When touch fails
- */
- public function touch($files, $time = null, $atime = null)
- {
- foreach ($this->toIterable($files) as $file) {
- $touch = $time ? @touch($file, $time, $atime) : @touch($file);
- if (true !== $touch) {
- throw new IOException(sprintf('Failed to touch "%s".', $file), 0, null, $file);
- }
- }
- }
-
- /**
- * Removes files or directories.
- *
- * @param string|iterable $files A filename, an array of files, or a \Traversable instance to remove
- *
- * @throws IOException When removal fails
- */
- public function remove($files)
- {
- if ($files instanceof \Traversable) {
- $files = iterator_to_array($files, false);
- } elseif (!\is_array($files)) {
- $files = [$files];
- }
- $files = array_reverse($files);
- foreach ($files as $file) {
- if (is_link($file)) {
- // See https://bugs.php.net/52176
- if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
- throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, self::$lastError));
- }
- } elseif (is_dir($file)) {
- $this->remove(new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));
-
- if (!self::box('rmdir', $file) && file_exists($file)) {
- throw new IOException(sprintf('Failed to remove directory "%s": %s.', $file, self::$lastError));
- }
- } elseif (!self::box('unlink', $file) && file_exists($file)) {
- throw new IOException(sprintf('Failed to remove file "%s": %s.', $file, self::$lastError));
- }
- }
- }
-
- /**
- * Change mode for an array of files or directories.
- *
- * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change mode
- * @param int $mode The new mode (octal)
- * @param int $umask The mode mask (octal)
- * @param bool $recursive Whether change the mod recursively or not
- *
- * @throws IOException When the change fails
- */
- public function chmod($files, $mode, $umask = 0000, $recursive = false)
- {
- foreach ($this->toIterable($files) as $file) {
- if (true !== @chmod($file, $mode & ~$umask)) {
- throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file);
- }
- if ($recursive && is_dir($file) && !is_link($file)) {
- $this->chmod(new \FilesystemIterator($file), $mode, $umask, true);
- }
- }
- }
-
- /**
- * Change the owner of an array of files or directories.
- *
- * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change owner
- * @param string $user The new owner user name
- * @param bool $recursive Whether change the owner recursively or not
- *
- * @throws IOException When the change fails
- */
- public function chown($files, $user, $recursive = false)
- {
- foreach ($this->toIterable($files) as $file) {
- if ($recursive && is_dir($file) && !is_link($file)) {
- $this->chown(new \FilesystemIterator($file), $user, true);
- }
- if (is_link($file) && \function_exists('lchown')) {
- if (true !== @lchown($file, $user)) {
- throw new IOException(sprintf('Failed to chown file "%s".', $file), 0, null, $file);
- }
- } else {
- if (true !== @chown($file, $user)) {
- throw new IOException(sprintf('Failed to chown file "%s".', $file), 0, null, $file);
- }
- }
- }
- }
-
- /**
- * Change the group of an array of files or directories.
- *
- * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change group
- * @param string $group The group name
- * @param bool $recursive Whether change the group recursively or not
- *
- * @throws IOException When the change fails
- */
- public function chgrp($files, $group, $recursive = false)
- {
- foreach ($this->toIterable($files) as $file) {
- if ($recursive && is_dir($file) && !is_link($file)) {
- $this->chgrp(new \FilesystemIterator($file), $group, true);
- }
- if (is_link($file) && \function_exists('lchgrp')) {
- if (true !== @lchgrp($file, $group)) {
- throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
- }
- } else {
- if (true !== @chgrp($file, $group)) {
- throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
- }
- }
- }
- }
-
- /**
- * Renames a file or a directory.
- *
- * @param string $origin The origin filename or directory
- * @param string $target The new filename or directory
- * @param bool $overwrite Whether to overwrite the target if it already exists
- *
- * @throws IOException When target file or directory already exists
- * @throws IOException When origin cannot be renamed
- */
- public function rename($origin, $target, $overwrite = false)
- {
- // we check that target does not exist
- if (!$overwrite && $this->isReadable($target)) {
- throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target);
- }
-
- if (true !== @rename($origin, $target)) {
- if (is_dir($origin)) {
- // See https://bugs.php.net/54097 & https://php.net/rename#113943
- $this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);
- $this->remove($origin);
-
- return;
- }
- throw new IOException(sprintf('Cannot rename "%s" to "%s".', $origin, $target), 0, null, $target);
- }
- }
-
- /**
- * Tells whether a file exists and is readable.
- *
- * @throws IOException When windows path is longer than 258 characters
- */
- private function isReadable(string $filename): bool
- {
- $maxPathLength = PHP_MAXPATHLEN - 2;
-
- if (\strlen($filename) > $maxPathLength) {
- throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
- }
-
- return is_readable($filename);
- }
-
- /**
- * Creates a symbolic link or copy a directory.
- *
- * @param string $originDir The origin directory path
- * @param string $targetDir The symbolic link name
- * @param bool $copyOnWindows Whether to copy files if on Windows
- *
- * @throws IOException When symlink fails
- */
- public function symlink($originDir, $targetDir, $copyOnWindows = false)
- {
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $originDir = strtr($originDir, '/', '\\');
- $targetDir = strtr($targetDir, '/', '\\');
-
- if ($copyOnWindows) {
- $this->mirror($originDir, $targetDir);
-
- return;
- }
- }
-
- $this->mkdir(\dirname($targetDir));
-
- if (is_link($targetDir)) {
- if (readlink($targetDir) === $originDir) {
- return;
- }
- $this->remove($targetDir);
- }
-
- if (!self::box('symlink', $originDir, $targetDir)) {
- $this->linkException($originDir, $targetDir, 'symbolic');
- }
- }
-
- /**
- * Creates a hard link, or several hard links to a file.
- *
- * @param string $originFile The original file
- * @param string|string[] $targetFiles The target file(s)
- *
- * @throws FileNotFoundException When original file is missing or not a file
- * @throws IOException When link fails, including if link already exists
- */
- public function hardlink($originFile, $targetFiles)
- {
- if (!$this->exists($originFile)) {
- throw new FileNotFoundException(null, 0, null, $originFile);
- }
-
- if (!is_file($originFile)) {
- throw new FileNotFoundException(sprintf('Origin file "%s" is not a file', $originFile));
- }
-
- foreach ($this->toIterable($targetFiles) as $targetFile) {
- if (is_file($targetFile)) {
- if (fileinode($originFile) === fileinode($targetFile)) {
- continue;
- }
- $this->remove($targetFile);
- }
-
- if (!self::box('link', $originFile, $targetFile)) {
- $this->linkException($originFile, $targetFile, 'hard');
- }
- }
- }
-
- /**
- * @param string $linkType Name of the link type, typically 'symbolic' or 'hard'
- */
- private function linkException(string $origin, string $target, string $linkType)
- {
- if (self::$lastError) {
- if ('\\' === \DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
- throw new IOException(sprintf('Unable to create %s link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
- }
- }
- throw new IOException(sprintf('Failed to create %s link from "%s" to "%s".', $linkType, $origin, $target), 0, null, $target);
- }
-
- /**
- * Resolves links in paths.
- *
- * With $canonicalize = false (default)
- * - if $path does not exist or is not a link, returns null
- * - if $path is a link, returns the next direct target of the link without considering the existence of the target
- *
- * With $canonicalize = true
- * - if $path does not exist, returns null
- * - if $path exists, returns its absolute fully resolved final version
- *
- * @param string $path A filesystem path
- * @param bool $canonicalize Whether or not to return a canonicalized path
- *
- * @return string|null
- */
- public function readlink($path, $canonicalize = false)
- {
- if (!$canonicalize && !is_link($path)) {
- return null;
- }
-
- if ($canonicalize) {
- if (!$this->exists($path)) {
- return null;
- }
-
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $path = readlink($path);
- }
-
- return realpath($path);
- }
-
- if ('\\' === \DIRECTORY_SEPARATOR) {
- return realpath($path);
- }
-
- return readlink($path);
- }
-
- /**
- * Given an existing path, convert it to a path relative to a given starting path.
- *
- * @param string $endPath Absolute path of target
- * @param string $startPath Absolute path where traversal begins
- *
- * @return string Path of target relative to starting path
- */
- public function makePathRelative($endPath, $startPath)
- {
- if (!$this->isAbsolutePath($startPath)) {
- throw new InvalidArgumentException(sprintf('The start path "%s" is not absolute.', $startPath));
- }
-
- if (!$this->isAbsolutePath($endPath)) {
- throw new InvalidArgumentException(sprintf('The end path "%s" is not absolute.', $endPath));
- }
-
- // Normalize separators on Windows
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $endPath = str_replace('\\', '/', $endPath);
- $startPath = str_replace('\\', '/', $startPath);
- }
-
- $stripDriveLetter = function ($path) {
- if (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) {
- return substr($path, 2);
- }
-
- return $path;
- };
-
- $endPath = $stripDriveLetter($endPath);
- $startPath = $stripDriveLetter($startPath);
-
- // Split the paths into arrays
- $startPathArr = explode('/', trim($startPath, '/'));
- $endPathArr = explode('/', trim($endPath, '/'));
-
- $normalizePathArray = function ($pathSegments) {
- $result = [];
-
- foreach ($pathSegments as $segment) {
- if ('..' === $segment) {
- array_pop($result);
- } elseif ('.' !== $segment) {
- $result[] = $segment;
- }
- }
-
- return $result;
- };
-
- $startPathArr = $normalizePathArray($startPathArr);
- $endPathArr = $normalizePathArray($endPathArr);
-
- // Find for which directory the common path stops
- $index = 0;
- while (isset($startPathArr[$index]) && isset($endPathArr[$index]) && $startPathArr[$index] === $endPathArr[$index]) {
- ++$index;
- }
-
- // Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
- if (1 === \count($startPathArr) && '' === $startPathArr[0]) {
- $depth = 0;
- } else {
- $depth = \count($startPathArr) - $index;
- }
-
- // Repeated "../" for each level need to reach the common path
- $traverser = str_repeat('../', $depth);
-
- $endPathRemainder = implode('/', \array_slice($endPathArr, $index));
-
- // Construct $endPath from traversing to the common path, then to the remaining $endPath
- $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : '');
-
- return '' === $relativePath ? './' : $relativePath;
- }
-
- /**
- * Mirrors a directory to another.
- *
- * Copies files and directories from the origin directory into the target directory. By default:
- *
- * - existing files in the target directory will be overwritten, except if they are newer (see the `override` option)
- * - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option)
- *
- * @param string $originDir The origin directory
- * @param string $targetDir The target directory
- * @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created
- * @param array $options An array of boolean options
- * Valid options are:
- * - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false)
- * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
- * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
- *
- * @throws IOException When file type is unknown
- */
- public function mirror($originDir, $targetDir, \Traversable $iterator = null, $options = [])
- {
- $targetDir = rtrim($targetDir, '/\\');
- $originDir = rtrim($originDir, '/\\');
- $originDirLen = \strlen($originDir);
-
- if (!$this->exists($originDir)) {
- throw new IOException(sprintf('The origin directory specified "%s" was not found.', $originDir), 0, null, $originDir);
- }
-
- // Iterate in destination folder to remove obsolete entries
- if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) {
- $deleteIterator = $iterator;
- if (null === $deleteIterator) {
- $flags = \FilesystemIterator::SKIP_DOTS;
- $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST);
- }
- $targetDirLen = \strlen($targetDir);
- foreach ($deleteIterator as $file) {
- $origin = $originDir.substr($file->getPathname(), $targetDirLen);
- if (!$this->exists($origin)) {
- $this->remove($file);
- }
- }
- }
-
- $copyOnWindows = $options['copy_on_windows'] ?? false;
-
- if (null === $iterator) {
- $flags = $copyOnWindows ? \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS : \FilesystemIterator::SKIP_DOTS;
- $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($originDir, $flags), \RecursiveIteratorIterator::SELF_FIRST);
- }
-
- $this->mkdir($targetDir);
- $filesCreatedWhileMirroring = [];
-
- foreach ($iterator as $file) {
- if ($file->getPathname() === $targetDir || $file->getRealPath() === $targetDir || isset($filesCreatedWhileMirroring[$file->getRealPath()])) {
- continue;
- }
-
- $target = $targetDir.substr($file->getPathname(), $originDirLen);
- $filesCreatedWhileMirroring[$target] = true;
-
- if (!$copyOnWindows && is_link($file)) {
- $this->symlink($file->getLinkTarget(), $target);
- } elseif (is_dir($file)) {
- $this->mkdir($target);
- } elseif (is_file($file)) {
- $this->copy($file, $target, isset($options['override']) ? $options['override'] : false);
- } else {
- throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file);
- }
- }
- }
-
- /**
- * Returns whether the file path is an absolute path.
- *
- * @param string $file A file path
- *
- * @return bool
- */
- public function isAbsolutePath($file)
- {
- if (null === $file) {
- @trigger_error(sprintf('Calling "%s()" with a null in the $file argument is deprecated since Symfony 4.4.', __METHOD__), E_USER_DEPRECATED);
- }
-
- return strspn($file, '/\\', 0, 1)
- || (\strlen($file) > 3 && ctype_alpha($file[0])
- && ':' === $file[1]
- && strspn($file, '/\\', 2, 1)
- )
- || null !== parse_url($file, PHP_URL_SCHEME)
- ;
- }
-
- /**
- * Creates a temporary file with support for custom stream wrappers.
- *
- * @param string $dir The directory where the temporary filename will be created
- * @param string $prefix The prefix of the generated temporary filename
- * Note: Windows uses only the first three characters of prefix
- *
- * @return string The new temporary filename (with path), or throw an exception on failure
- */
- public function tempnam($dir, $prefix)
- {
- list($scheme, $hierarchy) = $this->getSchemeAndHierarchy($dir);
-
- // If no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem
- if (null === $scheme || 'file' === $scheme || 'gs' === $scheme) {
- $tmpFile = @tempnam($hierarchy, $prefix);
-
- // If tempnam failed or no scheme return the filename otherwise prepend the scheme
- if (false !== $tmpFile) {
- if (null !== $scheme && 'gs' !== $scheme) {
- return $scheme.'://'.$tmpFile;
- }
-
- return $tmpFile;
- }
-
- throw new IOException('A temporary file could not be created.');
- }
-
- // Loop until we create a valid temp file or have reached 10 attempts
- for ($i = 0; $i < 10; ++$i) {
- // Create a unique filename
- $tmpFile = $dir.'/'.$prefix.uniqid(mt_rand(), true);
-
- // Use fopen instead of file_exists as some streams do not support stat
- // Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability
- $handle = @fopen($tmpFile, 'x+');
-
- // If unsuccessful restart the loop
- if (false === $handle) {
- continue;
- }
-
- // Close the file if it was successfully opened
- @fclose($handle);
-
- return $tmpFile;
- }
-
- throw new IOException('A temporary file could not be created.');
- }
-
- /**
- * Atomically dumps content into a file.
- *
- * @param string $filename The file to be written to
- * @param string|resource $content The data to write into the file
- *
- * @throws IOException if the file cannot be written to
- */
- public function dumpFile($filename, $content)
- {
- if (\is_array($content)) {
- @trigger_error(sprintf('Calling "%s()" with an array in the $content argument is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED);
- }
-
- $dir = \dirname($filename);
-
- if (!is_dir($dir)) {
- $this->mkdir($dir);
- }
-
- if (!is_writable($dir)) {
- throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
- }
-
- // Will create a temp file with 0600 access rights
- // when the filesystem supports chmod.
- $tmpFile = $this->tempnam($dir, basename($filename));
-
- if (false === @file_put_contents($tmpFile, $content)) {
- throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
- }
-
- @chmod($tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask());
-
- $this->rename($tmpFile, $filename, true);
- }
-
- /**
- * Appends content to an existing file.
- *
- * @param string $filename The file to which to append content
- * @param string|resource $content The content to append
- *
- * @throws IOException If the file is not writable
- */
- public function appendToFile($filename, $content)
- {
- if (\is_array($content)) {
- @trigger_error(sprintf('Calling "%s()" with an array in the $content argument is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED);
- }
-
- $dir = \dirname($filename);
-
- if (!is_dir($dir)) {
- $this->mkdir($dir);
- }
-
- if (!is_writable($dir)) {
- throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
- }
-
- if (false === @file_put_contents($filename, $content, FILE_APPEND)) {
- throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
- }
- }
-
- private function toIterable($files): iterable
- {
- return \is_array($files) || $files instanceof \Traversable ? $files : [$files];
- }
-
- /**
- * Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]).
- */
- private function getSchemeAndHierarchy(string $filename): array
- {
- $components = explode('://', $filename, 2);
-
- return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]];
- }
-
- /**
- * @return mixed
- */
- private static function box(callable $func)
- {
- self::$lastError = null;
- set_error_handler(__CLASS__.'::handleError');
- try {
- $result = $func(...\array_slice(\func_get_args(), 1));
- restore_error_handler();
-
- return $result;
- } catch (\Throwable $e) {
- }
- restore_error_handler();
-
- throw $e;
- }
-
- /**
- * @internal
- */
- public static function handleError($type, $msg)
- {
- self::$lastError = $msg;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/LICENSE b/srcs/phpmyadmin/vendor/symfony/filesystem/LICENSE
deleted file mode 100644
index a677f43..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/README.md b/srcs/phpmyadmin/vendor/symfony/filesystem/README.md
deleted file mode 100644
index 877ab35..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Filesystem Component
-====================
-
-The Filesystem component provides basic utilities for the filesystem.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/filesystem/index.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/filesystem/composer.json b/srcs/phpmyadmin/vendor/symfony/filesystem/composer.json
deleted file mode 100644
index 9e0373d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/filesystem/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "symfony/filesystem",
- "type": "library",
- "description": "Symfony Filesystem Component",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "symfony/polyfill-ctype": "~1.8"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Filesystem\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/Ctype.php b/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/Ctype.php
deleted file mode 100644
index 58414dc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/Ctype.php
+++ /dev/null
@@ -1,227 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Ctype;
-
-/**
- * Ctype implementation through regex.
- *
- * @internal
- *
- * @author Gert de Pagter <BackEndTea@gmail.com>
- */
-final class Ctype
-{
- /**
- * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-alnum
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_alnum($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a letter, FALSE otherwise.
- *
- * @see https://php.net/ctype-alpha
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_alpha($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
- *
- * @see https://php.net/ctype-cntrl
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_cntrl($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
- }
-
- /**
- * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
- *
- * @see https://php.net/ctype-digit
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_digit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
- *
- * @see https://php.net/ctype-graph
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_graph($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a lowercase letter.
- *
- * @see https://php.net/ctype-lower
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_lower($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
- *
- * @see https://php.net/ctype-print
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_print($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
- *
- * @see https://php.net/ctype-punct
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_punct($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
- *
- * @see https://php.net/ctype-space
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_space($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is an uppercase letter.
- *
- * @see https://php.net/ctype-upper
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_upper($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
- }
-
- /**
- * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
- *
- * @see https://php.net/ctype-xdigit
- *
- * @param string|int $text
- *
- * @return bool
- */
- public static function ctype_xdigit($text)
- {
- $text = self::convert_int_to_char_for_ctype($text);
-
- return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
- }
-
- /**
- * Converts integers to their char versions according to normal ctype behaviour, if needed.
- *
- * If an integer between -128 and 255 inclusive is provided,
- * it is interpreted as the ASCII value of a single character
- * (negative values have 256 added in order to allow characters in the Extended ASCII range).
- * Any other integer is interpreted as a string containing the decimal digits of the integer.
- *
- * @param string|int $int
- *
- * @return mixed
- */
- private static function convert_int_to_char_for_ctype($int)
- {
- if (!\is_int($int)) {
- return $int;
- }
-
- if ($int < -128 || $int > 255) {
- return (string) $int;
- }
-
- if ($int < 0) {
- $int += 256;
- }
-
- return \chr($int);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/LICENSE b/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/LICENSE
deleted file mode 100644
index 3f853aa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/README.md b/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/README.md
deleted file mode 100644
index 8add1ab..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Symfony Polyfill / Ctype
-========================
-
-This component provides `ctype_*` functions to users who run php versions without the ctype extension.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/bootstrap.php b/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/bootstrap.php
deleted file mode 100644
index 14d1d0f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/bootstrap.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Ctype as p;
-
-if (!function_exists('ctype_alnum')) {
- function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
- function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
- function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
- function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
- function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
- function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
- function ctype_print($text) { return p\Ctype::ctype_print($text); }
- function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
- function ctype_space($text) { return p\Ctype::ctype_space($text); }
- function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
- function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/composer.json b/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/composer.json
deleted file mode 100644
index 2a2ea04..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-ctype/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "symfony/polyfill-ctype",
- "type": "library",
- "description": "Symfony polyfill for ctype functions",
- "keywords": ["polyfill", "compatibility", "portable", "ctype"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=5.3.3"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.13-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/LICENSE b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/LICENSE
deleted file mode 100644
index 4cd8bdd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Mbstring.php b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Mbstring.php
deleted file mode 100644
index bf882ba..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Mbstring.php
+++ /dev/null
@@ -1,840 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Mbstring;
-
-/**
- * Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
- *
- * Implemented:
- * - mb_chr - Returns a specific character from its Unicode code point
- * - mb_convert_encoding - Convert character encoding
- * - mb_convert_variables - Convert character code in variable(s)
- * - mb_decode_mimeheader - Decode string in MIME header field
- * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
- * - mb_decode_numericentity - Decode HTML numeric string reference to character
- * - mb_encode_numericentity - Encode character to HTML numeric string reference
- * - mb_convert_case - Perform case folding on a string
- * - mb_detect_encoding - Detect character encoding
- * - mb_get_info - Get internal settings of mbstring
- * - mb_http_input - Detect HTTP input character encoding
- * - mb_http_output - Set/Get HTTP output character encoding
- * - mb_internal_encoding - Set/Get internal character encoding
- * - mb_list_encodings - Returns an array of all supported encodings
- * - mb_ord - Returns the Unicode code point of a character
- * - mb_output_handler - Callback function converts character encoding in output buffer
- * - mb_scrub - Replaces ill-formed byte sequences with substitute characters
- * - mb_strlen - Get string length
- * - mb_strpos - Find position of first occurrence of string in a string
- * - mb_strrpos - Find position of last occurrence of a string in a string
- * - mb_str_split - Convert a string to an array
- * - mb_strtolower - Make a string lowercase
- * - mb_strtoupper - Make a string uppercase
- * - mb_substitute_character - Set/Get substitution character
- * - mb_substr - Get part of string
- * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive
- * - mb_stristr - Finds first occurrence of a string within another, case insensitive
- * - mb_strrchr - Finds the last occurrence of a character in a string within another
- * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
- * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive
- * - mb_strstr - Finds first occurrence of a string within another
- * - mb_strwidth - Return width of string
- * - mb_substr_count - Count the number of substring occurrences
- *
- * Not implemented:
- * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
- * - mb_ereg_* - Regular expression with multibyte support
- * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable
- * - mb_preferred_mime_name - Get MIME charset string
- * - mb_regex_encoding - Returns current encoding for multibyte regex as string
- * - mb_regex_set_options - Set/Get the default options for mbregex functions
- * - mb_send_mail - Send encoded mail
- * - mb_split - Split multibyte string using regular expression
- * - mb_strcut - Get part of string
- * - mb_strimwidth - Get truncated string with specified width
- *
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-final class Mbstring
-{
- const MB_CASE_FOLD = PHP_INT_MAX;
-
- private static $encodingList = array('ASCII', 'UTF-8');
- private static $language = 'neutral';
- private static $internalEncoding = 'UTF-8';
- private static $caseFold = array(
- array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"),
- array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'),
- );
-
- public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
- {
- if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) {
- $fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
- } else {
- $fromEncoding = self::getEncoding($fromEncoding);
- }
-
- $toEncoding = self::getEncoding($toEncoding);
-
- if ('BASE64' === $fromEncoding) {
- $s = base64_decode($s);
- $fromEncoding = $toEncoding;
- }
-
- if ('BASE64' === $toEncoding) {
- return base64_encode($s);
- }
-
- if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
- if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
- $fromEncoding = 'Windows-1252';
- }
- if ('UTF-8' !== $fromEncoding) {
- $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
- }
-
- return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s);
- }
-
- if ('HTML-ENTITIES' === $fromEncoding) {
- $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
- $fromEncoding = 'UTF-8';
- }
-
- return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
- }
-
- public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
- {
- $vars = array(&$a, &$b, &$c, &$d, &$e, &$f);
-
- $ok = true;
- array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
- if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
- $ok = false;
- }
- });
-
- return $ok ? $fromEncoding : false;
- }
-
- public static function mb_decode_mimeheader($s)
- {
- return iconv_mime_decode($s, 2, self::$internalEncoding);
- }
-
- public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
- {
- trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING);
- }
-
- public static function mb_decode_numericentity($s, $convmap, $encoding = null)
- {
- if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) {
- trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING);
-
- return null;
- }
-
- if (!\is_array($convmap) || !$convmap) {
- return false;
- }
-
- if (null !== $encoding && !\is_scalar($encoding)) {
- trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING);
-
- return ''; // Instead of null (cf. mb_encode_numericentity).
- }
-
- $s = (string) $s;
- if ('' === $s) {
- return '';
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding) {
- $encoding = null;
- if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
- }
- } else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- $cnt = floor(\count($convmap) / 4) * 4;
-
- for ($i = 0; $i < $cnt; $i += 4) {
- // collector_decode_htmlnumericentity ignores $convmap[$i + 3]
- $convmap[$i] += $convmap[$i + 2];
- $convmap[$i + 1] += $convmap[$i + 2];
- }
-
- $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) {
- $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1];
- for ($i = 0; $i < $cnt; $i += 4) {
- if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) {
- return Mbstring::mb_chr($c - $convmap[$i + 2]);
- }
- }
-
- return $m[0];
- }, $s);
-
- if (null === $encoding) {
- return $s;
- }
-
- return iconv('UTF-8', $encoding.'//IGNORE', $s);
- }
-
- public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
- {
- if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) {
- trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING);
-
- return null;
- }
-
- if (!\is_array($convmap) || !$convmap) {
- return false;
- }
-
- if (null !== $encoding && !\is_scalar($encoding)) {
- trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING);
-
- return null; // Instead of '' (cf. mb_decode_numericentity).
- }
-
- if (null !== $is_hex && !\is_scalar($is_hex)) {
- trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING);
-
- return null;
- }
-
- $s = (string) $s;
- if ('' === $s) {
- return '';
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding) {
- $encoding = null;
- if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
- }
- } else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4);
-
- $cnt = floor(\count($convmap) / 4) * 4;
- $i = 0;
- $len = \strlen($s);
- $result = '';
-
- while ($i < $len) {
- $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
- $uchr = substr($s, $i, $ulen);
- $i += $ulen;
- $c = self::mb_ord($uchr);
-
- for ($j = 0; $j < $cnt; $j += 4) {
- if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) {
- $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3];
- $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';';
- continue 2;
- }
- }
- $result .= $uchr;
- }
-
- if (null === $encoding) {
- return $result;
- }
-
- return iconv('UTF-8', $encoding.'//IGNORE', $result);
- }
-
- public static function mb_convert_case($s, $mode, $encoding = null)
- {
- $s = (string) $s;
- if ('' === $s) {
- return '';
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding) {
- $encoding = null;
- if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
- }
- } else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- if (MB_CASE_TITLE == $mode) {
- static $titleRegexp = null;
- if (null === $titleRegexp) {
- $titleRegexp = self::getData('titleCaseRegexp');
- }
- $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s);
- } else {
- if (MB_CASE_UPPER == $mode) {
- static $upper = null;
- if (null === $upper) {
- $upper = self::getData('upperCase');
- }
- $map = $upper;
- } else {
- if (self::MB_CASE_FOLD === $mode) {
- $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s);
- }
-
- static $lower = null;
- if (null === $lower) {
- $lower = self::getData('lowerCase');
- }
- $map = $lower;
- }
-
- static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4);
-
- $i = 0;
- $len = \strlen($s);
-
- while ($i < $len) {
- $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
- $uchr = substr($s, $i, $ulen);
- $i += $ulen;
-
- if (isset($map[$uchr])) {
- $uchr = $map[$uchr];
- $nlen = \strlen($uchr);
-
- if ($nlen == $ulen) {
- $nlen = $i;
- do {
- $s[--$nlen] = $uchr[--$ulen];
- } while ($ulen);
- } else {
- $s = substr_replace($s, $uchr, $i - $ulen, $ulen);
- $len += $nlen - $ulen;
- $i += $nlen - $ulen;
- }
- }
- }
- }
-
- if (null === $encoding) {
- return $s;
- }
-
- return iconv('UTF-8', $encoding.'//IGNORE', $s);
- }
-
- public static function mb_internal_encoding($encoding = null)
- {
- if (null === $encoding) {
- return self::$internalEncoding;
- }
-
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) {
- self::$internalEncoding = $encoding;
-
- return true;
- }
-
- return false;
- }
-
- public static function mb_language($lang = null)
- {
- if (null === $lang) {
- return self::$language;
- }
-
- switch ($lang = strtolower($lang)) {
- case 'uni':
- case 'neutral':
- self::$language = $lang;
-
- return true;
- }
-
- return false;
- }
-
- public static function mb_list_encodings()
- {
- return array('UTF-8');
- }
-
- public static function mb_encoding_aliases($encoding)
- {
- switch (strtoupper($encoding)) {
- case 'UTF8':
- case 'UTF-8':
- return array('utf8');
- }
-
- return false;
- }
-
- public static function mb_check_encoding($var = null, $encoding = null)
- {
- if (null === $encoding) {
- if (null === $var) {
- return false;
- }
- $encoding = self::$internalEncoding;
- }
-
- return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var);
- }
-
- public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
- {
- if (null === $encodingList) {
- $encodingList = self::$encodingList;
- } else {
- if (!\is_array($encodingList)) {
- $encodingList = array_map('trim', explode(',', $encodingList));
- }
- $encodingList = array_map('strtoupper', $encodingList);
- }
-
- foreach ($encodingList as $enc) {
- switch ($enc) {
- case 'ASCII':
- if (!preg_match('/[\x80-\xFF]/', $str)) {
- return $enc;
- }
- break;
-
- case 'UTF8':
- case 'UTF-8':
- if (preg_match('//u', $str)) {
- return 'UTF-8';
- }
- break;
-
- default:
- if (0 === strncmp($enc, 'ISO-8859-', 9)) {
- return $enc;
- }
- }
- }
-
- return false;
- }
-
- public static function mb_detect_order($encodingList = null)
- {
- if (null === $encodingList) {
- return self::$encodingList;
- }
-
- if (!\is_array($encodingList)) {
- $encodingList = array_map('trim', explode(',', $encodingList));
- }
- $encodingList = array_map('strtoupper', $encodingList);
-
- foreach ($encodingList as $enc) {
- switch ($enc) {
- default:
- if (strncmp($enc, 'ISO-8859-', 9)) {
- return false;
- }
- // no break
- case 'ASCII':
- case 'UTF8':
- case 'UTF-8':
- }
- }
-
- self::$encodingList = $encodingList;
-
- return true;
- }
-
- public static function mb_strlen($s, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return \strlen($s);
- }
-
- return @iconv_strlen($s, $encoding);
- }
-
- public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return strpos($haystack, $needle, $offset);
- }
-
- $needle = (string) $needle;
- if ('' === $needle) {
- trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING);
-
- return false;
- }
-
- return iconv_strpos($haystack, $needle, $offset, $encoding);
- }
-
- public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return strrpos($haystack, $needle, $offset);
- }
-
- if ($offset != (int) $offset) {
- $offset = 0;
- } elseif ($offset = (int) $offset) {
- if ($offset < 0) {
- if (0 > $offset += self::mb_strlen($needle)) {
- $haystack = self::mb_substr($haystack, 0, $offset, $encoding);
- }
- $offset = 0;
- } else {
- $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
- }
- }
-
- $pos = iconv_strrpos($haystack, $needle, $encoding);
-
- return false !== $pos ? $offset + $pos : false;
- }
-
- public static function mb_str_split($string, $split_length = 1, $encoding = null)
- {
- if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) {
- trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING);
-
- return null;
- }
-
- if (1 > $split_length = (int) $split_length) {
- trigger_error('The length of each segment must be greater than zero', E_USER_WARNING);
-
- return false;
- }
-
- if (null === $encoding) {
- $encoding = mb_internal_encoding();
- }
-
- if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
- return preg_split("/(.{{$split_length}})/u", $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
- }
-
- $result = array();
- $length = mb_strlen($string, $encoding);
-
- for ($i = 0; $i < $length; $i += $split_length) {
- $result[] = mb_substr($string, $i, $split_length, $encoding);
- }
-
- return $result;
- }
-
- public static function mb_strtolower($s, $encoding = null)
- {
- return self::mb_convert_case($s, MB_CASE_LOWER, $encoding);
- }
-
- public static function mb_strtoupper($s, $encoding = null)
- {
- return self::mb_convert_case($s, MB_CASE_UPPER, $encoding);
- }
-
- public static function mb_substitute_character($c = null)
- {
- if (0 === strcasecmp($c, 'none')) {
- return true;
- }
-
- return null !== $c ? false : 'none';
- }
-
- public static function mb_substr($s, $start, $length = null, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return (string) substr($s, $start, null === $length ? 2147483647 : $length);
- }
-
- if ($start < 0) {
- $start = iconv_strlen($s, $encoding) + $start;
- if ($start < 0) {
- $start = 0;
- }
- }
-
- if (null === $length) {
- $length = 2147483647;
- } elseif ($length < 0) {
- $length = iconv_strlen($s, $encoding) + $length - $start;
- if ($length < 0) {
- return '';
- }
- }
-
- return (string) iconv_substr($s, $start, $length, $encoding);
- }
-
- public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
- $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
-
- return self::mb_strpos($haystack, $needle, $offset, $encoding);
- }
-
- public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
- {
- $pos = self::mb_stripos($haystack, $needle, 0, $encoding);
-
- return self::getSubpart($pos, $part, $haystack, $encoding);
- }
-
- public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
- if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return strrchr($haystack, $needle, $part);
- }
- $needle = self::mb_substr($needle, 0, 1, $encoding);
- $pos = iconv_strrpos($haystack, $needle, $encoding);
-
- return self::getSubpart($pos, $part, $haystack, $encoding);
- }
-
- public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
- {
- $needle = self::mb_substr($needle, 0, 1, $encoding);
- $pos = self::mb_strripos($haystack, $needle, $encoding);
-
- return self::getSubpart($pos, $part, $haystack, $encoding);
- }
-
- public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
- {
- $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
- $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
-
- return self::mb_strrpos($haystack, $needle, $offset, $encoding);
- }
-
- public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
- {
- $pos = strpos($haystack, $needle);
- if (false === $pos) {
- return false;
- }
- if ($part) {
- return substr($haystack, 0, $pos);
- }
-
- return substr($haystack, $pos);
- }
-
- public static function mb_get_info($type = 'all')
- {
- $info = array(
- 'internal_encoding' => self::$internalEncoding,
- 'http_output' => 'pass',
- 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)',
- 'func_overload' => 0,
- 'func_overload_list' => 'no overload',
- 'mail_charset' => 'UTF-8',
- 'mail_header_encoding' => 'BASE64',
- 'mail_body_encoding' => 'BASE64',
- 'illegal_chars' => 0,
- 'encoding_translation' => 'Off',
- 'language' => self::$language,
- 'detect_order' => self::$encodingList,
- 'substitute_character' => 'none',
- 'strict_detection' => 'Off',
- );
-
- if ('all' === $type) {
- return $info;
- }
- if (isset($info[$type])) {
- return $info[$type];
- }
-
- return false;
- }
-
- public static function mb_http_input($type = '')
- {
- return false;
- }
-
- public static function mb_http_output($encoding = null)
- {
- return null !== $encoding ? 'pass' === $encoding : 'pass';
- }
-
- public static function mb_strwidth($s, $encoding = null)
- {
- $encoding = self::getEncoding($encoding);
-
- if ('UTF-8' !== $encoding) {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
- }
-
- $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
-
- return ($wide << 1) + iconv_strlen($s, 'UTF-8');
- }
-
- public static function mb_substr_count($haystack, $needle, $encoding = null)
- {
- return substr_count($haystack, $needle);
- }
-
- public static function mb_output_handler($contents, $status)
- {
- return $contents;
- }
-
- public static function mb_chr($code, $encoding = null)
- {
- if (0x80 > $code %= 0x200000) {
- $s = \chr($code);
- } elseif (0x800 > $code) {
- $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
- } elseif (0x10000 > $code) {
- $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
- } else {
- $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
- }
-
- if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
- $s = mb_convert_encoding($s, $encoding, 'UTF-8');
- }
-
- return $s;
- }
-
- public static function mb_ord($s, $encoding = null)
- {
- if ('UTF-8' !== $encoding = self::getEncoding($encoding)) {
- $s = mb_convert_encoding($s, 'UTF-8', $encoding);
- }
-
- if (1 === \strlen($s)) {
- return \ord($s);
- }
-
- $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
- if (0xF0 <= $code) {
- return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
- }
- if (0xE0 <= $code) {
- return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
- }
- if (0xC0 <= $code) {
- return (($code - 0xC0) << 6) + $s[2] - 0x80;
- }
-
- return $code;
- }
-
- private static function getSubpart($pos, $part, $haystack, $encoding)
- {
- if (false === $pos) {
- return false;
- }
- if ($part) {
- return self::mb_substr($haystack, 0, $pos, $encoding);
- }
-
- return self::mb_substr($haystack, $pos, null, $encoding);
- }
-
- private static function html_encoding_callback(array $m)
- {
- $i = 1;
- $entities = '';
- $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8'));
-
- while (isset($m[$i])) {
- if (0x80 > $m[$i]) {
- $entities .= \chr($m[$i++]);
- continue;
- }
- if (0xF0 <= $m[$i]) {
- $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
- } elseif (0xE0 <= $m[$i]) {
- $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80;
- } else {
- $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80;
- }
-
- $entities .= '&#'.$c.';';
- }
-
- return $entities;
- }
-
- private static function title_case(array $s)
- {
- return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8');
- }
-
- private static function getData($file)
- {
- if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
- return require $file;
- }
-
- return false;
- }
-
- private static function getEncoding($encoding)
- {
- if (null === $encoding) {
- return self::$internalEncoding;
- }
-
- if ('UTF-8' === $encoding) {
- return 'UTF-8';
- }
-
- $encoding = strtoupper($encoding);
-
- if ('8BIT' === $encoding || 'BINARY' === $encoding) {
- return 'CP850';
- }
-
- if ('UTF8' === $encoding) {
- return 'UTF-8';
- }
-
- return $encoding;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/README.md b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/README.md
deleted file mode 100644
index 342e828..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Symfony Polyfill / Mbstring
-===========================
-
-This component provides a partial, native PHP implementation for the
-[Mbstring](http://php.net/mbstring) extension.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
deleted file mode 100644
index e6fbfa6..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
+++ /dev/null
@@ -1,1096 +0,0 @@
-<?php
-
-return array(
- 'A' => 'a',
- 'B' => 'b',
- 'C' => 'c',
- 'D' => 'd',
- 'E' => 'e',
- 'F' => 'f',
- 'G' => 'g',
- 'H' => 'h',
- 'I' => 'i',
- 'J' => 'j',
- 'K' => 'k',
- 'L' => 'l',
- 'M' => 'm',
- 'N' => 'n',
- 'O' => 'o',
- 'P' => 'p',
- 'Q' => 'q',
- 'R' => 'r',
- 'S' => 's',
- 'T' => 't',
- 'U' => 'u',
- 'V' => 'v',
- 'W' => 'w',
- 'X' => 'x',
- 'Y' => 'y',
- 'Z' => 'z',
- 'À' => 'à',
- 'Á' => 'á',
- 'Â' => 'â',
- 'Ã' => 'ã',
- 'Ä' => 'ä',
- 'Å' => 'å',
- 'Æ' => 'æ',
- 'Ç' => 'ç',
- 'È' => 'è',
- 'É' => 'é',
- 'Ê' => 'ê',
- 'Ë' => 'ë',
- 'Ì' => 'ì',
- 'Í' => 'í',
- 'Î' => 'î',
- 'Ï' => 'ï',
- 'Ð' => 'ð',
- 'Ñ' => 'ñ',
- 'Ò' => 'ò',
- 'Ó' => 'ó',
- 'Ô' => 'ô',
- 'Õ' => 'õ',
- 'Ö' => 'ö',
- 'Ø' => 'ø',
- 'Ù' => 'ù',
- 'Ú' => 'ú',
- 'Û' => 'û',
- 'Ü' => 'ü',
- 'Ý' => 'ý',
- 'Þ' => 'þ',
- 'Ā' => 'ā',
- 'Ă' => 'ă',
- 'Ą' => 'ą',
- 'Ć' => 'ć',
- 'Ĉ' => 'ĉ',
- 'Ċ' => 'ċ',
- 'Č' => 'č',
- 'Ď' => 'ď',
- 'Đ' => 'đ',
- 'Ē' => 'ē',
- 'Ĕ' => 'ĕ',
- 'Ė' => 'ė',
- 'Ę' => 'ę',
- 'Ě' => 'ě',
- 'Ĝ' => 'ĝ',
- 'Ğ' => 'ğ',
- 'Ġ' => 'ġ',
- 'Ģ' => 'ģ',
- 'Ĥ' => 'ĥ',
- 'Ħ' => 'ħ',
- 'Ĩ' => 'ĩ',
- 'Ī' => 'ī',
- 'Ĭ' => 'ĭ',
- 'Į' => 'į',
- 'İ' => 'i',
- 'IJ' => 'ij',
- 'Ĵ' => 'ĵ',
- 'Ķ' => 'ķ',
- 'Ĺ' => 'ĺ',
- 'Ļ' => 'ļ',
- 'Ľ' => 'ľ',
- 'Ŀ' => 'ŀ',
- 'Ł' => 'ł',
- 'Ń' => 'ń',
- 'Ņ' => 'ņ',
- 'Ň' => 'ň',
- 'Ŋ' => 'ŋ',
- 'Ō' => 'ō',
- 'Ŏ' => 'ŏ',
- 'Ő' => 'ő',
- 'Œ' => 'œ',
- 'Ŕ' => 'ŕ',
- 'Ŗ' => 'ŗ',
- 'Ř' => 'ř',
- 'Ś' => 'ś',
- 'Ŝ' => 'ŝ',
- 'Ş' => 'ş',
- 'Š' => 'š',
- 'Ţ' => 'ţ',
- 'Ť' => 'ť',
- 'Ŧ' => 'ŧ',
- 'Ũ' => 'ũ',
- 'Ū' => 'ū',
- 'Ŭ' => 'ŭ',
- 'Ů' => 'ů',
- 'Ű' => 'ű',
- 'Ų' => 'ų',
- 'Ŵ' => 'ŵ',
- 'Ŷ' => 'ŷ',
- 'Ÿ' => 'ÿ',
- 'Ź' => 'ź',
- 'Ż' => 'ż',
- 'Ž' => 'ž',
- 'Ɓ' => 'ɓ',
- 'Ƃ' => 'ƃ',
- 'Ƅ' => 'ƅ',
- 'Ɔ' => 'ɔ',
- 'Ƈ' => 'ƈ',
- 'Ɖ' => 'ɖ',
- 'Ɗ' => 'ɗ',
- 'Ƌ' => 'ƌ',
- 'Ǝ' => 'ǝ',
- 'Ə' => 'ə',
- 'Ɛ' => 'ɛ',
- 'Ƒ' => 'ƒ',
- 'Ɠ' => 'ɠ',
- 'Ɣ' => 'ɣ',
- 'Ɩ' => 'ɩ',
- 'Ɨ' => 'ɨ',
- 'Ƙ' => 'ƙ',
- 'Ɯ' => 'ɯ',
- 'Ɲ' => 'ɲ',
- 'Ɵ' => 'ɵ',
- 'Ơ' => 'ơ',
- 'Ƣ' => 'ƣ',
- 'Ƥ' => 'ƥ',
- 'Ʀ' => 'ʀ',
- 'Ƨ' => 'ƨ',
- 'Ʃ' => 'ʃ',
- 'Ƭ' => 'ƭ',
- 'Ʈ' => 'ʈ',
- 'Ư' => 'ư',
- 'Ʊ' => 'ʊ',
- 'Ʋ' => 'ʋ',
- 'Ƴ' => 'ƴ',
- 'Ƶ' => 'ƶ',
- 'Ʒ' => 'ʒ',
- 'Ƹ' => 'ƹ',
- 'Ƽ' => 'ƽ',
- 'DŽ' => 'dž',
- 'Dž' => 'dž',
- 'LJ' => 'lj',
- 'Lj' => 'lj',
- 'NJ' => 'nj',
- 'Nj' => 'nj',
- 'Ǎ' => 'ǎ',
- 'Ǐ' => 'ǐ',
- 'Ǒ' => 'ǒ',
- 'Ǔ' => 'ǔ',
- 'Ǖ' => 'ǖ',
- 'Ǘ' => 'ǘ',
- 'Ǚ' => 'ǚ',
- 'Ǜ' => 'ǜ',
- 'Ǟ' => 'ǟ',
- 'Ǡ' => 'ǡ',
- 'Ǣ' => 'ǣ',
- 'Ǥ' => 'ǥ',
- 'Ǧ' => 'ǧ',
- 'Ǩ' => 'ǩ',
- 'Ǫ' => 'ǫ',
- 'Ǭ' => 'ǭ',
- 'Ǯ' => 'ǯ',
- 'DZ' => 'dz',
- 'Dz' => 'dz',
- 'Ǵ' => 'ǵ',
- 'Ƕ' => 'ƕ',
- 'Ƿ' => 'ƿ',
- 'Ǹ' => 'ǹ',
- 'Ǻ' => 'ǻ',
- 'Ǽ' => 'ǽ',
- 'Ǿ' => 'ǿ',
- 'Ȁ' => 'ȁ',
- 'Ȃ' => 'ȃ',
- 'Ȅ' => 'ȅ',
- 'Ȇ' => 'ȇ',
- 'Ȉ' => 'ȉ',
- 'Ȋ' => 'ȋ',
- 'Ȍ' => 'ȍ',
- 'Ȏ' => 'ȏ',
- 'Ȑ' => 'ȑ',
- 'Ȓ' => 'ȓ',
- 'Ȕ' => 'ȕ',
- 'Ȗ' => 'ȗ',
- 'Ș' => 'ș',
- 'Ț' => 'ț',
- 'Ȝ' => 'ȝ',
- 'Ȟ' => 'ȟ',
- 'Ƞ' => 'ƞ',
- 'Ȣ' => 'ȣ',
- 'Ȥ' => 'ȥ',
- 'Ȧ' => 'ȧ',
- 'Ȩ' => 'ȩ',
- 'Ȫ' => 'ȫ',
- 'Ȭ' => 'ȭ',
- 'Ȯ' => 'ȯ',
- 'Ȱ' => 'ȱ',
- 'Ȳ' => 'ȳ',
- 'Ⱥ' => 'ⱥ',
- 'Ȼ' => 'ȼ',
- 'Ƚ' => 'ƚ',
- 'Ⱦ' => 'ⱦ',
- 'Ɂ' => 'ɂ',
- 'Ƀ' => 'ƀ',
- 'Ʉ' => 'ʉ',
- 'Ʌ' => 'ʌ',
- 'Ɇ' => 'ɇ',
- 'Ɉ' => 'ɉ',
- 'Ɋ' => 'ɋ',
- 'Ɍ' => 'ɍ',
- 'Ɏ' => 'ɏ',
- 'Ͱ' => 'ͱ',
- 'Ͳ' => 'ͳ',
- 'Ͷ' => 'ͷ',
- 'Ϳ' => 'ϳ',
- 'Ά' => 'ά',
- 'Έ' => 'έ',
- 'Ή' => 'ή',
- 'Ί' => 'ί',
- 'Ό' => 'ό',
- 'Ύ' => 'ύ',
- 'Ώ' => 'ώ',
- 'Α' => 'α',
- 'Β' => 'β',
- 'Γ' => 'γ',
- 'Δ' => 'δ',
- 'Ε' => 'ε',
- 'Ζ' => 'ζ',
- 'Η' => 'η',
- 'Θ' => 'θ',
- 'Ι' => 'ι',
- 'Κ' => 'κ',
- 'Λ' => 'λ',
- 'Μ' => 'μ',
- 'Ν' => 'ν',
- 'Ξ' => 'ξ',
- 'Ο' => 'ο',
- 'Π' => 'π',
- 'Ρ' => 'ρ',
- 'Σ' => 'σ',
- 'Τ' => 'τ',
- 'Υ' => 'υ',
- 'Φ' => 'φ',
- 'Χ' => 'χ',
- 'Ψ' => 'ψ',
- 'Ω' => 'ω',
- 'Ϊ' => 'ϊ',
- 'Ϋ' => 'ϋ',
- 'Ϗ' => 'ϗ',
- 'Ϙ' => 'ϙ',
- 'Ϛ' => 'ϛ',
- 'Ϝ' => 'ϝ',
- 'Ϟ' => 'ϟ',
- 'Ϡ' => 'ϡ',
- 'Ϣ' => 'ϣ',
- 'Ϥ' => 'ϥ',
- 'Ϧ' => 'ϧ',
- 'Ϩ' => 'ϩ',
- 'Ϫ' => 'ϫ',
- 'Ϭ' => 'ϭ',
- 'Ϯ' => 'ϯ',
- 'ϴ' => 'θ',
- 'Ϸ' => 'ϸ',
- 'Ϲ' => 'ϲ',
- 'Ϻ' => 'ϻ',
- 'Ͻ' => 'ͻ',
- 'Ͼ' => 'ͼ',
- 'Ͽ' => 'ͽ',
- 'Ѐ' => 'ѐ',
- 'Ё' => 'ё',
- 'Ђ' => 'ђ',
- 'Ѓ' => 'ѓ',
- 'Є' => 'є',
- 'Ѕ' => 'ѕ',
- 'І' => 'і',
- 'Ї' => 'ї',
- 'Ј' => 'ј',
- 'Љ' => 'љ',
- 'Њ' => 'њ',
- 'Ћ' => 'ћ',
- 'Ќ' => 'ќ',
- 'Ѝ' => 'ѝ',
- 'Ў' => 'ў',
- 'Џ' => 'џ',
- 'А' => 'а',
- 'Б' => 'б',
- 'В' => 'в',
- 'Г' => 'г',
- 'Д' => 'д',
- 'Е' => 'е',
- 'Ж' => 'ж',
- 'З' => 'з',
- 'И' => 'и',
- 'Й' => 'й',
- 'К' => 'к',
- 'Л' => 'л',
- 'М' => 'м',
- 'Н' => 'н',
- 'О' => 'о',
- 'П' => 'п',
- 'Р' => 'р',
- 'С' => 'с',
- 'Т' => 'т',
- 'У' => 'у',
- 'Ф' => 'ф',
- 'Х' => 'х',
- 'Ц' => 'ц',
- 'Ч' => 'ч',
- 'Ш' => 'ш',
- 'Щ' => 'щ',
- 'Ъ' => 'ъ',
- 'Ы' => 'ы',
- 'Ь' => 'ь',
- 'Э' => 'э',
- 'Ю' => 'ю',
- 'Я' => 'я',
- 'Ѡ' => 'ѡ',
- 'Ѣ' => 'ѣ',
- 'Ѥ' => 'ѥ',
- 'Ѧ' => 'ѧ',
- 'Ѩ' => 'ѩ',
- 'Ѫ' => 'ѫ',
- 'Ѭ' => 'ѭ',
- 'Ѯ' => 'ѯ',
- 'Ѱ' => 'ѱ',
- 'Ѳ' => 'ѳ',
- 'Ѵ' => 'ѵ',
- 'Ѷ' => 'ѷ',
- 'Ѹ' => 'ѹ',
- 'Ѻ' => 'ѻ',
- 'Ѽ' => 'ѽ',
- 'Ѿ' => 'ѿ',
- 'Ҁ' => 'ҁ',
- 'Ҋ' => 'ҋ',
- 'Ҍ' => 'ҍ',
- 'Ҏ' => 'ҏ',
- 'Ґ' => 'ґ',
- 'Ғ' => 'ғ',
- 'Ҕ' => 'ҕ',
- 'Җ' => 'җ',
- 'Ҙ' => 'ҙ',
- 'Қ' => 'қ',
- 'Ҝ' => 'ҝ',
- 'Ҟ' => 'ҟ',
- 'Ҡ' => 'ҡ',
- 'Ң' => 'ң',
- 'Ҥ' => 'ҥ',
- 'Ҧ' => 'ҧ',
- 'Ҩ' => 'ҩ',
- 'Ҫ' => 'ҫ',
- 'Ҭ' => 'ҭ',
- 'Ү' => 'ү',
- 'Ұ' => 'ұ',
- 'Ҳ' => 'ҳ',
- 'Ҵ' => 'ҵ',
- 'Ҷ' => 'ҷ',
- 'Ҹ' => 'ҹ',
- 'Һ' => 'һ',
- 'Ҽ' => 'ҽ',
- 'Ҿ' => 'ҿ',
- 'Ӏ' => 'ӏ',
- 'Ӂ' => 'ӂ',
- 'Ӄ' => 'ӄ',
- 'Ӆ' => 'ӆ',
- 'Ӈ' => 'ӈ',
- 'Ӊ' => 'ӊ',
- 'Ӌ' => 'ӌ',
- 'Ӎ' => 'ӎ',
- 'Ӑ' => 'ӑ',
- 'Ӓ' => 'ӓ',
- 'Ӕ' => 'ӕ',
- 'Ӗ' => 'ӗ',
- 'Ә' => 'ә',
- 'Ӛ' => 'ӛ',
- 'Ӝ' => 'ӝ',
- 'Ӟ' => 'ӟ',
- 'Ӡ' => 'ӡ',
- 'Ӣ' => 'ӣ',
- 'Ӥ' => 'ӥ',
- 'Ӧ' => 'ӧ',
- 'Ө' => 'ө',
- 'Ӫ' => 'ӫ',
- 'Ӭ' => 'ӭ',
- 'Ӯ' => 'ӯ',
- 'Ӱ' => 'ӱ',
- 'Ӳ' => 'ӳ',
- 'Ӵ' => 'ӵ',
- 'Ӷ' => 'ӷ',
- 'Ӹ' => 'ӹ',
- 'Ӻ' => 'ӻ',
- 'Ӽ' => 'ӽ',
- 'Ӿ' => 'ӿ',
- 'Ԁ' => 'ԁ',
- 'Ԃ' => 'ԃ',
- 'Ԅ' => 'ԅ',
- 'Ԇ' => 'ԇ',
- 'Ԉ' => 'ԉ',
- 'Ԋ' => 'ԋ',
- 'Ԍ' => 'ԍ',
- 'Ԏ' => 'ԏ',
- 'Ԑ' => 'ԑ',
- 'Ԓ' => 'ԓ',
- 'Ԕ' => 'ԕ',
- 'Ԗ' => 'ԗ',
- 'Ԙ' => 'ԙ',
- 'Ԛ' => 'ԛ',
- 'Ԝ' => 'ԝ',
- 'Ԟ' => 'ԟ',
- 'Ԡ' => 'ԡ',
- 'Ԣ' => 'ԣ',
- 'Ԥ' => 'ԥ',
- 'Ԧ' => 'ԧ',
- 'Ԩ' => 'ԩ',
- 'Ԫ' => 'ԫ',
- 'Ԭ' => 'ԭ',
- 'Ԯ' => 'ԯ',
- 'Ա' => 'ա',
- 'Բ' => 'բ',
- 'Գ' => 'գ',
- 'Դ' => 'դ',
- 'Ե' => 'ե',
- 'Զ' => 'զ',
- 'Է' => 'է',
- 'Ը' => 'ը',
- 'Թ' => 'թ',
- 'Ժ' => 'ժ',
- 'Ի' => 'ի',
- 'Լ' => 'լ',
- 'Խ' => 'խ',
- 'Ծ' => 'ծ',
- 'Կ' => 'կ',
- 'Հ' => 'հ',
- 'Ձ' => 'ձ',
- 'Ղ' => 'ղ',
- 'Ճ' => 'ճ',
- 'Մ' => 'մ',
- 'Յ' => 'յ',
- 'Ն' => 'ն',
- 'Շ' => 'շ',
- 'Ո' => 'ո',
- 'Չ' => 'չ',
- 'Պ' => 'պ',
- 'Ջ' => 'ջ',
- 'Ռ' => 'ռ',
- 'Ս' => 'ս',
- 'Վ' => 'վ',
- 'Տ' => 'տ',
- 'Ր' => 'ր',
- 'Ց' => 'ց',
- 'Ւ' => 'ւ',
- 'Փ' => 'փ',
- 'Ք' => 'ք',
- 'Օ' => 'օ',
- 'Ֆ' => 'ֆ',
- 'Ⴀ' => 'ⴀ',
- 'Ⴁ' => 'ⴁ',
- 'Ⴂ' => 'ⴂ',
- 'Ⴃ' => 'ⴃ',
- 'Ⴄ' => 'ⴄ',
- 'Ⴅ' => 'ⴅ',
- 'Ⴆ' => 'ⴆ',
- 'Ⴇ' => 'ⴇ',
- 'Ⴈ' => 'ⴈ',
- 'Ⴉ' => 'ⴉ',
- 'Ⴊ' => 'ⴊ',
- 'Ⴋ' => 'ⴋ',
- 'Ⴌ' => 'ⴌ',
- 'Ⴍ' => 'ⴍ',
- 'Ⴎ' => 'ⴎ',
- 'Ⴏ' => 'ⴏ',
- 'Ⴐ' => 'ⴐ',
- 'Ⴑ' => 'ⴑ',
- 'Ⴒ' => 'ⴒ',
- 'Ⴓ' => 'ⴓ',
- 'Ⴔ' => 'ⴔ',
- 'Ⴕ' => 'ⴕ',
- 'Ⴖ' => 'ⴖ',
- 'Ⴗ' => 'ⴗ',
- 'Ⴘ' => 'ⴘ',
- 'Ⴙ' => 'ⴙ',
- 'Ⴚ' => 'ⴚ',
- 'Ⴛ' => 'ⴛ',
- 'Ⴜ' => 'ⴜ',
- 'Ⴝ' => 'ⴝ',
- 'Ⴞ' => 'ⴞ',
- 'Ⴟ' => 'ⴟ',
- 'Ⴠ' => 'ⴠ',
- 'Ⴡ' => 'ⴡ',
- 'Ⴢ' => 'ⴢ',
- 'Ⴣ' => 'ⴣ',
- 'Ⴤ' => 'ⴤ',
- 'Ⴥ' => 'ⴥ',
- 'Ⴧ' => 'ⴧ',
- 'Ⴭ' => 'ⴭ',
- 'Ḁ' => 'ḁ',
- 'Ḃ' => 'ḃ',
- 'Ḅ' => 'ḅ',
- 'Ḇ' => 'ḇ',
- 'Ḉ' => 'ḉ',
- 'Ḋ' => 'ḋ',
- 'Ḍ' => 'ḍ',
- 'Ḏ' => 'ḏ',
- 'Ḑ' => 'ḑ',
- 'Ḓ' => 'ḓ',
- 'Ḕ' => 'ḕ',
- 'Ḗ' => 'ḗ',
- 'Ḙ' => 'ḙ',
- 'Ḛ' => 'ḛ',
- 'Ḝ' => 'ḝ',
- 'Ḟ' => 'ḟ',
- 'Ḡ' => 'ḡ',
- 'Ḣ' => 'ḣ',
- 'Ḥ' => 'ḥ',
- 'Ḧ' => 'ḧ',
- 'Ḩ' => 'ḩ',
- 'Ḫ' => 'ḫ',
- 'Ḭ' => 'ḭ',
- 'Ḯ' => 'ḯ',
- 'Ḱ' => 'ḱ',
- 'Ḳ' => 'ḳ',
- 'Ḵ' => 'ḵ',
- 'Ḷ' => 'ḷ',
- 'Ḹ' => 'ḹ',
- 'Ḻ' => 'ḻ',
- 'Ḽ' => 'ḽ',
- 'Ḿ' => 'ḿ',
- 'Ṁ' => 'ṁ',
- 'Ṃ' => 'ṃ',
- 'Ṅ' => 'ṅ',
- 'Ṇ' => 'ṇ',
- 'Ṉ' => 'ṉ',
- 'Ṋ' => 'ṋ',
- 'Ṍ' => 'ṍ',
- 'Ṏ' => 'ṏ',
- 'Ṑ' => 'ṑ',
- 'Ṓ' => 'ṓ',
- 'Ṕ' => 'ṕ',
- 'Ṗ' => 'ṗ',
- 'Ṙ' => 'ṙ',
- 'Ṛ' => 'ṛ',
- 'Ṝ' => 'ṝ',
- 'Ṟ' => 'ṟ',
- 'Ṡ' => 'ṡ',
- 'Ṣ' => 'ṣ',
- 'Ṥ' => 'ṥ',
- 'Ṧ' => 'ṧ',
- 'Ṩ' => 'ṩ',
- 'Ṫ' => 'ṫ',
- 'Ṭ' => 'ṭ',
- 'Ṯ' => 'ṯ',
- 'Ṱ' => 'ṱ',
- 'Ṳ' => 'ṳ',
- 'Ṵ' => 'ṵ',
- 'Ṷ' => 'ṷ',
- 'Ṹ' => 'ṹ',
- 'Ṻ' => 'ṻ',
- 'Ṽ' => 'ṽ',
- 'Ṿ' => 'ṿ',
- 'Ẁ' => 'ẁ',
- 'Ẃ' => 'ẃ',
- 'Ẅ' => 'ẅ',
- 'Ẇ' => 'ẇ',
- 'Ẉ' => 'ẉ',
- 'Ẋ' => 'ẋ',
- 'Ẍ' => 'ẍ',
- 'Ẏ' => 'ẏ',
- 'Ẑ' => 'ẑ',
- 'Ẓ' => 'ẓ',
- 'Ẕ' => 'ẕ',
- 'ẞ' => 'ß',
- 'Ạ' => 'ạ',
- 'Ả' => 'ả',
- 'Ấ' => 'ấ',
- 'Ầ' => 'ầ',
- 'Ẩ' => 'ẩ',
- 'Ẫ' => 'ẫ',
- 'Ậ' => 'ậ',
- 'Ắ' => 'ắ',
- 'Ằ' => 'ằ',
- 'Ẳ' => 'ẳ',
- 'Ẵ' => 'ẵ',
- 'Ặ' => 'ặ',
- 'Ẹ' => 'ẹ',
- 'Ẻ' => 'ẻ',
- 'Ẽ' => 'ẽ',
- 'Ế' => 'ế',
- 'Ề' => 'ề',
- 'Ể' => 'ể',
- 'Ễ' => 'ễ',
- 'Ệ' => 'ệ',
- 'Ỉ' => 'ỉ',
- 'Ị' => 'ị',
- 'Ọ' => 'ọ',
- 'Ỏ' => 'ỏ',
- 'Ố' => 'ố',
- 'Ồ' => 'ồ',
- 'Ổ' => 'ổ',
- 'Ỗ' => 'ỗ',
- 'Ộ' => 'ộ',
- 'Ớ' => 'ớ',
- 'Ờ' => 'ờ',
- 'Ở' => 'ở',
- 'Ỡ' => 'ỡ',
- 'Ợ' => 'ợ',
- 'Ụ' => 'ụ',
- 'Ủ' => 'ủ',
- 'Ứ' => 'ứ',
- 'Ừ' => 'ừ',
- 'Ử' => 'ử',
- 'Ữ' => 'ữ',
- 'Ự' => 'ự',
- 'Ỳ' => 'ỳ',
- 'Ỵ' => 'ỵ',
- 'Ỷ' => 'ỷ',
- 'Ỹ' => 'ỹ',
- 'Ỻ' => 'ỻ',
- 'Ỽ' => 'ỽ',
- 'Ỿ' => 'ỿ',
- 'Ἀ' => 'ἀ',
- 'Ἁ' => 'ἁ',
- 'Ἂ' => 'ἂ',
- 'Ἃ' => 'ἃ',
- 'Ἄ' => 'ἄ',
- 'Ἅ' => 'ἅ',
- 'Ἆ' => 'ἆ',
- 'Ἇ' => 'ἇ',
- 'Ἐ' => 'ἐ',
- 'Ἑ' => 'ἑ',
- 'Ἒ' => 'ἒ',
- 'Ἓ' => 'ἓ',
- 'Ἔ' => 'ἔ',
- 'Ἕ' => 'ἕ',
- 'Ἠ' => 'ἠ',
- 'Ἡ' => 'ἡ',
- 'Ἢ' => 'ἢ',
- 'Ἣ' => 'ἣ',
- 'Ἤ' => 'ἤ',
- 'Ἥ' => 'ἥ',
- 'Ἦ' => 'ἦ',
- 'Ἧ' => 'ἧ',
- 'Ἰ' => 'ἰ',
- 'Ἱ' => 'ἱ',
- 'Ἲ' => 'ἲ',
- 'Ἳ' => 'ἳ',
- 'Ἴ' => 'ἴ',
- 'Ἵ' => 'ἵ',
- 'Ἶ' => 'ἶ',
- 'Ἷ' => 'ἷ',
- 'Ὀ' => 'ὀ',
- 'Ὁ' => 'ὁ',
- 'Ὂ' => 'ὂ',
- 'Ὃ' => 'ὃ',
- 'Ὄ' => 'ὄ',
- 'Ὅ' => 'ὅ',
- 'Ὑ' => 'ὑ',
- 'Ὓ' => 'ὓ',
- 'Ὕ' => 'ὕ',
- 'Ὗ' => 'ὗ',
- 'Ὠ' => 'ὠ',
- 'Ὡ' => 'ὡ',
- 'Ὢ' => 'ὢ',
- 'Ὣ' => 'ὣ',
- 'Ὤ' => 'ὤ',
- 'Ὥ' => 'ὥ',
- 'Ὦ' => 'ὦ',
- 'Ὧ' => 'ὧ',
- 'ᾈ' => 'ᾀ',
- 'ᾉ' => 'ᾁ',
- 'ᾊ' => 'ᾂ',
- 'ᾋ' => 'ᾃ',
- 'ᾌ' => 'ᾄ',
- 'ᾍ' => 'ᾅ',
- 'ᾎ' => 'ᾆ',
- 'ᾏ' => 'ᾇ',
- 'ᾘ' => 'ᾐ',
- 'ᾙ' => 'ᾑ',
- 'ᾚ' => 'ᾒ',
- 'ᾛ' => 'ᾓ',
- 'ᾜ' => 'ᾔ',
- 'ᾝ' => 'ᾕ',
- 'ᾞ' => 'ᾖ',
- 'ᾟ' => 'ᾗ',
- 'ᾨ' => 'ᾠ',
- 'ᾩ' => 'ᾡ',
- 'ᾪ' => 'ᾢ',
- 'ᾫ' => 'ᾣ',
- 'ᾬ' => 'ᾤ',
- 'ᾭ' => 'ᾥ',
- 'ᾮ' => 'ᾦ',
- 'ᾯ' => 'ᾧ',
- 'Ᾰ' => 'ᾰ',
- 'Ᾱ' => 'ᾱ',
- 'Ὰ' => 'ὰ',
- 'Ά' => 'ά',
- 'ᾼ' => 'ᾳ',
- 'Ὲ' => 'ὲ',
- 'Έ' => 'έ',
- 'Ὴ' => 'ὴ',
- 'Ή' => 'ή',
- 'ῌ' => 'ῃ',
- 'Ῐ' => 'ῐ',
- 'Ῑ' => 'ῑ',
- 'Ὶ' => 'ὶ',
- 'Ί' => 'ί',
- 'Ῠ' => 'ῠ',
- 'Ῡ' => 'ῡ',
- 'Ὺ' => 'ὺ',
- 'Ύ' => 'ύ',
- 'Ῥ' => 'ῥ',
- 'Ὸ' => 'ὸ',
- 'Ό' => 'ό',
- 'Ὼ' => 'ὼ',
- 'Ώ' => 'ώ',
- 'ῼ' => 'ῳ',
- 'Ω' => 'ω',
- 'K' => 'k',
- 'Å' => 'å',
- 'Ⅎ' => 'ⅎ',
- 'Ⅰ' => 'ⅰ',
- 'Ⅱ' => 'ⅱ',
- 'Ⅲ' => 'ⅲ',
- 'Ⅳ' => 'ⅳ',
- 'Ⅴ' => 'ⅴ',
- 'Ⅵ' => 'ⅵ',
- 'Ⅶ' => 'ⅶ',
- 'Ⅷ' => 'ⅷ',
- 'Ⅸ' => 'ⅸ',
- 'Ⅹ' => 'ⅹ',
- 'Ⅺ' => 'ⅺ',
- 'Ⅻ' => 'ⅻ',
- 'Ⅼ' => 'ⅼ',
- 'Ⅽ' => 'ⅽ',
- 'Ⅾ' => 'ⅾ',
- 'Ⅿ' => 'ⅿ',
- 'Ↄ' => 'ↄ',
- 'Ⓐ' => 'ⓐ',
- 'Ⓑ' => 'ⓑ',
- 'Ⓒ' => 'ⓒ',
- 'Ⓓ' => 'ⓓ',
- 'Ⓔ' => 'ⓔ',
- 'Ⓕ' => 'ⓕ',
- 'Ⓖ' => 'ⓖ',
- 'Ⓗ' => 'ⓗ',
- 'Ⓘ' => 'ⓘ',
- 'Ⓙ' => 'ⓙ',
- 'Ⓚ' => 'ⓚ',
- 'Ⓛ' => 'ⓛ',
- 'Ⓜ' => 'ⓜ',
- 'Ⓝ' => 'ⓝ',
- 'Ⓞ' => 'ⓞ',
- 'Ⓟ' => 'ⓟ',
- 'Ⓠ' => 'ⓠ',
- 'Ⓡ' => 'ⓡ',
- 'Ⓢ' => 'ⓢ',
- 'Ⓣ' => 'ⓣ',
- 'Ⓤ' => 'ⓤ',
- 'Ⓥ' => 'ⓥ',
- 'Ⓦ' => 'ⓦ',
- 'Ⓧ' => 'ⓧ',
- 'Ⓨ' => 'ⓨ',
- 'Ⓩ' => 'ⓩ',
- 'Ⰰ' => 'ⰰ',
- 'Ⰱ' => 'ⰱ',
- 'Ⰲ' => 'ⰲ',
- 'Ⰳ' => 'ⰳ',
- 'Ⰴ' => 'ⰴ',
- 'Ⰵ' => 'ⰵ',
- 'Ⰶ' => 'ⰶ',
- 'Ⰷ' => 'ⰷ',
- 'Ⰸ' => 'ⰸ',
- 'Ⰹ' => 'ⰹ',
- 'Ⰺ' => 'ⰺ',
- 'Ⰻ' => 'ⰻ',
- 'Ⰼ' => 'ⰼ',
- 'Ⰽ' => 'ⰽ',
- 'Ⰾ' => 'ⰾ',
- 'Ⰿ' => 'ⰿ',
- 'Ⱀ' => 'ⱀ',
- 'Ⱁ' => 'ⱁ',
- 'Ⱂ' => 'ⱂ',
- 'Ⱃ' => 'ⱃ',
- 'Ⱄ' => 'ⱄ',
- 'Ⱅ' => 'ⱅ',
- 'Ⱆ' => 'ⱆ',
- 'Ⱇ' => 'ⱇ',
- 'Ⱈ' => 'ⱈ',
- 'Ⱉ' => 'ⱉ',
- 'Ⱊ' => 'ⱊ',
- 'Ⱋ' => 'ⱋ',
- 'Ⱌ' => 'ⱌ',
- 'Ⱍ' => 'ⱍ',
- 'Ⱎ' => 'ⱎ',
- 'Ⱏ' => 'ⱏ',
- 'Ⱐ' => 'ⱐ',
- 'Ⱑ' => 'ⱑ',
- 'Ⱒ' => 'ⱒ',
- 'Ⱓ' => 'ⱓ',
- 'Ⱔ' => 'ⱔ',
- 'Ⱕ' => 'ⱕ',
- 'Ⱖ' => 'ⱖ',
- 'Ⱗ' => 'ⱗ',
- 'Ⱘ' => 'ⱘ',
- 'Ⱙ' => 'ⱙ',
- 'Ⱚ' => 'ⱚ',
- 'Ⱛ' => 'ⱛ',
- 'Ⱜ' => 'ⱜ',
- 'Ⱝ' => 'ⱝ',
- 'Ⱞ' => 'ⱞ',
- 'Ⱡ' => 'ⱡ',
- 'Ɫ' => 'ɫ',
- 'Ᵽ' => 'ᵽ',
- 'Ɽ' => 'ɽ',
- 'Ⱨ' => 'ⱨ',
- 'Ⱪ' => 'ⱪ',
- 'Ⱬ' => 'ⱬ',
- 'Ɑ' => 'ɑ',
- 'Ɱ' => 'ɱ',
- 'Ɐ' => 'ɐ',
- 'Ɒ' => 'ɒ',
- 'Ⱳ' => 'ⱳ',
- 'Ⱶ' => 'ⱶ',
- 'Ȿ' => 'ȿ',
- 'Ɀ' => 'ɀ',
- 'Ⲁ' => 'ⲁ',
- 'Ⲃ' => 'ⲃ',
- 'Ⲅ' => 'ⲅ',
- 'Ⲇ' => 'ⲇ',
- 'Ⲉ' => 'ⲉ',
- 'Ⲋ' => 'ⲋ',
- 'Ⲍ' => 'ⲍ',
- 'Ⲏ' => 'ⲏ',
- 'Ⲑ' => 'ⲑ',
- 'Ⲓ' => 'ⲓ',
- 'Ⲕ' => 'ⲕ',
- 'Ⲗ' => 'ⲗ',
- 'Ⲙ' => 'ⲙ',
- 'Ⲛ' => 'ⲛ',
- 'Ⲝ' => 'ⲝ',
- 'Ⲟ' => 'ⲟ',
- 'Ⲡ' => 'ⲡ',
- 'Ⲣ' => 'ⲣ',
- 'Ⲥ' => 'ⲥ',
- 'Ⲧ' => 'ⲧ',
- 'Ⲩ' => 'ⲩ',
- 'Ⲫ' => 'ⲫ',
- 'Ⲭ' => 'ⲭ',
- 'Ⲯ' => 'ⲯ',
- 'Ⲱ' => 'ⲱ',
- 'Ⲳ' => 'ⲳ',
- 'Ⲵ' => 'ⲵ',
- 'Ⲷ' => 'ⲷ',
- 'Ⲹ' => 'ⲹ',
- 'Ⲻ' => 'ⲻ',
- 'Ⲽ' => 'ⲽ',
- 'Ⲿ' => 'ⲿ',
- 'Ⳁ' => 'ⳁ',
- 'Ⳃ' => 'ⳃ',
- 'Ⳅ' => 'ⳅ',
- 'Ⳇ' => 'ⳇ',
- 'Ⳉ' => 'ⳉ',
- 'Ⳋ' => 'ⳋ',
- 'Ⳍ' => 'ⳍ',
- 'Ⳏ' => 'ⳏ',
- 'Ⳑ' => 'ⳑ',
- 'Ⳓ' => 'ⳓ',
- 'Ⳕ' => 'ⳕ',
- 'Ⳗ' => 'ⳗ',
- 'Ⳙ' => 'ⳙ',
- 'Ⳛ' => 'ⳛ',
- 'Ⳝ' => 'ⳝ',
- 'Ⳟ' => 'ⳟ',
- 'Ⳡ' => 'ⳡ',
- 'Ⳣ' => 'ⳣ',
- 'Ⳬ' => 'ⳬ',
- 'Ⳮ' => 'ⳮ',
- 'Ⳳ' => 'ⳳ',
- 'Ꙁ' => 'ꙁ',
- 'Ꙃ' => 'ꙃ',
- 'Ꙅ' => 'ꙅ',
- 'Ꙇ' => 'ꙇ',
- 'Ꙉ' => 'ꙉ',
- 'Ꙋ' => 'ꙋ',
- 'Ꙍ' => 'ꙍ',
- 'Ꙏ' => 'ꙏ',
- 'Ꙑ' => 'ꙑ',
- 'Ꙓ' => 'ꙓ',
- 'Ꙕ' => 'ꙕ',
- 'Ꙗ' => 'ꙗ',
- 'Ꙙ' => 'ꙙ',
- 'Ꙛ' => 'ꙛ',
- 'Ꙝ' => 'ꙝ',
- 'Ꙟ' => 'ꙟ',
- 'Ꙡ' => 'ꙡ',
- 'Ꙣ' => 'ꙣ',
- 'Ꙥ' => 'ꙥ',
- 'Ꙧ' => 'ꙧ',
- 'Ꙩ' => 'ꙩ',
- 'Ꙫ' => 'ꙫ',
- 'Ꙭ' => 'ꙭ',
- 'Ꚁ' => 'ꚁ',
- 'Ꚃ' => 'ꚃ',
- 'Ꚅ' => 'ꚅ',
- 'Ꚇ' => 'ꚇ',
- 'Ꚉ' => 'ꚉ',
- 'Ꚋ' => 'ꚋ',
- 'Ꚍ' => 'ꚍ',
- 'Ꚏ' => 'ꚏ',
- 'Ꚑ' => 'ꚑ',
- 'Ꚓ' => 'ꚓ',
- 'Ꚕ' => 'ꚕ',
- 'Ꚗ' => 'ꚗ',
- 'Ꚙ' => 'ꚙ',
- 'Ꚛ' => 'ꚛ',
- 'Ꜣ' => 'ꜣ',
- 'Ꜥ' => 'ꜥ',
- 'Ꜧ' => 'ꜧ',
- 'Ꜩ' => 'ꜩ',
- 'Ꜫ' => 'ꜫ',
- 'Ꜭ' => 'ꜭ',
- 'Ꜯ' => 'ꜯ',
- 'Ꜳ' => 'ꜳ',
- 'Ꜵ' => 'ꜵ',
- 'Ꜷ' => 'ꜷ',
- 'Ꜹ' => 'ꜹ',
- 'Ꜻ' => 'ꜻ',
- 'Ꜽ' => 'ꜽ',
- 'Ꜿ' => 'ꜿ',
- 'Ꝁ' => 'ꝁ',
- 'Ꝃ' => 'ꝃ',
- 'Ꝅ' => 'ꝅ',
- 'Ꝇ' => 'ꝇ',
- 'Ꝉ' => 'ꝉ',
- 'Ꝋ' => 'ꝋ',
- 'Ꝍ' => 'ꝍ',
- 'Ꝏ' => 'ꝏ',
- 'Ꝑ' => 'ꝑ',
- 'Ꝓ' => 'ꝓ',
- 'Ꝕ' => 'ꝕ',
- 'Ꝗ' => 'ꝗ',
- 'Ꝙ' => 'ꝙ',
- 'Ꝛ' => 'ꝛ',
- 'Ꝝ' => 'ꝝ',
- 'Ꝟ' => 'ꝟ',
- 'Ꝡ' => 'ꝡ',
- 'Ꝣ' => 'ꝣ',
- 'Ꝥ' => 'ꝥ',
- 'Ꝧ' => 'ꝧ',
- 'Ꝩ' => 'ꝩ',
- 'Ꝫ' => 'ꝫ',
- 'Ꝭ' => 'ꝭ',
- 'Ꝯ' => 'ꝯ',
- 'Ꝺ' => 'ꝺ',
- 'Ꝼ' => 'ꝼ',
- 'Ᵹ' => 'ᵹ',
- 'Ꝿ' => 'ꝿ',
- 'Ꞁ' => 'ꞁ',
- 'Ꞃ' => 'ꞃ',
- 'Ꞅ' => 'ꞅ',
- 'Ꞇ' => 'ꞇ',
- 'Ꞌ' => 'ꞌ',
- 'Ɥ' => 'ɥ',
- 'Ꞑ' => 'ꞑ',
- 'Ꞓ' => 'ꞓ',
- 'Ꞗ' => 'ꞗ',
- 'Ꞙ' => 'ꞙ',
- 'Ꞛ' => 'ꞛ',
- 'Ꞝ' => 'ꞝ',
- 'Ꞟ' => 'ꞟ',
- 'Ꞡ' => 'ꞡ',
- 'Ꞣ' => 'ꞣ',
- 'Ꞥ' => 'ꞥ',
- 'Ꞧ' => 'ꞧ',
- 'Ꞩ' => 'ꞩ',
- 'Ɦ' => 'ɦ',
- 'Ɜ' => 'ɜ',
- 'Ɡ' => 'ɡ',
- 'Ɬ' => 'ɬ',
- 'Ʞ' => 'ʞ',
- 'Ʇ' => 'ʇ',
- 'A' => 'a',
- 'B' => 'b',
- 'C' => 'c',
- 'D' => 'd',
- 'E' => 'e',
- 'F' => 'f',
- 'G' => 'g',
- 'H' => 'h',
- 'I' => 'i',
- 'J' => 'j',
- 'K' => 'k',
- 'L' => 'l',
- 'M' => 'm',
- 'N' => 'n',
- 'O' => 'o',
- 'P' => 'p',
- 'Q' => 'q',
- 'R' => 'r',
- 'S' => 's',
- 'T' => 't',
- 'U' => 'u',
- 'V' => 'v',
- 'W' => 'w',
- 'X' => 'x',
- 'Y' => 'y',
- 'Z' => 'z',
- '𐐀' => '𐐨',
- '𐐁' => '𐐩',
- '𐐂' => '𐐪',
- '𐐃' => '𐐫',
- '𐐄' => '𐐬',
- '𐐅' => '𐐭',
- '𐐆' => '𐐮',
- '𐐇' => '𐐯',
- '𐐈' => '𐐰',
- '𐐉' => '𐐱',
- '𐐊' => '𐐲',
- '𐐋' => '𐐳',
- '𐐌' => '𐐴',
- '𐐍' => '𐐵',
- '𐐎' => '𐐶',
- '𐐏' => '𐐷',
- '𐐐' => '𐐸',
- '𐐑' => '𐐹',
- '𐐒' => '𐐺',
- '𐐓' => '𐐻',
- '𐐔' => '𐐼',
- '𐐕' => '𐐽',
- '𐐖' => '𐐾',
- '𐐗' => '𐐿',
- '𐐘' => '𐑀',
- '𐐙' => '𐑁',
- '𐐚' => '𐑂',
- '𐐛' => '𐑃',
- '𐐜' => '𐑄',
- '𐐝' => '𐑅',
- '𐐞' => '𐑆',
- '𐐟' => '𐑇',
- '𐐠' => '𐑈',
- '𐐡' => '𐑉',
- '𐐢' => '𐑊',
- '𐐣' => '𐑋',
- '𐐤' => '𐑌',
- '𐐥' => '𐑍',
- '𐐦' => '𐑎',
- '𐐧' => '𐑏',
- '𑢠' => '𑣀',
- '𑢡' => '𑣁',
- '𑢢' => '𑣂',
- '𑢣' => '𑣃',
- '𑢤' => '𑣄',
- '𑢥' => '𑣅',
- '𑢦' => '𑣆',
- '𑢧' => '𑣇',
- '𑢨' => '𑣈',
- '𑢩' => '𑣉',
- '𑢪' => '𑣊',
- '𑢫' => '𑣋',
- '𑢬' => '𑣌',
- '𑢭' => '𑣍',
- '𑢮' => '𑣎',
- '𑢯' => '𑣏',
- '𑢰' => '𑣐',
- '𑢱' => '𑣑',
- '𑢲' => '𑣒',
- '𑢳' => '𑣓',
- '𑢴' => '𑣔',
- '𑢵' => '𑣕',
- '𑢶' => '𑣖',
- '𑢷' => '𑣗',
- '𑢸' => '𑣘',
- '𑢹' => '𑣙',
- '𑢺' => '𑣚',
- '𑢻' => '𑣛',
- '𑢼' => '𑣜',
- '𑢽' => '𑣝',
- '𑢾' => '𑣞',
- '𑢿' => '𑣟',
-);
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
deleted file mode 100644
index 2a8f6e7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
-
-return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u';
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
deleted file mode 100644
index b8103b2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
+++ /dev/null
@@ -1,1104 +0,0 @@
-<?php
-
-return array(
- 'a' => 'A',
- 'b' => 'B',
- 'c' => 'C',
- 'd' => 'D',
- 'e' => 'E',
- 'f' => 'F',
- 'g' => 'G',
- 'h' => 'H',
- 'i' => 'I',
- 'j' => 'J',
- 'k' => 'K',
- 'l' => 'L',
- 'm' => 'M',
- 'n' => 'N',
- 'o' => 'O',
- 'p' => 'P',
- 'q' => 'Q',
- 'r' => 'R',
- 's' => 'S',
- 't' => 'T',
- 'u' => 'U',
- 'v' => 'V',
- 'w' => 'W',
- 'x' => 'X',
- 'y' => 'Y',
- 'z' => 'Z',
- 'µ' => 'Μ',
- 'à' => 'À',
- 'á' => 'Á',
- 'â' => 'Â',
- 'ã' => 'Ã',
- 'ä' => 'Ä',
- 'å' => 'Å',
- 'æ' => 'Æ',
- 'ç' => 'Ç',
- 'è' => 'È',
- 'é' => 'É',
- 'ê' => 'Ê',
- 'ë' => 'Ë',
- 'ì' => 'Ì',
- 'í' => 'Í',
- 'î' => 'Î',
- 'ï' => 'Ï',
- 'ð' => 'Ð',
- 'ñ' => 'Ñ',
- 'ò' => 'Ò',
- 'ó' => 'Ó',
- 'ô' => 'Ô',
- 'õ' => 'Õ',
- 'ö' => 'Ö',
- 'ø' => 'Ø',
- 'ù' => 'Ù',
- 'ú' => 'Ú',
- 'û' => 'Û',
- 'ü' => 'Ü',
- 'ý' => 'Ý',
- 'þ' => 'Þ',
- 'ÿ' => 'Ÿ',
- 'ā' => 'Ā',
- 'ă' => 'Ă',
- 'ą' => 'Ą',
- 'ć' => 'Ć',
- 'ĉ' => 'Ĉ',
- 'ċ' => 'Ċ',
- 'č' => 'Č',
- 'ď' => 'Ď',
- 'đ' => 'Đ',
- 'ē' => 'Ē',
- 'ĕ' => 'Ĕ',
- 'ė' => 'Ė',
- 'ę' => 'Ę',
- 'ě' => 'Ě',
- 'ĝ' => 'Ĝ',
- 'ğ' => 'Ğ',
- 'ġ' => 'Ġ',
- 'ģ' => 'Ģ',
- 'ĥ' => 'Ĥ',
- 'ħ' => 'Ħ',
- 'ĩ' => 'Ĩ',
- 'ī' => 'Ī',
- 'ĭ' => 'Ĭ',
- 'į' => 'Į',
- 'ı' => 'I',
- 'ij' => 'IJ',
- 'ĵ' => 'Ĵ',
- 'ķ' => 'Ķ',
- 'ĺ' => 'Ĺ',
- 'ļ' => 'Ļ',
- 'ľ' => 'Ľ',
- 'ŀ' => 'Ŀ',
- 'ł' => 'Ł',
- 'ń' => 'Ń',
- 'ņ' => 'Ņ',
- 'ň' => 'Ň',
- 'ŋ' => 'Ŋ',
- 'ō' => 'Ō',
- 'ŏ' => 'Ŏ',
- 'ő' => 'Ő',
- 'œ' => 'Œ',
- 'ŕ' => 'Ŕ',
- 'ŗ' => 'Ŗ',
- 'ř' => 'Ř',
- 'ś' => 'Ś',
- 'ŝ' => 'Ŝ',
- 'ş' => 'Ş',
- 'š' => 'Š',
- 'ţ' => 'Ţ',
- 'ť' => 'Ť',
- 'ŧ' => 'Ŧ',
- 'ũ' => 'Ũ',
- 'ū' => 'Ū',
- 'ŭ' => 'Ŭ',
- 'ů' => 'Ů',
- 'ű' => 'Ű',
- 'ų' => 'Ų',
- 'ŵ' => 'Ŵ',
- 'ŷ' => 'Ŷ',
- 'ź' => 'Ź',
- 'ż' => 'Ż',
- 'ž' => 'Ž',
- 'ſ' => 'S',
- 'ƀ' => 'Ƀ',
- 'ƃ' => 'Ƃ',
- 'ƅ' => 'Ƅ',
- 'ƈ' => 'Ƈ',
- 'ƌ' => 'Ƌ',
- 'ƒ' => 'Ƒ',
- 'ƕ' => 'Ƕ',
- 'ƙ' => 'Ƙ',
- 'ƚ' => 'Ƚ',
- 'ƞ' => 'Ƞ',
- 'ơ' => 'Ơ',
- 'ƣ' => 'Ƣ',
- 'ƥ' => 'Ƥ',
- 'ƨ' => 'Ƨ',
- 'ƭ' => 'Ƭ',
- 'ư' => 'Ư',
- 'ƴ' => 'Ƴ',
- 'ƶ' => 'Ƶ',
- 'ƹ' => 'Ƹ',
- 'ƽ' => 'Ƽ',
- 'ƿ' => 'Ƿ',
- 'Dž' => 'DŽ',
- 'dž' => 'DŽ',
- 'Lj' => 'LJ',
- 'lj' => 'LJ',
- 'Nj' => 'NJ',
- 'nj' => 'NJ',
- 'ǎ' => 'Ǎ',
- 'ǐ' => 'Ǐ',
- 'ǒ' => 'Ǒ',
- 'ǔ' => 'Ǔ',
- 'ǖ' => 'Ǖ',
- 'ǘ' => 'Ǘ',
- 'ǚ' => 'Ǚ',
- 'ǜ' => 'Ǜ',
- 'ǝ' => 'Ǝ',
- 'ǟ' => 'Ǟ',
- 'ǡ' => 'Ǡ',
- 'ǣ' => 'Ǣ',
- 'ǥ' => 'Ǥ',
- 'ǧ' => 'Ǧ',
- 'ǩ' => 'Ǩ',
- 'ǫ' => 'Ǫ',
- 'ǭ' => 'Ǭ',
- 'ǯ' => 'Ǯ',
- 'Dz' => 'DZ',
- 'dz' => 'DZ',
- 'ǵ' => 'Ǵ',
- 'ǹ' => 'Ǹ',
- 'ǻ' => 'Ǻ',
- 'ǽ' => 'Ǽ',
- 'ǿ' => 'Ǿ',
- 'ȁ' => 'Ȁ',
- 'ȃ' => 'Ȃ',
- 'ȅ' => 'Ȅ',
- 'ȇ' => 'Ȇ',
- 'ȉ' => 'Ȉ',
- 'ȋ' => 'Ȋ',
- 'ȍ' => 'Ȍ',
- 'ȏ' => 'Ȏ',
- 'ȑ' => 'Ȑ',
- 'ȓ' => 'Ȓ',
- 'ȕ' => 'Ȕ',
- 'ȗ' => 'Ȗ',
- 'ș' => 'Ș',
- 'ț' => 'Ț',
- 'ȝ' => 'Ȝ',
- 'ȟ' => 'Ȟ',
- 'ȣ' => 'Ȣ',
- 'ȥ' => 'Ȥ',
- 'ȧ' => 'Ȧ',
- 'ȩ' => 'Ȩ',
- 'ȫ' => 'Ȫ',
- 'ȭ' => 'Ȭ',
- 'ȯ' => 'Ȯ',
- 'ȱ' => 'Ȱ',
- 'ȳ' => 'Ȳ',
- 'ȼ' => 'Ȼ',
- 'ȿ' => 'Ȿ',
- 'ɀ' => 'Ɀ',
- 'ɂ' => 'Ɂ',
- 'ɇ' => 'Ɇ',
- 'ɉ' => 'Ɉ',
- 'ɋ' => 'Ɋ',
- 'ɍ' => 'Ɍ',
- 'ɏ' => 'Ɏ',
- 'ɐ' => 'Ɐ',
- 'ɑ' => 'Ɑ',
- 'ɒ' => 'Ɒ',
- 'ɓ' => 'Ɓ',
- 'ɔ' => 'Ɔ',
- 'ɖ' => 'Ɖ',
- 'ɗ' => 'Ɗ',
- 'ə' => 'Ə',
- 'ɛ' => 'Ɛ',
- 'ɜ' => 'Ɜ',
- 'ɠ' => 'Ɠ',
- 'ɡ' => 'Ɡ',
- 'ɣ' => 'Ɣ',
- 'ɥ' => 'Ɥ',
- 'ɦ' => 'Ɦ',
- 'ɨ' => 'Ɨ',
- 'ɩ' => 'Ɩ',
- 'ɫ' => 'Ɫ',
- 'ɬ' => 'Ɬ',
- 'ɯ' => 'Ɯ',
- 'ɱ' => 'Ɱ',
- 'ɲ' => 'Ɲ',
- 'ɵ' => 'Ɵ',
- 'ɽ' => 'Ɽ',
- 'ʀ' => 'Ʀ',
- 'ʃ' => 'Ʃ',
- 'ʇ' => 'Ʇ',
- 'ʈ' => 'Ʈ',
- 'ʉ' => 'Ʉ',
- 'ʊ' => 'Ʊ',
- 'ʋ' => 'Ʋ',
- 'ʌ' => 'Ʌ',
- 'ʒ' => 'Ʒ',
- 'ʞ' => 'Ʞ',
- 'ͅ' => 'Ι',
- 'ͱ' => 'Ͱ',
- 'ͳ' => 'Ͳ',
- 'ͷ' => 'Ͷ',
- 'ͻ' => 'Ͻ',
- 'ͼ' => 'Ͼ',
- 'ͽ' => 'Ͽ',
- 'ά' => 'Ά',
- 'έ' => 'Έ',
- 'ή' => 'Ή',
- 'ί' => 'Ί',
- 'α' => 'Α',
- 'β' => 'Β',
- 'γ' => 'Γ',
- 'δ' => 'Δ',
- 'ε' => 'Ε',
- 'ζ' => 'Ζ',
- 'η' => 'Η',
- 'θ' => 'Θ',
- 'ι' => 'Ι',
- 'κ' => 'Κ',
- 'λ' => 'Λ',
- 'μ' => 'Μ',
- 'ν' => 'Ν',
- 'ξ' => 'Ξ',
- 'ο' => 'Ο',
- 'π' => 'Π',
- 'ρ' => 'Ρ',
- 'ς' => 'Σ',
- 'σ' => 'Σ',
- 'τ' => 'Τ',
- 'υ' => 'Υ',
- 'φ' => 'Φ',
- 'χ' => 'Χ',
- 'ψ' => 'Ψ',
- 'ω' => 'Ω',
- 'ϊ' => 'Ϊ',
- 'ϋ' => 'Ϋ',
- 'ό' => 'Ό',
- 'ύ' => 'Ύ',
- 'ώ' => 'Ώ',
- 'ϐ' => 'Β',
- 'ϑ' => 'Θ',
- 'ϕ' => 'Φ',
- 'ϖ' => 'Π',
- 'ϗ' => 'Ϗ',
- 'ϙ' => 'Ϙ',
- 'ϛ' => 'Ϛ',
- 'ϝ' => 'Ϝ',
- 'ϟ' => 'Ϟ',
- 'ϡ' => 'Ϡ',
- 'ϣ' => 'Ϣ',
- 'ϥ' => 'Ϥ',
- 'ϧ' => 'Ϧ',
- 'ϩ' => 'Ϩ',
- 'ϫ' => 'Ϫ',
- 'ϭ' => 'Ϭ',
- 'ϯ' => 'Ϯ',
- 'ϰ' => 'Κ',
- 'ϱ' => 'Ρ',
- 'ϲ' => 'Ϲ',
- 'ϳ' => 'Ϳ',
- 'ϵ' => 'Ε',
- 'ϸ' => 'Ϸ',
- 'ϻ' => 'Ϻ',
- 'а' => 'А',
- 'б' => 'Б',
- 'в' => 'В',
- 'г' => 'Г',
- 'д' => 'Д',
- 'е' => 'Е',
- 'ж' => 'Ж',
- 'з' => 'З',
- 'и' => 'И',
- 'й' => 'Й',
- 'к' => 'К',
- 'л' => 'Л',
- 'м' => 'М',
- 'н' => 'Н',
- 'о' => 'О',
- 'п' => 'П',
- 'р' => 'Р',
- 'с' => 'С',
- 'т' => 'Т',
- 'у' => 'У',
- 'ф' => 'Ф',
- 'х' => 'Х',
- 'ц' => 'Ц',
- 'ч' => 'Ч',
- 'ш' => 'Ш',
- 'щ' => 'Щ',
- 'ъ' => 'Ъ',
- 'ы' => 'Ы',
- 'ь' => 'Ь',
- 'э' => 'Э',
- 'ю' => 'Ю',
- 'я' => 'Я',
- 'ѐ' => 'Ѐ',
- 'ё' => 'Ё',
- 'ђ' => 'Ђ',
- 'ѓ' => 'Ѓ',
- 'є' => 'Є',
- 'ѕ' => 'Ѕ',
- 'і' => 'І',
- 'ї' => 'Ї',
- 'ј' => 'Ј',
- 'љ' => 'Љ',
- 'њ' => 'Њ',
- 'ћ' => 'Ћ',
- 'ќ' => 'Ќ',
- 'ѝ' => 'Ѝ',
- 'ў' => 'Ў',
- 'џ' => 'Џ',
- 'ѡ' => 'Ѡ',
- 'ѣ' => 'Ѣ',
- 'ѥ' => 'Ѥ',
- 'ѧ' => 'Ѧ',
- 'ѩ' => 'Ѩ',
- 'ѫ' => 'Ѫ',
- 'ѭ' => 'Ѭ',
- 'ѯ' => 'Ѯ',
- 'ѱ' => 'Ѱ',
- 'ѳ' => 'Ѳ',
- 'ѵ' => 'Ѵ',
- 'ѷ' => 'Ѷ',
- 'ѹ' => 'Ѹ',
- 'ѻ' => 'Ѻ',
- 'ѽ' => 'Ѽ',
- 'ѿ' => 'Ѿ',
- 'ҁ' => 'Ҁ',
- 'ҋ' => 'Ҋ',
- 'ҍ' => 'Ҍ',
- 'ҏ' => 'Ҏ',
- 'ґ' => 'Ґ',
- 'ғ' => 'Ғ',
- 'ҕ' => 'Ҕ',
- 'җ' => 'Җ',
- 'ҙ' => 'Ҙ',
- 'қ' => 'Қ',
- 'ҝ' => 'Ҝ',
- 'ҟ' => 'Ҟ',
- 'ҡ' => 'Ҡ',
- 'ң' => 'Ң',
- 'ҥ' => 'Ҥ',
- 'ҧ' => 'Ҧ',
- 'ҩ' => 'Ҩ',
- 'ҫ' => 'Ҫ',
- 'ҭ' => 'Ҭ',
- 'ү' => 'Ү',
- 'ұ' => 'Ұ',
- 'ҳ' => 'Ҳ',
- 'ҵ' => 'Ҵ',
- 'ҷ' => 'Ҷ',
- 'ҹ' => 'Ҹ',
- 'һ' => 'Һ',
- 'ҽ' => 'Ҽ',
- 'ҿ' => 'Ҿ',
- 'ӂ' => 'Ӂ',
- 'ӄ' => 'Ӄ',
- 'ӆ' => 'Ӆ',
- 'ӈ' => 'Ӈ',
- 'ӊ' => 'Ӊ',
- 'ӌ' => 'Ӌ',
- 'ӎ' => 'Ӎ',
- 'ӏ' => 'Ӏ',
- 'ӑ' => 'Ӑ',
- 'ӓ' => 'Ӓ',
- 'ӕ' => 'Ӕ',
- 'ӗ' => 'Ӗ',
- 'ә' => 'Ә',
- 'ӛ' => 'Ӛ',
- 'ӝ' => 'Ӝ',
- 'ӟ' => 'Ӟ',
- 'ӡ' => 'Ӡ',
- 'ӣ' => 'Ӣ',
- 'ӥ' => 'Ӥ',
- 'ӧ' => 'Ӧ',
- 'ө' => 'Ө',
- 'ӫ' => 'Ӫ',
- 'ӭ' => 'Ӭ',
- 'ӯ' => 'Ӯ',
- 'ӱ' => 'Ӱ',
- 'ӳ' => 'Ӳ',
- 'ӵ' => 'Ӵ',
- 'ӷ' => 'Ӷ',
- 'ӹ' => 'Ӹ',
- 'ӻ' => 'Ӻ',
- 'ӽ' => 'Ӽ',
- 'ӿ' => 'Ӿ',
- 'ԁ' => 'Ԁ',
- 'ԃ' => 'Ԃ',
- 'ԅ' => 'Ԅ',
- 'ԇ' => 'Ԇ',
- 'ԉ' => 'Ԉ',
- 'ԋ' => 'Ԋ',
- 'ԍ' => 'Ԍ',
- 'ԏ' => 'Ԏ',
- 'ԑ' => 'Ԑ',
- 'ԓ' => 'Ԓ',
- 'ԕ' => 'Ԕ',
- 'ԗ' => 'Ԗ',
- 'ԙ' => 'Ԙ',
- 'ԛ' => 'Ԛ',
- 'ԝ' => 'Ԝ',
- 'ԟ' => 'Ԟ',
- 'ԡ' => 'Ԡ',
- 'ԣ' => 'Ԣ',
- 'ԥ' => 'Ԥ',
- 'ԧ' => 'Ԧ',
- 'ԩ' => 'Ԩ',
- 'ԫ' => 'Ԫ',
- 'ԭ' => 'Ԭ',
- 'ԯ' => 'Ԯ',
- 'ա' => 'Ա',
- 'բ' => 'Բ',
- 'գ' => 'Գ',
- 'դ' => 'Դ',
- 'ե' => 'Ե',
- 'զ' => 'Զ',
- 'է' => 'Է',
- 'ը' => 'Ը',
- 'թ' => 'Թ',
- 'ժ' => 'Ժ',
- 'ի' => 'Ի',
- 'լ' => 'Լ',
- 'խ' => 'Խ',
- 'ծ' => 'Ծ',
- 'կ' => 'Կ',
- 'հ' => 'Հ',
- 'ձ' => 'Ձ',
- 'ղ' => 'Ղ',
- 'ճ' => 'Ճ',
- 'մ' => 'Մ',
- 'յ' => 'Յ',
- 'ն' => 'Ն',
- 'շ' => 'Շ',
- 'ո' => 'Ո',
- 'չ' => 'Չ',
- 'պ' => 'Պ',
- 'ջ' => 'Ջ',
- 'ռ' => 'Ռ',
- 'ս' => 'Ս',
- 'վ' => 'Վ',
- 'տ' => 'Տ',
- 'ր' => 'Ր',
- 'ց' => 'Ց',
- 'ւ' => 'Ւ',
- 'փ' => 'Փ',
- 'ք' => 'Ք',
- 'օ' => 'Օ',
- 'ֆ' => 'Ֆ',
- 'ᵹ' => 'Ᵹ',
- 'ᵽ' => 'Ᵽ',
- 'ḁ' => 'Ḁ',
- 'ḃ' => 'Ḃ',
- 'ḅ' => 'Ḅ',
- 'ḇ' => 'Ḇ',
- 'ḉ' => 'Ḉ',
- 'ḋ' => 'Ḋ',
- 'ḍ' => 'Ḍ',
- 'ḏ' => 'Ḏ',
- 'ḑ' => 'Ḑ',
- 'ḓ' => 'Ḓ',
- 'ḕ' => 'Ḕ',
- 'ḗ' => 'Ḗ',
- 'ḙ' => 'Ḙ',
- 'ḛ' => 'Ḛ',
- 'ḝ' => 'Ḝ',
- 'ḟ' => 'Ḟ',
- 'ḡ' => 'Ḡ',
- 'ḣ' => 'Ḣ',
- 'ḥ' => 'Ḥ',
- 'ḧ' => 'Ḧ',
- 'ḩ' => 'Ḩ',
- 'ḫ' => 'Ḫ',
- 'ḭ' => 'Ḭ',
- 'ḯ' => 'Ḯ',
- 'ḱ' => 'Ḱ',
- 'ḳ' => 'Ḳ',
- 'ḵ' => 'Ḵ',
- 'ḷ' => 'Ḷ',
- 'ḹ' => 'Ḹ',
- 'ḻ' => 'Ḻ',
- 'ḽ' => 'Ḽ',
- 'ḿ' => 'Ḿ',
- 'ṁ' => 'Ṁ',
- 'ṃ' => 'Ṃ',
- 'ṅ' => 'Ṅ',
- 'ṇ' => 'Ṇ',
- 'ṉ' => 'Ṉ',
- 'ṋ' => 'Ṋ',
- 'ṍ' => 'Ṍ',
- 'ṏ' => 'Ṏ',
- 'ṑ' => 'Ṑ',
- 'ṓ' => 'Ṓ',
- 'ṕ' => 'Ṕ',
- 'ṗ' => 'Ṗ',
- 'ṙ' => 'Ṙ',
- 'ṛ' => 'Ṛ',
- 'ṝ' => 'Ṝ',
- 'ṟ' => 'Ṟ',
- 'ṡ' => 'Ṡ',
- 'ṣ' => 'Ṣ',
- 'ṥ' => 'Ṥ',
- 'ṧ' => 'Ṧ',
- 'ṩ' => 'Ṩ',
- 'ṫ' => 'Ṫ',
- 'ṭ' => 'Ṭ',
- 'ṯ' => 'Ṯ',
- 'ṱ' => 'Ṱ',
- 'ṳ' => 'Ṳ',
- 'ṵ' => 'Ṵ',
- 'ṷ' => 'Ṷ',
- 'ṹ' => 'Ṹ',
- 'ṻ' => 'Ṻ',
- 'ṽ' => 'Ṽ',
- 'ṿ' => 'Ṿ',
- 'ẁ' => 'Ẁ',
- 'ẃ' => 'Ẃ',
- 'ẅ' => 'Ẅ',
- 'ẇ' => 'Ẇ',
- 'ẉ' => 'Ẉ',
- 'ẋ' => 'Ẋ',
- 'ẍ' => 'Ẍ',
- 'ẏ' => 'Ẏ',
- 'ẑ' => 'Ẑ',
- 'ẓ' => 'Ẓ',
- 'ẕ' => 'Ẕ',
- 'ẛ' => 'Ṡ',
- 'ạ' => 'Ạ',
- 'ả' => 'Ả',
- 'ấ' => 'Ấ',
- 'ầ' => 'Ầ',
- 'ẩ' => 'Ẩ',
- 'ẫ' => 'Ẫ',
- 'ậ' => 'Ậ',
- 'ắ' => 'Ắ',
- 'ằ' => 'Ằ',
- 'ẳ' => 'Ẳ',
- 'ẵ' => 'Ẵ',
- 'ặ' => 'Ặ',
- 'ẹ' => 'Ẹ',
- 'ẻ' => 'Ẻ',
- 'ẽ' => 'Ẽ',
- 'ế' => 'Ế',
- 'ề' => 'Ề',
- 'ể' => 'Ể',
- 'ễ' => 'Ễ',
- 'ệ' => 'Ệ',
- 'ỉ' => 'Ỉ',
- 'ị' => 'Ị',
- 'ọ' => 'Ọ',
- 'ỏ' => 'Ỏ',
- 'ố' => 'Ố',
- 'ồ' => 'Ồ',
- 'ổ' => 'Ổ',
- 'ỗ' => 'Ỗ',
- 'ộ' => 'Ộ',
- 'ớ' => 'Ớ',
- 'ờ' => 'Ờ',
- 'ở' => 'Ở',
- 'ỡ' => 'Ỡ',
- 'ợ' => 'Ợ',
- 'ụ' => 'Ụ',
- 'ủ' => 'Ủ',
- 'ứ' => 'Ứ',
- 'ừ' => 'Ừ',
- 'ử' => 'Ử',
- 'ữ' => 'Ữ',
- 'ự' => 'Ự',
- 'ỳ' => 'Ỳ',
- 'ỵ' => 'Ỵ',
- 'ỷ' => 'Ỷ',
- 'ỹ' => 'Ỹ',
- 'ỻ' => 'Ỻ',
- 'ỽ' => 'Ỽ',
- 'ỿ' => 'Ỿ',
- 'ἀ' => 'Ἀ',
- 'ἁ' => 'Ἁ',
- 'ἂ' => 'Ἂ',
- 'ἃ' => 'Ἃ',
- 'ἄ' => 'Ἄ',
- 'ἅ' => 'Ἅ',
- 'ἆ' => 'Ἆ',
- 'ἇ' => 'Ἇ',
- 'ἐ' => 'Ἐ',
- 'ἑ' => 'Ἑ',
- 'ἒ' => 'Ἒ',
- 'ἓ' => 'Ἓ',
- 'ἔ' => 'Ἔ',
- 'ἕ' => 'Ἕ',
- 'ἠ' => 'Ἠ',
- 'ἡ' => 'Ἡ',
- 'ἢ' => 'Ἢ',
- 'ἣ' => 'Ἣ',
- 'ἤ' => 'Ἤ',
- 'ἥ' => 'Ἥ',
- 'ἦ' => 'Ἦ',
- 'ἧ' => 'Ἧ',
- 'ἰ' => 'Ἰ',
- 'ἱ' => 'Ἱ',
- 'ἲ' => 'Ἲ',
- 'ἳ' => 'Ἳ',
- 'ἴ' => 'Ἴ',
- 'ἵ' => 'Ἵ',
- 'ἶ' => 'Ἶ',
- 'ἷ' => 'Ἷ',
- 'ὀ' => 'Ὀ',
- 'ὁ' => 'Ὁ',
- 'ὂ' => 'Ὂ',
- 'ὃ' => 'Ὃ',
- 'ὄ' => 'Ὄ',
- 'ὅ' => 'Ὅ',
- 'ὑ' => 'Ὑ',
- 'ὓ' => 'Ὓ',
- 'ὕ' => 'Ὕ',
- 'ὗ' => 'Ὗ',
- 'ὠ' => 'Ὠ',
- 'ὡ' => 'Ὡ',
- 'ὢ' => 'Ὢ',
- 'ὣ' => 'Ὣ',
- 'ὤ' => 'Ὤ',
- 'ὥ' => 'Ὥ',
- 'ὦ' => 'Ὦ',
- 'ὧ' => 'Ὧ',
- 'ὰ' => 'Ὰ',
- 'ά' => 'Ά',
- 'ὲ' => 'Ὲ',
- 'έ' => 'Έ',
- 'ὴ' => 'Ὴ',
- 'ή' => 'Ή',
- 'ὶ' => 'Ὶ',
- 'ί' => 'Ί',
- 'ὸ' => 'Ὸ',
- 'ό' => 'Ό',
- 'ὺ' => 'Ὺ',
- 'ύ' => 'Ύ',
- 'ὼ' => 'Ὼ',
- 'ώ' => 'Ώ',
- 'ᾀ' => 'ᾈ',
- 'ᾁ' => 'ᾉ',
- 'ᾂ' => 'ᾊ',
- 'ᾃ' => 'ᾋ',
- 'ᾄ' => 'ᾌ',
- 'ᾅ' => 'ᾍ',
- 'ᾆ' => 'ᾎ',
- 'ᾇ' => 'ᾏ',
- 'ᾐ' => 'ᾘ',
- 'ᾑ' => 'ᾙ',
- 'ᾒ' => 'ᾚ',
- 'ᾓ' => 'ᾛ',
- 'ᾔ' => 'ᾜ',
- 'ᾕ' => 'ᾝ',
- 'ᾖ' => 'ᾞ',
- 'ᾗ' => 'ᾟ',
- 'ᾠ' => 'ᾨ',
- 'ᾡ' => 'ᾩ',
- 'ᾢ' => 'ᾪ',
- 'ᾣ' => 'ᾫ',
- 'ᾤ' => 'ᾬ',
- 'ᾥ' => 'ᾭ',
- 'ᾦ' => 'ᾮ',
- 'ᾧ' => 'ᾯ',
- 'ᾰ' => 'Ᾰ',
- 'ᾱ' => 'Ᾱ',
- 'ᾳ' => 'ᾼ',
- 'ι' => 'Ι',
- 'ῃ' => 'ῌ',
- 'ῐ' => 'Ῐ',
- 'ῑ' => 'Ῑ',
- 'ῠ' => 'Ῠ',
- 'ῡ' => 'Ῡ',
- 'ῥ' => 'Ῥ',
- 'ῳ' => 'ῼ',
- 'ⅎ' => 'Ⅎ',
- 'ⅰ' => 'Ⅰ',
- 'ⅱ' => 'Ⅱ',
- 'ⅲ' => 'Ⅲ',
- 'ⅳ' => 'Ⅳ',
- 'ⅴ' => 'Ⅴ',
- 'ⅵ' => 'Ⅵ',
- 'ⅶ' => 'Ⅶ',
- 'ⅷ' => 'Ⅷ',
- 'ⅸ' => 'Ⅸ',
- 'ⅹ' => 'Ⅹ',
- 'ⅺ' => 'Ⅺ',
- 'ⅻ' => 'Ⅻ',
- 'ⅼ' => 'Ⅼ',
- 'ⅽ' => 'Ⅽ',
- 'ⅾ' => 'Ⅾ',
- 'ⅿ' => 'Ⅿ',
- 'ↄ' => 'Ↄ',
- 'ⓐ' => 'Ⓐ',
- 'ⓑ' => 'Ⓑ',
- 'ⓒ' => 'Ⓒ',
- 'ⓓ' => 'Ⓓ',
- 'ⓔ' => 'Ⓔ',
- 'ⓕ' => 'Ⓕ',
- 'ⓖ' => 'Ⓖ',
- 'ⓗ' => 'Ⓗ',
- 'ⓘ' => 'Ⓘ',
- 'ⓙ' => 'Ⓙ',
- 'ⓚ' => 'Ⓚ',
- 'ⓛ' => 'Ⓛ',
- 'ⓜ' => 'Ⓜ',
- 'ⓝ' => 'Ⓝ',
- 'ⓞ' => 'Ⓞ',
- 'ⓟ' => 'Ⓟ',
- 'ⓠ' => 'Ⓠ',
- 'ⓡ' => 'Ⓡ',
- 'ⓢ' => 'Ⓢ',
- 'ⓣ' => 'Ⓣ',
- 'ⓤ' => 'Ⓤ',
- 'ⓥ' => 'Ⓥ',
- 'ⓦ' => 'Ⓦ',
- 'ⓧ' => 'Ⓧ',
- 'ⓨ' => 'Ⓨ',
- 'ⓩ' => 'Ⓩ',
- 'ⰰ' => 'Ⰰ',
- 'ⰱ' => 'Ⰱ',
- 'ⰲ' => 'Ⰲ',
- 'ⰳ' => 'Ⰳ',
- 'ⰴ' => 'Ⰴ',
- 'ⰵ' => 'Ⰵ',
- 'ⰶ' => 'Ⰶ',
- 'ⰷ' => 'Ⰷ',
- 'ⰸ' => 'Ⰸ',
- 'ⰹ' => 'Ⰹ',
- 'ⰺ' => 'Ⰺ',
- 'ⰻ' => 'Ⰻ',
- 'ⰼ' => 'Ⰼ',
- 'ⰽ' => 'Ⰽ',
- 'ⰾ' => 'Ⰾ',
- 'ⰿ' => 'Ⰿ',
- 'ⱀ' => 'Ⱀ',
- 'ⱁ' => 'Ⱁ',
- 'ⱂ' => 'Ⱂ',
- 'ⱃ' => 'Ⱃ',
- 'ⱄ' => 'Ⱄ',
- 'ⱅ' => 'Ⱅ',
- 'ⱆ' => 'Ⱆ',
- 'ⱇ' => 'Ⱇ',
- 'ⱈ' => 'Ⱈ',
- 'ⱉ' => 'Ⱉ',
- 'ⱊ' => 'Ⱊ',
- 'ⱋ' => 'Ⱋ',
- 'ⱌ' => 'Ⱌ',
- 'ⱍ' => 'Ⱍ',
- 'ⱎ' => 'Ⱎ',
- 'ⱏ' => 'Ⱏ',
- 'ⱐ' => 'Ⱐ',
- 'ⱑ' => 'Ⱑ',
- 'ⱒ' => 'Ⱒ',
- 'ⱓ' => 'Ⱓ',
- 'ⱔ' => 'Ⱔ',
- 'ⱕ' => 'Ⱕ',
- 'ⱖ' => 'Ⱖ',
- 'ⱗ' => 'Ⱗ',
- 'ⱘ' => 'Ⱘ',
- 'ⱙ' => 'Ⱙ',
- 'ⱚ' => 'Ⱚ',
- 'ⱛ' => 'Ⱛ',
- 'ⱜ' => 'Ⱜ',
- 'ⱝ' => 'Ⱝ',
- 'ⱞ' => 'Ⱞ',
- 'ⱡ' => 'Ⱡ',
- 'ⱥ' => 'Ⱥ',
- 'ⱦ' => 'Ⱦ',
- 'ⱨ' => 'Ⱨ',
- 'ⱪ' => 'Ⱪ',
- 'ⱬ' => 'Ⱬ',
- 'ⱳ' => 'Ⱳ',
- 'ⱶ' => 'Ⱶ',
- 'ⲁ' => 'Ⲁ',
- 'ⲃ' => 'Ⲃ',
- 'ⲅ' => 'Ⲅ',
- 'ⲇ' => 'Ⲇ',
- 'ⲉ' => 'Ⲉ',
- 'ⲋ' => 'Ⲋ',
- 'ⲍ' => 'Ⲍ',
- 'ⲏ' => 'Ⲏ',
- 'ⲑ' => 'Ⲑ',
- 'ⲓ' => 'Ⲓ',
- 'ⲕ' => 'Ⲕ',
- 'ⲗ' => 'Ⲗ',
- 'ⲙ' => 'Ⲙ',
- 'ⲛ' => 'Ⲛ',
- 'ⲝ' => 'Ⲝ',
- 'ⲟ' => 'Ⲟ',
- 'ⲡ' => 'Ⲡ',
- 'ⲣ' => 'Ⲣ',
- 'ⲥ' => 'Ⲥ',
- 'ⲧ' => 'Ⲧ',
- 'ⲩ' => 'Ⲩ',
- 'ⲫ' => 'Ⲫ',
- 'ⲭ' => 'Ⲭ',
- 'ⲯ' => 'Ⲯ',
- 'ⲱ' => 'Ⲱ',
- 'ⲳ' => 'Ⲳ',
- 'ⲵ' => 'Ⲵ',
- 'ⲷ' => 'Ⲷ',
- 'ⲹ' => 'Ⲹ',
- 'ⲻ' => 'Ⲻ',
- 'ⲽ' => 'Ⲽ',
- 'ⲿ' => 'Ⲿ',
- 'ⳁ' => 'Ⳁ',
- 'ⳃ' => 'Ⳃ',
- 'ⳅ' => 'Ⳅ',
- 'ⳇ' => 'Ⳇ',
- 'ⳉ' => 'Ⳉ',
- 'ⳋ' => 'Ⳋ',
- 'ⳍ' => 'Ⳍ',
- 'ⳏ' => 'Ⳏ',
- 'ⳑ' => 'Ⳑ',
- 'ⳓ' => 'Ⳓ',
- 'ⳕ' => 'Ⳕ',
- 'ⳗ' => 'Ⳗ',
- 'ⳙ' => 'Ⳙ',
- 'ⳛ' => 'Ⳛ',
- 'ⳝ' => 'Ⳝ',
- 'ⳟ' => 'Ⳟ',
- 'ⳡ' => 'Ⳡ',
- 'ⳣ' => 'Ⳣ',
- 'ⳬ' => 'Ⳬ',
- 'ⳮ' => 'Ⳮ',
- 'ⳳ' => 'Ⳳ',
- 'ⴀ' => 'Ⴀ',
- 'ⴁ' => 'Ⴁ',
- 'ⴂ' => 'Ⴂ',
- 'ⴃ' => 'Ⴃ',
- 'ⴄ' => 'Ⴄ',
- 'ⴅ' => 'Ⴅ',
- 'ⴆ' => 'Ⴆ',
- 'ⴇ' => 'Ⴇ',
- 'ⴈ' => 'Ⴈ',
- 'ⴉ' => 'Ⴉ',
- 'ⴊ' => 'Ⴊ',
- 'ⴋ' => 'Ⴋ',
- 'ⴌ' => 'Ⴌ',
- 'ⴍ' => 'Ⴍ',
- 'ⴎ' => 'Ⴎ',
- 'ⴏ' => 'Ⴏ',
- 'ⴐ' => 'Ⴐ',
- 'ⴑ' => 'Ⴑ',
- 'ⴒ' => 'Ⴒ',
- 'ⴓ' => 'Ⴓ',
- 'ⴔ' => 'Ⴔ',
- 'ⴕ' => 'Ⴕ',
- 'ⴖ' => 'Ⴖ',
- 'ⴗ' => 'Ⴗ',
- 'ⴘ' => 'Ⴘ',
- 'ⴙ' => 'Ⴙ',
- 'ⴚ' => 'Ⴚ',
- 'ⴛ' => 'Ⴛ',
- 'ⴜ' => 'Ⴜ',
- 'ⴝ' => 'Ⴝ',
- 'ⴞ' => 'Ⴞ',
- 'ⴟ' => 'Ⴟ',
- 'ⴠ' => 'Ⴠ',
- 'ⴡ' => 'Ⴡ',
- 'ⴢ' => 'Ⴢ',
- 'ⴣ' => 'Ⴣ',
- 'ⴤ' => 'Ⴤ',
- 'ⴥ' => 'Ⴥ',
- 'ⴧ' => 'Ⴧ',
- 'ⴭ' => 'Ⴭ',
- 'ꙁ' => 'Ꙁ',
- 'ꙃ' => 'Ꙃ',
- 'ꙅ' => 'Ꙅ',
- 'ꙇ' => 'Ꙇ',
- 'ꙉ' => 'Ꙉ',
- 'ꙋ' => 'Ꙋ',
- 'ꙍ' => 'Ꙍ',
- 'ꙏ' => 'Ꙏ',
- 'ꙑ' => 'Ꙑ',
- 'ꙓ' => 'Ꙓ',
- 'ꙕ' => 'Ꙕ',
- 'ꙗ' => 'Ꙗ',
- 'ꙙ' => 'Ꙙ',
- 'ꙛ' => 'Ꙛ',
- 'ꙝ' => 'Ꙝ',
- 'ꙟ' => 'Ꙟ',
- 'ꙡ' => 'Ꙡ',
- 'ꙣ' => 'Ꙣ',
- 'ꙥ' => 'Ꙥ',
- 'ꙧ' => 'Ꙧ',
- 'ꙩ' => 'Ꙩ',
- 'ꙫ' => 'Ꙫ',
- 'ꙭ' => 'Ꙭ',
- 'ꚁ' => 'Ꚁ',
- 'ꚃ' => 'Ꚃ',
- 'ꚅ' => 'Ꚅ',
- 'ꚇ' => 'Ꚇ',
- 'ꚉ' => 'Ꚉ',
- 'ꚋ' => 'Ꚋ',
- 'ꚍ' => 'Ꚍ',
- 'ꚏ' => 'Ꚏ',
- 'ꚑ' => 'Ꚑ',
- 'ꚓ' => 'Ꚓ',
- 'ꚕ' => 'Ꚕ',
- 'ꚗ' => 'Ꚗ',
- 'ꚙ' => 'Ꚙ',
- 'ꚛ' => 'Ꚛ',
- 'ꜣ' => 'Ꜣ',
- 'ꜥ' => 'Ꜥ',
- 'ꜧ' => 'Ꜧ',
- 'ꜩ' => 'Ꜩ',
- 'ꜫ' => 'Ꜫ',
- 'ꜭ' => 'Ꜭ',
- 'ꜯ' => 'Ꜯ',
- 'ꜳ' => 'Ꜳ',
- 'ꜵ' => 'Ꜵ',
- 'ꜷ' => 'Ꜷ',
- 'ꜹ' => 'Ꜹ',
- 'ꜻ' => 'Ꜻ',
- 'ꜽ' => 'Ꜽ',
- 'ꜿ' => 'Ꜿ',
- 'ꝁ' => 'Ꝁ',
- 'ꝃ' => 'Ꝃ',
- 'ꝅ' => 'Ꝅ',
- 'ꝇ' => 'Ꝇ',
- 'ꝉ' => 'Ꝉ',
- 'ꝋ' => 'Ꝋ',
- 'ꝍ' => 'Ꝍ',
- 'ꝏ' => 'Ꝏ',
- 'ꝑ' => 'Ꝑ',
- 'ꝓ' => 'Ꝓ',
- 'ꝕ' => 'Ꝕ',
- 'ꝗ' => 'Ꝗ',
- 'ꝙ' => 'Ꝙ',
- 'ꝛ' => 'Ꝛ',
- 'ꝝ' => 'Ꝝ',
- 'ꝟ' => 'Ꝟ',
- 'ꝡ' => 'Ꝡ',
- 'ꝣ' => 'Ꝣ',
- 'ꝥ' => 'Ꝥ',
- 'ꝧ' => 'Ꝧ',
- 'ꝩ' => 'Ꝩ',
- 'ꝫ' => 'Ꝫ',
- 'ꝭ' => 'Ꝭ',
- 'ꝯ' => 'Ꝯ',
- 'ꝺ' => 'Ꝺ',
- 'ꝼ' => 'Ꝼ',
- 'ꝿ' => 'Ꝿ',
- 'ꞁ' => 'Ꞁ',
- 'ꞃ' => 'Ꞃ',
- 'ꞅ' => 'Ꞅ',
- 'ꞇ' => 'Ꞇ',
- 'ꞌ' => 'Ꞌ',
- 'ꞑ' => 'Ꞑ',
- 'ꞓ' => 'Ꞓ',
- 'ꞗ' => 'Ꞗ',
- 'ꞙ' => 'Ꞙ',
- 'ꞛ' => 'Ꞛ',
- 'ꞝ' => 'Ꞝ',
- 'ꞟ' => 'Ꞟ',
- 'ꞡ' => 'Ꞡ',
- 'ꞣ' => 'Ꞣ',
- 'ꞥ' => 'Ꞥ',
- 'ꞧ' => 'Ꞧ',
- 'ꞩ' => 'Ꞩ',
- 'a' => 'A',
- 'b' => 'B',
- 'c' => 'C',
- 'd' => 'D',
- 'e' => 'E',
- 'f' => 'F',
- 'g' => 'G',
- 'h' => 'H',
- 'i' => 'I',
- 'j' => 'J',
- 'k' => 'K',
- 'l' => 'L',
- 'm' => 'M',
- 'n' => 'N',
- 'o' => 'O',
- 'p' => 'P',
- 'q' => 'Q',
- 'r' => 'R',
- 's' => 'S',
- 't' => 'T',
- 'u' => 'U',
- 'v' => 'V',
- 'w' => 'W',
- 'x' => 'X',
- 'y' => 'Y',
- 'z' => 'Z',
- '𐐨' => '𐐀',
- '𐐩' => '𐐁',
- '𐐪' => '𐐂',
- '𐐫' => '𐐃',
- '𐐬' => '𐐄',
- '𐐭' => '𐐅',
- '𐐮' => '𐐆',
- '𐐯' => '𐐇',
- '𐐰' => '𐐈',
- '𐐱' => '𐐉',
- '𐐲' => '𐐊',
- '𐐳' => '𐐋',
- '𐐴' => '𐐌',
- '𐐵' => '𐐍',
- '𐐶' => '𐐎',
- '𐐷' => '𐐏',
- '𐐸' => '𐐐',
- '𐐹' => '𐐑',
- '𐐺' => '𐐒',
- '𐐻' => '𐐓',
- '𐐼' => '𐐔',
- '𐐽' => '𐐕',
- '𐐾' => '𐐖',
- '𐐿' => '𐐗',
- '𐑀' => '𐐘',
- '𐑁' => '𐐙',
- '𐑂' => '𐐚',
- '𐑃' => '𐐛',
- '𐑄' => '𐐜',
- '𐑅' => '𐐝',
- '𐑆' => '𐐞',
- '𐑇' => '𐐟',
- '𐑈' => '𐐠',
- '𐑉' => '𐐡',
- '𐑊' => '𐐢',
- '𐑋' => '𐐣',
- '𐑌' => '𐐤',
- '𐑍' => '𐐥',
- '𐑎' => '𐐦',
- '𐑏' => '𐐧',
- '𑣀' => '𑢠',
- '𑣁' => '𑢡',
- '𑣂' => '𑢢',
- '𑣃' => '𑢣',
- '𑣄' => '𑢤',
- '𑣅' => '𑢥',
- '𑣆' => '𑢦',
- '𑣇' => '𑢧',
- '𑣈' => '𑢨',
- '𑣉' => '𑢩',
- '𑣊' => '𑢪',
- '𑣋' => '𑢫',
- '𑣌' => '𑢬',
- '𑣍' => '𑢭',
- '𑣎' => '𑢮',
- '𑣏' => '𑢯',
- '𑣐' => '𑢰',
- '𑣑' => '𑢱',
- '𑣒' => '𑢲',
- '𑣓' => '𑢳',
- '𑣔' => '𑢴',
- '𑣕' => '𑢵',
- '𑣖' => '𑢶',
- '𑣗' => '𑢷',
- '𑣘' => '𑢸',
- '𑣙' => '𑢹',
- '𑣚' => '𑢺',
- '𑣛' => '𑢻',
- '𑣜' => '𑢼',
- '𑣝' => '𑢽',
- '𑣞' => '𑢾',
- '𑣟' => '𑢿',
-);
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/bootstrap.php b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/bootstrap.php
deleted file mode 100644
index 204a41b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/bootstrap.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Mbstring as p;
-
-if (!function_exists('mb_strlen')) {
- define('MB_CASE_UPPER', 0);
- define('MB_CASE_LOWER', 1);
- define('MB_CASE_TITLE', 2);
-
- function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
- function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
- function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
- function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
- function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
- function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
- function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
- function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
- function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
- function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
- function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
- function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
- function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
- function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
- function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
- function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
- function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
- function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
- function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
- function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
- function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
- function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
- function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
- function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
- function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
- function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
- function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
- function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
- function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
- function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
- function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
- function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
- function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
- function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
-}
-if (!function_exists('mb_chr')) {
- function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
- function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
- function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
-}
-
-if (!function_exists('mb_str_split')) {
- function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/composer.json b/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/composer.json
deleted file mode 100644
index c968074..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-mbstring/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "symfony/polyfill-mbstring",
- "type": "library",
- "description": "Symfony polyfill for the Mbstring extension",
- "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=5.3.3"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.13-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/LICENSE b/srcs/phpmyadmin/vendor/symfony/polyfill-php56/LICENSE
deleted file mode 100644
index 4cd8bdd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/Php56.php b/srcs/phpmyadmin/vendor/symfony/polyfill-php56/Php56.php
deleted file mode 100644
index dbbc0e1..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/Php56.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Php56;
-
-use Symfony\Polyfill\Util\Binary;
-
-/**
- * @internal
- */
-final class Php56
-{
- const LDAP_ESCAPE_FILTER = 1;
- const LDAP_ESCAPE_DN = 2;
-
- public static function hash_equals($knownString, $userInput)
- {
- if (!\is_string($knownString)) {
- trigger_error('Expected known_string to be a string, '.\gettype($knownString).' given', E_USER_WARNING);
-
- return false;
- }
-
- if (!\is_string($userInput)) {
- trigger_error('Expected user_input to be a string, '.\gettype($userInput).' given', E_USER_WARNING);
-
- return false;
- }
-
- $knownLen = Binary::strlen($knownString);
- $userLen = Binary::strlen($userInput);
-
- if ($knownLen !== $userLen) {
- return false;
- }
-
- $result = 0;
-
- for ($i = 0; $i < $knownLen; ++$i) {
- $result |= \ord($knownString[$i]) ^ \ord($userInput[$i]);
- }
-
- return 0 === $result;
- }
-
- /**
- * Stub implementation of the {@link ldap_escape()} function of the ldap
- * extension.
- *
- * Escape strings for safe use in LDAP filters and DNs.
- *
- * @author Chris Wright <ldapi@daverandom.com>
- *
- * @param string $subject
- * @param string $ignore
- * @param int $flags
- *
- * @return string
- *
- * @see http://stackoverflow.com/a/8561604
- */
- public static function ldap_escape($subject, $ignore = '', $flags = 0)
- {
- static $charMaps = null;
-
- if (null === $charMaps) {
- $charMaps = array(
- self::LDAP_ESCAPE_FILTER => array('\\', '*', '(', ')', "\x00"),
- self::LDAP_ESCAPE_DN => array('\\', ',', '=', '+', '<', '>', ';', '"', '#', "\r"),
- );
-
- $charMaps[0] = array();
-
- for ($i = 0; $i < 256; ++$i) {
- $charMaps[0][\chr($i)] = sprintf('\\%02x', $i);
- }
-
- for ($i = 0, $l = \count($charMaps[self::LDAP_ESCAPE_FILTER]); $i < $l; ++$i) {
- $chr = $charMaps[self::LDAP_ESCAPE_FILTER][$i];
- unset($charMaps[self::LDAP_ESCAPE_FILTER][$i]);
- $charMaps[self::LDAP_ESCAPE_FILTER][$chr] = $charMaps[0][$chr];
- }
-
- for ($i = 0, $l = \count($charMaps[self::LDAP_ESCAPE_DN]); $i < $l; ++$i) {
- $chr = $charMaps[self::LDAP_ESCAPE_DN][$i];
- unset($charMaps[self::LDAP_ESCAPE_DN][$i]);
- $charMaps[self::LDAP_ESCAPE_DN][$chr] = $charMaps[0][$chr];
- }
- }
-
- // Create the base char map to escape
- $flags = (int) $flags;
- $charMap = array();
-
- if ($flags & self::LDAP_ESCAPE_FILTER) {
- $charMap += $charMaps[self::LDAP_ESCAPE_FILTER];
- }
-
- if ($flags & self::LDAP_ESCAPE_DN) {
- $charMap += $charMaps[self::LDAP_ESCAPE_DN];
- }
-
- if (!$charMap) {
- $charMap = $charMaps[0];
- }
-
- // Remove any chars to ignore from the list
- $ignore = (string) $ignore;
-
- for ($i = 0, $l = \strlen($ignore); $i < $l; ++$i) {
- unset($charMap[$ignore[$i]]);
- }
-
- // Do the main replacement
- $result = strtr($subject, $charMap);
-
- // Encode leading/trailing spaces if self::LDAP_ESCAPE_DN is passed
- if ($flags & self::LDAP_ESCAPE_DN) {
- if (' ' === $result[0]) {
- $result = '\\20'.substr($result, 1);
- }
-
- if (' ' === $result[\strlen($result) - 1]) {
- $result = substr($result, 0, -1).'\\20';
- }
- }
-
- return $result;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/README.md b/srcs/phpmyadmin/vendor/symfony/polyfill-php56/README.md
deleted file mode 100644
index 307ce5b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-Symfony Polyfill / Php56
-========================
-
-This component provides functions unavailable in releases prior to PHP 5.6:
-
-- [`hash_equals`](http://php.net/hash_equals) (part of [hash](http://php.net/hash) extension)
-- [`ldap_escape`](http://php.net/ldap_escape) (part of [ldap](http://php.net/ldap) extension)
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/bootstrap.php b/srcs/phpmyadmin/vendor/symfony/polyfill-php56/bootstrap.php
deleted file mode 100644
index 587c2a8..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/bootstrap.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-use Symfony\Polyfill\Php56 as p;
-
-if (PHP_VERSION_ID < 50600) {
- if (!function_exists('hash_equals')) {
- function hash_equals($knownString, $userInput) { return p\Php56::hash_equals($knownString, $userInput); }
- }
- if (extension_loaded('ldap') && !function_exists('ldap_escape')) {
- define('LDAP_ESCAPE_FILTER', 1);
- define('LDAP_ESCAPE_DN', 2);
-
- function ldap_escape($subject, $ignore = '', $flags = 0) { return p\Php56::ldap_escape($subject, $ignore, $flags); }
- }
-
- if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) {
- // Missing functions in PHP 5.5.9 - affects 32 bit builds of Ubuntu 14.04LTS
- // See https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888
- if (!function_exists('gzopen') && function_exists('gzopen64')) {
- function gzopen($filename, $mode, $use_include_path = 0) { return gzopen64($filename, $mode, $use_include_path); }
- }
- if (!function_exists('gzseek') && function_exists('gzseek64')) {
- function gzseek($zp, $offset, $whence = SEEK_SET) { return gzseek64($zp, $offset, $whence); }
- }
- if (!function_exists('gztell') && function_exists('gztell64')) {
- function gztell($zp) { return gztell64($zp); }
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/composer.json b/srcs/phpmyadmin/vendor/symfony/polyfill-php56/composer.json
deleted file mode 100644
index cabee7b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-php56/composer.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "symfony/polyfill-php56",
- "type": "library",
- "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions",
- "keywords": ["polyfill", "shim", "compatibility", "portable"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=5.3.3",
- "symfony/polyfill-util": "~1.0"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Php56\\": "" },
- "files": [ "bootstrap.php" ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.13-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/Binary.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/Binary.php
deleted file mode 100644
index 23ff974..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/Binary.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-if (\extension_loaded('mbstring')) {
- class Binary extends BinaryOnFuncOverload
- {
- }
-} else {
- class Binary extends BinaryNoFuncOverload
- {
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryNoFuncOverload.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryNoFuncOverload.php
deleted file mode 100644
index 800ad75..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryNoFuncOverload.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class BinaryNoFuncOverload
-{
- public static function strlen($s)
- {
- return \strlen($s);
- }
-
- public static function strpos($haystack, $needle, $offset = 0)
- {
- return strpos($haystack, $needle, $offset);
- }
-
- public static function strrpos($haystack, $needle, $offset = 0)
- {
- return strrpos($haystack, $needle, $offset);
- }
-
- public static function substr($string, $start, $length = PHP_INT_MAX)
- {
- return substr($string, $start, $length);
- }
-
- public static function stripos($s, $needle, $offset = 0)
- {
- return stripos($s, $needle, $offset);
- }
-
- public static function stristr($s, $needle, $part = false)
- {
- return stristr($s, $needle, $part);
- }
-
- public static function strrchr($s, $needle, $part = false)
- {
- return strrchr($s, $needle, $part);
- }
-
- public static function strripos($s, $needle, $offset = 0)
- {
- return strripos($s, $needle, $offset);
- }
-
- public static function strstr($s, $needle, $part = false)
- {
- return strstr($s, $needle, $part);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php
deleted file mode 100644
index e1b886e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/BinaryOnFuncOverload.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-/**
- * Binary safe version of string functions overloaded when MB_OVERLOAD_STRING is enabled.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class BinaryOnFuncOverload
-{
- public static function strlen($s)
- {
- return mb_strlen($s, '8bit');
- }
-
- public static function strpos($haystack, $needle, $offset = 0)
- {
- return mb_strpos($haystack, $needle, $offset, '8bit');
- }
-
- public static function strrpos($haystack, $needle, $offset = 0)
- {
- return mb_strrpos($haystack, $needle, $offset, '8bit');
- }
-
- public static function substr($string, $start, $length = 2147483647)
- {
- return mb_substr($string, $start, $length, '8bit');
- }
-
- public static function stripos($s, $needle, $offset = 0)
- {
- return mb_stripos($s, $needle, $offset, '8bit');
- }
-
- public static function stristr($s, $needle, $part = false)
- {
- return mb_stristr($s, $needle, $part, '8bit');
- }
-
- public static function strrchr($s, $needle, $part = false)
- {
- return mb_strrchr($s, $needle, $part, '8bit');
- }
-
- public static function strripos($s, $needle, $offset = 0)
- {
- return mb_strripos($s, $needle, $offset, '8bit');
- }
-
- public static function strstr($s, $needle, $part = false)
- {
- return mb_strstr($s, $needle, $part, '8bit');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/LICENSE b/srcs/phpmyadmin/vendor/symfony/polyfill-util/LICENSE
deleted file mode 100644
index 4cd8bdd..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/README.md b/srcs/phpmyadmin/vendor/symfony/polyfill-util/README.md
deleted file mode 100644
index 1c655fc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Symfony Polyfill / Util
-=======================
-
-This component provides binary-safe string functions, using the
-[mbstring](https://php.net/mbstring) extension when available.
-
-More information can be found in the
-[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
-
-License
-=======
-
-This library is released under the [MIT license](LICENSE).
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListener.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListener.php
deleted file mode 100644
index 6b17d45..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListener.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
- class_alias('Symfony\Polyfill\Util\TestListenerForV5', 'Symfony\Polyfill\Util\TestListener');
-// Using an early return instead of a else does not work when using the PHPUnit phar due to some weird PHP behavior (the class
-// gets defined without executing the code before it and so the definition is not properly conditional)
-} elseif (version_compare(\PHPUnit\Runner\Version::id(), '7.0.0', '<')) {
- class_alias('Symfony\Polyfill\Util\TestListenerForV6', 'Symfony\Polyfill\Util\TestListener');
-} else {
- class_alias('Symfony\Polyfill\Util\TestListenerForV7', 'Symfony\Polyfill\Util\TestListener');
-}
-
-if (false) {
- class TestListener
- {
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV5.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV5.php
deleted file mode 100644
index 501053d..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV5.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TestListenerForV5 extends \PHPUnit_Framework_TestSuite implements \PHPUnit_Framework_TestListener
-{
- private $suite;
- private $trait;
-
- public function __construct(\PHPUnit_Framework_TestSuite $suite = null)
- {
- if ($suite) {
- $this->suite = $suite;
- $this->setName($suite->getName().' with polyfills enabled');
- $this->addTest($suite);
- }
- $this->trait = new TestListenerTrait();
- }
-
- public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
- {
- $this->trait->startTestSuite($suite);
- }
-
- public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- $this->trait->addError($test, $e, $time);
- }
-
- public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time)
- {
- }
-
- public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- $this->trait->addError($test, $e, $time);
- }
-
- public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function endTestSuite(\PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- public function startTest(\PHPUnit_Framework_Test $test)
- {
- }
-
- public function endTest(\PHPUnit_Framework_Test $test, $time)
- {
- }
-
- public static function warning($message)
- {
- return parent::warning($message);
- }
-
- protected function setUp()
- {
- TestListenerTrait::$enabledPolyfills = $this->suite->getName();
- }
-
- protected function tearDown()
- {
- TestListenerTrait::$enabledPolyfills = false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV6.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV6.php
deleted file mode 100644
index e9e87cb..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV6.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-use PHPUnit\Framework\AssertionFailedError;
-use PHPUnit\Framework\Test;
-use PHPUnit\Framework\TestListener as TestListenerInterface;
-use PHPUnit\Framework\TestSuite;
-use PHPUnit\Framework\Warning;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TestListenerForV6 extends TestSuite implements TestListenerInterface
-{
- private $suite;
- private $trait;
-
- public function __construct(TestSuite $suite = null)
- {
- if ($suite) {
- $this->suite = $suite;
- $this->setName($suite->getName().' with polyfills enabled');
- $this->addTest($suite);
- }
- $this->trait = new TestListenerTrait();
- }
-
- public function startTestSuite(TestSuite $suite)
- {
- $this->trait->startTestSuite($suite);
- }
-
- public function addError(Test $test, \Exception $e, $time)
- {
- $this->trait->addError($test, $e, $time);
- }
-
- public function addWarning(Test $test, Warning $e, $time)
- {
- }
-
- public function addFailure(Test $test, AssertionFailedError $e, $time)
- {
- $this->trait->addError($test, $e, $time);
- }
-
- public function addIncompleteTest(Test $test, \Exception $e, $time)
- {
- }
-
- public function addRiskyTest(Test $test, \Exception $e, $time)
- {
- }
-
- public function addSkippedTest(Test $test, \Exception $e, $time)
- {
- }
-
- public function endTestSuite(TestSuite $suite)
- {
- }
-
- public function startTest(Test $test)
- {
- }
-
- public function endTest(Test $test, $time)
- {
- }
-
- public static function warning($message)
- {
- return parent::warning($message);
- }
-
- protected function setUp()
- {
- TestListenerTrait::$enabledPolyfills = $this->suite->getName();
- }
-
- protected function tearDown()
- {
- TestListenerTrait::$enabledPolyfills = false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV7.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV7.php
deleted file mode 100644
index a5c3759..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerForV7.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-use PHPUnit\Framework\AssertionFailedError;
-use PHPUnit\Framework\Test;
-use PHPUnit\Framework\TestListener as TestListenerInterface;
-use PHPUnit\Framework\TestSuite;
-use PHPUnit\Framework\Warning;
-use PHPUnit\Framework\WarningTestCase;
-
-/**
- * @author Ion Bazan <ion.bazan@gmail.com>
- */
-class TestListenerForV7 extends TestSuite implements TestListenerInterface
-{
- private $suite;
- private $trait;
-
- public function __construct(TestSuite $suite = null)
- {
- if ($suite) {
- $this->suite = $suite;
- $this->setName($suite->getName().' with polyfills enabled');
- $this->addTest($suite);
- }
- $this->trait = new TestListenerTrait();
- }
-
- public function startTestSuite(TestSuite $suite): void
- {
- $this->trait->startTestSuite($suite);
- }
-
- public function addError(Test $test, \Throwable $t, float $time): void
- {
- $this->trait->addError($test, $t, $time);
- }
-
- public function addWarning(Test $test, Warning $e, float $time): void
- {
- }
-
- public function addFailure(Test $test, AssertionFailedError $e, float $time): void
- {
- $this->trait->addError($test, $e, $time);
- }
-
- public function addIncompleteTest(Test $test, \Throwable $t, float $time): void
- {
- }
-
- public function addRiskyTest(Test $test, \Throwable $t, float $time): void
- {
- }
-
- public function addSkippedTest(Test $test, \Throwable $t, float $time): void
- {
- }
-
- public function endTestSuite(TestSuite $suite): void
- {
- }
-
- public function startTest(Test $test): void
- {
- }
-
- public function endTest(Test $test, float $time): void
- {
- }
-
- public static function warning($message): WarningTestCase
- {
- return new WarningTestCase($message);
- }
-
- protected function setUp(): void
- {
- TestListenerTrait::$enabledPolyfills = $this->suite->getName();
- }
-
- protected function tearDown(): void
- {
- TestListenerTrait::$enabledPolyfills = false;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerTrait.php b/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerTrait.php
deleted file mode 100644
index d8047a0..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/TestListenerTrait.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Polyfill\Util;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class TestListenerTrait
-{
- public static $enabledPolyfills;
-
- public function startTestSuite($mainSuite)
- {
- if (null !== self::$enabledPolyfills) {
- return;
- }
- self::$enabledPolyfills = false;
- $SkippedTestError = class_exists('PHPUnit\Framework\SkippedTestError') ? 'PHPUnit\Framework\SkippedTestError' : 'PHPUnit_Framework_SkippedTestError';
-
- foreach ($mainSuite->tests() as $suite) {
- $testClass = $suite->getName();
- if (!$tests = $suite->tests()) {
- continue;
- }
- if (!preg_match('/^(.+)\\\\Tests(\\\\.*)Test$/', $testClass, $m)) {
- $mainSuite->addTest(TestListener::warning('Unknown naming convention for '.$testClass));
- continue;
- }
- if (!class_exists($m[1].$m[2])) {
- continue;
- }
- $testedClass = new \ReflectionClass($m[1].$m[2]);
- $bootstrap = new \SplFileObject(\dirname($testedClass->getFileName()).'/bootstrap.php');
- $warnings = array();
- $defLine = null;
-
- foreach (new \RegexIterator($bootstrap, '/define\(\'/') as $defLine) {
- preg_match('/define\(\'(?P<name>.+)\'/', $defLine, $matches);
- if (\defined($matches['name'])) {
- continue;
- }
-
- try {
- eval($defLine);
- } catch (\PHPUnit_Framework_Exception $ex){
- $warnings[] = TestListener::warning($ex->getMessage());
- } catch (\PHPUnit\Framework\Exception $ex) {
- $warnings[] = TestListener::warning($ex->getMessage());
- }
- }
-
- $bootstrap->rewind();
-
- foreach (new \RegexIterator($bootstrap, '/return p\\\\'.$testedClass->getShortName().'::/') as $defLine) {
- if (!preg_match('/^\s*function (?P<name>[^\(]++)(?P<signature>\(.*\)) \{ (?<return>return p\\\\'.$testedClass->getShortName().'::[^\(]++)(?P<args>\([^\)]*+\)); \}$/', $defLine, $f)) {
- $warnings[] = TestListener::warning('Invalid line in bootstrap.php: '.trim($defLine));
- continue;
- }
- $testNamespace = substr($testClass, 0, strrpos($testClass, '\\'));
- if (\function_exists($testNamespace.'\\'.$f['name'])) {
- continue;
- }
-
- try {
- $r = new \ReflectionFunction($f['name']);
- if ($r->isUserDefined()) {
- throw new \ReflectionException();
- }
- if ('idn_to_ascii' === $f['name'] || 'idn_to_utf8' === $f['name']) {
- $defLine = sprintf('return INTL_IDNA_VARIANT_2003 === $variant ? \\%s($domain, $options, $variant) : \\%1$s%s', $f['name'], $f['args']);
- } elseif (false !== strpos($f['signature'], '&') && 'idn_to_ascii' !== $f['name'] && 'idn_to_utf8' !== $f['name']) {
- $defLine = sprintf('return \\%s%s', $f['name'], $f['args']);
- } else {
- $defLine = sprintf("return \\call_user_func_array('%s', \\func_get_args())", $f['name']);
- }
- } catch (\ReflectionException $e) {
- $defLine = sprintf("throw new \\{$SkippedTestError}('Internal function not found: %s')", $f['name']);
- }
-
- eval(<<<EOPHP
-namespace {$testNamespace};
-
-use Symfony\Polyfill\Util\TestListenerTrait;
-use {$testedClass->getNamespaceName()} as p;
-
-function {$f['name']}{$f['signature']}
-{
- if ('{$testClass}' === TestListenerTrait::\$enabledPolyfills) {
- {$f['return']}{$f['args']};
- }
-
- {$defLine};
-}
-EOPHP
- );
- }
- if (!$warnings && null === $defLine) {
- $warnings[] = new $SkippedTestError('No Polyfills found in bootstrap.php for '.$testClass);
- } else {
- $mainSuite->addTest(new TestListener($suite));
- }
- }
- foreach ($warnings as $w) {
- $mainSuite->addTest($w);
- }
- }
-
- public function addError($test, \Exception $e, $time)
- {
- if (false !== self::$enabledPolyfills) {
- $r = new \ReflectionProperty('Exception', 'message');
- $r->setAccessible(true);
- $r->setValue($e, 'Polyfills enabled, '.$r->getValue($e));
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/polyfill-util/composer.json b/srcs/phpmyadmin/vendor/symfony/polyfill-util/composer.json
deleted file mode 100644
index 47c7883..0000000
--- a/srcs/phpmyadmin/vendor/symfony/polyfill-util/composer.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "symfony/polyfill-util",
- "type": "library",
- "description": "Symfony utilities for portability of PHP codes",
- "keywords": ["polyfill", "shim", "compat", "compatibility"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=5.3.3"
- },
- "autoload": {
- "psr-4": { "Symfony\\Polyfill\\Util\\": "" }
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.13-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/LICENSE b/srcs/phpmyadmin/vendor/symfony/service-contracts/LICENSE
deleted file mode 100644
index 3f853aa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/README.md b/srcs/phpmyadmin/vendor/symfony/service-contracts/README.md
deleted file mode 100644
index d033a43..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-Symfony Service Contracts
-=========================
-
-A set of abstractions extracted out of the Symfony components.
-
-Can be used to build on semantics that the Symfony components proved useful - and
-that already have battle tested implementations.
-
-See https://github.com/symfony/contracts/blob/master/README.md for more information.
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/ResetInterface.php b/srcs/phpmyadmin/vendor/symfony/service-contracts/ResetInterface.php
deleted file mode 100644
index 1af1075..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/ResetInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Service;
-
-/**
- * Provides a way to reset an object to its initial state.
- *
- * When calling the "reset()" method on an object, it should be put back to its
- * initial state. This usually means clearing any internal buffers and forwarding
- * the call to internal dependencies. All properties of the object should be put
- * back to the same state it had when it was first ready to use.
- *
- * This method could be called, for example, to recycle objects that are used as
- * services, so that they can be used to handle several requests in the same
- * process loop (note that we advise making your services stateless instead of
- * implementing this interface when possible.)
- */
-interface ResetInterface
-{
- public function reset();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceLocatorTrait.php
deleted file mode 100644
index 4ec6eb4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceLocatorTrait.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Service;
-
-use Psr\Container\ContainerExceptionInterface;
-use Psr\Container\NotFoundExceptionInterface;
-
-/**
- * A trait to help implement ServiceProviderInterface.
- *
- * @author Robin Chalas <robin.chalas@gmail.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-trait ServiceLocatorTrait
-{
- private $factories;
- private $loading = [];
- private $providedTypes;
-
- /**
- * @param callable[] $factories
- */
- public function __construct(array $factories)
- {
- $this->factories = $factories;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return bool
- */
- public function has($id)
- {
- return isset($this->factories[$id]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($id)
- {
- if (!isset($this->factories[$id])) {
- throw $this->createNotFoundException($id);
- }
-
- if (isset($this->loading[$id])) {
- $ids = array_values($this->loading);
- $ids = \array_slice($this->loading, array_search($id, $ids));
- $ids[] = $id;
-
- throw $this->createCircularReferenceException($id, $ids);
- }
-
- $this->loading[$id] = $id;
- try {
- return $this->factories[$id]($this);
- } finally {
- unset($this->loading[$id]);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getProvidedServices(): array
- {
- if (null === $this->providedTypes) {
- $this->providedTypes = [];
-
- foreach ($this->factories as $name => $factory) {
- if (!\is_callable($factory)) {
- $this->providedTypes[$name] = '?';
- } else {
- $type = (new \ReflectionFunction($factory))->getReturnType();
-
- $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').$type->getName() : '?';
- }
- }
- }
-
- return $this->providedTypes;
- }
-
- private function createNotFoundException(string $id): NotFoundExceptionInterface
- {
- if (!$alternatives = array_keys($this->factories)) {
- $message = 'is empty...';
- } else {
- $last = array_pop($alternatives);
- if ($alternatives) {
- $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last);
- } else {
- $message = sprintf('only knows about the "%s" service.', $last);
- }
- }
-
- if ($this->loading) {
- $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message);
- } else {
- $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message);
- }
-
- return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface {
- };
- }
-
- private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface
- {
- return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface {
- };
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceProviderInterface.php b/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceProviderInterface.php
deleted file mode 100644
index c60ad0b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceProviderInterface.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Service;
-
-use Psr\Container\ContainerInterface;
-
-/**
- * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- * @author Mateusz Sip <mateusz.sip@gmail.com>
- */
-interface ServiceProviderInterface extends ContainerInterface
-{
- /**
- * Returns an associative array of service types keyed by the identifiers provided by the current container.
- *
- * Examples:
- *
- * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface
- * * ['foo' => '?'] means the container provides service name "foo" of unspecified type
- * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null
- *
- * @return string[] The provided service types, keyed by service names
- */
- public function getProvidedServices(): array;
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberInterface.php
deleted file mode 100644
index 8bb320f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberInterface.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Service;
-
-/**
- * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method.
- *
- * The getSubscribedServices method returns an array of service types required by such instances,
- * optionally keyed by the service names used internally. Service types that start with an interrogation
- * mark "?" are optional, while the other ones are mandatory service dependencies.
- *
- * The injected service locators SHOULD NOT allow access to any other services not specified by the method.
- *
- * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally.
- * This interface does not dictate any injection method for these service locators, although constructor
- * injection is recommended.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-interface ServiceSubscriberInterface
-{
- /**
- * Returns an array of service types required by such instances, optionally keyed by the service names used internally.
- *
- * For mandatory dependencies:
- *
- * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name
- * internally to fetch a service which must implement Psr\Log\LoggerInterface.
- * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name
- * internally to fetch an iterable of Psr\Log\LoggerInterface instances.
- * * ['Psr\Log\LoggerInterface'] is a shortcut for
- * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface']
- *
- * otherwise:
- *
- * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency
- * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency
- * * ['?Psr\Log\LoggerInterface'] is a shortcut for
- * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface']
- *
- * @return array The required service types, optionally keyed by service names
- */
- public static function getSubscribedServices();
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberTrait.php
deleted file mode 100644
index 5d9d456..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/ServiceSubscriberTrait.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Service;
-
-use Psr\Container\ContainerInterface;
-
-/**
- * Implementation of ServiceSubscriberInterface that determines subscribed services from
- * private method return types. Service ids are available as "ClassName::methodName".
- *
- * @author Kevin Bond <kevinbond@gmail.com>
- */
-trait ServiceSubscriberTrait
-{
- /** @var ContainerInterface */
- protected $container;
-
- public static function getSubscribedServices(): array
- {
- static $services;
-
- if (null !== $services) {
- return $services;
- }
-
- $services = \is_callable(['parent', __FUNCTION__]) ? parent::getSubscribedServices() : [];
-
- foreach ((new \ReflectionClass(self::class))->getMethods() as $method) {
- if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
- continue;
- }
-
- if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) {
- $services[self::class.'::'.$method->name] = '?'.$returnType->getName();
- }
- }
-
- return $services;
- }
-
- /**
- * @required
- */
- public function setContainer(ContainerInterface $container)
- {
- $this->container = $container;
-
- if (\is_callable(['parent', __FUNCTION__])) {
- return parent::setContainer($container);
- }
-
- return null;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/srcs/phpmyadmin/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php
deleted file mode 100644
index 5ed9149..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Contracts\Service\Test;
-
-use PHPUnit\Framework\TestCase;
-use Psr\Container\ContainerInterface;
-use Symfony\Contracts\Service\ServiceLocatorTrait;
-
-abstract class ServiceLocatorTest extends TestCase
-{
- protected function getServiceLocator(array $factories)
- {
- return new class($factories) implements ContainerInterface {
- use ServiceLocatorTrait;
- };
- }
-
- public function testHas()
- {
- $locator = $this->getServiceLocator([
- 'foo' => function () { return 'bar'; },
- 'bar' => function () { return 'baz'; },
- function () { return 'dummy'; },
- ]);
-
- $this->assertTrue($locator->has('foo'));
- $this->assertTrue($locator->has('bar'));
- $this->assertFalse($locator->has('dummy'));
- }
-
- public function testGet()
- {
- $locator = $this->getServiceLocator([
- 'foo' => function () { return 'bar'; },
- 'bar' => function () { return 'baz'; },
- ]);
-
- $this->assertSame('bar', $locator->get('foo'));
- $this->assertSame('baz', $locator->get('bar'));
- }
-
- public function testGetDoesNotMemoize()
- {
- $i = 0;
- $locator = $this->getServiceLocator([
- 'foo' => function () use (&$i) {
- ++$i;
-
- return 'bar';
- },
- ]);
-
- $this->assertSame('bar', $locator->get('foo'));
- $this->assertSame('bar', $locator->get('foo'));
- $this->assertSame(2, $i);
- }
-
- public function testThrowsOnUndefinedInternalService()
- {
- if (!$this->getExpectedException()) {
- $this->expectException('Psr\Container\NotFoundExceptionInterface');
- $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
- }
- $locator = $this->getServiceLocator([
- 'foo' => function () use (&$locator) { return $locator->get('bar'); },
- ]);
-
- $locator->get('foo');
- }
-
- public function testThrowsOnCircularReference()
- {
- $this->expectException('Psr\Container\ContainerExceptionInterface');
- $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
- $locator = $this->getServiceLocator([
- 'foo' => function () use (&$locator) { return $locator->get('bar'); },
- 'bar' => function () use (&$locator) { return $locator->get('baz'); },
- 'baz' => function () use (&$locator) { return $locator->get('bar'); },
- ]);
-
- $locator->get('foo');
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/service-contracts/composer.json b/srcs/phpmyadmin/vendor/symfony/service-contracts/composer.json
deleted file mode 100644
index f4209cc..0000000
--- a/srcs/phpmyadmin/vendor/symfony/service-contracts/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "symfony/service-contracts",
- "type": "library",
- "description": "Generic abstractions related to writing services",
- "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "psr/container": "^1.0"
- },
- "suggest": {
- "symfony/service-implementation": ""
- },
- "autoload": {
- "psr-4": { "Symfony\\Contracts\\Service\\": "" }
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/var-exporter/CHANGELOG.md
deleted file mode 100644
index 9aa4a8b..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/CHANGELOG.md
+++ /dev/null
@@ -1,7 +0,0 @@
-CHANGELOG
-=========
-
-4.2.0
------
-
- * added the component
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php
deleted file mode 100644
index 4cebe44..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Exception;
-
-class ClassNotFoundException extends \Exception implements ExceptionInterface
-{
- public function __construct(string $class, \Throwable $previous = null)
- {
- parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ExceptionInterface.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ExceptionInterface.php
deleted file mode 100644
index adfaed4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Exception;
-
-interface ExceptionInterface extends \Throwable
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php
deleted file mode 100644
index 7ca4884..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Exception;
-
-class NotInstantiableTypeException extends \Exception implements ExceptionInterface
-{
- public function __construct(string $type)
- {
- parent::__construct(sprintf('Type "%s" is not instantiable.', $type));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Instantiator.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Instantiator.php
deleted file mode 100644
index 06abbc7..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Instantiator.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter;
-
-use Symfony\Component\VarExporter\Exception\ExceptionInterface;
-use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException;
-use Symfony\Component\VarExporter\Internal\Hydrator;
-use Symfony\Component\VarExporter\Internal\Registry;
-
-/**
- * A utility class to create objects without calling their constructor.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-final class Instantiator
-{
- /**
- * Creates an object and sets its properties without calling its constructor nor any other methods.
- *
- * For example:
- *
- * // creates an empty instance of Foo
- * Instantiator::instantiate(Foo::class);
- *
- * // creates a Foo instance and sets one of its properties
- * Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]);
- *
- * // creates a Foo instance and sets a private property defined on its parent Bar class
- * Instantiator::instantiate(Foo::class, [], [
- * Bar::class => ['privateBarProperty' => $propertyValue],
- * ]);
- *
- * Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
- * by using the special "\0" property name to define their internal value:
- *
- * // creates an SplObjectHash where $info1 is attached to $obj1, etc.
- * Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);
- *
- * // creates an ArrayObject populated with $inputArray
- * Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray]]);
- *
- * @param string $class The class of the instance to create
- * @param array $properties The properties to set on the instance
- * @param array $privateProperties The private properties to set on the instance,
- * keyed by their declaring class
- *
- * @return object The created instance
- *
- * @throws ExceptionInterface When the instance cannot be created
- */
- public static function instantiate(string $class, array $properties = [], array $privateProperties = [])
- {
- $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class);
-
- if (Registry::$cloneable[$class]) {
- $wrappedInstance = [clone Registry::$prototypes[$class]];
- } elseif (Registry::$instantiableWithoutConstructor[$class]) {
- $wrappedInstance = [$reflector->newInstanceWithoutConstructor()];
- } elseif (null === Registry::$prototypes[$class]) {
- throw new NotInstantiableTypeException($class);
- } elseif ($reflector->implementsInterface('Serializable') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize'))) {
- $wrappedInstance = [unserialize('C:'.\strlen($class).':"'.$class.'":0:{}')];
- } else {
- $wrappedInstance = [unserialize('O:'.\strlen($class).':"'.$class.'":0:{}')];
- }
-
- if ($properties) {
- $privateProperties[$class] = isset($privateProperties[$class]) ? $properties + $privateProperties[$class] : $properties;
- }
-
- foreach ($privateProperties as $class => $properties) {
- if (!$properties) {
- continue;
- }
- foreach ($properties as $name => $value) {
- // because they're also used for "unserialization", hydrators
- // deal with array of instances, so we need to wrap values
- $properties[$name] = [$value];
- }
- (Hydrator::$hydrators[$class] ?? Hydrator::getHydrator($class))($properties, $wrappedInstance);
- }
-
- return $wrappedInstance[0];
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Exporter.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Exporter.php
deleted file mode 100644
index d1ee987..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Exporter.php
+++ /dev/null
@@ -1,407 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Internal;
-
-use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class Exporter
-{
- /**
- * Prepares an array of values for VarExporter.
- *
- * For performance this method is public and has no type-hints.
- *
- * @param array &$values
- * @param \SplObjectStorage $objectsPool
- * @param array &$refsPool
- * @param int &$objectsCount
- * @param bool &$valuesAreStatic
- *
- * @return array
- *
- * @throws NotInstantiableTypeException When a value cannot be serialized
- */
- public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic)
- {
- $refs = $values;
- foreach ($values as $k => $value) {
- if (\is_resource($value)) {
- throw new NotInstantiableTypeException(get_resource_type($value).' resource');
- }
- $refs[$k] = $objectsPool;
-
- if ($isRef = !$valueIsStatic = $values[$k] !== $objectsPool) {
- $values[$k] = &$value; // Break hard references to make $values completely
- unset($value); // independent from the original structure
- $refs[$k] = $value = $values[$k];
- if ($value instanceof Reference && 0 > $value->id) {
- $valuesAreStatic = false;
- ++$value->count;
- continue;
- }
- $refsPool[] = [&$refs[$k], $value, &$value];
- $refs[$k] = $values[$k] = new Reference(-\count($refsPool), $value);
- }
-
- if (\is_array($value)) {
- if ($value) {
- $value = self::prepare($value, $objectsPool, $refsPool, $objectsCount, $valueIsStatic);
- }
- goto handle_value;
- } elseif (!\is_object($value) && !$value instanceof \__PHP_Incomplete_Class) {
- goto handle_value;
- }
-
- $valueIsStatic = false;
- if (isset($objectsPool[$value])) {
- ++$objectsCount;
- $value = new Reference($objectsPool[$value][0]);
- goto handle_value;
- }
-
- $class = \get_class($value);
- $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class);
-
- if ($reflector->hasMethod('__serialize')) {
- if (!$reflector->getMethod('__serialize')->isPublic()) {
- throw new \Error(sprintf('Call to %s method %s::__serialize()', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class));
- }
-
- if (!\is_array($properties = $value->__serialize())) {
- throw new \Typerror($class.'::__serialize() must return an array');
- }
-
- goto prepare_value;
- }
-
- $properties = [];
- $sleep = null;
- $arrayValue = (array) $value;
- $proto = Registry::$prototypes[$class];
-
- if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) {
- // ArrayIterator and ArrayObject need special care because their "flags"
- // option changes the behavior of the (array) casting operator.
- $properties = self::getArrayObjectProperties($value, $arrayValue, $proto);
-
- // populates Registry::$prototypes[$class] with a new instance
- Registry::getClassReflector($class, Registry::$instantiableWithoutConstructor[$class], Registry::$cloneable[$class]);
- } elseif ($value instanceof \SplObjectStorage && Registry::$cloneable[$class] && null !== $proto) {
- // By implementing Serializable, SplObjectStorage breaks
- // internal references; let's deal with it on our own.
- foreach (clone $value as $v) {
- $properties[] = $v;
- $properties[] = $value[$v];
- }
- $properties = ['SplObjectStorage' => ["\0" => $properties]];
- } elseif ($value instanceof \Serializable || $value instanceof \__PHP_Incomplete_Class) {
- ++$objectsCount;
- $objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0];
- $value = new Reference($id);
- goto handle_value;
- }
-
- if (method_exists($class, '__sleep')) {
- if (!\is_array($sleep = $value->__sleep())) {
- trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', E_USER_NOTICE);
- $value = null;
- goto handle_value;
- }
- foreach ($sleep as $name) {
- if (property_exists($value, $name) && !$reflector->hasProperty($name)) {
- $arrayValue[$name] = $value->$name;
- }
- }
- $sleep = array_flip($sleep);
- }
-
- $proto = (array) $proto;
-
- foreach ($arrayValue as $name => $v) {
- $i = 0;
- $n = (string) $name;
- if ('' === $n || "\0" !== $n[0]) {
- $c = 'stdClass';
- } elseif ('*' === $n[1]) {
- $n = substr($n, 3);
- $c = $reflector->getProperty($n)->class;
- if ('Error' === $c) {
- $c = 'TypeError';
- } elseif ('Exception' === $c) {
- $c = 'ErrorException';
- }
- } else {
- $i = strpos($n, "\0", 2);
- $c = substr($n, 1, $i - 1);
- $n = substr($n, 1 + $i);
- }
- if (null !== $sleep) {
- if (!isset($sleep[$n]) || ($i && $c !== $class)) {
- continue;
- }
- $sleep[$n] = false;
- }
- if (!\array_key_exists($name, $proto) || $proto[$name] !== $v || "\x00Error\x00trace" === $name || "\x00Exception\x00trace" === $name) {
- $properties[$c][$n] = $v;
- }
- }
- if ($sleep) {
- foreach ($sleep as $n => $v) {
- if (false !== $v) {
- trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), E_USER_NOTICE);
- }
- }
- }
-
- prepare_value:
- $objectsPool[$value] = [$id = \count($objectsPool)];
- $properties = self::prepare($properties, $objectsPool, $refsPool, $objectsCount, $valueIsStatic);
- ++$objectsCount;
- $objectsPool[$value] = [$id, $class, $properties, method_exists($class, '__unserialize') ? -$objectsCount : (method_exists($class, '__wakeup') ? $objectsCount : 0)];
-
- $value = new Reference($id);
-
- handle_value:
- if ($isRef) {
- unset($value); // Break the hard reference created above
- } elseif (!$valueIsStatic) {
- $values[$k] = $value;
- }
- $valuesAreStatic = $valueIsStatic && $valuesAreStatic;
- }
-
- return $values;
- }
-
- public static function export($value, $indent = '')
- {
- switch (true) {
- case \is_int($value) || \is_float($value): return var_export($value, true);
- case [] === $value: return '[]';
- case false === $value: return 'false';
- case true === $value: return 'true';
- case null === $value: return 'null';
- case '' === $value: return "''";
- }
-
- if ($value instanceof Reference) {
- if (0 <= $value->id) {
- return '$o['.$value->id.']';
- }
- if (!$value->count) {
- return self::export($value->value, $indent);
- }
- $value = -$value->id;
-
- return '&$r['.$value.']';
- }
- $subIndent = $indent.' ';
-
- if (\is_string($value)) {
- $code = sprintf("'%s'", addcslashes($value, "'\\"));
-
- $code = preg_replace_callback('/([\0\r\n]++)(.)/', function ($m) use ($subIndent) {
- $m[1] = sprintf('\'."%s".\'', str_replace(
- ["\0", "\r", "\n", '\n\\'],
- ['\0', '\r', '\n', '\n"'."\n".$subIndent.'."\\'],
- $m[1]
- ));
-
- if ("'" === $m[2]) {
- return substr($m[1], 0, -2);
- }
-
- if ('n".\'' === substr($m[1], -4)) {
- return substr_replace($m[1], "\n".$subIndent.".'".$m[2], -2);
- }
-
- return $m[1].$m[2];
- }, $code, -1, $count);
-
- if ($count && 0 === strpos($code, "''.")) {
- $code = substr($code, 3);
- }
-
- return $code;
- }
-
- if (\is_array($value)) {
- $j = -1;
- $code = '';
- foreach ($value as $k => $v) {
- $code .= $subIndent;
- if (!\is_int($k) || 1 !== $k - $j) {
- $code .= self::export($k, $subIndent).' => ';
- }
- if (\is_int($k) && $k > $j) {
- $j = $k;
- }
- $code .= self::export($v, $subIndent).",\n";
- }
-
- return "[\n".$code.$indent.']';
- }
-
- if ($value instanceof Values) {
- $code = $subIndent."\$r = [],\n";
- foreach ($value->values as $k => $v) {
- $code .= $subIndent.'$r['.$k.'] = '.self::export($v, $subIndent).",\n";
- }
-
- return "[\n".$code.$indent.']';
- }
-
- if ($value instanceof Registry) {
- return self::exportRegistry($value, $indent, $subIndent);
- }
-
- if ($value instanceof Hydrator) {
- return self::exportHydrator($value, $indent, $subIndent);
- }
-
- throw new \UnexpectedValueException(sprintf('Cannot export value of type "%s".', \is_object($value) ? \get_class($value) : \gettype($value)));
- }
-
- private static function exportRegistry(Registry $value, string $indent, string $subIndent): string
- {
- $code = '';
- $serializables = [];
- $seen = [];
- $prototypesAccess = 0;
- $factoriesAccess = 0;
- $r = '\\'.Registry::class;
- $j = -1;
-
- foreach ($value as $k => $class) {
- if (':' === ($class[1] ?? null)) {
- $serializables[$k] = $class;
- continue;
- }
- if (!Registry::$instantiableWithoutConstructor[$class]) {
- if (is_subclass_of($class, 'Serializable') && !method_exists($class, '__unserialize')) {
- $serializables[$k] = 'C:'.\strlen($class).':"'.$class.'":0:{}';
- } else {
- $serializables[$k] = 'O:'.\strlen($class).':"'.$class.'":0:{}';
- }
- if (is_subclass_of($class, 'Throwable')) {
- $eol = is_subclass_of($class, 'Error') ? "\0Error\0" : "\0Exception\0";
- $serializables[$k] = substr_replace($serializables[$k], '1:{s:'.(5 + \strlen($eol)).':"'.$eol.'trace";a:0:{}}', -4);
- }
- continue;
- }
- $code .= $subIndent.(1 !== $k - $j ? $k.' => ' : '');
- $j = $k;
- $eol = ",\n";
- $c = '['.self::export($class).']';
-
- if ($seen[$class] ?? false) {
- if (Registry::$cloneable[$class]) {
- ++$prototypesAccess;
- $code .= 'clone $p'.$c;
- } else {
- ++$factoriesAccess;
- $code .= '$f'.$c.'()';
- }
- } else {
- $seen[$class] = true;
- if (Registry::$cloneable[$class]) {
- $code .= 'clone ('.($prototypesAccess++ ? '$p' : '($p = &'.$r.'::$prototypes)').$c.' ?? '.$r.'::p';
- } else {
- $code .= '('.($factoriesAccess++ ? '$f' : '($f = &'.$r.'::$factories)').$c.' ?? '.$r.'::f';
- $eol = '()'.$eol;
- }
- $code .= '('.substr($c, 1, -1).'))';
- }
- $code .= $eol;
- }
-
- if (1 === $prototypesAccess) {
- $code = str_replace('($p = &'.$r.'::$prototypes)', $r.'::$prototypes', $code);
- }
- if (1 === $factoriesAccess) {
- $code = str_replace('($f = &'.$r.'::$factories)', $r.'::$factories', $code);
- }
- if ('' !== $code) {
- $code = "\n".$code.$indent;
- }
-
- if ($serializables) {
- $code = $r.'::unserialize(['.$code.'], '.self::export($serializables, $indent).')';
- } else {
- $code = '['.$code.']';
- }
-
- return '$o = '.$code;
- }
-
- private static function exportHydrator(Hydrator $value, string $indent, string $subIndent): string
- {
- $code = '';
- foreach ($value->properties as $class => $properties) {
- $code .= $subIndent.' '.self::export($class).' => '.self::export($properties, $subIndent.' ').",\n";
- }
-
- $code = [
- self::export($value->registry, $subIndent),
- self::export($value->values, $subIndent),
- '' !== $code ? "[\n".$code.$subIndent.']' : '[]',
- self::export($value->value, $subIndent),
- self::export($value->wakeups, $subIndent),
- ];
-
- return '\\'.\get_class($value)."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')';
- }
-
- /**
- * @param \ArrayIterator|\ArrayObject $value
- * @param \ArrayIterator|\ArrayObject $proto
- */
- private static function getArrayObjectProperties($value, array &$arrayValue, $proto): array
- {
- $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject';
- $reflector = Registry::$reflectors[$reflector] ?? Registry::getClassReflector($reflector);
-
- $properties = [
- $arrayValue,
- $reflector->getMethod('getFlags')->invoke($value),
- $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator',
- ];
-
- $reflector = $reflector->getMethod('setFlags');
- $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST);
-
- if ($properties[1] & \ArrayObject::STD_PROP_LIST) {
- $reflector->invoke($value, 0);
- $properties[0] = (array) $value;
- } else {
- $reflector->invoke($value, \ArrayObject::STD_PROP_LIST);
- $arrayValue = (array) $value;
- }
- $reflector->invoke($value, $properties[1]);
-
- if ([[], 0, 'ArrayIterator'] === $properties) {
- $properties = [];
- } else {
- if ('ArrayIterator' === $properties[2]) {
- unset($properties[2]);
- }
- $properties = [$reflector->class => ["\0" => $properties]];
- }
-
- return $properties;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Hydrator.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Hydrator.php
deleted file mode 100644
index 364d292..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Hydrator.php
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Internal;
-
-use Symfony\Component\VarExporter\Exception\ClassNotFoundException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class Hydrator
-{
- public static $hydrators = [];
-
- public $registry;
- public $values;
- public $properties;
- public $value;
- public $wakeups;
-
- public function __construct(?Registry $registry, ?Values $values, array $properties, $value, array $wakeups)
- {
- $this->registry = $registry;
- $this->values = $values;
- $this->properties = $properties;
- $this->value = $value;
- $this->wakeups = $wakeups;
- }
-
- public static function hydrate($objects, $values, $properties, $value, $wakeups)
- {
- foreach ($properties as $class => $vars) {
- (self::$hydrators[$class] ?? self::getHydrator($class))($vars, $objects);
- }
- foreach ($wakeups as $k => $v) {
- if (\is_array($v)) {
- $objects[-$k]->__unserialize($v);
- } else {
- $objects[$v]->__wakeup();
- }
- }
-
- return $value;
- }
-
- public static function getHydrator($class)
- {
- if ('stdClass' === $class) {
- return self::$hydrators[$class] = static function ($properties, $objects) {
- foreach ($properties as $name => $values) {
- foreach ($values as $i => $v) {
- $objects[$i]->$name = $v;
- }
- }
- };
- }
-
- if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) {
- throw new ClassNotFoundException($class);
- }
- $classReflector = new \ReflectionClass($class);
-
- if (!$classReflector->isInternal()) {
- return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, $class);
- }
-
- if ($classReflector->name !== $class) {
- return self::$hydrators[$classReflector->name] ?? self::getHydrator($classReflector->name);
- }
-
- switch ($class) {
- case 'ArrayIterator':
- case 'ArrayObject':
- $constructor = \Closure::fromCallable([$classReflector->getConstructor(), 'invokeArgs']);
-
- return self::$hydrators[$class] = static function ($properties, $objects) use ($constructor) {
- foreach ($properties as $name => $values) {
- if ("\0" !== $name) {
- foreach ($values as $i => $v) {
- $objects[$i]->$name = $v;
- }
- }
- }
- foreach ($properties["\0"] ?? [] as $i => $v) {
- $constructor($objects[$i], $v);
- }
- };
-
- case 'ErrorException':
- return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \ErrorException {
- });
-
- case 'TypeError':
- return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \Error {
- });
-
- case 'SplObjectStorage':
- return self::$hydrators[$class] = static function ($properties, $objects) {
- foreach ($properties as $name => $values) {
- if ("\0" === $name) {
- foreach ($values as $i => $v) {
- for ($j = 0; $j < \count($v); ++$j) {
- $objects[$i]->attach($v[$j], $v[++$j]);
- }
- }
- continue;
- }
- foreach ($values as $i => $v) {
- $objects[$i]->$name = $v;
- }
- }
- };
- }
-
- $propertySetters = [];
- foreach ($classReflector->getProperties() as $propertyReflector) {
- if (!$propertyReflector->isStatic()) {
- $propertyReflector->setAccessible(true);
- $propertySetters[$propertyReflector->name] = \Closure::fromCallable([$propertyReflector, 'setValue']);
- }
- }
-
- if (!$propertySetters) {
- return self::$hydrators[$class] = self::$hydrators['stdClass'] ?? self::getHydrator('stdClass');
- }
-
- return self::$hydrators[$class] = static function ($properties, $objects) use ($propertySetters) {
- foreach ($properties as $name => $values) {
- if ($setValue = $propertySetters[$name] ?? null) {
- foreach ($values as $i => $v) {
- $setValue($objects[$i], $v);
- }
- continue;
- }
- foreach ($values as $i => $v) {
- $objects[$i]->$name = $v;
- }
- }
- };
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Reference.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Reference.php
deleted file mode 100644
index e371c07..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Reference.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Internal;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class Reference
-{
- public $id;
- public $value;
- public $count = 0;
-
- public function __construct(int $id, $value = null)
- {
- $this->id = $id;
- $this->value = $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Registry.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Registry.php
deleted file mode 100644
index 19d91c9..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Registry.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Internal;
-
-use Symfony\Component\VarExporter\Exception\ClassNotFoundException;
-use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class Registry
-{
- public static $reflectors = [];
- public static $prototypes = [];
- public static $factories = [];
- public static $cloneable = [];
- public static $instantiableWithoutConstructor = [];
-
- public function __construct(array $classes)
- {
- foreach ($classes as $i => $class) {
- $this->$i = $class;
- }
- }
-
- public static function unserialize($objects, $serializables)
- {
- $unserializeCallback = ini_set('unserialize_callback_func', __CLASS__.'::getClassReflector');
-
- try {
- foreach ($serializables as $k => $v) {
- $objects[$k] = unserialize($v);
- }
- } finally {
- ini_set('unserialize_callback_func', $unserializeCallback);
- }
-
- return $objects;
- }
-
- public static function p($class)
- {
- self::getClassReflector($class, true, true);
-
- return self::$prototypes[$class];
- }
-
- public static function f($class)
- {
- $reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false);
-
- return self::$factories[$class] = \Closure::fromCallable([$reflector, 'newInstanceWithoutConstructor']);
- }
-
- public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null)
- {
- if (!($isClass = class_exists($class)) && !interface_exists($class, false) && !trait_exists($class, false)) {
- throw new ClassNotFoundException($class);
- }
- $reflector = new \ReflectionClass($class);
-
- if ($instantiableWithoutConstructor) {
- $proto = $reflector->newInstanceWithoutConstructor();
- } elseif (!$isClass || $reflector->isAbstract()) {
- throw new NotInstantiableTypeException($class);
- } elseif ($reflector->name !== $class) {
- $reflector = self::$reflectors[$name = $reflector->name] ?? self::getClassReflector($name, false, $cloneable);
- self::$cloneable[$class] = self::$cloneable[$name];
- self::$instantiableWithoutConstructor[$class] = self::$instantiableWithoutConstructor[$name];
- self::$prototypes[$class] = self::$prototypes[$name];
-
- return self::$reflectors[$class] = $reflector;
- } else {
- try {
- $proto = $reflector->newInstanceWithoutConstructor();
- $instantiableWithoutConstructor = true;
- } catch (\ReflectionException $e) {
- $proto = $reflector->implementsInterface('Serializable') && !method_exists($class, '__unserialize') ? 'C:' : 'O:';
- if ('C:' === $proto && !$reflector->getMethod('unserialize')->isInternal()) {
- $proto = null;
- } elseif (false === $proto = @unserialize($proto.\strlen($class).':"'.$class.'":0:{}')) {
- throw new NotInstantiableTypeException($class);
- }
- }
- if (null !== $proto && !$proto instanceof \Throwable && !$proto instanceof \Serializable && !method_exists($class, '__sleep') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__serialize'))) {
- try {
- serialize($proto);
- } catch (\Exception $e) {
- throw new NotInstantiableTypeException($class, $e);
- }
- }
- }
-
- if (null === $cloneable) {
- if (($proto instanceof \Reflector || $proto instanceof \ReflectionGenerator || $proto instanceof \ReflectionType || $proto instanceof \IteratorIterator || $proto instanceof \RecursiveIteratorIterator) && (!$proto instanceof \Serializable && !method_exists($proto, '__wakeup') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize')))) {
- throw new NotInstantiableTypeException($class);
- }
-
- $cloneable = $reflector->isCloneable() && !$reflector->hasMethod('__clone');
- }
-
- self::$cloneable[$class] = $cloneable;
- self::$instantiableWithoutConstructor[$class] = $instantiableWithoutConstructor;
- self::$prototypes[$class] = $proto;
-
- if ($proto instanceof \Throwable) {
- static $setTrace;
-
- if (null === $setTrace) {
- $setTrace = [
- new \ReflectionProperty(\Error::class, 'trace'),
- new \ReflectionProperty(\Exception::class, 'trace'),
- ];
- $setTrace[0]->setAccessible(true);
- $setTrace[1]->setAccessible(true);
- $setTrace[0] = \Closure::fromCallable([$setTrace[0], 'setValue']);
- $setTrace[1] = \Closure::fromCallable([$setTrace[1], 'setValue']);
- }
-
- $setTrace[$proto instanceof \Exception]($proto, []);
- }
-
- return self::$reflectors[$class] = $reflector;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Values.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Values.php
deleted file mode 100644
index 21ae04e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/Internal/Values.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter\Internal;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- *
- * @internal
- */
-class Values
-{
- public $values;
-
- public function __construct(array $values)
- {
- $this->values = $values;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/LICENSE b/srcs/phpmyadmin/vendor/symfony/var-exporter/LICENSE
deleted file mode 100644
index 3f853aa..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2018-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/README.md b/srcs/phpmyadmin/vendor/symfony/var-exporter/README.md
deleted file mode 100644
index bb13960..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-VarExporter Component
-=====================
-
-The VarExporter component allows exporting any serializable PHP data structure to
-plain PHP code. While doing so, it preserves all the semantics associated with
-the serialization mechanism of PHP (`__wakeup`, `__sleep`, `Serializable`,
-`__serialize`, `__unserialize`).
-
-It also provides an instantiator that allows creating and populating objects
-without calling their constructor nor any other methods.
-
-The reason to use this component *vs* `serialize()` or
-[igbinary](https://github.com/igbinary/igbinary) is performance: thanks to
-OPcache, the resulting code is significantly faster and more memory efficient
-than using `unserialize()` or `igbinary_unserialize()`.
-
-Unlike `var_export()`, this works on any serializable PHP value.
-
-It also provides a few improvements over `var_export()`/`serialize()`:
-
- * the output is PSR-2 compatible;
- * the output can be re-indented without messing up with `\r` or `\n` in the data
- * missing classes throw a `ClassNotFoundException` instead of being unserialized to
- `PHP_Incomplete_Class` objects;
- * references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator`
- instances are preserved;
- * `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes
- throw an exception when being serialized (their unserialized version is broken
- anyway, see https://bugs.php.net/76737).
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/var_exporter.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/VarExporter.php b/srcs/phpmyadmin/vendor/symfony/var-exporter/VarExporter.php
deleted file mode 100644
index da9a8d4..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/VarExporter.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\VarExporter;
-
-use Symfony\Component\VarExporter\Exception\ExceptionInterface;
-use Symfony\Component\VarExporter\Internal\Exporter;
-use Symfony\Component\VarExporter\Internal\Hydrator;
-use Symfony\Component\VarExporter\Internal\Registry;
-use Symfony\Component\VarExporter\Internal\Values;
-
-/**
- * Exports serializable PHP values to PHP code.
- *
- * VarExporter allows serializing PHP data structures to plain PHP code (like var_export())
- * while preserving all the semantics associated with serialize() (unlike var_export()).
- *
- * By leveraging OPcache, the generated PHP code is faster than doing the same with unserialize().
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-final class VarExporter
-{
- /**
- * Exports a serializable PHP value to PHP code.
- *
- * @param mixed $value The value to export
- * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise
- *
- * @return string The value exported as PHP code
- *
- * @throws ExceptionInterface When the provided value cannot be serialized
- */
- public static function export($value, bool &$isStaticValue = null): string
- {
- $isStaticValue = true;
-
- if (!\is_object($value) && !(\is_array($value) && $value) && !$value instanceof \__PHP_Incomplete_Class && !\is_resource($value)) {
- return Exporter::export($value);
- }
-
- $objectsPool = new \SplObjectStorage();
- $refsPool = [];
- $objectsCount = 0;
-
- try {
- $value = Exporter::prepare([$value], $objectsPool, $refsPool, $objectsCount, $isStaticValue)[0];
- } finally {
- $references = [];
- foreach ($refsPool as $i => $v) {
- if ($v[0]->count) {
- $references[1 + $i] = $v[2];
- }
- $v[0] = $v[1];
- }
- }
-
- if ($isStaticValue) {
- return Exporter::export($value);
- }
-
- $classes = [];
- $values = [];
- $states = [];
- foreach ($objectsPool as $i => $v) {
- list(, $classes[], $values[], $wakeup) = $objectsPool[$v];
- if (0 < $wakeup) {
- $states[$wakeup] = $i;
- } elseif (0 > $wakeup) {
- $states[-$wakeup] = [$i, array_pop($values)];
- $values[] = [];
- }
- }
- ksort($states);
-
- $wakeups = [null];
- foreach ($states as $k => $v) {
- if (\is_array($v)) {
- $wakeups[-$v[0]] = $v[1];
- } else {
- $wakeups[] = $v;
- }
- }
-
- if (null === $wakeups[0]) {
- unset($wakeups[0]);
- }
-
- $properties = [];
- foreach ($values as $i => $vars) {
- foreach ($vars as $class => $values) {
- foreach ($values as $name => $v) {
- $properties[$class][$name][$i] = $v;
- }
- }
- }
-
- if ($classes || $references) {
- $value = new Hydrator(new Registry($classes), $references ? new Values($references) : null, $properties, $value, $wakeups);
- } else {
- $isStaticValue = true;
- }
-
- return Exporter::export($value);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/var-exporter/composer.json b/srcs/phpmyadmin/vendor/symfony/var-exporter/composer.json
deleted file mode 100644
index 6b7dba2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/var-exporter/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "symfony/var-exporter",
- "type": "library",
- "description": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code",
- "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3"
- },
- "require-dev": {
- "symfony/var-dumper": "^4.1.1|^5.0"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\VarExporter\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/CHANGELOG.md b/srcs/phpmyadmin/vendor/symfony/yaml/CHANGELOG.md
deleted file mode 100644
index ff78af2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/CHANGELOG.md
+++ /dev/null
@@ -1,196 +0,0 @@
-CHANGELOG
-=========
-
-4.4.0
------
-
- * Added support for parsing the inline notation spanning multiple lines.
- * Added support to dump `null` as `~` by using the `Yaml::DUMP_NULL_AS_TILDE` flag.
- * deprecated accepting STDIN implicitly when using the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit.
-
-4.3.0
------
-
- * Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.
-
-4.2.0
------
-
- * added support for multiple files or directories in `LintCommand`
-
-4.0.0
------
-
- * The behavior of the non-specific tag `!` is changed and now forces
- non-evaluating your values.
- * complex mappings will throw a `ParseException`
- * support for the comma as a group separator for floats has been dropped, use
- the underscore instead
- * support for the `!!php/object` tag has been dropped, use the `!php/object`
- tag instead
- * duplicate mapping keys throw a `ParseException`
- * non-string mapping keys throw a `ParseException`, use the `Yaml::PARSE_KEYS_AS_STRINGS`
- flag to cast them to strings
- * `%` at the beginning of an unquoted string throw a `ParseException`
- * mappings with a colon (`:`) that is not followed by a whitespace throw a
- `ParseException`
- * the `Dumper::setIndentation()` method has been removed
- * being able to pass boolean options to the `Yaml::parse()`, `Yaml::dump()`,
- `Parser::parse()`, and `Dumper::dump()` methods to configure the behavior of
- the parser and dumper is no longer supported, pass bitmask flags instead
- * the constructor arguments of the `Parser` class have been removed
- * the `Inline` class is internal and no longer part of the BC promise
- * removed support for the `!str` tag, use the `!!str` tag instead
- * added support for tagged scalars.
-
- ```yml
- Yaml::parse('!foo bar', Yaml::PARSE_CUSTOM_TAGS);
- // returns TaggedValue('foo', 'bar');
- ```
-
-3.4.0
------
-
- * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method
-
- * the `Dumper`, `Parser`, and `Yaml` classes are marked as final
-
- * Deprecated the `!php/object:` tag which will be replaced by the
- `!php/object` tag (without the colon) in 4.0.
-
- * Deprecated the `!php/const:` tag which will be replaced by the
- `!php/const` tag (without the colon) in 4.0.
-
- * Support for the `!str` tag is deprecated, use the `!!str` tag instead.
-
- * Deprecated using the non-specific tag `!` as its behavior will change in 4.0.
- It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead.
-
-3.3.0
------
-
- * Starting an unquoted string with a question mark followed by a space is
- deprecated and will throw a `ParseException` in Symfony 4.0.
-
- * Deprecated support for implicitly parsing non-string mapping keys as strings.
- Mapping keys that are no strings will lead to a `ParseException` in Symfony
- 4.0. Use quotes to opt-in for keys to be parsed as strings.
-
- Before:
-
- ```php
- $yaml = <<<YAML
- null: null key
- true: boolean true
- 2.0: float key
- YAML;
-
- Yaml::parse($yaml);
- ```
-
- After:
-
- ```php
-
- $yaml = <<<YAML
- "null": null key
- "true": boolean true
- "2.0": float key
- YAML;
-
- Yaml::parse($yaml);
- ```
-
- * Omitted mapping values will be parsed as `null`.
-
- * Omitting the key of a mapping is deprecated and will throw a `ParseException` in Symfony 4.0.
-
- * Added support for dumping empty PHP arrays as YAML sequences:
-
- ```php
- Yaml::dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
- ```
-
-3.2.0
------
-
- * Mappings with a colon (`:`) that is not followed by a whitespace are deprecated
- when the mapping key is not quoted and will lead to a `ParseException` in
- Symfony 4.0 (e.g. `foo:bar` must be `foo: bar`).
-
- * Added support for parsing PHP constants:
-
- ```php
- Yaml::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_CONSTANT);
- ```
-
- * Support for silently ignoring duplicate mapping keys in YAML has been
- deprecated and will lead to a `ParseException` in Symfony 4.0.
-
-3.1.0
------
-
- * Added support to dump `stdClass` and `ArrayAccess` objects as YAML mappings
- through the `Yaml::DUMP_OBJECT_AS_MAP` flag.
-
- * Strings that are not UTF-8 encoded will be dumped as base64 encoded binary
- data.
-
- * Added support for dumping multi line strings as literal blocks.
-
- * Added support for parsing base64 encoded binary data when they are tagged
- with the `!!binary` tag.
-
- * Added support for parsing timestamps as `\DateTime` objects:
-
- ```php
- Yaml::parse('2001-12-15 21:59:43.10 -5', Yaml::PARSE_DATETIME);
- ```
-
- * `\DateTime` and `\DateTimeImmutable` objects are dumped as YAML timestamps.
-
- * Deprecated usage of `%` at the beginning of an unquoted string.
-
- * Added support for customizing the YAML parser behavior through an optional bit field:
-
- ```php
- Yaml::parse('{ "foo": "bar", "fiz": "cat" }', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE | Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP);
- ```
-
- * Added support for customizing the dumped YAML string through an optional bit field:
-
- ```php
- Yaml::dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT);
- ```
-
-3.0.0
------
-
- * Yaml::parse() now throws an exception when a blackslash is not escaped
- in double-quoted strings
-
-2.8.0
------
-
- * Deprecated usage of a colon in an unquoted mapping value
- * Deprecated usage of @, \`, | and > at the beginning of an unquoted string
- * When surrounding strings with double-quotes, you must now escape `\` characters. Not
- escaping those characters (when surrounded by double-quotes) is deprecated.
-
- Before:
-
- ```yml
- class: "Foo\Var"
- ```
-
- After:
-
- ```yml
- class: "Foo\\Var"
- ```
-
-2.1.0
------
-
- * Yaml::parse() does not evaluate loaded files as PHP files by default
- anymore (call Yaml::enablePhpParsing() to get back the old behavior)
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Command/LintCommand.php b/srcs/phpmyadmin/vendor/symfony/yaml/Command/LintCommand.php
deleted file mode 100644
index 65ef531..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Command/LintCommand.php
+++ /dev/null
@@ -1,255 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Command;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Parser;
-use Symfony\Component\Yaml\Yaml;
-
-/**
- * Validates YAML files syntax and outputs encountered errors.
- *
- * @author Grégoire Pineau <lyrixx@lyrixx.info>
- * @author Robin Chalas <robin.chalas@gmail.com>
- */
-class LintCommand extends Command
-{
- protected static $defaultName = 'lint:yaml';
-
- private $parser;
- private $format;
- private $displayCorrectFiles;
- private $directoryIteratorProvider;
- private $isReadableProvider;
-
- public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null)
- {
- parent::__construct($name);
-
- $this->directoryIteratorProvider = $directoryIteratorProvider;
- $this->isReadableProvider = $isReadableProvider;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function configure()
- {
- $this
- ->setDescription('Lints a file and outputs encountered errors')
- ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
- ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
- ->addOption('parse-tags', null, InputOption::VALUE_NONE, 'Parse custom tags')
- ->setHelp(<<<EOF
-The <info>%command.name%</info> command lints a YAML file and outputs to STDOUT
-the first encountered syntax error.
-
-You can validates YAML contents passed from STDIN:
-
- <info>cat filename | php %command.full_name% -</info>
-
-You can also validate the syntax of a file:
-
- <info>php %command.full_name% filename</info>
-
-Or of a whole directory:
-
- <info>php %command.full_name% dirname</info>
- <info>php %command.full_name% dirname --format=json</info>
-
-EOF
- )
- ;
- }
-
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $io = new SymfonyStyle($input, $output);
- $filenames = (array) $input->getArgument('filename');
- $this->format = $input->getOption('format');
- $this->displayCorrectFiles = $output->isVerbose();
- $flags = $input->getOption('parse-tags') ? Yaml::PARSE_CUSTOM_TAGS : 0;
-
- if (['-'] === $filenames) {
- return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]);
- }
-
- // @deprecated to be removed in 5.0
- if (!$filenames) {
- if (0 === ftell(STDIN)) {
- @trigger_error('Piping content from STDIN to the "lint:yaml" command without passing the dash symbol "-" as argument is deprecated since Symfony 4.4.', E_USER_DEPRECATED);
-
- return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]);
- }
-
- throw new RuntimeException('Please provide a filename or pipe file content to STDIN.');
- }
-
- $filesInfo = [];
- foreach ($filenames as $filename) {
- if (!$this->isReadable($filename)) {
- throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename));
- }
-
- foreach ($this->getFiles($filename) as $file) {
- $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file);
- }
- }
-
- return $this->display($io, $filesInfo);
- }
-
- private function validate(string $content, int $flags, string $file = null)
- {
- $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) {
- if (E_USER_DEPRECATED === $level) {
- throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1);
- }
-
- return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false;
- });
-
- try {
- $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags);
- } catch (ParseException $e) {
- return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()];
- } finally {
- restore_error_handler();
- }
-
- return ['file' => $file, 'valid' => true];
- }
-
- private function display(SymfonyStyle $io, array $files): int
- {
- switch ($this->format) {
- case 'txt':
- return $this->displayTxt($io, $files);
- case 'json':
- return $this->displayJson($io, $files);
- default:
- throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format));
- }
- }
-
- private function displayTxt(SymfonyStyle $io, array $filesInfo): int
- {
- $countFiles = \count($filesInfo);
- $erroredFiles = 0;
- $suggestTagOption = false;
-
- foreach ($filesInfo as $info) {
- if ($info['valid'] && $this->displayCorrectFiles) {
- $io->comment('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
- } elseif (!$info['valid']) {
- ++$erroredFiles;
- $io->text('<error> ERROR </error>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
- $io->text(sprintf('<error> >> %s</error>', $info['message']));
-
- if (false !== strpos($info['message'], 'PARSE_CUSTOM_TAGS')) {
- $suggestTagOption = true;
- }
- }
- }
-
- if (0 === $erroredFiles) {
- $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles));
- } else {
- $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : ''));
- }
-
- return min($erroredFiles, 1);
- }
-
- private function displayJson(SymfonyStyle $io, array $filesInfo): int
- {
- $errors = 0;
-
- array_walk($filesInfo, function (&$v) use (&$errors) {
- $v['file'] = (string) $v['file'];
- if (!$v['valid']) {
- ++$errors;
- }
-
- if (isset($v['message']) && false !== strpos($v['message'], 'PARSE_CUSTOM_TAGS')) {
- $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.';
- }
- });
-
- $io->writeln(json_encode($filesInfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
-
- return min($errors, 1);
- }
-
- private function getFiles(string $fileOrDirectory): iterable
- {
- if (is_file($fileOrDirectory)) {
- yield new \SplFileInfo($fileOrDirectory);
-
- return;
- }
-
- foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) {
- if (!\in_array($file->getExtension(), ['yml', 'yaml'])) {
- continue;
- }
-
- yield $file;
- }
- }
-
- private function getParser(): Parser
- {
- if (!$this->parser) {
- $this->parser = new Parser();
- }
-
- return $this->parser;
- }
-
- private function getDirectoryIterator(string $directory): iterable
- {
- $default = function ($directory) {
- return new \RecursiveIteratorIterator(
- new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
- \RecursiveIteratorIterator::LEAVES_ONLY
- );
- };
-
- if (null !== $this->directoryIteratorProvider) {
- return ($this->directoryIteratorProvider)($directory, $default);
- }
-
- return $default($directory);
- }
-
- private function isReadable(string $fileOrDirectory): bool
- {
- $default = function ($fileOrDirectory) {
- return is_readable($fileOrDirectory);
- };
-
- if (null !== $this->isReadableProvider) {
- return ($this->isReadableProvider)($fileOrDirectory, $default);
- }
-
- return $default($fileOrDirectory);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Dumper.php b/srcs/phpmyadmin/vendor/symfony/yaml/Dumper.php
deleted file mode 100644
index 0b56779..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Dumper.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Dumper dumps PHP variables to YAML strings.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @final
- */
-class Dumper
-{
- /**
- * The amount of spaces to use for indentation of nested nodes.
- *
- * @var int
- */
- protected $indentation;
-
- public function __construct(int $indentation = 4)
- {
- if ($indentation < 1) {
- throw new \InvalidArgumentException('The indentation must be greater than zero.');
- }
-
- $this->indentation = $indentation;
- }
-
- /**
- * Dumps a PHP value to YAML.
- *
- * @param mixed $input The PHP value
- * @param int $inline The level where you switch to inline YAML
- * @param int $indent The level of indentation (used internally)
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @return string The YAML representation of the PHP value
- */
- public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string
- {
- $output = '';
- $prefix = $indent ? str_repeat(' ', $indent) : '';
- $dumpObjectAsInlineMap = true;
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) {
- $dumpObjectAsInlineMap = empty((array) $input);
- }
-
- if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) {
- $output .= $prefix.Inline::dump($input, $flags);
- } else {
- $dumpAsMap = Inline::isHash($input);
-
- foreach ($input as $key => $value) {
- if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r\n")) {
- // If the first line starts with a space character, the spec requires a blockIndicationIndicator
- // http://www.yaml.org/spec/1.2/spec.html#id2793979
- $blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : '';
- $output .= sprintf("%s%s%s |%s\n", $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator);
-
- foreach (explode("\n", $value) as $row) {
- $output .= sprintf("%s%s%s\n", $prefix, str_repeat(' ', $this->indentation), $row);
- }
-
- continue;
- }
-
- if ($value instanceof TaggedValue) {
- $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());
-
- if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
- // If the first line starts with a space character, the spec requires a blockIndicationIndicator
- // http://www.yaml.org/spec/1.2/spec.html#id2793979
- $blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : '';
- $output .= sprintf(" |%s\n", $blockIndentationIndicator);
-
- foreach (explode("\n", $value->getValue()) as $row) {
- $output .= sprintf("%s%s%s\n", $prefix, str_repeat(' ', $this->indentation), $row);
- }
-
- continue;
- }
-
- if ($inline - 1 <= 0 || null === $value->getValue() || is_scalar($value->getValue())) {
- $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
- } else {
- $output .= "\n";
- $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags);
- }
-
- continue;
- }
-
- $dumpObjectAsInlineMap = true;
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) {
- $dumpObjectAsInlineMap = empty((array) $value);
- }
-
- $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value);
-
- $output .= sprintf('%s%s%s%s',
- $prefix,
- $dumpAsMap ? Inline::dump($key, $flags).':' : '-',
- $willBeInlined ? ' ' : "\n",
- $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags)
- ).($willBeInlined ? "\n" : '');
- }
- }
-
- return $output;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Escaper.php b/srcs/phpmyadmin/vendor/symfony/yaml/Escaper.php
deleted file mode 100644
index afff168..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Escaper.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-/**
- * Escaper encapsulates escaping rules for single and double-quoted
- * YAML strings.
- *
- * @author Matthew Lewinski <matthew@lewinski.org>
- *
- * @internal
- */
-class Escaper
-{
- // Characters that would cause a dumped string to require double quoting.
- const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9";
-
- // Mapping arrays for escaping a double quoted string. The backslash is
- // first to ensure proper escaping because str_replace operates iteratively
- // on the input arrays. This ordering of the characters avoids the use of strtr,
- // which performs more slowly.
- private static $escapees = ['\\', '\\\\', '\\"', '"',
- "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07",
- "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f",
- "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17",
- "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f",
- "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",
- ];
- private static $escaped = ['\\\\', '\\"', '\\\\', '\\"',
- '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a',
- '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f',
- '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17',
- '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f',
- '\\N', '\\_', '\\L', '\\P',
- ];
-
- /**
- * Determines if a PHP value would require double quoting in YAML.
- *
- * @param string $value A PHP value
- *
- * @return bool True if the value would require double quotes
- */
- public static function requiresDoubleQuoting(string $value): bool
- {
- return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value);
- }
-
- /**
- * Escapes and surrounds a PHP value with double quotes.
- *
- * @param string $value A PHP value
- *
- * @return string The quoted, escaped string
- */
- public static function escapeWithDoubleQuotes(string $value): string
- {
- return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value));
- }
-
- /**
- * Determines if a PHP value would require single quoting in YAML.
- *
- * @param string $value A PHP value
- *
- * @return bool True if the value would require single quotes
- */
- public static function requiresSingleQuoting(string $value): bool
- {
- // Determines if a PHP value is entirely composed of a value that would
- // require single quoting in YAML.
- if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) {
- return true;
- }
-
- // Determines if the PHP value contains any single characters that would
- // cause it to require single quoting in YAML.
- return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` ]/x', $value);
- }
-
- /**
- * Escapes and surrounds a PHP value with single quotes.
- *
- * @param string $value A PHP value
- *
- * @return string The quoted, escaped string
- */
- public static function escapeWithSingleQuotes(string $value): string
- {
- return sprintf("'%s'", str_replace('\'', '\'\'', $value));
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/DumpException.php b/srcs/phpmyadmin/vendor/symfony/yaml/Exception/DumpException.php
deleted file mode 100644
index cce972f..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/DumpException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during dumping.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class DumpException extends RuntimeException
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/ExceptionInterface.php b/srcs/phpmyadmin/vendor/symfony/yaml/Exception/ExceptionInterface.php
deleted file mode 100644
index 9091316..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception interface for all exceptions thrown by the component.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface ExceptionInterface extends \Throwable
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/ParseException.php b/srcs/phpmyadmin/vendor/symfony/yaml/Exception/ParseException.php
deleted file mode 100644
index ce623a3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/ParseException.php
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during parsing.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ParseException extends RuntimeException
-{
- private $parsedFile;
- private $parsedLine;
- private $snippet;
- private $rawMessage;
-
- /**
- * @param string $message The error message
- * @param int $parsedLine The line where the error occurred
- * @param string|null $snippet The snippet of code near the problem
- * @param string|null $parsedFile The file name where the error occurred
- * @param \Exception|null $previous The previous exception
- */
- public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
- {
- $this->parsedFile = $parsedFile;
- $this->parsedLine = $parsedLine;
- $this->snippet = $snippet;
- $this->rawMessage = $message;
-
- $this->updateRepr();
-
- parent::__construct($this->message, 0, $previous);
- }
-
- /**
- * Gets the snippet of code near the error.
- *
- * @return string The snippet of code
- */
- public function getSnippet()
- {
- return $this->snippet;
- }
-
- /**
- * Sets the snippet of code near the error.
- *
- * @param string $snippet The code snippet
- */
- public function setSnippet($snippet)
- {
- $this->snippet = $snippet;
-
- $this->updateRepr();
- }
-
- /**
- * Gets the filename where the error occurred.
- *
- * This method returns null if a string is parsed.
- *
- * @return string The filename
- */
- public function getParsedFile()
- {
- return $this->parsedFile;
- }
-
- /**
- * Sets the filename where the error occurred.
- *
- * @param string $parsedFile The filename
- */
- public function setParsedFile($parsedFile)
- {
- $this->parsedFile = $parsedFile;
-
- $this->updateRepr();
- }
-
- /**
- * Gets the line where the error occurred.
- *
- * @return int The file line
- */
- public function getParsedLine()
- {
- return $this->parsedLine;
- }
-
- /**
- * Sets the line where the error occurred.
- *
- * @param int $parsedLine The file line
- */
- public function setParsedLine($parsedLine)
- {
- $this->parsedLine = $parsedLine;
-
- $this->updateRepr();
- }
-
- private function updateRepr()
- {
- $this->message = $this->rawMessage;
-
- $dot = false;
- if ('.' === substr($this->message, -1)) {
- $this->message = substr($this->message, 0, -1);
- $dot = true;
- }
-
- if (null !== $this->parsedFile) {
- $this->message .= sprintf(' in %s', json_encode($this->parsedFile, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
- }
-
- if ($this->parsedLine >= 0) {
- $this->message .= sprintf(' at line %d', $this->parsedLine);
- }
-
- if ($this->snippet) {
- $this->message .= sprintf(' (near "%s")', $this->snippet);
- }
-
- if ($dot) {
- $this->message .= '.';
- }
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/RuntimeException.php b/srcs/phpmyadmin/vendor/symfony/yaml/Exception/RuntimeException.php
deleted file mode 100644
index 3f36b73..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Exception/RuntimeException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Exception;
-
-/**
- * Exception class thrown when an error occurs during parsing.
- *
- * @author Romain Neutron <imprec@gmail.com>
- */
-class RuntimeException extends \RuntimeException implements ExceptionInterface
-{
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Inline.php b/srcs/phpmyadmin/vendor/symfony/yaml/Inline.php
deleted file mode 100644
index 5cdf763..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Inline.php
+++ /dev/null
@@ -1,753 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\DumpException;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Inline implements a YAML parser/dumper for the YAML inline syntax.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @internal
- */
-class Inline
-{
- const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')';
-
- public static $parsedLineNumber = -1;
- public static $parsedFilename;
-
- private static $exceptionOnInvalidType = false;
- private static $objectSupport = false;
- private static $objectForMap = false;
- private static $constantSupport = false;
-
- public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null)
- {
- self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags);
- self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags);
- self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags);
- self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags);
- self::$parsedFilename = $parsedFilename;
-
- if (null !== $parsedLineNumber) {
- self::$parsedLineNumber = $parsedLineNumber;
- }
- }
-
- /**
- * Converts a YAML string to a PHP value.
- *
- * @param string $value A YAML string
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- * @param array $references Mapping of variable names to values
- *
- * @return mixed A PHP value
- *
- * @throws ParseException
- */
- public static function parse(string $value = null, int $flags = 0, array $references = [])
- {
- self::initialize($flags);
-
- $value = trim($value);
-
- if ('' === $value) {
- return '';
- }
-
- if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
- $mbEncoding = mb_internal_encoding();
- mb_internal_encoding('ASCII');
- }
-
- try {
- $i = 0;
- $tag = self::parseTag($value, $i, $flags);
- switch ($value[$i]) {
- case '[':
- $result = self::parseSequence($value, $flags, $i, $references);
- ++$i;
- break;
- case '{':
- $result = self::parseMapping($value, $flags, $i, $references);
- ++$i;
- break;
- default:
- $result = self::parseScalar($value, $flags, null, $i, null === $tag, $references);
- }
-
- // some comments are allowed at the end
- if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) {
- throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (null !== $tag && '' !== $tag) {
- return new TaggedValue($tag, $result);
- }
-
- return $result;
- } finally {
- if (isset($mbEncoding)) {
- mb_internal_encoding($mbEncoding);
- }
- }
- }
-
- /**
- * Dumps a given PHP variable to a YAML string.
- *
- * @param mixed $value The PHP variable to convert
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @return string The YAML string representing the PHP value
- *
- * @throws DumpException When trying to dump PHP resource
- */
- public static function dump($value, int $flags = 0): string
- {
- switch (true) {
- case \is_resource($value):
- if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) {
- throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value)));
- }
-
- return self::dumpNull($flags);
- case $value instanceof \DateTimeInterface:
- return $value->format('c');
- case \is_object($value):
- if ($value instanceof TaggedValue) {
- return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags);
- }
-
- if (Yaml::DUMP_OBJECT & $flags) {
- return '!php/object '.self::dump(serialize($value));
- }
-
- if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) {
- $output = [];
-
- foreach ($value as $key => $val) {
- $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags));
- }
-
- return sprintf('{ %s }', implode(', ', $output));
- }
-
- if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) {
- throw new DumpException('Object support when dumping a YAML file has been disabled.');
- }
-
- return self::dumpNull($flags);
- case \is_array($value):
- return self::dumpArray($value, $flags);
- case null === $value:
- return self::dumpNull($flags);
- case true === $value:
- return 'true';
- case false === $value:
- return 'false';
- case ctype_digit($value):
- return \is_string($value) ? "'$value'" : (int) $value;
- case is_numeric($value):
- $locale = setlocale(LC_NUMERIC, 0);
- if (false !== $locale) {
- setlocale(LC_NUMERIC, 'C');
- }
- if (\is_float($value)) {
- $repr = (string) $value;
- if (is_infinite($value)) {
- $repr = str_ireplace('INF', '.Inf', $repr);
- } elseif (floor($value) == $value && $repr == $value) {
- // Preserve float data type since storing a whole number will result in integer value.
- $repr = '!!float '.$repr;
- }
- } else {
- $repr = \is_string($value) ? "'$value'" : (string) $value;
- }
- if (false !== $locale) {
- setlocale(LC_NUMERIC, $locale);
- }
-
- return $repr;
- case '' == $value:
- return "''";
- case self::isBinaryString($value):
- return '!!binary '.base64_encode($value);
- case Escaper::requiresDoubleQuoting($value):
- return Escaper::escapeWithDoubleQuotes($value);
- case Escaper::requiresSingleQuoting($value):
- case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value):
- case Parser::preg_match(self::getHexRegex(), $value):
- case Parser::preg_match(self::getTimestampRegex(), $value):
- return Escaper::escapeWithSingleQuotes($value);
- default:
- return $value;
- }
- }
-
- /**
- * Check if given array is hash or just normal indexed array.
- *
- * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check
- *
- * @return bool true if value is hash array, false otherwise
- */
- public static function isHash($value): bool
- {
- if ($value instanceof \stdClass || $value instanceof \ArrayObject) {
- return true;
- }
-
- $expectedKey = 0;
-
- foreach ($value as $key => $val) {
- if ($key !== $expectedKey++) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Dumps a PHP array to a YAML string.
- *
- * @param array $value The PHP array to dump
- * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
- *
- * @return string The YAML string representing the PHP array
- */
- private static function dumpArray(array $value, int $flags): string
- {
- // array
- if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) {
- $output = [];
- foreach ($value as $val) {
- $output[] = self::dump($val, $flags);
- }
-
- return sprintf('[%s]', implode(', ', $output));
- }
-
- // hash
- $output = [];
- foreach ($value as $key => $val) {
- $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags));
- }
-
- return sprintf('{ %s }', implode(', ', $output));
- }
-
- private static function dumpNull(int $flags): string
- {
- if (Yaml::DUMP_NULL_AS_TILDE & $flags) {
- return '~';
- }
-
- return 'null';
- }
-
- /**
- * Parses a YAML scalar.
- *
- * @return mixed
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array $references = [])
- {
- if (\in_array($scalar[$i], ['"', "'"])) {
- // quoted scalar
- $output = self::parseQuotedScalar($scalar, $i);
-
- if (null !== $delimiters) {
- $tmp = ltrim(substr($scalar, $i), " \n");
- if ('' === $tmp) {
- throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (!\in_array($tmp[0], $delimiters)) {
- throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- }
- } else {
- // "normal" string
- if (!$delimiters) {
- $output = substr($scalar, $i);
- $i += \strlen($output);
-
- // remove comments
- if (Parser::preg_match('/[ \t]+#/', $output, $match, PREG_OFFSET_CAPTURE)) {
- $output = substr($output, 0, $match[0][1]);
- }
- } elseif (Parser::preg_match('/^(.*?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) {
- $output = $match[1];
- $i += \strlen($output);
- $output = trim($output);
- } else {
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >)
- if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0] || '%' === $output[0])) {
- throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename);
- }
-
- if ($evaluate) {
- $output = self::evaluateScalar($output, $flags, $references);
- }
- }
-
- return $output;
- }
-
- /**
- * Parses a YAML quoted scalar.
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseQuotedScalar(string $scalar, int &$i): string
- {
- if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) {
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- $output = substr($match[0], 1, \strlen($match[0]) - 2);
-
- $unescaper = new Unescaper();
- if ('"' == $scalar[$i]) {
- $output = $unescaper->unescapeDoubleQuotedString($output);
- } else {
- $output = $unescaper->unescapeSingleQuotedString($output);
- }
-
- $i += \strlen($match[0]);
-
- return $output;
- }
-
- /**
- * Parses a YAML sequence.
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseSequence(string $sequence, int $flags, int &$i = 0, array $references = []): array
- {
- $output = [];
- $len = \strlen($sequence);
- ++$i;
-
- // [foo, bar, ...]
- while ($i < $len) {
- if (']' === $sequence[$i]) {
- return $output;
- }
- if (',' === $sequence[$i] || ' ' === $sequence[$i]) {
- ++$i;
-
- continue;
- }
-
- $tag = self::parseTag($sequence, $i, $flags);
- switch ($sequence[$i]) {
- case '[':
- // nested sequence
- $value = self::parseSequence($sequence, $flags, $i, $references);
- break;
- case '{':
- // nested mapping
- $value = self::parseMapping($sequence, $flags, $i, $references);
- break;
- default:
- $isQuoted = \in_array($sequence[$i], ['"', "'"]);
- $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references);
-
- // the value can be an array if a reference has been resolved to an array var
- if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) {
- // embedded mapping?
- try {
- $pos = 0;
- $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references);
- } catch (\InvalidArgumentException $e) {
- // no, it's not
- }
- }
-
- --$i;
- }
-
- if (null !== $tag && '' !== $tag) {
- $value = new TaggedValue($tag, $value);
- }
-
- $output[] = $value;
-
- ++$i;
- }
-
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- /**
- * Parses a YAML mapping.
- *
- * @return array|\stdClass
- *
- * @throws ParseException When malformed inline YAML string is parsed
- */
- private static function parseMapping(string $mapping, int $flags, int &$i = 0, array $references = [])
- {
- $output = [];
- $len = \strlen($mapping);
- ++$i;
- $allowOverwrite = false;
-
- // {foo: bar, bar:foo, ...}
- while ($i < $len) {
- switch ($mapping[$i]) {
- case ' ':
- case ',':
- case "\n":
- ++$i;
- continue 2;
- case '}':
- if (self::$objectForMap) {
- return (object) $output;
- }
-
- return $output;
- }
-
- // key
- $offsetBeforeKeyParsing = $i;
- $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true);
- $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false, []);
-
- if ($offsetBeforeKeyParsing === $i) {
- throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping);
- }
-
- if (false === $i = strpos($mapping, ':', $i)) {
- break;
- }
-
- if (!$isKeyQuoted) {
- $evaluatedKey = self::evaluateScalar($key, $flags, $references);
-
- if ('' !== $key && $evaluatedKey !== $key && !\is_string($evaluatedKey) && !\is_int($evaluatedKey)) {
- throw new ParseException('Implicit casting of incompatible mapping keys to strings is not supported. Quote your evaluable mapping keys instead.', self::$parsedLineNumber + 1, $mapping);
- }
- }
-
- if (!$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}', "\n"], true))) {
- throw new ParseException('Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}").', self::$parsedLineNumber + 1, $mapping);
- }
-
- if ('<<' === $key) {
- $allowOverwrite = true;
- }
-
- while ($i < $len) {
- if (':' === $mapping[$i] || ' ' === $mapping[$i] || "\n" === $mapping[$i]) {
- ++$i;
-
- continue;
- }
-
- $tag = self::parseTag($mapping, $i, $flags);
- switch ($mapping[$i]) {
- case '[':
- // nested sequence
- $value = self::parseSequence($mapping, $flags, $i, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- foreach ($value as $parsedValue) {
- $output += $parsedValue;
- }
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping);
- }
- break;
- case '{':
- // nested mapping
- $value = self::parseMapping($mapping, $flags, $i, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- $output += $value;
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping);
- }
- break;
- default:
- $value = self::parseScalar($mapping, $flags, [',', '}', "\n"], $i, null === $tag, $references);
- // Spec: Keys MUST be unique; first one wins.
- // Parser cannot abort this mapping earlier, since lines
- // are processed sequentially.
- // But overwriting is allowed when a merge node is used in current block.
- if ('<<' === $key) {
- $output += $value;
- } elseif ($allowOverwrite || !isset($output[$key])) {
- if (null !== $tag) {
- $output[$key] = new TaggedValue($tag, $value);
- } else {
- $output[$key] = $value;
- }
- } elseif (isset($output[$key])) {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping);
- }
- --$i;
- }
- ++$i;
-
- continue 2;
- }
- }
-
- throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename);
- }
-
- /**
- * Evaluates scalars and replaces magic values.
- *
- * @return mixed The evaluated YAML string
- *
- * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved
- */
- private static function evaluateScalar(string $scalar, int $flags, array $references = [])
- {
- $scalar = trim($scalar);
- $scalarLower = strtolower($scalar);
-
- if (0 === strpos($scalar, '*')) {
- if (false !== $pos = strpos($scalar, '#')) {
- $value = substr($scalar, 1, $pos - 2);
- } else {
- $value = substr($scalar, 1);
- }
-
- // an unquoted *
- if (false === $value || '' === $value) {
- throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if (!\array_key_exists($value, $references)) {
- throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- return $references[$value];
- }
-
- switch (true) {
- case 'null' === $scalarLower:
- case '' === $scalar:
- case '~' === $scalar:
- return null;
- case 'true' === $scalarLower:
- return true;
- case 'false' === $scalarLower:
- return false;
- case '!' === $scalar[0]:
- switch (true) {
- case 0 === strpos($scalar, '!!str '):
- return (string) substr($scalar, 6);
- case 0 === strpos($scalar, '! '):
- return substr($scalar, 2);
- case 0 === strpos($scalar, '!php/object'):
- if (self::$objectSupport) {
- return unserialize(self::parseScalar(substr($scalar, 12)));
- }
-
- if (self::$exceptionOnInvalidType) {
- throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!php/const'):
- if (self::$constantSupport) {
- $i = 0;
- if (\defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) {
- return \constant($const);
- }
-
- throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
- if (self::$exceptionOnInvalidType) {
- throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return null;
- case 0 === strpos($scalar, '!!float '):
- return (float) substr($scalar, 8);
- case 0 === strpos($scalar, '!!binary '):
- return self::evaluateBinaryScalar(substr($scalar, 9));
- default:
- throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename);
- }
-
- // Optimize for returning strings.
- // no break
- case '+' === $scalar[0] || '-' === $scalar[0] || '.' === $scalar[0] || is_numeric($scalar[0]):
- if (Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar)) {
- $scalar = str_replace('_', '', (string) $scalar);
- }
-
- switch (true) {
- case ctype_digit($scalar):
- $raw = $scalar;
- $cast = (int) $scalar;
-
- return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw);
- case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)):
- $raw = $scalar;
- $cast = (int) $scalar;
-
- return '0' == $scalar[1] ? -octdec(substr($scalar, 1)) : (($raw === (string) $cast) ? $cast : $raw);
- case is_numeric($scalar):
- case Parser::preg_match(self::getHexRegex(), $scalar):
- $scalar = str_replace('_', '', $scalar);
-
- return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar;
- case '.inf' === $scalarLower:
- case '.nan' === $scalarLower:
- return -log(0);
- case '-.inf' === $scalarLower:
- return log(0);
- case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar):
- return (float) str_replace('_', '', $scalar);
- case Parser::preg_match(self::getTimestampRegex(), $scalar):
- if (Yaml::PARSE_DATETIME & $flags) {
- // When no timezone is provided in the parsed date, YAML spec says we must assume UTC.
- return new \DateTime($scalar, new \DateTimeZone('UTC'));
- }
-
- $timeZone = date_default_timezone_get();
- date_default_timezone_set('UTC');
- $time = strtotime($scalar);
- date_default_timezone_set($timeZone);
-
- return $time;
- }
- }
-
- return (string) $scalar;
- }
-
- private static function parseTag(string $value, int &$i, int $flags): ?string
- {
- if ('!' !== $value[$i]) {
- return null;
- }
-
- $tagLength = strcspn($value, " \t\n[]{},", $i + 1);
- $tag = substr($value, $i + 1, $tagLength);
-
- $nextOffset = $i + $tagLength + 1;
- $nextOffset += strspn($value, ' ', $nextOffset);
-
- // Is followed by a scalar and is a built-in tag
- if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || 'str' === $tag || 'php/const' === $tag || 'php/object' === $tag)) {
- // Manage in {@link self::evaluateScalar()}
- return null;
- }
-
- $i = $nextOffset;
-
- // Built-in tags
- if ('' !== $tag && '!' === $tag[0]) {
- throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if ('' !== $tag && !isset($value[$i])) {
- throw new ParseException(sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- if ('' === $tag || Yaml::PARSE_CUSTOM_TAGS & $flags) {
- return $tag;
- }
-
- throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
- }
-
- public static function evaluateBinaryScalar(string $scalar): string
- {
- $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar));
-
- if (0 !== (\strlen($parsedBinaryData) % 4)) {
- throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) {
- throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
- }
-
- return base64_decode($parsedBinaryData, true);
- }
-
- private static function isBinaryString(string $value)
- {
- return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value);
- }
-
- /**
- * Gets a regex that matches a YAML date.
- *
- * @return string The regular expression
- *
- * @see http://www.yaml.org/spec/1.2/spec.html#id2761573
- */
- private static function getTimestampRegex(): string
- {
- return <<<EOF
- ~^
- (?P<year>[0-9][0-9][0-9][0-9])
- -(?P<month>[0-9][0-9]?)
- -(?P<day>[0-9][0-9]?)
- (?:(?:[Tt]|[ \t]+)
- (?P<hour>[0-9][0-9]?)
- :(?P<minute>[0-9][0-9])
- :(?P<second>[0-9][0-9])
- (?:\.(?P<fraction>[0-9]*))?
- (?:[ \t]*(?P<tz>Z|(?P<tz_sign>[-+])(?P<tz_hour>[0-9][0-9]?)
- (?::(?P<tz_minute>[0-9][0-9]))?))?)?
- $~x
-EOF;
- }
-
- /**
- * Gets a regex that matches a YAML number in hexadecimal notation.
- */
- private static function getHexRegex(): string
- {
- return '~^0x[0-9a-f_]++$~i';
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/LICENSE b/srcs/phpmyadmin/vendor/symfony/yaml/LICENSE
deleted file mode 100644
index a677f43..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-2019 Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Parser.php b/srcs/phpmyadmin/vendor/symfony/yaml/Parser.php
deleted file mode 100644
index 465bbb2..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Parser.php
+++ /dev/null
@@ -1,1245 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Tag\TaggedValue;
-
-/**
- * Parser parses YAML strings to convert them to PHP arrays.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @final
- */
-class Parser
-{
- const TAG_PATTERN = '(?P<tag>![\w!.\/:-]+)';
- const BLOCK_SCALAR_HEADER_PATTERN = '(?P<separator>\||>)(?P<modifiers>\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P<comments> +#.*)?';
-
- private $filename;
- private $offset = 0;
- private $totalNumberOfLines;
- private $lines = [];
- private $currentLineNb = -1;
- private $currentLine = '';
- private $refs = [];
- private $skippedLineNumbers = [];
- private $locallySkippedLineNumbers = [];
- private $refsBeingParsed = [];
-
- /**
- * Parses a YAML file into a PHP value.
- *
- * @param string $filename The path to the YAML file to be parsed
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed The YAML converted to a PHP value
- *
- * @throws ParseException If the file could not be read or the YAML is not valid
- */
- public function parseFile(string $filename, int $flags = 0)
- {
- if (!is_file($filename)) {
- throw new ParseException(sprintf('File "%s" does not exist.', $filename));
- }
-
- if (!is_readable($filename)) {
- throw new ParseException(sprintf('File "%s" cannot be read.', $filename));
- }
-
- $this->filename = $filename;
-
- try {
- return $this->parse(file_get_contents($filename), $flags);
- } finally {
- $this->filename = null;
- }
- }
-
- /**
- * Parses a YAML string to a PHP value.
- *
- * @param string $value A YAML string
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed A PHP value
- *
- * @throws ParseException If the YAML is not valid
- */
- public function parse(string $value, int $flags = 0)
- {
- if (false === preg_match('//u', $value)) {
- throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename);
- }
-
- $this->refs = [];
-
- $mbEncoding = null;
-
- if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
- $mbEncoding = mb_internal_encoding();
- mb_internal_encoding('UTF-8');
- }
-
- try {
- $data = $this->doParse($value, $flags);
- } finally {
- if (null !== $mbEncoding) {
- mb_internal_encoding($mbEncoding);
- }
- $this->lines = [];
- $this->currentLine = '';
- $this->refs = [];
- $this->skippedLineNumbers = [];
- $this->locallySkippedLineNumbers = [];
- }
-
- return $data;
- }
-
- private function doParse(string $value, int $flags)
- {
- $this->currentLineNb = -1;
- $this->currentLine = '';
- $value = $this->cleanup($value);
- $this->lines = explode("\n", $value);
- $this->locallySkippedLineNumbers = [];
-
- if (null === $this->totalNumberOfLines) {
- $this->totalNumberOfLines = \count($this->lines);
- }
-
- if (!$this->moveToNextLine()) {
- return null;
- }
-
- $data = [];
- $context = null;
- $allowOverwrite = false;
-
- while ($this->isCurrentLineEmpty()) {
- if (!$this->moveToNextLine()) {
- return null;
- }
- }
-
- // Resolves the tag and returns if end of the document
- if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) {
- return new TaggedValue($tag, '');
- }
-
- do {
- if ($this->isCurrentLineEmpty()) {
- continue;
- }
-
- // tab?
- if ("\t" === $this->currentLine[0]) {
- throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename);
-
- $isRef = $mergeNode = false;
- if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P<leadspaces>\s+)(?P<value>.+))?$#u', rtrim($this->currentLine), $values)) {
- if ($context && 'mapping' == $context) {
- throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- $context = 'sequence';
-
- if (isset($values['value']) && '&' === $values['value'][0] && self::preg_match('#^&(?P<ref>[^ ]+) *(?P<value>.*)#u', $values['value'], $matches)) {
- $isRef = $matches['ref'];
- $this->refsBeingParsed[] = $isRef;
- $values['value'] = $matches['value'];
- }
-
- if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) {
- throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
-
- // array
- if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
- $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags);
- } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) {
- $data[] = new TaggedValue(
- $subTag,
- $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags)
- );
- } else {
- if (isset($values['leadspaces'])
- && self::preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $this->trimTag($values['value']), $matches)
- ) {
- // this is a compact notation element, add to next block and parse
- $block = $values['value'];
- if ($this->isNextLineIndented()) {
- $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1);
- }
-
- $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags);
- } else {
- $data[] = $this->parseValue($values['value'], $flags, $context);
- }
- }
- if ($isRef) {
- $this->refs[$isRef] = end($data);
- array_pop($this->refsBeingParsed);
- }
- } elseif (
- self::preg_match('#^(?P<key>(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(\s++(?P<value>.+))?$#u', rtrim($this->currentLine), $values)
- && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"]))
- ) {
- if ($context && 'sequence' == $context) {
- throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
- $context = 'mapping';
-
- try {
- $key = Inline::parseScalar($values['key']);
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
-
- if (!\is_string($key) && !\is_int($key)) {
- throw new ParseException(sprintf('%s keys are not supported. Quote your evaluable mapping keys instead.', is_numeric($key) ? 'Numeric' : 'Non-string'), $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
-
- // Convert float keys to strings, to avoid being converted to integers by PHP
- if (\is_float($key)) {
- $key = (string) $key;
- }
-
- if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P<ref>[^ ]+)#u', $values['value'], $refMatches))) {
- $mergeNode = true;
- $allowOverwrite = true;
- if (isset($values['value'][0]) && '*' === $values['value'][0]) {
- $refName = substr(rtrim($values['value']), 1);
- if (!\array_key_exists($refName, $this->refs)) {
- if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) {
- throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- $refValue = $this->refs[$refName];
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) {
- $refValue = (array) $refValue;
- }
-
- if (!\is_array($refValue)) {
- throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- $data += $refValue; // array union
- } else {
- if (isset($values['value']) && '' !== $values['value']) {
- $value = $values['value'];
- } else {
- $value = $this->getNextEmbedBlock();
- }
- $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags);
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) {
- $parsed = (array) $parsed;
- }
-
- if (!\is_array($parsed)) {
- throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- if (isset($parsed[0])) {
- // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes
- // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier
- // in the sequence override keys specified in later mapping nodes.
- foreach ($parsed as $parsedItem) {
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) {
- $parsedItem = (array) $parsedItem;
- }
-
- if (!\is_array($parsedItem)) {
- throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename);
- }
-
- $data += $parsedItem; // array union
- }
- } else {
- // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the
- // current mapping, unless the key already exists in it.
- $data += $parsed; // array union
- }
- }
- } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match('#^&(?P<ref>[^ ]++) *+(?P<value>.*)#u', $values['value'], $matches)) {
- $isRef = $matches['ref'];
- $this->refsBeingParsed[] = $isRef;
- $values['value'] = $matches['value'];
- }
-
- $subTag = null;
- if ($mergeNode) {
- // Merge keys
- } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) {
- // hash
- // if next line is less indented or equal, then it means that the current value is null
- if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
- // Spec: Keys MUST be unique; first one wins.
- // But overwriting is allowed when a merge node is used in current block.
- if ($allowOverwrite || !isset($data[$key])) {
- if (null !== $subTag) {
- $data[$key] = new TaggedValue($subTag, '');
- } else {
- $data[$key] = null;
- }
- } else {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
- } else {
- // remember the parsed line number here in case we need it to provide some contexts in error messages below
- $realCurrentLineNbKey = $this->getRealCurrentLineNb();
- $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags);
- if ('<<' === $key) {
- $this->refs[$refMatches['ref']] = $value;
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) {
- $value = (array) $value;
- }
-
- $data += $value;
- } elseif ($allowOverwrite || !isset($data[$key])) {
- // Spec: Keys MUST be unique; first one wins.
- // But overwriting is allowed when a merge node is used in current block.
- if (null !== $subTag) {
- $data[$key] = new TaggedValue($subTag, $value);
- } else {
- $data[$key] = $value;
- }
- } else {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine);
- }
- }
- } else {
- $value = $this->parseValue(rtrim($values['value']), $flags, $context);
- // Spec: Keys MUST be unique; first one wins.
- // But overwriting is allowed when a merge node is used in current block.
- if ($allowOverwrite || !isset($data[$key])) {
- $data[$key] = $value;
- } else {
- throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
- }
- if ($isRef) {
- $this->refs[$isRef] = $data[$key];
- array_pop($this->refsBeingParsed);
- }
- } elseif ('"' === $this->currentLine[0] || "'" === $this->currentLine[0]) {
- if (null !== $context) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- try {
- return Inline::parse($this->parseQuotedString($this->currentLine), $flags, $this->refs);
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- } elseif ('{' === $this->currentLine[0]) {
- if (null !== $context) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- try {
- $parsedMapping = Inline::parse($this->lexInlineMapping($this->currentLine), $flags, $this->refs);
-
- while ($this->moveToNextLine()) {
- if (!$this->isCurrentLineEmpty()) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- }
-
- return $parsedMapping;
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- } elseif ('[' === $this->currentLine[0]) {
- if (null !== $context) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- try {
- $parsedSequence = Inline::parse($this->lexInlineSequence($this->currentLine), $flags, $this->refs);
-
- while ($this->moveToNextLine()) {
- if (!$this->isCurrentLineEmpty()) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- }
-
- return $parsedSequence;
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- } else {
- // multiple documents are not supported
- if ('---' === $this->currentLine) {
- throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) {
- throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
- }
-
- // 1-liner optionally followed by newline(s)
- if (\is_string($value) && $this->lines[0] === trim($value)) {
- try {
- $value = Inline::parse($this->lines[0], $flags, $this->refs);
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
-
- return $value;
- }
-
- // try to parse the value as a multi-line string as a last resort
- if (0 === $this->currentLineNb) {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = false;
- $value = '';
-
- foreach ($this->lines as $line) {
- if ('' !== ltrim($line) && '#' === ltrim($line)[0]) {
- continue;
- }
- // If the indentation is not consistent at offset 0, it is to be considered as a ParseError
- if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) {
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
-
- if (false !== strpos($line, ': ')) {
- @trigger_error('Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.', E_USER_DEPRECATED);
- }
-
- if ('' === trim($line)) {
- $value .= "\n";
- } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) {
- $value .= ' ';
- }
-
- if ('' !== trim($line) && '\\' === substr($line, -1)) {
- $value .= ltrim(substr($line, 0, -1));
- } elseif ('' !== trim($line)) {
- $value .= trim($line);
- }
-
- if ('' === trim($line)) {
- $previousLineWasNewline = true;
- $previousLineWasTerminatedWithBackslash = false;
- } elseif ('\\' === substr($line, -1)) {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = true;
- } else {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = false;
- }
- }
-
- try {
- return Inline::parse(trim($value));
- } catch (ParseException $e) {
- // fall-through to the ParseException thrown below
- }
- }
-
- throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- } while ($this->moveToNextLine());
-
- if (null !== $tag) {
- $data = new TaggedValue($tag, $data);
- }
-
- if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && !\is_object($data) && 'mapping' === $context) {
- $object = new \stdClass();
-
- foreach ($data as $key => $value) {
- $object->$key = $value;
- }
-
- $data = $object;
- }
-
- return empty($data) ? null : $data;
- }
-
- private function parseBlock(int $offset, string $yaml, int $flags)
- {
- $skippedLineNumbers = $this->skippedLineNumbers;
-
- foreach ($this->locallySkippedLineNumbers as $lineNumber) {
- if ($lineNumber < $offset) {
- continue;
- }
-
- $skippedLineNumbers[] = $lineNumber;
- }
-
- $parser = new self();
- $parser->offset = $offset;
- $parser->totalNumberOfLines = $this->totalNumberOfLines;
- $parser->skippedLineNumbers = $skippedLineNumbers;
- $parser->refs = &$this->refs;
- $parser->refsBeingParsed = $this->refsBeingParsed;
-
- return $parser->doParse($yaml, $flags);
- }
-
- /**
- * Returns the current line number (takes the offset into account).
- *
- * @internal
- *
- * @return int The current line number
- */
- public function getRealCurrentLineNb(): int
- {
- $realCurrentLineNumber = $this->currentLineNb + $this->offset;
-
- foreach ($this->skippedLineNumbers as $skippedLineNumber) {
- if ($skippedLineNumber > $realCurrentLineNumber) {
- break;
- }
-
- ++$realCurrentLineNumber;
- }
-
- return $realCurrentLineNumber;
- }
-
- /**
- * Returns the current line indentation.
- *
- * @return int The current line indentation
- */
- private function getCurrentLineIndentation(): int
- {
- return \strlen($this->currentLine) - \strlen(ltrim($this->currentLine, ' '));
- }
-
- /**
- * Returns the next embed block of YAML.
- *
- * @param int|null $indentation The indent level at which the block is to be read, or null for default
- * @param bool $inSequence True if the enclosing data structure is a sequence
- *
- * @return string A YAML string
- *
- * @throws ParseException When indentation problem are detected
- */
- private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string
- {
- $oldLineIndentation = $this->getCurrentLineIndentation();
-
- if (!$this->moveToNextLine()) {
- return '';
- }
-
- if (null === $indentation) {
- $newIndent = null;
- $movements = 0;
-
- do {
- $EOF = false;
-
- // empty and comment-like lines do not influence the indentation depth
- if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) {
- $EOF = !$this->moveToNextLine();
-
- if (!$EOF) {
- ++$movements;
- }
- } else {
- $newIndent = $this->getCurrentLineIndentation();
- }
- } while (!$EOF && null === $newIndent);
-
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem();
-
- if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) {
- throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- } else {
- $newIndent = $indentation;
- }
-
- $data = [];
- if ($this->getCurrentLineIndentation() >= $newIndent) {
- $data[] = substr($this->currentLine, $newIndent);
- } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) {
- $data[] = $this->currentLine;
- } else {
- $this->moveToPreviousLine();
-
- return '';
- }
-
- if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) {
- // the previous line contained a dash but no item content, this line is a sequence item with the same indentation
- // and therefore no nested list or mapping
- $this->moveToPreviousLine();
-
- return '';
- }
-
- $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem();
-
- while ($this->moveToNextLine()) {
- $indent = $this->getCurrentLineIndentation();
-
- if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) {
- $this->moveToPreviousLine();
- break;
- }
-
- if ($this->isCurrentLineBlank()) {
- $data[] = substr($this->currentLine, $newIndent);
- continue;
- }
-
- if ($indent >= $newIndent) {
- $data[] = substr($this->currentLine, $newIndent);
- } elseif ($this->isCurrentLineComment()) {
- $data[] = $this->currentLine;
- } elseif (0 == $indent) {
- $this->moveToPreviousLine();
-
- break;
- } else {
- throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
- }
- }
-
- return implode("\n", $data);
- }
-
- /**
- * Moves the parser to the next line.
- */
- private function moveToNextLine(): bool
- {
- if ($this->currentLineNb >= \count($this->lines) - 1) {
- return false;
- }
-
- $this->currentLine = $this->lines[++$this->currentLineNb];
-
- return true;
- }
-
- /**
- * Moves the parser to the previous line.
- */
- private function moveToPreviousLine(): bool
- {
- if ($this->currentLineNb < 1) {
- return false;
- }
-
- $this->currentLine = $this->lines[--$this->currentLineNb];
-
- return true;
- }
-
- /**
- * Parses a YAML value.
- *
- * @param string $value A YAML value
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- * @param string $context The parser context (either sequence or mapping)
- *
- * @return mixed A PHP value
- *
- * @throws ParseException When reference does not exist
- */
- private function parseValue(string $value, int $flags, string $context)
- {
- if (0 === strpos($value, '*')) {
- if (false !== $pos = strpos($value, '#')) {
- $value = substr($value, 1, $pos - 2);
- } else {
- $value = substr($value, 1);
- }
-
- if (!\array_key_exists($value, $this->refs)) {
- if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) {
- throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
- }
-
- return $this->refs[$value];
- }
-
- if (\in_array($value[0], ['!', '|', '>'], true) && self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) {
- $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
-
- $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs((int) $modifiers));
-
- if ('' !== $matches['tag'] && '!' !== $matches['tag']) {
- if ('!!binary' === $matches['tag']) {
- return Inline::evaluateBinaryScalar($data);
- }
-
- return new TaggedValue(substr($matches['tag'], 1), $data);
- }
-
- return $data;
- }
-
- try {
- if ('' !== $value && '{' === $value[0]) {
- return Inline::parse($this->lexInlineMapping($value), $flags, $this->refs);
- } elseif ('' !== $value && '[' === $value[0]) {
- return Inline::parse($this->lexInlineSequence($value), $flags, $this->refs);
- }
-
- $quotation = '' !== $value && ('"' === $value[0] || "'" === $value[0]) ? $value[0] : null;
-
- // do not take following lines into account when the current line is a quoted single line value
- if (null !== $quotation && self::preg_match('/^'.$quotation.'.*'.$quotation.'(\s*#.*)?$/', $value)) {
- return Inline::parse($value, $flags, $this->refs);
- }
-
- $lines = [];
-
- while ($this->moveToNextLine()) {
- // unquoted strings end before the first unindented line
- if (null === $quotation && 0 === $this->getCurrentLineIndentation()) {
- $this->moveToPreviousLine();
-
- break;
- }
-
- $lines[] = trim($this->currentLine);
-
- // quoted string values end with a line that is terminated with the quotation character
- if ('' !== $this->currentLine && substr($this->currentLine, -1) === $quotation) {
- break;
- }
- }
-
- for ($i = 0, $linesCount = \count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) {
- if ('' === $lines[$i]) {
- $value .= "\n";
- $previousLineBlank = true;
- } elseif ($previousLineBlank) {
- $value .= $lines[$i];
- $previousLineBlank = false;
- } else {
- $value .= ' '.$lines[$i];
- $previousLineBlank = false;
- }
- }
-
- Inline::$parsedLineNumber = $this->getRealCurrentLineNb();
-
- $parsedValue = Inline::parse($value, $flags, $this->refs);
-
- if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) {
- throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename);
- }
-
- return $parsedValue;
- } catch (ParseException $e) {
- $e->setParsedLine($this->getRealCurrentLineNb() + 1);
- $e->setSnippet($this->currentLine);
-
- throw $e;
- }
- }
-
- /**
- * Parses a block scalar.
- *
- * @param string $style The style indicator that was used to begin this block scalar (| or >)
- * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -)
- * @param int $indentation The indentation indicator that was used to begin this block scalar
- */
- private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0): string
- {
- $notEOF = $this->moveToNextLine();
- if (!$notEOF) {
- return '';
- }
-
- $isCurrentLineBlank = $this->isCurrentLineBlank();
- $blockLines = [];
-
- // leading blank lines are consumed before determining indentation
- while ($notEOF && $isCurrentLineBlank) {
- // newline only if not EOF
- if ($notEOF = $this->moveToNextLine()) {
- $blockLines[] = '';
- $isCurrentLineBlank = $this->isCurrentLineBlank();
- }
- }
-
- // determine indentation if not specified
- if (0 === $indentation) {
- $currentLineLength = \strlen($this->currentLine);
-
- for ($i = 0; $i < $currentLineLength && ' ' === $this->currentLine[$i]; ++$i) {
- ++$indentation;
- }
- }
-
- if ($indentation > 0) {
- $pattern = sprintf('/^ {%d}(.*)$/', $indentation);
-
- while (
- $notEOF && (
- $isCurrentLineBlank ||
- self::preg_match($pattern, $this->currentLine, $matches)
- )
- ) {
- if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) {
- $blockLines[] = substr($this->currentLine, $indentation);
- } elseif ($isCurrentLineBlank) {
- $blockLines[] = '';
- } else {
- $blockLines[] = $matches[1];
- }
-
- // newline only if not EOF
- if ($notEOF = $this->moveToNextLine()) {
- $isCurrentLineBlank = $this->isCurrentLineBlank();
- }
- }
- } elseif ($notEOF) {
- $blockLines[] = '';
- }
-
- if ($notEOF) {
- $blockLines[] = '';
- $this->moveToPreviousLine();
- } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) {
- $blockLines[] = '';
- }
-
- // folded style
- if ('>' === $style) {
- $text = '';
- $previousLineIndented = false;
- $previousLineBlank = false;
-
- for ($i = 0, $blockLinesCount = \count($blockLines); $i < $blockLinesCount; ++$i) {
- if ('' === $blockLines[$i]) {
- $text .= "\n";
- $previousLineIndented = false;
- $previousLineBlank = true;
- } elseif (' ' === $blockLines[$i][0]) {
- $text .= "\n".$blockLines[$i];
- $previousLineIndented = true;
- $previousLineBlank = false;
- } elseif ($previousLineIndented) {
- $text .= "\n".$blockLines[$i];
- $previousLineIndented = false;
- $previousLineBlank = false;
- } elseif ($previousLineBlank || 0 === $i) {
- $text .= $blockLines[$i];
- $previousLineIndented = false;
- $previousLineBlank = false;
- } else {
- $text .= ' '.$blockLines[$i];
- $previousLineIndented = false;
- $previousLineBlank = false;
- }
- }
- } else {
- $text = implode("\n", $blockLines);
- }
-
- // deal with trailing newlines
- if ('' === $chomping) {
- $text = preg_replace('/\n+$/', "\n", $text);
- } elseif ('-' === $chomping) {
- $text = preg_replace('/\n+$/', '', $text);
- }
-
- return $text;
- }
-
- /**
- * Returns true if the next line is indented.
- *
- * @return bool Returns true if the next line is indented, false otherwise
- */
- private function isNextLineIndented(): bool
- {
- $currentIndentation = $this->getCurrentLineIndentation();
- $movements = 0;
-
- do {
- $EOF = !$this->moveToNextLine();
-
- if (!$EOF) {
- ++$movements;
- }
- } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()));
-
- if ($EOF) {
- return false;
- }
-
- $ret = $this->getCurrentLineIndentation() > $currentIndentation;
-
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- return $ret;
- }
-
- /**
- * Returns true if the current line is blank or if it is a comment line.
- *
- * @return bool Returns true if the current line is empty or if it is a comment line, false otherwise
- */
- private function isCurrentLineEmpty(): bool
- {
- return $this->isCurrentLineBlank() || $this->isCurrentLineComment();
- }
-
- /**
- * Returns true if the current line is blank.
- *
- * @return bool Returns true if the current line is blank, false otherwise
- */
- private function isCurrentLineBlank(): bool
- {
- return '' == trim($this->currentLine, ' ');
- }
-
- /**
- * Returns true if the current line is a comment line.
- *
- * @return bool Returns true if the current line is a comment line, false otherwise
- */
- private function isCurrentLineComment(): bool
- {
- //checking explicitly the first char of the trim is faster than loops or strpos
- $ltrimmedLine = ltrim($this->currentLine, ' ');
-
- return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0];
- }
-
- private function isCurrentLineLastLineInDocument(): bool
- {
- return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1);
- }
-
- /**
- * Cleanups a YAML string to be parsed.
- *
- * @param string $value The input YAML string
- *
- * @return string A cleaned up YAML string
- */
- private function cleanup(string $value): string
- {
- $value = str_replace(["\r\n", "\r"], "\n", $value);
-
- // strip YAML header
- $count = 0;
- $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count);
- $this->offset += $count;
-
- // remove leading comments
- $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count);
- if (1 === $count) {
- // items have been removed, update the offset
- $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n");
- $value = $trimmedValue;
- }
-
- // remove start of the document marker (---)
- $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count);
- if (1 === $count) {
- // items have been removed, update the offset
- $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n");
- $value = $trimmedValue;
-
- // remove end of the document marker (...)
- $value = preg_replace('#\.\.\.\s*$#', '', $value);
- }
-
- return $value;
- }
-
- /**
- * Returns true if the next line starts unindented collection.
- *
- * @return bool Returns true if the next line starts unindented collection, false otherwise
- */
- private function isNextLineUnIndentedCollection(): bool
- {
- $currentIndentation = $this->getCurrentLineIndentation();
- $movements = 0;
-
- do {
- $EOF = !$this->moveToNextLine();
-
- if (!$EOF) {
- ++$movements;
- }
- } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()));
-
- if ($EOF) {
- return false;
- }
-
- $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem();
-
- for ($i = 0; $i < $movements; ++$i) {
- $this->moveToPreviousLine();
- }
-
- return $ret;
- }
-
- /**
- * Returns true if the string is un-indented collection item.
- *
- * @return bool Returns true if the string is un-indented collection item, false otherwise
- */
- private function isStringUnIndentedCollectionItem(): bool
- {
- return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- ');
- }
-
- /**
- * A local wrapper for "preg_match" which will throw a ParseException if there
- * is an internal error in the PCRE engine.
- *
- * This avoids us needing to check for "false" every time PCRE is used
- * in the YAML engine
- *
- * @throws ParseException on a PCRE internal error
- *
- * @see preg_last_error()
- *
- * @internal
- */
- public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int
- {
- if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
- switch (preg_last_error()) {
- case PREG_INTERNAL_ERROR:
- $error = 'Internal PCRE error.';
- break;
- case PREG_BACKTRACK_LIMIT_ERROR:
- $error = 'pcre.backtrack_limit reached.';
- break;
- case PREG_RECURSION_LIMIT_ERROR:
- $error = 'pcre.recursion_limit reached.';
- break;
- case PREG_BAD_UTF8_ERROR:
- $error = 'Malformed UTF-8 data.';
- break;
- case PREG_BAD_UTF8_OFFSET_ERROR:
- $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.';
- break;
- default:
- $error = 'Error.';
- }
-
- throw new ParseException($error);
- }
-
- return $ret;
- }
-
- /**
- * Trim the tag on top of the value.
- *
- * Prevent values such as "!foo {quz: bar}" to be considered as
- * a mapping block.
- */
- private function trimTag(string $value): string
- {
- if ('!' === $value[0]) {
- return ltrim(substr($value, 1, strcspn($value, " \r\n", 1)), ' ');
- }
-
- return $value;
- }
-
- private function getLineTag(string $value, int $flags, bool $nextLineCheck = true): ?string
- {
- if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) {
- return null;
- }
-
- if ($nextLineCheck && !$this->isNextLineIndented()) {
- return null;
- }
-
- $tag = substr($matches['tag'], 1);
-
- // Built-in tags
- if ($tag && '!' === $tag[0]) {
- throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename);
- }
-
- if (Yaml::PARSE_CUSTOM_TAGS & $flags) {
- return $tag;
- }
-
- throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename);
- }
-
- private function parseQuotedString(string $yaml): ?string
- {
- if ('' === $yaml || ('"' !== $yaml[0] && "'" !== $yaml[0])) {
- throw new \InvalidArgumentException(sprintf('"%s" is not a quoted string.', $yaml));
- }
-
- $lines = [$yaml];
-
- while ($this->moveToNextLine()) {
- $lines[] = $this->currentLine;
-
- if (!$this->isCurrentLineEmpty() && $yaml[0] === $this->currentLine[-1]) {
- break;
- }
- }
-
- $value = '';
-
- for ($i = 0, $linesCount = \count($lines), $previousLineWasNewline = false, $previousLineWasTerminatedWithBackslash = false; $i < $linesCount; ++$i) {
- if ('' === trim($lines[$i])) {
- $value .= "\n";
- } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) {
- $value .= ' ';
- }
-
- if ('' !== trim($lines[$i]) && '\\' === substr($lines[$i], -1)) {
- $value .= ltrim(substr($lines[$i], 0, -1));
- } elseif ('' !== trim($lines[$i])) {
- $value .= trim($lines[$i]);
- }
-
- if ('' === trim($lines[$i])) {
- $previousLineWasNewline = true;
- $previousLineWasTerminatedWithBackslash = false;
- } elseif ('\\' === substr($lines[$i], -1)) {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = true;
- } else {
- $previousLineWasNewline = false;
- $previousLineWasTerminatedWithBackslash = false;
- }
- }
-
- return $value;
-
- for ($i = 1; isset($yaml[$i]) && $quotation !== $yaml[$i]; ++$i) {
- }
-
- // quoted single line string
- if (isset($yaml[$i]) && $quotation === $yaml[$i]) {
- return $yaml;
- }
-
- $lines = [$yaml];
-
- while ($this->moveToNextLine()) {
- for ($i = 1; isset($this->currentLine[$i]) && $quotation !== $this->currentLine[$i]; ++$i) {
- }
-
- $lines[] = trim($this->currentLine);
-
- if (isset($this->currentLine[$i]) && $quotation === $this->currentLine[$i]) {
- break;
- }
- }
- }
-
- private function lexInlineMapping(string $yaml): string
- {
- if ('' === $yaml || '{' !== $yaml[0]) {
- throw new \InvalidArgumentException(sprintf('"%s" is not a sequence.', $yaml));
- }
-
- for ($i = 1; isset($yaml[$i]) && '}' !== $yaml[$i]; ++$i) {
- }
-
- if (isset($yaml[$i]) && '}' === $yaml[$i]) {
- return $yaml;
- }
-
- $lines = [$yaml];
-
- while ($this->moveToNextLine()) {
- $lines[] = $this->currentLine;
- }
-
- return implode("\n", $lines);
- }
-
- private function lexInlineSequence(string $yaml): string
- {
- if ('' === $yaml || '[' !== $yaml[0]) {
- throw new \InvalidArgumentException(sprintf('"%s" is not a sequence.', $yaml));
- }
-
- for ($i = 1; isset($yaml[$i]) && ']' !== $yaml[$i]; ++$i) {
- }
-
- if (isset($yaml[$i]) && ']' === $yaml[$i]) {
- return $yaml;
- }
-
- $value = $yaml;
-
- while ($this->moveToNextLine()) {
- for ($i = 1; isset($this->currentLine[$i]) && ']' !== $this->currentLine[$i]; ++$i) {
- }
-
- $value .= trim($this->currentLine);
-
- if (isset($this->currentLine[$i]) && ']' === $this->currentLine[$i]) {
- break;
- }
- }
-
- return $value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/README.md b/srcs/phpmyadmin/vendor/symfony/yaml/README.md
deleted file mode 100644
index 0d32488..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Yaml Component
-==============
-
-The Yaml component loads and dumps YAML files.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/yaml/index.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Tag/TaggedValue.php b/srcs/phpmyadmin/vendor/symfony/yaml/Tag/TaggedValue.php
deleted file mode 100644
index 4ea3406..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Tag/TaggedValue.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml\Tag;
-
-/**
- * @author Nicolas Grekas <p@tchwork.com>
- * @author Guilhem N. <egetick@gmail.com>
- */
-final class TaggedValue
-{
- private $tag;
- private $value;
-
- public function __construct(string $tag, $value)
- {
- $this->tag = $tag;
- $this->value = $value;
- }
-
- public function getTag(): string
- {
- return $this->tag;
- }
-
- public function getValue()
- {
- return $this->value;
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Unescaper.php b/srcs/phpmyadmin/vendor/symfony/yaml/Unescaper.php
deleted file mode 100644
index 9c3a19e..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Unescaper.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-
-/**
- * Unescaper encapsulates unescaping rules for single and double-quoted
- * YAML strings.
- *
- * @author Matthew Lewinski <matthew@lewinski.org>
- *
- * @internal
- */
-class Unescaper
-{
- /**
- * Regex fragment that matches an escaped character in a double quoted string.
- */
- const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)';
-
- /**
- * Unescapes a single quoted string.
- *
- * @param string $value A single quoted string
- *
- * @return string The unescaped string
- */
- public function unescapeSingleQuotedString(string $value): string
- {
- return str_replace('\'\'', '\'', $value);
- }
-
- /**
- * Unescapes a double quoted string.
- *
- * @param string $value A double quoted string
- *
- * @return string The unescaped string
- */
- public function unescapeDoubleQuotedString(string $value): string
- {
- $callback = function ($match) {
- return $this->unescapeCharacter($match[0]);
- };
-
- // evaluate the string
- return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value);
- }
-
- /**
- * Unescapes a character that was found in a double-quoted string.
- *
- * @param string $value An escaped character
- *
- * @return string The unescaped character
- */
- private function unescapeCharacter(string $value): string
- {
- switch ($value[1]) {
- case '0':
- return "\x0";
- case 'a':
- return "\x7";
- case 'b':
- return "\x8";
- case 't':
- return "\t";
- case "\t":
- return "\t";
- case 'n':
- return "\n";
- case 'v':
- return "\xB";
- case 'f':
- return "\xC";
- case 'r':
- return "\r";
- case 'e':
- return "\x1B";
- case ' ':
- return ' ';
- case '"':
- return '"';
- case '/':
- return '/';
- case '\\':
- return '\\';
- case 'N':
- // U+0085 NEXT LINE
- return "\xC2\x85";
- case '_':
- // U+00A0 NO-BREAK SPACE
- return "\xC2\xA0";
- case 'L':
- // U+2028 LINE SEPARATOR
- return "\xE2\x80\xA8";
- case 'P':
- // U+2029 PARAGRAPH SEPARATOR
- return "\xE2\x80\xA9";
- case 'x':
- return self::utf8chr(hexdec(substr($value, 2, 2)));
- case 'u':
- return self::utf8chr(hexdec(substr($value, 2, 4)));
- case 'U':
- return self::utf8chr(hexdec(substr($value, 2, 8)));
- default:
- throw new ParseException(sprintf('Found unknown escape character "%s".', $value));
- }
- }
-
- /**
- * Get the UTF-8 character for the given code point.
- */
- private static function utf8chr(int $c): string
- {
- if (0x80 > $c %= 0x200000) {
- return \chr($c);
- }
- if (0x800 > $c) {
- return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F);
- }
- if (0x10000 > $c) {
- return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F);
- }
-
- return \chr(0xF0 | $c >> 18).\chr(0x80 | $c >> 12 & 0x3F).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/Yaml.php b/srcs/phpmyadmin/vendor/symfony/yaml/Yaml.php
deleted file mode 100644
index 4efceb3..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/Yaml.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Yaml;
-
-use Symfony\Component\Yaml\Exception\ParseException;
-
-/**
- * Yaml offers convenience methods to load and dump YAML.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- *
- * @final
- */
-class Yaml
-{
- const DUMP_OBJECT = 1;
- const PARSE_EXCEPTION_ON_INVALID_TYPE = 2;
- const PARSE_OBJECT = 4;
- const PARSE_OBJECT_FOR_MAP = 8;
- const DUMP_EXCEPTION_ON_INVALID_TYPE = 16;
- const PARSE_DATETIME = 32;
- const DUMP_OBJECT_AS_MAP = 64;
- const DUMP_MULTI_LINE_LITERAL_BLOCK = 128;
- const PARSE_CONSTANT = 256;
- const PARSE_CUSTOM_TAGS = 512;
- const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024;
- const DUMP_NULL_AS_TILDE = 2048;
-
- /**
- * Parses a YAML file into a PHP value.
- *
- * Usage:
- *
- * $array = Yaml::parseFile('config.yml');
- * print_r($array);
- *
- * @param string $filename The path to the YAML file to be parsed
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed The YAML converted to a PHP value
- *
- * @throws ParseException If the file could not be read or the YAML is not valid
- */
- public static function parseFile(string $filename, int $flags = 0)
- {
- $yaml = new Parser();
-
- return $yaml->parseFile($filename, $flags);
- }
-
- /**
- * Parses YAML into a PHP value.
- *
- * Usage:
- * <code>
- * $array = Yaml::parse(file_get_contents('config.yml'));
- * print_r($array);
- * </code>
- *
- * @param string $input A string containing YAML
- * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
- *
- * @return mixed The YAML converted to a PHP value
- *
- * @throws ParseException If the YAML is not valid
- */
- public static function parse(string $input, int $flags = 0)
- {
- $yaml = new Parser();
-
- return $yaml->parse($input, $flags);
- }
-
- /**
- * Dumps a PHP value to a YAML string.
- *
- * The dump method, when supplied with an array, will do its best
- * to convert the array into friendly YAML.
- *
- * @param mixed $input The PHP value
- * @param int $inline The level where you switch to inline YAML
- * @param int $indent The amount of spaces to use for indentation of nested nodes
- * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string
- *
- * @return string A YAML string representing the original PHP value
- */
- public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string
- {
- $yaml = new Dumper($indent);
-
- return $yaml->dump($input, $inline, 0, $flags);
- }
-}
diff --git a/srcs/phpmyadmin/vendor/symfony/yaml/composer.json b/srcs/phpmyadmin/vendor/symfony/yaml/composer.json
deleted file mode 100644
index 407b297..0000000
--- a/srcs/phpmyadmin/vendor/symfony/yaml/composer.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "symfony/yaml",
- "type": "library",
- "description": "Symfony Yaml Component",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "symfony/polyfill-ctype": "~1.8"
- },
- "require-dev": {
- "symfony/console": "^3.4|^4.0|^5.0"
- },
- "conflict": {
- "symfony/console": "<3.4"
- },
- "suggest": {
- "symfony/console": "For validating YAML files using the lint command"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Yaml\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "4.4-dev"
- }
- }
-}