From bf68fa166afb95d682007e7671c2b0692227bec5 Mon Sep 17 00:00:00 2001 From: Devian Date: Thu, 22 Apr 2021 17:11:12 +0800 Subject: Initial --- .gitignore | 8 + composer.lock | 608 -------- vendor/autoload.php | 7 - vendor/composer/ClassLoader.php | 479 ------- vendor/composer/InstalledVersions.php | 346 ----- vendor/composer/LICENSE | 21 - vendor/composer/autoload_classmap.php | 10 - vendor/composer/autoload_namespaces.php | 9 - vendor/composer/autoload_psr4.php | 16 - vendor/composer/autoload_real.php | 57 - vendor/composer/autoload_static.php | 71 - vendor/composer/installed.json | 614 -------- vendor/composer/installed.php | 87 -- vendor/composer/platform_check.php | 26 - vendor/doctrine/annotations/CHANGELOG.md | 162 --- vendor/doctrine/annotations/LICENSE | 19 - vendor/doctrine/annotations/README.md | 22 - vendor/doctrine/annotations/composer.json | 42 - .../doctrine/annotations/docs/en/annotations.rst | 271 ---- vendor/doctrine/annotations/docs/en/custom.rst | 443 ------ vendor/doctrine/annotations/docs/en/index.rst | 101 -- vendor/doctrine/annotations/docs/en/sidebar.rst | 6 - .../lib/Doctrine/Common/Annotations/Annotation.php | 59 - .../Common/Annotations/Annotation/Attribute.php | 21 - .../Common/Annotations/Annotation/Attributes.php | 15 - .../Common/Annotations/Annotation/Enum.php | 69 - .../Annotations/Annotation/IgnoreAnnotation.php | 43 - .../Annotation/NamedArgumentConstructor.php | 13 - .../Common/Annotations/Annotation/Required.php | 13 - .../Common/Annotations/Annotation/Target.php | 101 -- .../Common/Annotations/AnnotationException.php | 171 --- .../Common/Annotations/AnnotationReader.php | 389 ------ .../Common/Annotations/AnnotationRegistry.php | 190 --- .../Doctrine/Common/Annotations/CachedReader.php | 264 ---- .../lib/Doctrine/Common/Annotations/DocLexer.php | 129 -- .../lib/Doctrine/Common/Annotations/DocParser.php | 1459 -------------------- .../Common/Annotations/FileCacheReader.php | 315 ----- .../ImplicitlyIgnoredAnnotationNames.php | 171 --- .../Doctrine/Common/Annotations/IndexedReader.php | 100 -- .../NamedArgumentConstructorAnnotation.php | 14 - .../lib/Doctrine/Common/Annotations/PhpParser.php | 92 -- .../lib/Doctrine/Common/Annotations/Reader.php | 80 -- .../Common/Annotations/SimpleAnnotationReader.php | 114 -- .../Doctrine/Common/Annotations/TokenParser.php | 208 --- vendor/doctrine/cache/LICENSE | 19 - vendor/doctrine/cache/README.md | 9 - vendor/doctrine/cache/UPGRADE.md | 16 - vendor/doctrine/cache/composer.json | 52 - .../cache/lib/Doctrine/Common/Cache/ApcCache.php | 105 -- .../cache/lib/Doctrine/Common/Cache/ApcuCache.php | 106 -- .../cache/lib/Doctrine/Common/Cache/ArrayCache.php | 113 -- .../cache/lib/Doctrine/Common/Cache/Cache.php | 90 -- .../lib/Doctrine/Common/Cache/CacheProvider.php | 325 ----- .../cache/lib/Doctrine/Common/Cache/ChainCache.php | 195 --- .../lib/Doctrine/Common/Cache/ClearableCache.php | 21 - .../Doctrine/Common/Cache/CouchbaseBucketCache.php | 197 --- .../lib/Doctrine/Common/Cache/CouchbaseCache.php | 105 -- .../lib/Doctrine/Common/Cache/ExtMongoDBCache.php | 198 --- .../cache/lib/Doctrine/Common/Cache/FileCache.php | 281 ---- .../lib/Doctrine/Common/Cache/FilesystemCache.php | 102 -- .../lib/Doctrine/Common/Cache/FlushableCache.php | 18 - .../lib/Doctrine/Common/Cache/InvalidCacheId.php | 25 - .../Doctrine/Common/Cache/LegacyMongoDBCache.php | 175 --- .../lib/Doctrine/Common/Cache/MemcacheCache.php | 104 -- .../lib/Doctrine/Common/Cache/MemcachedCache.php | 170 --- .../lib/Doctrine/Common/Cache/MongoDBCache.php | 112 -- .../lib/Doctrine/Common/Cache/MultiDeleteCache.php | 22 - .../lib/Doctrine/Common/Cache/MultiGetCache.php | 23 - .../Doctrine/Common/Cache/MultiOperationCache.php | 12 - .../lib/Doctrine/Common/Cache/MultiPutCache.php | 24 - .../lib/Doctrine/Common/Cache/PhpFileCache.php | 118 -- .../lib/Doctrine/Common/Cache/PredisCache.php | 143 -- .../cache/lib/Doctrine/Common/Cache/RedisCache.php | 181 --- .../lib/Doctrine/Common/Cache/SQLite3Cache.php | 206 --- .../cache/lib/Doctrine/Common/Cache/Version.php | 8 - .../cache/lib/Doctrine/Common/Cache/VoidCache.php | 59 - .../lib/Doctrine/Common/Cache/WinCacheCache.php | 106 -- .../lib/Doctrine/Common/Cache/XcacheCache.php | 104 -- .../lib/Doctrine/Common/Cache/ZendDataCache.php | 69 - vendor/doctrine/collections/.doctrine-project.json | 17 - vendor/doctrine/collections/CONTRIBUTING.md | 54 - vendor/doctrine/collections/LICENSE | 19 - vendor/doctrine/collections/README.md | 92 -- vendor/doctrine/collections/composer.json | 37 - .../collections/docs/en/derived-collections.rst | 26 - .../collections/docs/en/expression-builder.rst | 173 --- .../doctrine/collections/docs/en/expressions.rst | 102 -- vendor/doctrine/collections/docs/en/index.rst | 327 ----- .../collections/docs/en/lazy-collections.rst | 26 - vendor/doctrine/collections/docs/en/sidebar.rst | 8 - .../Common/Collections/AbstractLazyCollection.php | 369 ----- .../Common/Collections/ArrayCollection.php | 441 ------ .../lib/Doctrine/Common/Collections/Collection.php | 297 ---- .../lib/Doctrine/Common/Collections/Criteria.php | 222 --- .../Collections/Expr/ClosureExpressionVisitor.php | 262 ---- .../Common/Collections/Expr/Comparison.php | 80 -- .../Collections/Expr/CompositeExpression.php | 68 - .../Common/Collections/Expr/Expression.php | 14 - .../Common/Collections/Expr/ExpressionVisitor.php | 55 - .../lib/Doctrine/Common/Collections/Expr/Value.php | 33 - .../Common/Collections/ExpressionBuilder.php | 180 --- .../lib/Doctrine/Common/Collections/Selectable.php | 32 - vendor/doctrine/collections/psalm.xml.dist | 54 - vendor/doctrine/common/.doctrine-project.json | 38 - vendor/doctrine/common/LICENSE | 19 - vendor/doctrine/common/README.md | 12 - vendor/doctrine/common/UPGRADE_TO_2_1 | 39 - vendor/doctrine/common/UPGRADE_TO_2_2 | 61 - vendor/doctrine/common/composer.json | 43 - vendor/doctrine/common/docs/en/index.rst | 10 - .../common/docs/en/reference/class-loading.rst | 242 ---- vendor/doctrine/common/humbug.json.dist | 11 - .../common/lib/Doctrine/Common/ClassLoader.php | 289 ---- .../common/lib/Doctrine/Common/CommonException.php | 14 - .../common/lib/Doctrine/Common/Comparable.php | 26 - .../Doctrine/Common/Proxy/AbstractProxyFactory.php | 230 --- .../lib/Doctrine/Common/Proxy/Autoloader.php | 100 -- .../Proxy/Exception/InvalidArgumentException.php | 113 -- .../Proxy/Exception/OutOfBoundsException.php | 28 - .../Common/Proxy/Exception/ProxyException.php | 12 - .../Proxy/Exception/UnexpectedValueException.php | 74 - .../common/lib/Doctrine/Common/Proxy/Proxy.php | 65 - .../lib/Doctrine/Common/Proxy/ProxyDefinition.php | 42 - .../lib/Doctrine/Common/Proxy/ProxyGenerator.php | 1194 ---------------- .../common/lib/Doctrine/Common/Util/ClassUtils.php | 112 -- .../common/lib/Doctrine/Common/Util/Debug.php | 185 --- vendor/doctrine/common/phpstan.neon.dist | 49 - vendor/doctrine/common/psalm.xml | 16 - .../doctrine/event-manager/.doctrine-project.json | 18 - vendor/doctrine/event-manager/LICENSE | 19 - vendor/doctrine/event-manager/README.md | 13 - vendor/doctrine/event-manager/composer.json | 50 - .../lib/Doctrine/Common/EventArgs.php | 45 - .../lib/Doctrine/Common/EventManager.php | 132 -- .../lib/Doctrine/Common/EventSubscriber.php | 21 - vendor/doctrine/lexer/LICENSE | 19 - vendor/doctrine/lexer/README.md | 9 - vendor/doctrine/lexer/composer.json | 41 - .../lib/Doctrine/Common/Lexer/AbstractLexer.php | 328 ----- vendor/doctrine/persistence/.doctrine-project.json | 60 - .../.github/workflows/coding-standards.yml | 50 - .../.github/workflows/continuous-integration.yml | 79 -- .../workflows/release-on-milestone-closed.yml | 55 - .../.github/workflows/static-analysis.yml | 64 - vendor/doctrine/persistence/LICENSE | 19 - vendor/doctrine/persistence/README.md | 12 - vendor/doctrine/persistence/UPGRADE-1.2.md | 6 - vendor/doctrine/persistence/composer.json | 52 - .../Common/Persistence/PersistentObject.php | 238 ---- .../Persistence/AbstractManagerRegistry.php | 249 ---- .../Doctrine/Persistence/ConnectionRegistry.php | 39 - .../Persistence/Event/LifecycleEventArgs.php | 60 - .../Event/LoadClassMetadataEventArgs.php | 45 - .../Persistence/Event/ManagerEventArgs.php | 30 - .../Persistence/Event/OnClearEventArgs.php | 58 - .../Persistence/Event/PreUpdateEventArgs.php | 114 -- .../lib/Doctrine/Persistence/ManagerRegistry.php | 92 -- .../Mapping/AbstractClassMetadataFactory.php | 416 ------ .../Doctrine/Persistence/Mapping/ClassMetadata.php | 154 --- .../Persistence/Mapping/ClassMetadataFactory.php | 53 - .../Mapping/Driver/AnnotationDriver.php | 256 ---- .../Mapping/Driver/DefaultFileLocator.php | 163 --- .../Persistence/Mapping/Driver/FileDriver.php | 195 --- .../Persistence/Mapping/Driver/FileLocator.php | 53 - .../Persistence/Mapping/Driver/MappingDriver.php | 37 - .../Mapping/Driver/MappingDriverChain.php | 146 -- .../Persistence/Mapping/Driver/PHPDriver.php | 44 - .../Persistence/Mapping/Driver/StaticPHPDriver.php | 130 -- .../Mapping/Driver/SymfonyFileLocator.php | 232 ---- .../Persistence/Mapping/MappingException.php | 96 -- .../Persistence/Mapping/ReflectionService.php | 71 - .../Mapping/RuntimeReflectionService.php | 102 -- .../Mapping/StaticReflectionService.php | 71 - .../Doctrine/Persistence/NotifyPropertyChanged.php | 20 - .../lib/Doctrine/Persistence/ObjectManager.php | 165 --- .../Doctrine/Persistence/ObjectManagerAware.php | 29 - .../Persistence/ObjectManagerDecorator.php | 116 -- .../lib/Doctrine/Persistence/ObjectRepository.php | 71 - .../Persistence/PropertyChangedListener.php | 22 - .../persistence/lib/Doctrine/Persistence/Proxy.php | 35 - .../Reflection/RuntimePublicReflectionProperty.php | 57 - .../TypedNoDefaultReflectionProperty.php | 48 - vendor/doctrine/persistence/psalm.xml | 24 - 183 files changed, 8 insertions(+), 21895 deletions(-) create mode 100644 .gitignore delete mode 100644 composer.lock delete mode 100644 vendor/autoload.php delete mode 100644 vendor/composer/ClassLoader.php delete mode 100644 vendor/composer/InstalledVersions.php delete mode 100644 vendor/composer/LICENSE delete mode 100644 vendor/composer/autoload_classmap.php delete mode 100644 vendor/composer/autoload_namespaces.php delete mode 100644 vendor/composer/autoload_psr4.php delete mode 100644 vendor/composer/autoload_real.php delete mode 100644 vendor/composer/autoload_static.php delete mode 100644 vendor/composer/installed.json delete mode 100644 vendor/composer/installed.php delete mode 100644 vendor/composer/platform_check.php delete mode 100644 vendor/doctrine/annotations/CHANGELOG.md delete mode 100644 vendor/doctrine/annotations/LICENSE delete mode 100644 vendor/doctrine/annotations/README.md delete mode 100644 vendor/doctrine/annotations/composer.json delete mode 100644 vendor/doctrine/annotations/docs/en/annotations.rst delete mode 100644 vendor/doctrine/annotations/docs/en/custom.rst delete mode 100644 vendor/doctrine/annotations/docs/en/index.rst delete mode 100644 vendor/doctrine/annotations/docs/en/sidebar.rst delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php delete mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php delete mode 100644 vendor/doctrine/cache/LICENSE delete mode 100644 vendor/doctrine/cache/README.md delete mode 100644 vendor/doctrine/cache/UPGRADE.md delete mode 100644 vendor/doctrine/cache/composer.json delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseBucketCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/InvalidCacheId.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/LegacyMongoDBCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiOperationCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php delete mode 100644 vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php delete mode 100644 vendor/doctrine/collections/.doctrine-project.json delete mode 100644 vendor/doctrine/collections/CONTRIBUTING.md delete mode 100644 vendor/doctrine/collections/LICENSE delete mode 100644 vendor/doctrine/collections/README.md delete mode 100644 vendor/doctrine/collections/composer.json delete mode 100644 vendor/doctrine/collections/docs/en/derived-collections.rst delete mode 100644 vendor/doctrine/collections/docs/en/expression-builder.rst delete mode 100644 vendor/doctrine/collections/docs/en/expressions.rst delete mode 100644 vendor/doctrine/collections/docs/en/index.rst delete mode 100644 vendor/doctrine/collections/docs/en/lazy-collections.rst delete mode 100644 vendor/doctrine/collections/docs/en/sidebar.rst delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php delete mode 100644 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php delete mode 100644 vendor/doctrine/collections/psalm.xml.dist delete mode 100644 vendor/doctrine/common/.doctrine-project.json delete mode 100644 vendor/doctrine/common/LICENSE delete mode 100644 vendor/doctrine/common/README.md delete mode 100644 vendor/doctrine/common/UPGRADE_TO_2_1 delete mode 100644 vendor/doctrine/common/UPGRADE_TO_2_2 delete mode 100644 vendor/doctrine/common/composer.json delete mode 100644 vendor/doctrine/common/docs/en/index.rst delete mode 100644 vendor/doctrine/common/docs/en/reference/class-loading.rst delete mode 100644 vendor/doctrine/common/humbug.json.dist delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/CommonException.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Comparable.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php delete mode 100644 vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php delete mode 100644 vendor/doctrine/common/phpstan.neon.dist delete mode 100644 vendor/doctrine/common/psalm.xml delete mode 100644 vendor/doctrine/event-manager/.doctrine-project.json delete mode 100644 vendor/doctrine/event-manager/LICENSE delete mode 100644 vendor/doctrine/event-manager/README.md delete mode 100644 vendor/doctrine/event-manager/composer.json delete mode 100644 vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php delete mode 100644 vendor/doctrine/event-manager/lib/Doctrine/Common/EventManager.php delete mode 100644 vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php delete mode 100644 vendor/doctrine/lexer/LICENSE delete mode 100644 vendor/doctrine/lexer/README.md delete mode 100644 vendor/doctrine/lexer/composer.json delete mode 100644 vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php delete mode 100644 vendor/doctrine/persistence/.doctrine-project.json delete mode 100644 vendor/doctrine/persistence/.github/workflows/coding-standards.yml delete mode 100644 vendor/doctrine/persistence/.github/workflows/continuous-integration.yml delete mode 100644 vendor/doctrine/persistence/.github/workflows/release-on-milestone-closed.yml delete mode 100644 vendor/doctrine/persistence/.github/workflows/static-analysis.yml delete mode 100644 vendor/doctrine/persistence/LICENSE delete mode 100644 vendor/doctrine/persistence/README.md delete mode 100644 vendor/doctrine/persistence/UPGRADE-1.2.md delete mode 100644 vendor/doctrine/persistence/composer.json delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/PersistentObject.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LifecycleEventArgs.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadataFactory.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/AnnotationDriver.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/MappingDriver.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/MappingDriverChain.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ReflectionService.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/NotifyPropertyChanged.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManager.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerDecorator.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/PropertyChangedListener.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Proxy.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Reflection/RuntimePublicReflectionProperty.php delete mode 100644 vendor/doctrine/persistence/lib/Doctrine/Persistence/Reflection/TypedNoDefaultReflectionProperty.php delete mode 100644 vendor/doctrine/persistence/psalm.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30c2b7b --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/.buildpath +/.project +/.settings +/vendor +composer.lock +composer.phar +Thumbs.db +phpunit.xml diff --git a/composer.lock b/composer.lock deleted file mode 100644 index f9faece..0000000 --- a/composer.lock +++ /dev/null @@ -1,608 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "e28c56acadf192049f2eed4fdc1386fc", - "packages": [ - { - "name": "doctrine/annotations", - "version": "1.12.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/cache": "1.*", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.12.1" - }, - "time": "2021-02-21T21:00:45+00:00" - }, - { - "name": "doctrine/cache", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "13e3381b25847283a91948d04640543941309727" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", - "reference": "13e3381b25847283a91948d04640543941309727", - "shasum": "" - }, - "require": { - "php": "~7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^6.0", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "keywords": [ - "abstraction", - "apcu", - "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" - ], - "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.10.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "time": "2020-07-07T18:54:01+00:00" - }, - { - "name": "doctrine/collections", - "version": "1.6.7", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/55f8b799269a1a472457bd1a41b4f379d4cfba4a", - "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a", - "shasum": "" - }, - "require": { - "php": "^7.1.3 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan-shim": "^0.9.2", - "phpunit/phpunit": "^7.0", - "vimeo/psalm": "^3.8.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.6.7" - }, - "time": "2020-07-27T17:53:49+00:00" - }, - { - "name": "doctrine/common", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a036d90c303f3163b5be8b8fde9b6755b2be4a3a", - "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a", - "shasum": "" - }, - "require": { - "doctrine/persistence": "^2.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0 || ^8.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^4.0.5", - "vimeo/psalm": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "homepage": "https://www.doctrine-project.org/projects/common.html", - "keywords": [ - "common", - "doctrine", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.1.2" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", - "type": "tidelift" - } - ], - "time": "2021-02-10T20:18:51+00:00" - }, - { - "name": "doctrine/event-manager", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/event-manager.git", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": "<2.9@dev" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "keywords": [ - "event", - "event dispatcher", - "event manager", - "event system", - "events" - ], - "support": { - "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", - "type": "tidelift" - } - ], - "time": "2020-05-29T18:28:51+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2020-05-25T17:44:05+00:00" - }, - { - "name": "doctrine/persistence", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/persistence.git", - "reference": "9899c16934053880876b920a3b8b02ed2337ac1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/9899c16934053880876b920a3b8b02ed2337ac1d", - "reference": "9899c16934053880876b920a3b8b02ed2337ac1d", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.0", - "doctrine/cache": "^1.0", - "doctrine/collections": "^1.0", - "doctrine/event-manager": "^1.0", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": "<2.10@dev" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.11", - "doctrine/coding-standard": "^6.0 || ^8.0", - "doctrine/common": "^3.0", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5.20 || ^8.0 || ^9.0", - "vimeo/psalm": "^3.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common", - "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "homepage": "https://doctrine-project.org/projects/persistence.html", - "keywords": [ - "mapper", - "object", - "odm", - "orm", - "persistence" - ], - "support": { - "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/2.1.0" - }, - "time": "2020-10-24T22:13:54+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.4 || ^8.0" - }, - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index 48830b1..0000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - private $vendorDir; - - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - private static $registeredLoaders = array(); - - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php deleted file mode 100644 index 593600f..0000000 --- a/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,346 +0,0 @@ - - array ( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - 'name' => 'peopleaps/scorm', - ), - 'versions' => - array ( - 'doctrine/annotations' => - array ( - 'pretty_version' => '1.12.1', - 'version' => '1.12.1.0', - 'aliases' => - array ( - ), - 'reference' => 'b17c5014ef81d212ac539f07a1001832df1b6d3b', - ), - 'doctrine/cache' => - array ( - 'pretty_version' => '1.10.2', - 'version' => '1.10.2.0', - 'aliases' => - array ( - ), - 'reference' => '13e3381b25847283a91948d04640543941309727', - ), - 'doctrine/collections' => - array ( - 'pretty_version' => '1.6.7', - 'version' => '1.6.7.0', - 'aliases' => - array ( - ), - 'reference' => '55f8b799269a1a472457bd1a41b4f379d4cfba4a', - ), - 'doctrine/common' => - array ( - 'pretty_version' => '3.1.2', - 'version' => '3.1.2.0', - 'aliases' => - array ( - ), - 'reference' => 'a036d90c303f3163b5be8b8fde9b6755b2be4a3a', - ), - 'doctrine/event-manager' => - array ( - 'pretty_version' => '1.1.1', - 'version' => '1.1.1.0', - 'aliases' => - array ( - ), - 'reference' => '41370af6a30faa9dc0368c4a6814d596e81aba7f', - ), - 'doctrine/lexer' => - array ( - 'pretty_version' => '1.2.1', - 'version' => '1.2.1.0', - 'aliases' => - array ( - ), - 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', - ), - 'doctrine/persistence' => - array ( - 'pretty_version' => '2.1.0', - 'version' => '2.1.0.0', - 'aliases' => - array ( - ), - 'reference' => '9899c16934053880876b920a3b8b02ed2337ac1d', - ), - 'peopleaps/scorm' => - array ( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - ), - ), -); -private static $canGetVendors; -private static $installedByVendor = array(); - - - - - - - -public static function getInstalledPackages() -{ -$packages = array(); -foreach (self::getInstalled() as $installed) { -$packages[] = array_keys($installed['versions']); -} - - -if (1 === \count($packages)) { -return $packages[0]; -} - -return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); -} - - - - - - - - - -public static function isInstalled($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (isset($installed['versions'][$packageName])) { -return true; -} -} - -return false; -} - - - - - - - - - - - - - - -public static function satisfies(VersionParser $parser, $packageName, $constraint) -{ -$constraint = $parser->parseConstraints($constraint); -$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - -return $provided->matches($constraint); -} - - - - - - - - - - -public static function getVersionRanges($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -$ranges = array(); -if (isset($installed['versions'][$packageName]['pretty_version'])) { -$ranges[] = $installed['versions'][$packageName]['pretty_version']; -} -if (array_key_exists('aliases', $installed['versions'][$packageName])) { -$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); -} -if (array_key_exists('replaced', $installed['versions'][$packageName])) { -$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); -} -if (array_key_exists('provided', $installed['versions'][$packageName])) { -$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); -} - -return implode(' || ', $ranges); -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getVersion($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -if (!isset($installed['versions'][$packageName]['version'])) { -return null; -} - -return $installed['versions'][$packageName]['version']; -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getPrettyVersion($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -if (!isset($installed['versions'][$packageName]['pretty_version'])) { -return null; -} - -return $installed['versions'][$packageName]['pretty_version']; -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getReference($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -if (!isset($installed['versions'][$packageName]['reference'])) { -return null; -} - -return $installed['versions'][$packageName]['reference']; -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getRootPackage() -{ -$installed = self::getInstalled(); - -return $installed[0]['root']; -} - - - - - - - -public static function getRawData() -{ -return self::$installed; -} - - - - - - - - - - - - - - - - - - - -public static function reload($data) -{ -self::$installed = $data; -self::$installedByVendor = array(); -} - - - - -private static function getInstalled() -{ -if (null === self::$canGetVendors) { -self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); -} - -$installed = array(); - -if (self::$canGetVendors) { -foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { -if (isset(self::$installedByVendor[$vendorDir])) { -$installed[] = self::$installedByVendor[$vendorDir]; -} elseif (is_file($vendorDir.'/composer/installed.php')) { -$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; -} -} -} - -$installed[] = self::$installed; - -return $installed; -} -} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE deleted file mode 100644 index f27399a..0000000 --- a/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -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/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php deleted file mode 100644 index b26f1b1..0000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,10 +0,0 @@ - $vendorDir . '/composer/InstalledVersions.php', -); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc012..0000000 --- a/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array('/src'), - 'Doctrine\\Persistence\\' => array($vendorDir . '/doctrine/persistence/lib/Doctrine/Persistence'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), - 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections'), - 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), - 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/event-manager/lib/Doctrine/Common', $vendorDir . '/doctrine/persistence/lib/Doctrine/Common', $vendorDir . '/doctrine/common/lib/Doctrine/Common'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index 2f388e6..0000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,57 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInitd36addb7c57cfdb58fd5112db14a06cc::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php deleted file mode 100644 index 097ac3d..0000000 --- a/vendor/composer/autoload_static.php +++ /dev/null @@ -1,71 +0,0 @@ - - array ( - 'Peopleaps\\Scorm\\' => 16, - ), - 'D' => - array ( - 'Doctrine\\Persistence\\' => 21, - 'Doctrine\\Common\\Lexer\\' => 22, - 'Doctrine\\Common\\Collections\\' => 28, - 'Doctrine\\Common\\Cache\\' => 22, - 'Doctrine\\Common\\Annotations\\' => 28, - 'Doctrine\\Common\\' => 16, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Peopleaps\\Scorm\\' => - array ( - 0 => '/src', - ), - 'Doctrine\\Persistence\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/persistence/lib/Doctrine/Persistence', - ), - 'Doctrine\\Common\\Lexer\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', - ), - 'Doctrine\\Common\\Collections\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/collections/lib/Doctrine/Common/Collections', - ), - 'Doctrine\\Common\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache', - ), - 'Doctrine\\Common\\Annotations\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', - ), - 'Doctrine\\Common\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/event-manager/lib/Doctrine/Common', - 1 => __DIR__ . '/..' . '/doctrine/persistence/lib/Doctrine/Common', - 2 => __DIR__ . '/..' . '/doctrine/common/lib/Doctrine/Common', - ), - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitd36addb7c57cfdb58fd5112db14a06cc::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitd36addb7c57cfdb58fd5112db14a06cc::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitd36addb7c57cfdb58fd5112db14a06cc::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index 853cbc1..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,614 +0,0 @@ -{ - "packages": [ - { - "name": "doctrine/annotations", - "version": "1.12.1", - "version_normalized": "1.12.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", - "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/cache": "1.*", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5" - }, - "time": "2021-02-21T21:00:45+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.12.1" - }, - "install-path": "../doctrine/annotations" - }, - { - "name": "doctrine/cache", - "version": "1.10.2", - "version_normalized": "1.10.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "13e3381b25847283a91948d04640543941309727" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", - "reference": "13e3381b25847283a91948d04640543941309727", - "shasum": "" - }, - "require": { - "php": "~7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^6.0", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "time": "2020-07-07T18:54:01+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "keywords": [ - "abstraction", - "apcu", - "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" - ], - "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.10.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "install-path": "../doctrine/cache" - }, - { - "name": "doctrine/collections", - "version": "1.6.7", - "version_normalized": "1.6.7.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/55f8b799269a1a472457bd1a41b4f379d4cfba4a", - "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a", - "shasum": "" - }, - "require": { - "php": "^7.1.3 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan-shim": "^0.9.2", - "phpunit/phpunit": "^7.0", - "vimeo/psalm": "^3.8.1" - }, - "time": "2020-07-27T17:53:49+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.6.7" - }, - "install-path": "../doctrine/collections" - }, - { - "name": "doctrine/common", - "version": "3.1.2", - "version_normalized": "3.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a036d90c303f3163b5be8b8fde9b6755b2be4a3a", - "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a", - "shasum": "" - }, - "require": { - "doctrine/persistence": "^2.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0 || ^8.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^4.0.5", - "vimeo/psalm": "^4.4" - }, - "time": "2021-02-10T20:18:51+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "homepage": "https://www.doctrine-project.org/projects/common.html", - "keywords": [ - "common", - "doctrine", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.1.2" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", - "type": "tidelift" - } - ], - "install-path": "../doctrine/common" - }, - { - "name": "doctrine/event-manager", - "version": "1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/event-manager.git", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": "<2.9@dev" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" - }, - "time": "2020-05-29T18:28:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "keywords": [ - "event", - "event dispatcher", - "event manager", - "event system", - "events" - ], - "support": { - "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", - "type": "tidelift" - } - ], - "install-path": "../doctrine/event-manager" - }, - { - "name": "doctrine/lexer", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "time": "2020-05-25T17:44:05+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "install-path": "../doctrine/lexer" - }, - { - "name": "doctrine/persistence", - "version": "2.1.0", - "version_normalized": "2.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/persistence.git", - "reference": "9899c16934053880876b920a3b8b02ed2337ac1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/9899c16934053880876b920a3b8b02ed2337ac1d", - "reference": "9899c16934053880876b920a3b8b02ed2337ac1d", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.0", - "doctrine/cache": "^1.0", - "doctrine/collections": "^1.0", - "doctrine/event-manager": "^1.0", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": "<2.10@dev" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.11", - "doctrine/coding-standard": "^6.0 || ^8.0", - "doctrine/common": "^3.0", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5.20 || ^8.0 || ^9.0", - "vimeo/psalm": "^3.11" - }, - "time": "2020-10-24T22:13:54+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common", - "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "homepage": "https://doctrine-project.org/projects/persistence.html", - "keywords": [ - "mapper", - "object", - "odm", - "orm", - "persistence" - ], - "support": { - "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/2.1.0" - }, - "install-path": "../doctrine/persistence" - } - ], - "dev": true, - "dev-package-names": [] -} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php deleted file mode 100644 index c606d28..0000000 --- a/vendor/composer/installed.php +++ /dev/null @@ -1,87 +0,0 @@ - - array ( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - 'name' => 'peopleaps/scorm', - ), - 'versions' => - array ( - 'doctrine/annotations' => - array ( - 'pretty_version' => '1.12.1', - 'version' => '1.12.1.0', - 'aliases' => - array ( - ), - 'reference' => 'b17c5014ef81d212ac539f07a1001832df1b6d3b', - ), - 'doctrine/cache' => - array ( - 'pretty_version' => '1.10.2', - 'version' => '1.10.2.0', - 'aliases' => - array ( - ), - 'reference' => '13e3381b25847283a91948d04640543941309727', - ), - 'doctrine/collections' => - array ( - 'pretty_version' => '1.6.7', - 'version' => '1.6.7.0', - 'aliases' => - array ( - ), - 'reference' => '55f8b799269a1a472457bd1a41b4f379d4cfba4a', - ), - 'doctrine/common' => - array ( - 'pretty_version' => '3.1.2', - 'version' => '3.1.2.0', - 'aliases' => - array ( - ), - 'reference' => 'a036d90c303f3163b5be8b8fde9b6755b2be4a3a', - ), - 'doctrine/event-manager' => - array ( - 'pretty_version' => '1.1.1', - 'version' => '1.1.1.0', - 'aliases' => - array ( - ), - 'reference' => '41370af6a30faa9dc0368c4a6814d596e81aba7f', - ), - 'doctrine/lexer' => - array ( - 'pretty_version' => '1.2.1', - 'version' => '1.2.1.0', - 'aliases' => - array ( - ), - 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', - ), - 'doctrine/persistence' => - array ( - 'pretty_version' => '2.1.0', - 'version' => '2.1.0.0', - 'aliases' => - array ( - ), - 'reference' => '9899c16934053880876b920a3b8b02ed2337ac1d', - ), - 'peopleaps/scorm' => - array ( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - ), - ), -); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php deleted file mode 100644 index 580fa96..0000000 --- a/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 70400)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/vendor/doctrine/annotations/CHANGELOG.md b/vendor/doctrine/annotations/CHANGELOG.md deleted file mode 100644 index 0b0ba1a..0000000 --- a/vendor/doctrine/annotations/CHANGELOG.md +++ /dev/null @@ -1,162 +0,0 @@ -## Changelog - -### 1.6.1 - -This release fixes an issue in which annotations such as `@foo-bar` -and `@foo-` were incorrectly recognised as valid, and both erroneously -parsed as `@foo`. - -Any annotation with `@name-*` format will now silently be ignored, -allowing vendor-specific annotations to be prefixed with the tool -name. - -Total issues resolved: **3** - -- [165: Update the composer branch alias](https://github.com/doctrine/annotations/pull/165) thanks to @mikeSimonson -- [209: Change Annotation::value typehint to mixed](https://github.com/doctrine/annotations/pull/209) thanks to @malarzm -- [257: Skip parsing annotations containing dashes, such as `@Foo-bar`, or `@Foo-`](https://github.com/doctrine/annotations/pull/257) thanks to @Ocramius - -### 1.6.0 - -This release brings a new endpoint that make sure that you can't shoot yourself in the foot by calling ```registerLoader``` multiple times and a few tests improvements. - -Total issues resolved: **7** - -- [145: Memory leak in AnnotationRegistry::registerLoader() when called multiple times](https://github.com/doctrine/annotations/issues/145) thanks to @TriAnMan -- [146: Import error on @experimental Annotation](https://github.com/doctrine/annotations/issues/146) thanks to @aturki -- [147: Ignoring @experimental annotation used by Symfony 3.3 CacheAdapter](https://github.com/doctrine/annotations/pull/147) thanks to @aturki -- [151: Remove duplicate code in `DCOM58Test`](https://github.com/doctrine/annotations/pull/151) thanks to @tuanphpvn -- [161: Prevent loading class_exists multiple times](https://github.com/doctrine/annotations/pull/161) thanks to @jrjohnson -- [162: Add registerUniqueLoader to AnnotationRegistry](https://github.com/doctrine/annotations/pull/162) thanks to @jrjohnson -- [163: Use assertDirectoryExists and assertDirectoryNotExists](https://github.com/doctrine/annotations/pull/163) thanks to @carusogabriel - -Thanks to everyone involved in this release. - -### 1.5.0 - -This release increments the minimum supported PHP version to 7.1.0. - -Also, HHVM official support has been dropped. - -Some noticeable performance improvements to annotation autoloading -have been applied, making failed annotation autoloading less heavy -on the filesystem access. - -- [133: Add @throws annotation in AnnotationReader#__construct()](https://github.com/doctrine/annotations/issues/133) thanks to @SenseException -- [134: Require PHP 7.1, drop HHVM support](https://github.com/doctrine/annotations/issues/134) thanks to @lcobucci -- [135: Prevent the same loader from being registered twice](https://github.com/doctrine/annotations/issues/135) thanks to @jrjohnson -- [137: #135 optimise multiple class load attempts in AnnotationRegistry](https://github.com/doctrine/annotations/issues/137) thanks to @Ocramius - - -### 1.4.0 - -This release fix an issue were some annotations could be not loaded if the namespace in the use statement started with a backslash. -It also update the tests and drop the support for php 5.X - -- [115: Missing annotations with the latest composer version](https://github.com/doctrine/annotations/issues/115) thanks to @pascalporedda -- [120: Missing annotations with the latest composer version](https://github.com/doctrine/annotations/pull/120) thanks to @gnat42 -- [121: Adding a more detailed explanation of the test](https://github.com/doctrine/annotations/pull/121) thanks to @mikeSimonson -- [101: Test annotation parameters containing space](https://github.com/doctrine/annotations/pull/101) thanks to @mikeSimonson -- [111: Cleanup: move to correct phpunit assertions](https://github.com/doctrine/annotations/pull/111) thanks to @Ocramius -- [112: Removes support for PHP 5.x](https://github.com/doctrine/annotations/pull/112) thanks to @railto -- [113: bumped phpunit version to 5.7](https://github.com/doctrine/annotations/pull/113) thanks to @gabbydgab -- [114: Enhancement: Use SVG Travis build badge](https://github.com/doctrine/annotations/pull/114) thanks to @localheinz -- [118: Integrating PHPStan](https://github.com/doctrine/annotations/pull/118) thanks to @ondrejmirtes - -### 1.3.1 - 2016-12-30 - -This release fixes an issue with ignored annotations that were already -autoloaded, causing the `SimpleAnnotationReader` to pick them up -anyway. [#110](https://github.com/doctrine/annotations/pull/110) - -Additionally, an issue was fixed in the `CachedReader`, which was -not correctly checking the freshness of cached annotations when -traits were defined on a class. [#105](https://github.com/doctrine/annotations/pull/105) - -Total issues resolved: **2** - -- [105: Return single max timestamp](https://github.com/doctrine/annotations/pull/105) -- [110: setIgnoreNotImportedAnnotations(true) didn’t work for existing classes](https://github.com/doctrine/annotations/pull/110) - -### 1.3.0 - -This release introduces a PHP version bump. `doctrine/annotations` now requires PHP -5.6 or later to be installed. - -A series of additional improvements have been introduced: - - * support for PHP 7 "grouped use statements" - * support for ignoring entire namespace names - via `Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredNamespace()` and - `Doctrine\Common\Annotations\DocParser::setIgnoredAnnotationNamespaces()`. This will - allow you to ignore annotations from namespaces that you cannot autoload - * testing all parent classes and interfaces when checking if the annotation cache - in the `CachedReader` is fresh - * simplifying the cache keys used by the `CachedReader`: keys are no longer artificially - namespaced, since `Doctrine\Common\Cache` already supports that - * corrected parsing of multibyte strings when `mbstring.func_overload` is enabled - * corrected parsing of annotations when `"\t"` is put before the first annotation - in a docblock - * allow skipping non-imported annotations when a custom `DocParser` is passed to - the `AnnotationReader` constructor - -Total issues resolved: **15** - -- [45: DocParser can now ignore whole namespaces](https://github.com/doctrine/annotations/pull/45) -- [57: Switch to the docker-based infrastructure on Travis](https://github.com/doctrine/annotations/pull/57) -- [59: opcache.load_comments has been removed from PHP 7](https://github.com/doctrine/annotations/pull/59) -- [62: [CachedReader\ Test traits and parent class to see if cache is fresh](https://github.com/doctrine/annotations/pull/62) -- [65: Remove cache salt making key unnecessarily long](https://github.com/doctrine/annotations/pull/65) -- [66: Fix of incorrect parsing multibyte strings](https://github.com/doctrine/annotations/pull/66) -- [68: Annotations that are indented by tab are not processed.](https://github.com/doctrine/annotations/issues/68) -- [69: Support for Group Use Statements](https://github.com/doctrine/annotations/pull/69) -- [70: Allow tab character before first annotation in DocBlock](https://github.com/doctrine/annotations/pull/70) -- [74: Ignore not registered annotations fix](https://github.com/doctrine/annotations/pull/74) -- [92: Added tests for AnnotationRegistry class.](https://github.com/doctrine/annotations/pull/92) -- [96: Fix/#62 check trait and parent class ttl in annotations](https://github.com/doctrine/annotations/pull/96) -- [97: Feature - #45 - allow ignoring entire namespaces](https://github.com/doctrine/annotations/pull/97) -- [98: Enhancement/#65 remove cache salt from cached reader](https://github.com/doctrine/annotations/pull/98) -- [99: Fix - #70 - allow tab character before first annotation in docblock](https://github.com/doctrine/annotations/pull/99) - -### 1.2.4 - -Total issues resolved: **1** - -- [51: FileCacheReader::saveCacheFile::unlink fix](https://github.com/doctrine/annotations/pull/51) - -### 1.2.3 - -Total issues resolved: [**2**](https://github.com/doctrine/annotations/milestones/v1.2.3) - -- [49: #46 - applying correct `chmod()` to generated cache file](https://github.com/doctrine/annotations/pull/49) -- [50: Hotfix: match escaped quotes (revert #44)](https://github.com/doctrine/annotations/pull/50) - -### 1.2.2 - -Total issues resolved: **4** - -- [43: Exclude files from distribution with .gitattributes](https://github.com/doctrine/annotations/pull/43) -- [44: Update DocLexer.php](https://github.com/doctrine/annotations/pull/44) -- [46: A plain "file_put_contents" can cause havoc](https://github.com/doctrine/annotations/pull/46) -- [48: Deprecating the `FileCacheReader` in 1.2.2: will be removed in 2.0.0](https://github.com/doctrine/annotations/pull/48) - -### 1.2.1 - -Total issues resolved: **4** - -- [38: fixes doctrine/common#326](https://github.com/doctrine/annotations/pull/38) -- [39: Remove superfluous NS](https://github.com/doctrine/annotations/pull/39) -- [41: Warn if load_comments is not enabled.](https://github.com/doctrine/annotations/pull/41) -- [42: Clean up unused uses](https://github.com/doctrine/annotations/pull/42) - -### 1.2.0 - - * HHVM support - * Allowing dangling comma in annotations - * Excluded annotations are no longer autoloaded - * Importing namespaces also in traits - * Added support for `::class` 5.5-style constant, works also in 5.3 and 5.4 - -### 1.1.0 - - * Add Exception when ZendOptimizer+ or Opcache is configured to drop comments diff --git a/vendor/doctrine/annotations/LICENSE b/vendor/doctrine/annotations/LICENSE deleted file mode 100644 index 5e781fc..0000000 --- a/vendor/doctrine/annotations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -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/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md deleted file mode 100644 index ddeddd2..0000000 --- a/vendor/doctrine/annotations/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Doctrine Annotations - -[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions) -[![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations) -[![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references) -[![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations) -[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations) - -Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). - -## Documentation - -See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html). - -## Contributing - -When making a pull request, make sure your changes follow the -[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction). - -## Changelog - -See [CHANGELOG.md](CHANGELOG.md). diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json deleted file mode 100644 index e14ce93..0000000 --- a/vendor/doctrine/annotations/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "doctrine/annotations", - "type": "library", - "description": "Docblock Annotations Parser", - "keywords": ["annotations", "docblock", "parser"], - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "^7.1 || ^8.0", - "ext-tokenizer": "*", - "doctrine/lexer": "1.*" - }, - "require-dev": { - "doctrine/cache": "1.*", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5" - }, - "config": { - "sort-packages": true - }, - "autoload": { - "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Performance\\Common\\Annotations\\": "tests/Doctrine/Performance/Common/Annotations", - "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations" - }, - "files": [ - "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php", - "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php" - ] - } -} diff --git a/vendor/doctrine/annotations/docs/en/annotations.rst b/vendor/doctrine/annotations/docs/en/annotations.rst deleted file mode 100644 index 648ab26..0000000 --- a/vendor/doctrine/annotations/docs/en/annotations.rst +++ /dev/null @@ -1,271 +0,0 @@ -Handling Annotations -==================== - -There are several different approaches to handling annotations in PHP. -Doctrine Annotations maps docblock annotations to PHP classes. Because -not all docblock annotations are used for metadata purposes a filter is -applied to ignore or skip classes that are not Doctrine annotations. - -Take a look at the following code snippet: - -.. code-block:: php - - namespace MyProject\Entities; - - use Doctrine\ORM\Mapping AS ORM; - use Symfony\Component\Validator\Constraints AS Assert; - - /** - * @author Benjamin Eberlei - * @ORM\Entity - * @MyProject\Annotations\Foobarable - */ - class User - { - /** - * @ORM\Id @ORM\Column @ORM\GeneratedValue - * @dummy - * @var int - */ - private $id; - - /** - * @ORM\Column(type="string") - * @Assert\NotEmpty - * @Assert\Email - * @var string - */ - private $email; - } - -In this snippet you can see a variety of different docblock annotations: - -- Documentation annotations such as ``@var`` and ``@author``. These - annotations are ignored and never considered for throwing an - exception due to wrongly used annotations. -- Annotations imported through use statements. The statement ``use - Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace - available as ``@ORM\ClassName``. Same goes for the import of - ``@Assert``. -- The ``@dummy`` annotation. It is not a documentation annotation and - not ignored. For Doctrine Annotations it is not entirely clear how - to handle this annotation. Depending on the configuration an exception - (unknown annotation) will be thrown when parsing this annotation. -- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. - This is transformed directly into the given class name. - -How are these annotations loaded? From looking at the code you could -guess that the ORM Mapping, Assert Validation and the fully qualified -annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error -handling reasons every check for class existence inside the -``AnnotationReader`` sets the second parameter $autoload -of ``class_exists($name, $autoload)`` to false. To work flawlessly the -``AnnotationReader`` requires silent autoloaders which many autoloaders are -not. Silent autoloading is NOT part of the `PSR-0 specification -`_ -for autoloading. - -This is why Doctrine Annotations uses its own autoloading mechanism -through a global registry. If you are wondering about the annotation -registry being global, there is no other way to solve the architectural -problems of autoloading annotation classes in a straightforward fashion. -Additionally if you think about PHP autoloading then you recognize it is -a global as well. - -To anticipate the configuration section, making the above PHP class work -with Doctrine Annotations requires this setup: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\AnnotationRegistry; - - AnnotationRegistry::registerFile("/path/to/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php"); - AnnotationRegistry::registerAutoloadNamespace("Symfony\Component\Validator\Constraint", "/path/to/symfony/src"); - AnnotationRegistry::registerAutoloadNamespace("MyProject\Annotations", "/path/to/myproject/src"); - - $reader = new AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('dummy'); - -The second block with the annotation registry calls registers all the -three different annotation namespaces that are used. -Doctrine Annotations saves all its annotations in a single file, that is -why ``AnnotationRegistry#registerFile`` is used in contrast to -``AnnotationRegistry#registerAutoloadNamespace`` which creates a PSR-0 -compatible loading mechanism for class to file names. - -In the third block, we create the actual ``AnnotationReader`` instance. -Note that we also add ``dummy`` to the global list of ignored -annotations for which we do not throw exceptions. Setting this is -necessary in our example case, otherwise ``@dummy`` would trigger an -exception to be thrown during the parsing of the docblock of -``MyProject\Entities\User#id``. - -Setup and Configuration ------------------------ - -To use the annotations library is simple, you just need to create a new -``AnnotationReader`` instance: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - -This creates a simple annotation reader with no caching other than in -memory (in php arrays). Since parsing docblocks can be expensive you -should cache this process by using a caching reader. - -You can use a file caching reader, but please note it is deprecated to -do so: - -.. code-block:: php - - use Doctrine\Common\Annotations\FileCacheReader; - use Doctrine\Common\Annotations\AnnotationReader; - - $reader = new FileCacheReader( - new AnnotationReader(), - "/path/to/cache", - $debug = true - ); - -If you set the ``debug`` flag to ``true`` the cache reader will check -for changes in the original files, which is very important during -development. If you don't set it to ``true`` you have to delete the -directory to clear the cache. This gives faster performance, however -should only be used in production, because of its inconvenience during -development. - -You can also use one of the ``Doctrine\Common\Cache\Cache`` cache -implementations to cache the annotations: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\CachedReader; - use Doctrine\Common\Cache\ApcCache; - - $reader = new CachedReader( - new AnnotationReader(), - new ApcCache(), - $debug = true - ); - -The ``debug`` flag is used here as well to invalidate the cache files -when the PHP class with annotations changed and should be used during -development. - -.. warning :: - - The ``AnnotationReader`` works and caches under the - assumption that all annotations of a doc-block are processed at - once. That means that annotation classes that do not exist and - aren't loaded and cannot be autoloaded (using the - AnnotationRegistry) would never be visible and not accessible if a - cache is used unless the cache is cleared and the annotations - requested again, this time with all annotations defined. - -By default the annotation reader returns a list of annotations with -numeric indexes. If you want your annotations to be indexed by their -class name you can wrap the reader in an ``IndexedReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\IndexedReader; - - $reader = new IndexedReader(new AnnotationReader()); - -.. warning:: - - You should never wrap the indexed reader inside a cached reader, - only the other way around. This way you can re-use the cache with - indexed or numeric keys, otherwise your code may experience failures - due to caching in a numerical or indexed format. - -Registering Annotations -~~~~~~~~~~~~~~~~~~~~~~~ - -As explained in the introduction, Doctrine Annotations uses its own -autoloading mechanism to determine if a given annotation has a -corresponding PHP class that can be autoloaded. For annotation -autoloading you have to configure the -``Doctrine\Common\Annotations\AnnotationRegistry``. There are three -different mechanisms to configure annotation autoloading: - -- Calling ``AnnotationRegistry#registerFile($file)`` to register a file - that contains one or more annotation classes. -- Calling ``AnnotationRegistry#registerNamespace($namespace, $dirs = - null)`` to register that the given namespace contains annotations and - that their base directory is located at the given $dirs or in the - include path if ``NULL`` is passed. The given directories should *NOT* - be the directory where classes of the namespace are in, but the base - directory of the root namespace. The AnnotationRegistry uses a - namespace to directory separator approach to resolve the correct path. -- Calling ``AnnotationRegistry#registerLoader($callable)`` to register - an autoloader callback. The callback accepts the class as first and - only parameter and has to return ``true`` if the corresponding file - was found and included. - -.. note:: - - Loaders have to fail silently, if a class is not found even if it - matches for example the namespace prefix of that loader. Never is a - loader to throw a warning or exception if the loading failed - otherwise parsing doc block annotations will become a huge pain. - -A sample loader callback could look like: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationRegistry; - use Symfony\Component\ClassLoader\UniversalClassLoader; - - AnnotationRegistry::registerLoader(function($class) { - $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php"; - - if (file_exists("/my/base/path/" . $file)) { - // file_exists() makes sure that the loader fails silently - require "/my/base/path/" . $file; - } - }); - - $loader = new UniversalClassLoader(); - AnnotationRegistry::registerLoader(array($loader, "loadClass")); - - -Ignoring missing exceptions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default an exception is thrown from the ``AnnotationReader`` if an -annotation was found that: - -- is not part of the list of ignored "documentation annotations"; -- was not imported through a use statement; -- is not a fully qualified class that exists. - -You can disable this behavior for specific names if your docblocks do -not follow strict requirements: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('foo'); - -PHP Imports -~~~~~~~~~~~ - -By default the annotation reader parses the use-statement of a php file -to gain access to the import rules and register them for the annotation -processing. Only if you are using PHP Imports can you validate the -correct usage of annotations and throw exceptions if you misspelled an -annotation. This mechanism is enabled by default. - -To ease the upgrade path, we still allow you to disable this mechanism. -Note however that we will remove this in future versions: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setEnabledPhpImports(false); diff --git a/vendor/doctrine/annotations/docs/en/custom.rst b/vendor/doctrine/annotations/docs/en/custom.rst deleted file mode 100644 index 11fbe1a..0000000 --- a/vendor/doctrine/annotations/docs/en/custom.rst +++ /dev/null @@ -1,443 +0,0 @@ -Custom Annotation Classes -========================= - -If you want to define your own annotations, you just have to group them -in a namespace and register this namespace in the ``AnnotationRegistry``. -Annotation classes have to contain a class-level docblock with the text -``@Annotation``: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** @Annotation */ - class Bar - { - // some code - } - -Inject annotation values ------------------------- - -The annotation parser checks if the annotation constructor has arguments, -if so then it will pass the value array, otherwise it will try to inject -values into public properties directly: - - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * - * Some Annotation using a constructor - */ - class Bar - { - private $foo; - - public function __construct(array $values) - { - $this->foo = $values['foo']; - } - } - - /** - * @Annotation - * - * Some Annotation without a constructor - */ - class Foo - { - public $bar; - } - -Optional: Constructors with Named Parameters --------------------------------------------- - -Starting with Annotations v1.11 a new annotation instantiation strategy -is available that aims at compatibility of Annotation classes with the PHP 8 -attribute feature. You need to declare a constructor with regular parameter -names that match the named arguments in the annotation syntax. - -To enable this feature, you can tag your annotation class with -``@NamedArgumentConstructor`` (available from v1.12) or implement the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface -(available from v1.11 and deprecated as of v1.12). -When using the ``@NamedArgumentConstructor`` tag, the first argument of the -constructor is considered as the default one. - - -Usage with the ``@NamedArgumentContrustor`` tag - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(string $foo) - { - $this->foo = $foo; - } - } - - /** Usable with @Bar(foo="baz") */ - /** Usable with @Bar("baz") */ - -In combination with PHP 8's constructor property promotion feature -you can simplify this to: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - public function __construct(private string $foo) {} - } - - -Usage with the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` -interface (v1.11, deprecated as of v1.12): -.. code-block:: php - - namespace MyCompany\Annotations; - - use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; - - /** @Annotation */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(private string $foo) {} - } - - /** Usable with @Bar(foo="baz") */ - -Annotation Target ------------------ - -``@Target`` indicates the kinds of class elements to which an annotation -type is applicable. Then you could define one or more targets: - -- ``CLASS`` Allowed in class docblocks -- ``PROPERTY`` Allowed in property docblocks -- ``METHOD`` Allowed in the method docblocks -- ``FUNCTION`` Allowed in function dockblocks -- ``ALL`` Allowed in class, property, method and function docblocks -- ``ANNOTATION`` Allowed inside other annotations - -If the annotations is not allowed in the current context, an -``AnnotationException`` is thrown. - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - // some code - } - - /** - * @Annotation - * @Target("CLASS") - */ - class Foo - { - // some code - } - -Attribute types ---------------- - -The annotation parser checks the given parameters using the phpdoc -annotation ``@var``, The data type could be validated using the ``@var`` -annotation on the annotation properties or using the ``@Attributes`` and -``@Attribute`` annotations. - -If the data type does not match you get an ``AnnotationException`` - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - /** @var mixed */ - public $mixed; - - /** @var boolean */ - public $boolean; - - /** @var bool */ - public $bool; - - /** @var float */ - public $float; - - /** @var string */ - public $string; - - /** @var integer */ - public $integer; - - /** @var array */ - public $array; - - /** @var SomeAnnotationClass */ - public $annotation; - - /** @var array */ - public $arrayOfIntegers; - - /** @var array */ - public $arrayOfAnnotations; - } - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - * @Attributes({ - * @Attribute("stringProperty", type = "string"), - * @Attribute("annotProperty", type = "SomeAnnotationClass"), - * }) - */ - class Foo - { - public function __construct(array $values) - { - $this->stringProperty = $values['stringProperty']; - $this->annotProperty = $values['annotProperty']; - } - - // some code - } - -Annotation Required -------------------- - -``@Required`` indicates that the field must be specified when the -annotation is used. If it is not used you get an ``AnnotationException`` -stating that this value can not be null. - -Declaring a required field: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Foo - { - /** @Required */ - public $requiredField; - } - -Usage: - -.. code-block:: php - - /** @Foo(requiredField="value") */ - public $direction; // Valid - - /** @Foo */ - public $direction; // Required field missing, throws an AnnotationException - - -Enumerated values ------------------ - -- An annotation property marked with ``@Enum`` is a field that accepts a - fixed set of scalar values. -- You should use ``@Enum`` fields any time you need to represent fixed - values. -- The annotation parser checks the given value and throws an - ``AnnotationException`` if the value does not match. - - -Declaring an enumerated property: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Direction - { - /** - * @Enum({"NORTH", "SOUTH", "EAST", "WEST"}) - */ - public $value; - } - -Annotation usage: - -.. code-block:: php - - /** @Direction("NORTH") */ - public $direction; // Valid value - - /** @Direction("NORTHEAST") */ - public $direction; // Invalid value, throws an AnnotationException - - -Constants ---------- - -The use of constants and class constants is available on the annotations -parser. - -The following usages are allowed: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - use MyCompany\Entity\SomeClass; - - /** - * @Foo(PHP_EOL) - * @Bar(Bar::FOO) - * @Foo({SomeClass::FOO, SomeClass::BAR}) - * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE}) - */ - class User - { - } - - -Be careful with constants and the cache ! - -.. note:: - - The cached reader will not re-evaluate each time an annotation is - loaded from cache. When a constant is changed the cache must be - cleaned. - - -Usage ------ - -Using the library API is simple. Using the annotations described in the -previous section, you can now annotate other classes with your -annotations: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - - /** - * @Foo(bar="foo") - * @Bar(foo="bar") - */ - class User - { - } - -Now we can write a script to get the annotations above: - -.. code-block:: php - - $reflClass = new ReflectionClass('MyCompany\Entity\User'); - $classAnnotations = $reader->getClassAnnotations($reflClass); - - foreach ($classAnnotations AS $annot) { - if ($annot instanceof \MyCompany\Annotations\Foo) { - echo $annot->bar; // prints "foo"; - } else if ($annot instanceof \MyCompany\Annotations\Bar) { - echo $annot->foo; // prints "bar"; - } - } - -You have a complete API for retrieving annotation class instances from a -class, property or method docblock: - - -Reader API -~~~~~~~~~~ - -Access all annotations of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotations(\ReflectionClass $class); - -Access one annotation of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotation(\ReflectionClass $class, $annotationName); - -Access all annotations of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotations(\ReflectionMethod $method); - -Access one annotation of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - -Access all annotations of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotations(\ReflectionProperty $property); - -Access one annotation of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); - -Access all annotations of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotations(\ReflectionFunction $property); - -Access one annotation of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/vendor/doctrine/annotations/docs/en/index.rst b/vendor/doctrine/annotations/docs/en/index.rst deleted file mode 100644 index fd001f4..0000000 --- a/vendor/doctrine/annotations/docs/en/index.rst +++ /dev/null @@ -1,101 +0,0 @@ -Introduction -============ - -Doctrine Annotations allows to implement custom annotation -functionality for PHP classes and functions. - -.. code-block:: php - - class Foo - { - /** - * @MyAnnotation(myProperty="value") - */ - private $bar; - } - -Annotations aren't implemented in PHP itself which is why this component -offers a way to use the PHP doc-blocks as a place for the well known -annotation syntax using the ``@`` char. - -Annotations in Doctrine are used for the ORM configuration to build the -class mapping, but it can be used in other projects for other purposes -too. - -Installation -============ - -You can install the Annotation component with composer: - -.. code-block:: - -   $ composer require doctrine/annotations - -Create an annotation class -========================== - -An annotation class is a representation of the later used annotation -configuration in classes. The annotation class of the previous example -looks like this: - -.. code-block:: php - - /** - * @Annotation - */ - final class MyAnnotation - { - public $myProperty; - } - -The annotation class is declared as an annotation by ``@Annotation``. - -:ref:`Read more about custom annotations. ` - -Reading annotations -=================== - -The access to the annotations happens by reflection of the class or function -containing them. There are multiple reader-classes implementing the -``Doctrine\Common\Annotations\Reader`` interface, that can access the -annotations of a class. A common one is -``Doctrine\Common\Annotations\AnnotationReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\AnnotationRegistry; - - // Deprecated and will be removed in 2.0 but currently needed - AnnotationRegistry::registerLoader('class_exists'); - - $reflectionClass = new ReflectionClass(Foo::class); - $property = $reflectionClass->getProperty('bar'); - - $reader = new AnnotationReader(); - $myAnnotation = $reader->getPropertyAnnotation( - $property, - MyAnnotation::class - ); - - echo $myAnnotation->myProperty; // result: "value" - -Note that ``AnnotationRegistry::registerLoader('class_exists')`` only works -if you already have an autoloader configured (i.e. composer autoloader). -Otherwise, :ref:`please take a look to the other annotation autoload mechanisms `. - -A reader has multiple methods to access the annotations of a class or -function. - -:ref:`Read more about handling annotations. ` - -IDE Support ------------ - -Some IDEs already provide support for annotations: - -- Eclipse via the `Symfony2 Plugin `_ -- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ - -.. _Read more about handling annotations.: annotations -.. _Read more about custom annotations.: custom diff --git a/vendor/doctrine/annotations/docs/en/sidebar.rst b/vendor/doctrine/annotations/docs/en/sidebar.rst deleted file mode 100644 index 6f5d13c..0000000 --- a/vendor/doctrine/annotations/docs/en/sidebar.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. toctree:: - :depth: 3 - - index - annotations - custom diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index 750270e..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,59 +0,0 @@ - $data Key-value for properties to be defined in this class. - */ - final public function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @param string $name Unknown property name. - * - * @throws BadMethodCallException - */ - public function __get($name) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param string $name Unknown property name. - * @param mixed $value Property value. - * - * @throws BadMethodCallException - */ - public function __set($name, $value) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index b1f8514..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,21 +0,0 @@ - */ - public $value; -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index 35d6410..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,69 +0,0 @@ - */ - public $value; - - /** - * Literal target declaration. - * - * @var mixed[] - */ - public $literal; - - /** - * @throws InvalidArgumentException - * - * @phpstan-param array{literal?: mixed[], value: list} $values - */ - public function __construct(array $values) - { - if (! isset($values['literal'])) { - $values['literal'] = []; - } - - foreach ($values['value'] as $var) { - if (! is_scalar($var)) { - throw new InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if (! in_array($key, $values['value'])) { - throw new InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key, - $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index ae60f7d..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,43 +0,0 @@ - */ - public $names; - - /** - * @throws RuntimeException - * - * @phpstan-param array{value: string|list} $values - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new RuntimeException(sprintf( - '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', - json_encode($values['value']) - )); - } - - $this->names = $values['value']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php deleted file mode 100644 index 1690601..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php +++ /dev/null @@ -1,13 +0,0 @@ - */ - private static $map = [ - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'FUNCTION' => self::TARGET_FUNCTION, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ]; - - /** @phpstan-var list */ - public $value; - - /** - * Targets as bitmask. - * - * @var int - */ - public $targets; - - /** - * Literal target declaration. - * - * @var string - */ - public $literal; - - /** - * @throws InvalidArgumentException - * - * @phpstan-param array{value?: string|list} $values - */ - public function __construct(array $values) - { - if (! isset($values['value'])) { - $values['value'] = null; - } - - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new InvalidArgumentException( - sprintf( - '@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if (! isset(self::$map[$literal])) { - throw new InvalidArgumentException( - sprintf( - 'Invalid Target "%s". Available targets: [%s]', - $literal, - implode(', ', array_keys(self::$map)) - ) - ); - } - - $bitmask |= self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index b1ea64e..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,171 +0,0 @@ - $available - */ - public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) - { - return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusSaveComments() - { - return new self( - 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.' - ); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusLoadComments() - { - return new self( - 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.' - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index 1f538ee..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,389 +0,0 @@ - - */ - private static $globalImports = [ - 'ignoreannotation' => Annotation\IgnoreAnnotation::class, - ]; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNamespaces = []; - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - * - * @param string $name - */ - public static function addGlobalIgnoredName($name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling. - * - * @param string $namespace - */ - public static function addGlobalIgnoredNamespace($namespace) - { - self::$globalIgnoredNamespaces[$namespace] = true; - } - - /** - * Annotations parser. - * - * @var DocParser - */ - private $parser; - - /** - * Annotations parser used to collect parsing metadata. - * - * @var DocParser - */ - private $preParser; - - /** - * PHP parser used to collect imports. - * - * @var PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $imports = []; - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $ignoredAnnotationNames = []; - - /** - * Initializes a new AnnotationReader. - * - * @throws AnnotationException - */ - public function __construct(?DocParser $parser = null) - { - if ( - extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === '0' || - ini_get('opcache.save_comments') === '0') - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') === 0) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - // Make sure that the IgnoreAnnotation annotation is loaded - class_exists(IgnoreAnnotation::class); - - $this->parser = $parser ?: new DocParser(); - - $this->preParser = new DocParser(); - - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); - - $this->phpParser = new PhpParser(); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . '::$' . $property->getName(); - - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getPropertyImports($property)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getMethodImports($method)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a function. - * - * @phpstan-return list An array of Annotations. - */ - public function getFunctionAnnotations(ReflectionFunction $function): array - { - $context = 'function ' . $function->getName(); - - $this->parser->setTarget(Target::TARGET_FUNCTION); - $this->parser->setImports($this->getImports($function)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($function->getDocComment(), $context); - } - - /** - * Gets a function annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) - { - $annotations = $this->getFunctionAnnotations($function); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getIgnoredAnnotationNames($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->ignoredAnnotationNames[$type][$name])) { - return $this->ignoredAnnotationNames[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->ignoredAnnotationNames[$type][$name]; - } - - /** - * Retrieves imports for a class or a function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getImports($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->imports[$type][$name])) { - return $this->imports[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->imports[$type][$name]; - } - - /** - * Retrieves imports for methods. - * - * @return array - */ - private function getMethodImports(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if ( - ! $trait->hasMethod($method->getName()) - || $trait->getFileName() !== $method->getFileName() - ) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Retrieves imports for properties. - * - * @return array - */ - private function getPropertyImports(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if (! $trait->hasProperty($property->getName())) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Collects parsing metadata for a given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - */ - private function collectParsingMetadata($reflection): void - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); - - foreach ($annotations as $annotation) { - if (! ($annotation instanceof IgnoreAnnotation)) { - continue; - } - - foreach ($annotation->names as $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - - $this->imports[$type][$name] = array_merge( - self::$globalImports, - $this->phpParser->parseUseStatements($reflection), - [ - '__NAMESPACE__' => $reflection->getNamespaceName(), - 'self' => $name, - ] - ); - - $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 259d497..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,190 +0,0 @@ -|null $dirs - */ - public static function registerAutoloadNamespace(string $namespace, $dirs = null): void - { - self::$autoloadNamespaces[$namespace] = $dirs; - } - - /** - * Registers multiple namespaces. - * - * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * - * @deprecated This method is deprecated and will be removed in - * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. - * - * @param string[][]|string[]|null[] $namespaces indexed by namespace name - */ - public static function registerAutoloadNamespaces(array $namespaces): void - { - self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); - } - - /** - * Registers an autoloading callable for annotations, much like spl_autoload_register(). - * - * NOTE: These class loaders HAVE to be silent when a class was not found! - * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. - * - * @deprecated This method is deprecated and will be removed in - * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. - */ - public static function registerLoader(callable $callable): void - { - // Reset our static cache now that we have a new loader to work with - self::$failedToAutoload = []; - self::$loaders[] = $callable; - } - - /** - * Registers an autoloading callable for annotations, if it is not already registered - * - * @deprecated This method is deprecated and will be removed in - * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. - */ - public static function registerUniqueLoader(callable $callable): void - { - if (in_array($callable, self::$loaders, true)) { - return; - } - - self::registerLoader($callable); - } - - /** - * Autoloads an annotation class silently. - */ - public static function loadAnnotationClass(string $class): bool - { - if (class_exists($class, false)) { - return true; - } - - if (array_key_exists($class, self::$failedToAutoload)) { - return false; - } - - foreach (self::$autoloadNamespaces as $namespace => $dirs) { - if (strpos($class, $namespace) !== 0) { - continue; - } - - $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; - - if ($dirs === null) { - $path = stream_resolve_include_path($file); - if ($path) { - require $path; - - return true; - } - } else { - foreach ((array) $dirs as $dir) { - if (is_file($dir . DIRECTORY_SEPARATOR . $file)) { - require $dir . DIRECTORY_SEPARATOR . $file; - - return true; - } - } - } - } - - foreach (self::$loaders as $loader) { - if ($loader($class) === true) { - return true; - } - } - - if ( - self::$loaders === [] && - self::$autoloadNamespaces === [] && - self::$registerFileUsed === false && - class_exists($class) - ) { - return true; - } - - self::$failedToAutoload[$class] = null; - - return false; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php deleted file mode 100644 index 91fbad0..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php +++ /dev/null @@ -1,264 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var int[] */ - private $loadedFilemtimes = []; - - /** - * @param bool $debug - */ - public function __construct(Reader $reader, Cache $cache, $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (bool) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class); - if ($annots === false) { - $annots = $this->delegate->getClassAnnotations($class); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName() . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class); - if ($annots === false) { - $annots = $this->delegate->getPropertyAnnotations($property); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName() . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class); - if ($annots === false) { - $annots = $this->delegate->getMethodAnnotations($method); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Clears loaded annotations. - * - * @return void - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = []; - $this->loadedFilemtimes = []; - } - - /** - * Fetches a value from the cache. - * - * @param string $cacheKey The cache key. - * - * @return mixed The cached value or false when the value is not in cache. - */ - private function fetchFromCache($cacheKey, ReflectionClass $class) - { - $data = $this->cache->fetch($cacheKey); - if ($data !== false) { - if (! $this->debug || $this->isCacheFresh($cacheKey, $class)) { - return $data; - } - } - - return false; - } - - /** - * Saves a value to the cache. - * - * @param string $cacheKey The cache key. - * @param mixed $value The value. - * - * @return void - */ - private function saveToCache($cacheKey, $value) - { - $this->cache->save($cacheKey, $value); - if (! $this->debug) { - return; - } - - $this->cache->save('[C]' . $cacheKey, time()); - } - - /** - * Checks if the cache is fresh. - * - * @param string $cacheKey - * - * @return bool - */ - private function isCacheFresh($cacheKey, ReflectionClass $class) - { - $lastModification = $this->getLastModification($class); - if ($lastModification === 0) { - return true; - } - - return $this->cache->fetch('[C]' . $cacheKey) >= $lastModification; - } - - /** - * Returns the time the class was last modified, testing traits and parents - */ - private function getLastModification(ReflectionClass $class): int - { - $filename = $class->getFileName(); - - if (isset($this->loadedFilemtimes[$filename])) { - return $this->loadedFilemtimes[$filename]; - } - - $parent = $class->getParentClass(); - - $lastModification = max(array_merge( - [$filename ? filemtime($filename) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $class->getTraits()), - array_map(function (ReflectionClass $class): int { - return $this->getLastModification($class); - }, $class->getInterfaces()), - $parent ? [$this->getLastModification($parent)] : [] - )); - - assert($lastModification !== false); - - return $this->loadedFilemtimes[$filename] = $lastModification; - } - - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int - { - $fileName = $reflectionTrait->getFileName(); - - if (isset($this->loadedFilemtimes[$fileName])) { - return $this->loadedFilemtimes[$fileName]; - } - - $lastModificationTime = max(array_merge( - [$fileName ? filemtime($fileName) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $reflectionTrait->getTraits()) - )); - - assert($lastModificationTime !== false); - - return $this->loadedFilemtimes[$fileName] = $lastModificationTime; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php deleted file mode 100644 index f6567c5..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php +++ /dev/null @@ -1,129 +0,0 @@ -= 100 - public const T_IDENTIFIER = 100; - public const T_AT = 101; - public const T_CLOSE_CURLY_BRACES = 102; - public const T_CLOSE_PARENTHESIS = 103; - public const T_COMMA = 104; - public const T_EQUALS = 105; - public const T_FALSE = 106; - public const T_NAMESPACE_SEPARATOR = 107; - public const T_OPEN_CURLY_BRACES = 108; - public const T_OPEN_PARENTHESIS = 109; - public const T_TRUE = 110; - public const T_NULL = 111; - public const T_COLON = 112; - public const T_MINUS = 113; - - /** @var array */ - protected $noCase = [ - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '-' => self::T_MINUS, - '\\' => self::T_NAMESPACE_SEPARATOR, - ]; - - /** @var array */ - protected $withCase = [ - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL, - ]; - - /** - * Whether the next token starts immediately, or if there were - * non-captured symbols before that - */ - public function nextTokenIsAdjacent(): bool - { - return $this->token === null - || ($this->lookahead !== null - && ($this->lookahead['position'] - $this->token['position']) === strlen($this->token['value'])); - } - - /** - * {@inheritdoc} - */ - protected function getCatchablePatterns() - { - return [ - '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:""|[^"])*+"', - ]; - } - - /** - * {@inheritdoc} - */ - protected function getNonCatchablePatterns() - { - return ['\s+', '\*+', '(.)']; - } - - /** - * {@inheritdoc} - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return strpos($value, '.') !== false || stripos($value, 'e') !== false - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index ae530c5..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1459 +0,0 @@ - - */ - private static $classIdentifiers = [ - DocLexer::T_IDENTIFIER, - DocLexer::T_TRUE, - DocLexer::T_FALSE, - DocLexer::T_NULL, - ]; - - /** - * The lexer. - * - * @var DocLexer - */ - private $lexer; - - /** - * Current target context. - * - * @var int - */ - private $target; - - /** - * Doc parser used to collect annotation target. - * - * @var DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var bool - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = []; - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = []; - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var bool - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var string[] - */ - private $namespaces = []; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * - * @var bool[] indexed by annotation name - */ - private $ignoredAnnotationNames = []; - - /** - * A list with annotations in namespaced format - * that are not causing exceptions when not resolved to an annotation class. - * - * @var bool[] indexed by namespace name - */ - private $ignoredAnnotationNamespaces = []; - - /** @var string */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata. - * - * @var array - */ - private static $annotationMetadata = [ - Annotation\Target::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'properties' => [], - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => [ - 'value' => [ - 'required' => false, - 'type' => 'array', - 'array_type' => 'string', - 'value' => 'array', - ], - ], - ], - Annotation\Attribute::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => [ - 'name' => 'name', - 'type' => 'type', - 'required' => 'required', - ], - 'attribute_types' => [ - 'value' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'type' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'required' => [ - 'required' => false, - 'type' => 'boolean', - 'value' => 'boolean', - ], - ], - ], - Annotation\Attributes::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - 'array_type' => Annotation\Attribute::class, - 'value' => 'array<' . Annotation\Attribute::class . '>', - ], - ], - ], - Annotation\Enum::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - ], - 'literal' => [ - 'type' => 'array', - 'required' => false, - ], - ], - ], - Annotation\NamedArgumentConstructor::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => null, - 'properties' => [], - 'attribute_types' => [], - ], - ]; - - /** - * Hash-map for handle types declaration. - * - * @var array - */ - private static $typeMap = [ - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ]; - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer(); - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param bool[] $names indexed by annotation name - * - * @return void - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets the annotation namespaces that are ignored during the parsing process. - * - * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name - * - * @return void - */ - public function setIgnoredAnnotationNamespaces($ignoredAnnotationNamespaces) - { - $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces; - } - - /** - * Sets ignore on not-imported annotations. - * - * @param bool $bool - * - * @return void - */ - public function setIgnoreNotImportedAnnotations($bool) - { - $this->ignoreNotImportedAnnotations = (bool) $bool; - } - - /** - * Sets the default namespaces. - * - * @param string $namespace - * - * @return void - * - * @throws RuntimeException - */ - public function addNamespace($namespace) - { - if ($this->imports) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports. - * - * @param array $imports - * - * @return void - * - * @throws RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @param int $target - * - * @return void - */ - public function setTarget($target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @param string $input The docblock string to parse. - * @param string $context The parsing context. - * - * @throws AnnotationException - * @throws ReflectionException - * - * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. - */ - public function parse($input, $context = '') - { - $pos = $this->findInitialTokenPosition($input); - if ($pos === null) { - return []; - } - - $this->context = $context; - - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Finds the first valid annotation - * - * @param string $input The docblock string to parse - */ - private function findInitialTokenPosition($input): ?int - { - $pos = 0; - - // search for first valid annotation - while (($pos = strpos($input, '@', $pos)) !== false) { - $preceding = substr($input, $pos - 1, 1); - - // if the @ is preceded by a space, a tab or * it is valid - if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") { - return $pos; - } - - $pos++; - } - - return null; - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param int $token Type of token. - * - * @return bool True if tokens match; false otherwise. - * - * @throws AnnotationException - */ - private function match(int $token): bool - { - if (! $this->lexer->isNextToken($token)) { - throw $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @throws AnnotationException - * - * @phpstan-param list $tokens - */ - private function matchAny(array $tokens): bool - { - if (! $this->lexer->isNextTokenAny($tokens)) { - throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param mixed[]|null $token Optional token. - */ - private function syntaxError(string $expected, ?array $token = null): AnnotationException - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = sprintf('Expected %s, got ', $expected); - $message .= $this->lexer->lookahead === null - ? 'end of string' - : sprintf("'%s' at position %s", $token['value'], $token['position']); - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - return AnnotationException::syntaxError($message); - } - - /** - * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param class-string $fqcn - */ - private function classExists(string $fqcn): bool - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param class-string $name The annotation name - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function collectAnnotationMetadata(string $name): void - { - if (self::$metadataParser === null) { - self::$metadataParser = new self(); - - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports([ - 'enum' => Enum::class, - 'target' => Target::class, - 'attribute' => Attribute::class, - 'attributes' => Attributes::class, - 'namedargumentconstructor' => NamedArgumentConstructor::class, - ]); - - // Make sure that annotations from metadata are loaded - class_exists(Enum::class); - class_exists(Target::class); - class_exists(Attribute::class); - class_exists(Attributes::class); - class_exists(NamedArgumentConstructor::class); - } - - $class = new ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $constructor = $class->getConstructor(); - $metadata = [ - 'default_property' => null, - 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, - 'constructor_args' => [], - 'properties' => [], - 'property_types' => [], - 'attribute_types' => [], - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => strpos($docComment, '@Annotation') !== false, - ]; - - $metadata['has_named_argument_constructor'] = $metadata['has_constructor'] - && $class->implementsInterface(NamedArgumentConstructorAnnotation::class); - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - continue; - } - - if ($annotation instanceof NamedArgumentConstructor) { - $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; - if ($metadata['has_named_argument_constructor']) { - // choose the first argument as the default property - $metadata['default_property'] = $constructor->getParameters()[0]->getName(); - } - } - - if (! ($annotation instanceof Attributes)) { - continue; - } - - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); - } - } - - // if not has a constructor will inject values into public properties - if ($metadata['has_constructor'] === false) { - // collect all public properties - foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - $propertyComment = $property->getDocComment(); - if ($propertyComment === false) { - continue; - } - - $attribute = new Attribute(); - - $attribute->required = (strpos($propertyComment, '@Required') !== false); - $attribute->name = $property->name; - $attribute->type = (strpos($propertyComment, '@var') !== false && - preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches)) - ? $matches[1] - : 'mixed'; - - $this->collectAttributeTypeMetadata($metadata, $attribute); - - // checks if the property has @Enum - if (strpos($propertyComment, '@Enum') === false) { - continue; - } - - $context = 'property ' . $class->name . '::$' . $property->name; - - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if (! $annotation instanceof Enum) { - continue; - } - - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } elseif ($metadata['has_named_argument_constructor']) { - foreach ($constructor->getParameters() as $parameter) { - $metadata['constructor_args'][$parameter->getName()] = [ - 'position' => $parameter->getPosition(), - 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null, - ]; - } - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Collects parsing metadata for a given attribute. - * - * @param mixed[] $metadata - */ - private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void - { - // handle internal type declaration - $type = self::$typeMap[$attribute->type] ?? $attribute->type; - - // handle the case if the property type is mixed - if ($type === 'mixed') { - return; - } - - // Evaluate type - $pos = strpos($type, '<'); - if ($pos !== false) { - // Checks if the property has array - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } else { - // Checks if the property has type[] - $pos = strrpos($type, '['); - if ($pos !== false) { - $arrayType = substr($type, 0, $pos); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } - } - - $metadata['attribute_types'][$attribute->name]['type'] = $type; - $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; - $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @throws AnnotationException - * @throws ReflectionException - * - * @phpstan-return list - */ - private function Annotations(): array - { - $annotations = []; - - while ($this->lexer->lookahead !== null) { - if ($this->lexer->lookahead['type'] !== DocLexer::T_AT) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if ( - $this->lexer->token !== null && - $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen( - $this->lexer->token['value'] - ) - ) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - $peek = $this->lexer->glimpse(); - if ( - ($peek === null) - || ($peek['type'] !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array( - $peek['type'], - self::$classIdentifiers, - true - )) - || $peek['position'] !== $this->lexer->lookahead['position'] + 1 - ) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - $annot = $this->Annotation(); - if ($annot === false) { - continue; - } - - $annotations[] = $annot; - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName MethodCall - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @return object|false False if it is not a valid annotation. - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - if ( - $this->lexer->isNextToken(DocLexer::T_MINUS) - && $this->lexer->nextTokenIsAdjacent() - ) { - // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded - return false; - } - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - - if ($name[0] !== '\\') { - $pos = strpos($name, '\\'); - $alias = ($pos === false) ? $name : substr($name, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace . '\\' . $name)) { - $name = $namespace . '\\' . $name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias])) { - $namespace = ltrim($this->imports[$loweredAlias], '\\'); - $name = ($pos !== false) - ? $namespace . substr($name, $pos) - : $namespace; - $found = $this->classExists($name); - } elseif ( - ! isset($this->ignoredAnnotationNames[$name]) - && isset($this->imports['__NAMESPACE__']) - && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) - ) { - $name = $this->imports['__NAMESPACE__'] . '\\' . $name; - $found = true; - } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { - $found = true; - } - - if (! $found) { - if ($this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? -EXCEPTION - , - $name, - $this->context - )); - } - } - - $name = ltrim($name, '\\'); - - if (! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf( - 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.', - $name, - $this->context - )); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - // collects the metadata annotation only if there is not yet - if (! isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The class "%s" is not annotated with @Annotation. -Are you sure this class can be used as annotation? -If so, then you need to add @Annotation to the _class_ doc comment of "%s". -If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. -EXCEPTION - , - $name, - $name, - $originalName, - $this->context - )); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { - throw AnnotationException::semanticalError( - sprintf( - <<<'EXCEPTION' -Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. -EXCEPTION - , - $originalName, - $this->context, - self::$annotationMetadata[$name]['targets_literal'] - ) - ); - } - - $arguments = $this->MethodCall(); - $values = $this->resolvePositionalValues($arguments, $name); - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError( - $property, - $name, - $this->context, - $enum['literal'], - $values[$property] - ); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ( - $property === self::$annotationMetadata[$name]['default_property'] - && ! isset($values[$property]) && isset($values['value']) - ) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (! isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'] - ); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if (! is_array($values[$property])) { - $values[$property] = [$values[$property]]; - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', - $item - ); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'], - $values[$property] - ); - } - } - - if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { - if (PHP_VERSION_ID >= 80000) { - return new $name(...$values); - } - - $positionalValues = []; - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $positionalValues[$parameter['position']] = $parameter['default']; - } - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - - $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; - } - - return new $name(...$positionalValues); - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return new $name($values); - } - - $instance = new $name(); - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ($property !== 'value') { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s". -Available properties: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', self::$annotationMetadata[$name]['properties']) - )); - } - - // handle the case if the property has no annotations - $property = self::$annotationMetadata[$name]['default_property']; - if (! $property) { - throw AnnotationException::creationError(sprintf( - 'The annotation @%s declared on %s does not accept any values, but got %s.', - $originalName, - $this->context, - json_encode($values) - )); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * MethodCall ::= ["(" [Values] ")"] - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function MethodCall(): array - { - $values = []; - - if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - return $values; - } - - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - - return $values; - } - - /** - * Values ::= Array | Value {"," Value}* [","] - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Values(): array - { - $values = [$this->Value()]; - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - break; - } - - $token = $this->lexer->lookahead; - $value = $this->Value(); - - $values[] = $value; - } - - $namedArguments = []; - $positionalArguments = []; - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof stdClass) { - $namedArguments[$value->name] = $value->value; - } else { - $positionalArguments[$k] = $value; - } - } - - return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @return mixed - * - * @throws AnnotationException - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') { - [$className, $const] = explode('::', $identifier); - - $pos = strpos($className, '\\'); - $alias = ($pos === false) ? $className : substr($className, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - switch (true) { - case ! empty($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - break; - } - } - - break; - - case isset($this->imports[$loweredAlias]): - $found = true; - $className = ($pos !== false) - ? $this->imports[$loweredAlias] . substr($className, $pos) - : $this->imports[$loweredAlias]; - break; - - default: - if (isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - } - } - - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - /** - * Checks if identifier ends with ::class and remove the leading backslash if it exists. - */ - if ( - $this->identifierEndsWithClassConstant($identifier) && - ! $this->identifierStartsWithBackslash($identifier) - ) { - return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); - } - - if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { - return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); - } - - if (! defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - private function identifierStartsWithBackslash(string $identifier): bool - { - return $identifier[0] === '\\'; - } - - private function identifierEndsWithClassConstant(string $identifier): bool - { - return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); - } - - /** - * @return int|false - */ - private function getClassConstantPositionInIdentifier(string $identifier) - { - return stripos($identifier, '::class'); - } - - /** - * Identifier ::= string - * - * @throws AnnotationException - */ - private function Identifier(): string - { - // check if we have an annotation - if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - throw $this->syntaxError('namespace separator or identifier'); - } - - $this->lexer->moveNext(); - - $className = $this->lexer->token['value']; - - while ( - $this->lexer->lookahead !== null && - $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + - strlen($this->lexer->token['value'])) && - $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) - ) { - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - - $className .= '\\' . $this->lexer->token['value']; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if ($peek['type'] === DocLexer::T_EQUALS) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead['type']) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - - return $this->lexer->token['value']; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - - return (int) $this->lexer->token['value']; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - - return (float) $this->lexer->token['value']; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - - return null; - - default: - throw $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function FieldAssignment(): stdClass - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token['value']; - - $this->match(DocLexer::T_EQUALS); - - $item = new stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Arrayx(): array - { - $array = $values = []; - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - - // If the array is empty, stop parsing and return. - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - return $array; - } - - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - [$key, $val] = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @throws AnnotationException - * @throws ReflectionException - * - * @phpstan-return array{mixed, mixed} - */ - private function ArrayEntry(): array - { - $peek = $this->lexer->glimpse(); - - if ( - $peek['type'] === DocLexer::T_EQUALS - || $peek['type'] === DocLexer::T_COLON - ) { - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]); - $key = $this->lexer->token['value']; - } - - $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]); - - return [$key, $this->PlainValue()]; - } - - return [null, $this->Value()]; - } - - /** - * Checks whether the given $name matches any ignored annotation name or namespace - */ - private function isIgnoredAnnotation(string $name): bool - { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return true; - } - - foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { - $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; - - if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { - return true; - } - } - - return false; - } - - /** - * Resolve positional arguments (without name) to named ones - * - * @param array $arguments - * - * @return array - */ - private function resolvePositionalValues(array $arguments, string $name): array - { - $positionalArguments = $arguments['positional_arguments'] ?? []; - $values = $arguments['named_arguments'] ?? []; - - if ( - self::$annotationMetadata[$name]['has_named_argument_constructor'] - && self::$annotationMetadata[$name]['default_property'] !== null - ) { - // We must ensure that we don't have positional arguments after named ones - $positions = array_keys($positionalArguments); - $lastPosition = null; - foreach ($positions as $position) { - if ( - ($lastPosition === null && $position !== 0) || - ($lastPosition !== null && $position !== $lastPosition + 1) - ) { - throw $this->syntaxError('Positional arguments after named arguments is not allowed'); - } - - $lastPosition = $position; - } - - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $position = $parameter['position']; - if (isset($values[$property]) || ! isset($positionalArguments[$position])) { - continue; - } - - $values[$property] = $positionalArguments[$position]; - } - } else { - if (count($positionalArguments) > 0 && ! isset($values['value'])) { - if (count($positionalArguments) === 1) { - $value = array_pop($positionalArguments); - } else { - $value = array_values($positionalArguments); - } - - $values['value'] = $value; - } - } - - return $values; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php deleted file mode 100644 index e6a7a95..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php +++ /dev/null @@ -1,315 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var array */ - private $classNameHashes = []; - - /** @var int */ - private $umask; - - /** - * @param string $cacheDir - * @param bool $debug - * @param int $umask - * - * @throws InvalidArgumentException - */ - public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002) - { - if (! is_int($umask)) { - throw new InvalidArgumentException(sprintf( - 'The parameter umask must be an integer, was: %s', - gettype($umask) - )); - } - - $this->reader = $reader; - $this->umask = $umask; - - if (! is_dir($cacheDir) && ! @mkdir($cacheDir, 0777 & (~$this->umask), true)) { - throw new InvalidArgumentException(sprintf( - 'The directory "%s" does not exist and could not be created.', - $cacheDir - )); - } - - $this->dir = rtrim($cacheDir, '\\/'); - $this->debug = $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - if (! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - - $key = $this->classNameHashes[$class->name]; - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; - if (! is_file($path)) { - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - $filename = $class->getFilename(); - if ( - $this->debug - && $filename !== false - && filemtime($path) < filemtime($filename) - ) { - @unlink($path); - - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - if (! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - - $key = $this->classNameHashes[$class->name] . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; - if (! is_file($path)) { - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - $filename = $class->getFilename(); - if ( - $this->debug - && $filename !== false - && filemtime($path) < filemtime($filename) - ) { - @unlink($path); - - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - if (! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - - $key = $this->classNameHashes[$class->name] . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; - if (! is_file($path)) { - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - $filename = $class->getFilename(); - if ( - $this->debug - && $filename !== false - && filemtime($path) < filemtime($filename) - ) { - @unlink($path); - - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * Saves the cache file. - * - * @param string $path - * @param mixed $data - * - * @return void - */ - private function saveCacheFile($path, $data) - { - if (! is_writable($this->dir)) { - throw new InvalidArgumentException(sprintf( - <<<'EXCEPTION' -The directory "%s" is not writable. Both the webserver and the console user need access. -You can manage access rights for multiple users with "chmod +a". -If your system does not support this, check out the acl package., -EXCEPTION - , - $this->dir - )); - } - - $tempfile = tempnam($this->dir, uniqid('', true)); - - if ($tempfile === false) { - throw new RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir)); - } - - @chmod($tempfile, 0666 & (~$this->umask)); - - $written = file_put_contents( - $tempfile, - 'umask)); - - if (rename($tempfile, $path) === false) { - @unlink($tempfile); - - throw new RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path)); - } - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Clears loaded annotations. - * - * @return void - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = []; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php deleted file mode 100644 index 52b929d..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php +++ /dev/null @@ -1,171 +0,0 @@ - true, - 'Attribute' => true, - 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - ]; - - private const WidelyUsedNonStandard = [ - 'fix' => true, - 'fixme' => true, - 'override' => true, - ]; - - private const PhpDocumentor1 = [ - 'abstract' => true, - 'access' => true, - 'code' => true, - 'deprec' => true, - 'endcode' => true, - 'exception' => true, - 'final' => true, - 'ingroup' => true, - 'inheritdoc' => true, - 'inheritDoc' => true, - 'magic' => true, - 'name' => true, - 'private' => true, - 'static' => true, - 'staticvar' => true, - 'staticVar' => true, - 'toc' => true, - 'tutorial' => true, - 'throw' => true, - ]; - - private const PhpDocumentor2 = [ - 'api' => true, - 'author' => true, - 'category' => true, - 'copyright' => true, - 'deprecated' => true, - 'example' => true, - 'filesource' => true, - 'global' => true, - 'ignore' => true, - /* Can we enable this? 'index' => true, */ - 'internal' => true, - 'license' => true, - 'link' => true, - 'method' => true, - 'package' => true, - 'param' => true, - 'property' => true, - 'property-read' => true, - 'property-write' => true, - 'return' => true, - 'see' => true, - 'since' => true, - 'source' => true, - 'subpackage' => true, - 'throws' => true, - 'todo' => true, - 'TODO' => true, - 'usedby' => true, - 'uses' => true, - 'var' => true, - 'version' => true, - ]; - - private const PHPUnit = [ - 'author' => true, - 'after' => true, - 'afterClass' => true, - 'backupGlobals' => true, - 'backupStaticAttributes' => true, - 'before' => true, - 'beforeClass' => true, - 'codeCoverageIgnore' => true, - 'codeCoverageIgnoreStart' => true, - 'codeCoverageIgnoreEnd' => true, - 'covers' => true, - 'coversDefaultClass' => true, - 'coversNothing' => true, - 'dataProvider' => true, - 'depends' => true, - 'doesNotPerformAssertions' => true, - 'expectedException' => true, - 'expectedExceptionCode' => true, - 'expectedExceptionMessage' => true, - 'expectedExceptionMessageRegExp' => true, - 'group' => true, - 'large' => true, - 'medium' => true, - 'preserveGlobalState' => true, - 'requires' => true, - 'runTestsInSeparateProcesses' => true, - 'runInSeparateProcess' => true, - 'small' => true, - 'test' => true, - 'testdox' => true, - 'testWith' => true, - 'ticket' => true, - 'uses' => true, - ]; - - private const PhpCheckStyle = ['SuppressWarnings' => true]; - - private const PhpStorm = ['noinspection' => true]; - - private const PEAR = ['package_version' => true]; - - private const PlainUML = [ - 'startuml' => true, - 'enduml' => true, - ]; - - private const Symfony = ['experimental' => true]; - - private const PhpCodeSniffer = [ - 'codingStandardsIgnoreStart' => true, - 'codingStandardsIgnoreEnd' => true, - ]; - - private const SlevomatCodingStandard = ['phpcsSuppress' => true]; - - private const PhpStan = [ - 'extends' => true, - 'implements' => true, - 'template' => true, - 'use' => true, - ]; - - private const Phan = ['suppress' => true]; - - private const Rector = ['noRector' => true]; - - public const LIST = self::Reserved - + self::WidelyUsedNonStandard - + self::PhpDocumentor1 - + self::PhpDocumentor2 - + self::PHPUnit - + self::PhpCheckStyle - + self::PhpStorm - + self::PEAR - + self::PlainUML - + self::Symfony - + self::SlevomatCodingStandard - + self::PhpCodeSniffer - + self::PhpStan - + self::Phan - + self::Rector; - - private function __construct() - { - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index 42e7076..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,100 +0,0 @@ -delegate = $reader; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $annotations = []; - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotation) - { - return $this->delegate->getClassAnnotation($class, $annotation); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $annotations = []; - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotation) - { - return $this->delegate->getMethodAnnotation($method, $annotation); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $annotations = []; - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotation) - { - return $this->delegate->getPropertyAnnotation($property, $annotation); - } - - /** - * Proxies all methods to the delegate. - * - * @param string $method - * @param mixed[] $args - * - * @return mixed - */ - public function __call($method, $args) - { - return call_user_func_array([$this->delegate, $method], $args); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php deleted file mode 100644 index 8af224c..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php +++ /dev/null @@ -1,14 +0,0 @@ -ReflectionClass object. - * - * @return array A list with use statements in the form (Alias => FQN). - */ - public function parseClass(ReflectionClass $class) - { - return $this->parseUseStatements($class); - } - - /** - * Parse a class or function for use statements. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @psalm-return array a list with use statements in the form (Alias => FQN). - */ - public function parseUseStatements($reflection): array - { - if (method_exists($reflection, 'getUseStatements')) { - return $reflection->getUseStatements(); - } - - $filename = $reflection->getFileName(); - - if ($filename === false) { - return []; - } - - $content = $this->getFileContent($filename, $reflection->getStartLine()); - - if ($content === null) { - return []; - } - - $namespace = preg_quote($reflection->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); - } - - /** - * Gets the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param int $lineNumber The number of lines to read from file. - * - * @return string|null The content of the file or null if the file does not exist. - */ - private function getFileContent($filename, $lineNumber) - { - if (! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (! $file->eof()) { - if ($lineCnt++ === $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 0663ffd..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,80 +0,0 @@ - An array of Annotations. - */ - public function getClassAnnotations(ReflectionClass $class); - - /** - * Gets a class annotation. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName); - - /** - * Gets the annotations applied to a method. - * - * @param ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(ReflectionMethod $method); - - /** - * Gets a method annotation. - * - * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName); - - /** - * Gets the annotations applied to a property. - * - * @param ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(ReflectionProperty $property); - - /** - * Gets a property annotation. - * - * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php deleted file mode 100644 index 8a78c11..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php +++ /dev/null @@ -1,114 +0,0 @@ -parser = new DocParser(); - $this->parser->setIgnoreNotImportedAnnotations(true); - } - - /** - * Adds a namespace in which we will look for annotations. - * - * @param string $namespace - * - * @return void - */ - public function addNamespace($namespace) - { - $this->parser->addNamespace($namespace); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - return $this->parser->parse( - $method->getDocComment(), - 'method ' . $method->getDeclaringClass()->name . '::' . $method->getName() . '()' - ); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - return $this->parser->parse( - $property->getDocComment(), - 'property ' . $property->getDeclaringClass()->name . '::$' . $property->getName() - ); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index 9605fb8..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,208 +0,0 @@ - - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - /** - * @param string $contents - */ - public function __construct($contents) - { - $this->tokens = token_get_all($contents); - - // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it - // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored - // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a - // docblock. If the first thing in the file is a class without a doc block this would cause calls to - // getDocBlock() on said class to return our long lost doc_comment. Argh. - // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least - // it's harmless to us. - token_get_all("numTokens = count($this->tokens); - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return mixed[]|string|null The token if exists, null otherwise. - */ - public function next($docCommentIsComment = true) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ( - $this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) - ) { - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parses a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $groupRoot = ''; - $class = ''; - $alias = ''; - $statements = []; - $explicitAlias = false; - while (($token = $this->next())) { - if (! $explicitAlias && $token[0] === T_STRING) { - $class .= $token[1]; - $alias = $token[1]; - } elseif ($explicitAlias && $token[0] === T_STRING) { - $alias = $token[1]; - } elseif ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - ) { - $class .= $token[1]; - - $classSplit = explode('\\', $token[1]); - $alias = $classSplit[count($classSplit) - 1]; - } elseif ($token[0] === T_NS_SEPARATOR) { - $class .= '\\'; - $alias = ''; - } elseif ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } elseif ($token === ',') { - $statements[strtolower($alias)] = $groupRoot . $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } elseif ($token === ';') { - $statements[strtolower($alias)] = $groupRoot . $class; - break; - } elseif ($token === '{') { - $groupRoot = $class; - $class = ''; - } elseif ($token === '}') { - continue; - } else { - break; - } - } - - return $statements; - } - - /** - * Gets all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * - * @return array A list with all found use statements. - */ - public function parseUseStatements($namespaceName) - { - $statements = []; - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = []; - } - - return $statements; - } - - /** - * Gets the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while ( - ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - )) - ) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Gets the class name. - * - * @return string The found class name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/vendor/doctrine/cache/LICENSE b/vendor/doctrine/cache/LICENSE deleted file mode 100644 index 8c38cc1..0000000 --- a/vendor/doctrine/cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -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/vendor/doctrine/cache/README.md b/vendor/doctrine/cache/README.md deleted file mode 100644 index c795a05..0000000 --- a/vendor/doctrine/cache/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Doctrine Cache - -[![Build Status](https://img.shields.io/travis/doctrine/cache/master.svg?style=flat-square)](http://travis-ci.org/doctrine/cache) -[![Code Coverage](https://codecov.io/gh/doctrine/dbal/branch/cache/graph/badge.svg)](https://codecov.io/gh/doctrine/dbal/branch/master) - -[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/cache.svg?style=flat-square)](https://packagist.org/packages/doctrine/cache) -[![Total Downloads](https://img.shields.io/packagist/dt/doctrine/cache.svg?style=flat-square)](https://packagist.org/packages/doctrine/cache) - -Cache component extracted from the Doctrine Common project. [Documentation](https://www.doctrine-project.org/projects/doctrine-cache/en/current/index.html) diff --git a/vendor/doctrine/cache/UPGRADE.md b/vendor/doctrine/cache/UPGRADE.md deleted file mode 100644 index e1f8a50..0000000 --- a/vendor/doctrine/cache/UPGRADE.md +++ /dev/null @@ -1,16 +0,0 @@ -# Upgrade to 1.4 - -## Minor BC Break: `Doctrine\Common\Cache\FileCache#$extension` is now `private`. - -If you need to override the value of `Doctrine\Common\Cache\FileCache#$extension`, then use the -second parameter of `Doctrine\Common\Cache\FileCache#__construct()` instead of overriding -the property in your own implementation. - -## Minor BC Break: file based caches paths changed - -`Doctrine\Common\Cache\FileCache`, `Doctrine\Common\Cache\PhpFileCache` and -`Doctrine\Common\Cache\FilesystemCache` are using a different cache paths structure. - -If you rely on warmed up caches for deployments, consider that caches generated -with `doctrine/cache` `<1.4` are not compatible with the new directory structure, -and will be ignored. diff --git a/vendor/doctrine/cache/composer.json b/vendor/doctrine/cache/composer.json deleted file mode 100644 index b889aa3..0000000 --- a/vendor/doctrine/cache/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "doctrine/cache", - "type": "library", - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "keywords": [ - "php", - "cache", - "caching", - "abstraction", - "redis", - "memcached", - "couchdb", - "xcache", - "apcu" - ], - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "~7.1 || ^8.0" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0", - "doctrine/coding-standard": "^6.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "autoload": { - "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } - }, - "autoload-dev": { - "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php deleted file mode 100644 index 138d49a..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php +++ /dev/null @@ -1,105 +0,0 @@ -= 50500) { - $info['num_hits'] = $info['num_hits'] ?? $info['nhits']; - $info['num_misses'] = $info['num_misses'] ?? $info['nmisses']; - $info['start_time'] = $info['start_time'] ?? $info['stime']; - } - - return [ - Cache::STATS_HITS => $info['num_hits'], - Cache::STATS_MISSES => $info['num_misses'], - Cache::STATS_UPTIME => $info['start_time'], - Cache::STATS_MEMORY_USAGE => $info['mem_size'], - Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'], - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php deleted file mode 100644 index a725213..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php +++ /dev/null @@ -1,106 +0,0 @@ - $info['num_hits'], - Cache::STATS_MISSES => $info['num_misses'], - Cache::STATS_UPTIME => $info['start_time'], - Cache::STATS_MEMORY_USAGE => $info['mem_size'], - Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'], - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php deleted file mode 100644 index 1beb709..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php +++ /dev/null @@ -1,113 +0,0 @@ -upTime = time(); - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - if (! $this->doContains($id)) { - $this->missesCount += 1; - - return false; - } - - $this->hitsCount += 1; - - return $this->data[$id][0]; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - if (! isset($this->data[$id])) { - return false; - } - - $expiration = $this->data[$id][1]; - - if ($expiration && $expiration < time()) { - $this->doDelete($id); - - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $this->data[$id] = [$data, $lifeTime ? time() + $lifeTime : false]; - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - unset($this->data[$id]); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $this->data = []; - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - return [ - Cache::STATS_HITS => $this->hitsCount, - Cache::STATS_MISSES => $this->missesCount, - Cache::STATS_UPTIME => $this->upTime, - Cache::STATS_MEMORY_USAGE => null, - Cache::STATS_MEMORY_AVAILABLE => null, - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php deleted file mode 100644 index 4569744..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php +++ /dev/null @@ -1,90 +0,0 @@ -hits - * Number of keys that have been requested and found present. - * - * - misses - * Number of items that have been requested and not found. - * - * - uptime - * Time that the server is running. - * - * - memory_usage - * Memory used by this server to store items. - * - * - memory_available - * Memory allowed to use for storage. - * - * @return array|null An associative array with server's statistics if available, NULL otherwise. - */ - public function getStats(); -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php deleted file mode 100644 index 43d414f..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php +++ /dev/null @@ -1,325 +0,0 @@ -namespace = (string) $namespace; - $this->namespaceVersion = null; - } - - /** - * Retrieves the namespace that prefixes all cache ids. - * - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * {@inheritdoc} - */ - public function fetch($id) - { - return $this->doFetch($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function fetchMultiple(array $keys) - { - if (empty($keys)) { - return []; - } - - // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys - $namespacedKeys = array_combine($keys, array_map([$this, 'getNamespacedId'], $keys)); - $items = $this->doFetchMultiple($namespacedKeys); - $foundItems = []; - - // no internal array function supports this sort of mapping: needs to be iterative - // this filters and combines keys in one pass - foreach ($namespacedKeys as $requestedKey => $namespacedKey) { - if (! isset($items[$namespacedKey]) && ! array_key_exists($namespacedKey, $items)) { - continue; - } - - $foundItems[$requestedKey] = $items[$namespacedKey]; - } - - return $foundItems; - } - - /** - * {@inheritdoc} - */ - public function saveMultiple(array $keysAndValues, $lifetime = 0) - { - $namespacedKeysAndValues = []; - foreach ($keysAndValues as $key => $value) { - $namespacedKeysAndValues[$this->getNamespacedId($key)] = $value; - } - - return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function contains($id) - { - return $this->doContains($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function save($id, $data, $lifeTime = 0) - { - return $this->doSave($this->getNamespacedId($id), $data, $lifeTime); - } - - /** - * {@inheritdoc} - */ - public function deleteMultiple(array $keys) - { - return $this->doDeleteMultiple(array_map([$this, 'getNamespacedId'], $keys)); - } - - /** - * {@inheritdoc} - */ - public function delete($id) - { - return $this->doDelete($this->getNamespacedId($id)); - } - - /** - * {@inheritdoc} - */ - public function getStats() - { - return $this->doGetStats(); - } - - /** - * {@inheritDoc} - */ - public function flushAll() - { - return $this->doFlush(); - } - - /** - * {@inheritDoc} - */ - public function deleteAll() - { - $namespaceCacheKey = $this->getNamespaceCacheKey(); - $namespaceVersion = $this->getNamespaceVersion() + 1; - - if ($this->doSave($namespaceCacheKey, $namespaceVersion)) { - $this->namespaceVersion = $namespaceVersion; - - return true; - } - - return false; - } - - /** - * Prefixes the passed id with the configured namespace value. - * - * @param string $id The id to namespace. - * - * @return string The namespaced id. - */ - private function getNamespacedId(string $id) : string - { - $namespaceVersion = $this->getNamespaceVersion(); - - return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); - } - - /** - * Returns the namespace cache key. - */ - private function getNamespaceCacheKey() : string - { - return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); - } - - /** - * Returns the namespace version. - */ - private function getNamespaceVersion() : int - { - if ($this->namespaceVersion !== null) { - return $this->namespaceVersion; - } - - $namespaceCacheKey = $this->getNamespaceCacheKey(); - $this->namespaceVersion = (int) $this->doFetch($namespaceCacheKey) ?: 1; - - return $this->namespaceVersion; - } - - /** - * Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it. - * - * @param array $keys Array of keys to retrieve from cache - * - * @return array Array of values retrieved for the given keys. - */ - protected function doFetchMultiple(array $keys) - { - $returnValues = []; - - foreach ($keys as $key) { - $item = $this->doFetch($key); - if ($item === false && ! $this->doContains($key)) { - continue; - } - - $returnValues[$key] = $item; - } - - return $returnValues; - } - - /** - * Fetches an entry from the cache. - * - * @param string $id The id of the cache entry to fetch. - * - * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id. - */ - abstract protected function doFetch($id); - - /** - * Tests if an entry exists in the cache. - * - * @param string $id The cache id of the entry to check for. - * - * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise. - */ - abstract protected function doContains($id); - - /** - * Default implementation of doSaveMultiple. Each driver that supports multi-put should override it. - * - * @param array $keysAndValues Array of keys and values to save in cache - * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these - * cache entries (0 => infinite lifeTime). - * - * @return bool TRUE if the operation was successful, FALSE if it wasn't. - */ - protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) - { - $success = true; - - foreach ($keysAndValues as $key => $value) { - if ($this->doSave($key, $value, $lifetime)) { - continue; - } - - $success = false; - } - - return $success; - } - - /** - * Puts data into the cache. - * - * @param string $id The cache id. - * @param string $data The cache entry/data. - * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this - * cache entry (0 => infinite lifeTime). - * - * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. - */ - abstract protected function doSave($id, $data, $lifeTime = 0); - - /** - * Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it. - * - * @param array $keys Array of keys to delete from cache - * - * @return bool TRUE if the operation was successful, FALSE if it wasn't - */ - protected function doDeleteMultiple(array $keys) - { - $success = true; - - foreach ($keys as $key) { - if ($this->doDelete($key)) { - continue; - } - - $success = false; - } - - return $success; - } - - /** - * Deletes a cache entry. - * - * @param string $id The cache id. - * - * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. - */ - abstract protected function doDelete($id); - - /** - * Flushes all cache entries. - * - * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise. - */ - abstract protected function doFlush(); - - /** - * Retrieves cached information from the data store. - * - * @return array|null An associative array with server's statistics if available, NULL otherwise. - */ - abstract protected function doGetStats(); -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php deleted file mode 100644 index 8f85845..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php +++ /dev/null @@ -1,195 +0,0 @@ -cacheProviders = $cacheProviders instanceof Traversable - ? iterator_to_array($cacheProviders, false) - : array_values($cacheProviders); - } - - public function setDefaultLifeTimeForDownstreamCacheProviders(int $defaultLifeTimeForDownstreamCacheProviders) : void - { - $this->defaultLifeTimeForDownstreamCacheProviders = $defaultLifeTimeForDownstreamCacheProviders; - } - - /** - * {@inheritDoc} - */ - public function setNamespace($namespace) - { - parent::setNamespace($namespace); - - foreach ($this->cacheProviders as $cacheProvider) { - $cacheProvider->setNamespace($namespace); - } - } - - /** - * {@inheritDoc} - */ - protected function doFetch($id) - { - foreach ($this->cacheProviders as $key => $cacheProvider) { - if ($cacheProvider->doContains($id)) { - $value = $cacheProvider->doFetch($id); - - // We populate all the previous cache layers (that are assumed to be faster) - for ($subKey = $key - 1; $subKey >= 0; $subKey--) { - $this->cacheProviders[$subKey]->doSave($id, $value, $this->defaultLifeTimeForDownstreamCacheProviders); - } - - return $value; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doFetchMultiple(array $keys) - { - /** @var CacheProvider[] $traversedProviders */ - $traversedProviders = []; - $keysCount = count($keys); - $fetchedValues = []; - - foreach ($this->cacheProviders as $key => $cacheProvider) { - $fetchedValues = $cacheProvider->doFetchMultiple($keys); - - // We populate all the previous cache layers (that are assumed to be faster) - if (count($fetchedValues) === $keysCount) { - foreach ($traversedProviders as $previousCacheProvider) { - $previousCacheProvider->doSaveMultiple($fetchedValues, $this->defaultLifeTimeForDownstreamCacheProviders); - } - - return $fetchedValues; - } - - $traversedProviders[] = $cacheProvider; - } - - return $fetchedValues; - } - - /** - * {@inheritDoc} - */ - protected function doContains($id) - { - foreach ($this->cacheProviders as $cacheProvider) { - if ($cacheProvider->doContains($id)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $stored = true; - - foreach ($this->cacheProviders as $cacheProvider) { - $stored = $cacheProvider->doSave($id, $data, $lifeTime) && $stored; - } - - return $stored; - } - - /** - * {@inheritdoc} - */ - protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) - { - $stored = true; - - foreach ($this->cacheProviders as $cacheProvider) { - $stored = $cacheProvider->doSaveMultiple($keysAndValues, $lifetime) && $stored; - } - - return $stored; - } - - /** - * {@inheritDoc} - */ - protected function doDelete($id) - { - $deleted = true; - - foreach ($this->cacheProviders as $cacheProvider) { - $deleted = $cacheProvider->doDelete($id) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteMultiple(array $keys) - { - $deleted = true; - - foreach ($this->cacheProviders as $cacheProvider) { - $deleted = $cacheProvider->doDeleteMultiple($keys) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritDoc} - */ - protected function doFlush() - { - $flushed = true; - - foreach ($this->cacheProviders as $cacheProvider) { - $flushed = $cacheProvider->doFlush() && $flushed; - } - - return $flushed; - } - - /** - * {@inheritDoc} - */ - protected function doGetStats() - { - // We return all the stats from all adapters - $stats = []; - - foreach ($this->cacheProviders as $cacheProvider) { - $stats[] = $cacheProvider->doGetStats(); - } - - return $stats; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php deleted file mode 100644 index b94618e..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php +++ /dev/null @@ -1,21 +0,0 @@ -bucket = $bucket; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $id = $this->normalizeKey($id); - - try { - $document = $this->bucket->get($id); - } catch (Exception $e) { - return false; - } - - if ($document instanceof Document && $document->value !== false) { - return unserialize($document->value); - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $id = $this->normalizeKey($id); - - try { - $document = $this->bucket->get($id); - } catch (Exception $e) { - return false; - } - - if ($document instanceof Document) { - return ! $document->error; - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $id = $this->normalizeKey($id); - - $lifeTime = $this->normalizeExpiry($lifeTime); - - try { - $encoded = serialize($data); - - $document = $this->bucket->upsert($id, $encoded, [ - 'expiry' => (int) $lifeTime, - ]); - } catch (Exception $e) { - return false; - } - - if ($document instanceof Document) { - return ! $document->error; - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - $id = $this->normalizeKey($id); - - try { - $document = $this->bucket->remove($id); - } catch (Exception $e) { - return $e->getCode() === self::KEY_NOT_FOUND; - } - - if ($document instanceof Document) { - return ! $document->error; - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $manager = $this->bucket->manager(); - - // Flush does not return with success or failure, and must be enabled per bucket on the server. - // Store a marker item so that we will know if it was successful. - $this->doSave(__METHOD__, true, 60); - - $manager->flush(); - - if ($this->doContains(__METHOD__)) { - $this->doDelete(__METHOD__); - - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $manager = $this->bucket->manager(); - $stats = $manager->info(); - $nodes = $stats['nodes']; - $node = $nodes[0]; - $interestingStats = $node['interestingStats']; - - return [ - Cache::STATS_HITS => $interestingStats['get_hits'], - Cache::STATS_MISSES => $interestingStats['cmd_get'] - $interestingStats['get_hits'], - Cache::STATS_UPTIME => $node['uptime'], - Cache::STATS_MEMORY_USAGE => $interestingStats['mem_used'], - Cache::STATS_MEMORY_AVAILABLE => $node['memoryFree'], - ]; - } - - private function normalizeKey(string $id) : string - { - $normalized = substr($id, 0, self::MAX_KEY_LENGTH); - - if ($normalized === false) { - return $id; - } - - return $normalized; - } - - /** - * Expiry treated as a unix timestamp instead of an offset if expiry is greater than 30 days. - * - * @src https://developer.couchbase.com/documentation/server/4.1/developer-guide/expiry.html - */ - private function normalizeExpiry(int $expiry) : int - { - if ($expiry > self::THIRTY_DAYS_IN_SECONDS) { - return time() + $expiry; - } - - return $expiry; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php deleted file mode 100644 index 2c62c2e..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php +++ /dev/null @@ -1,105 +0,0 @@ -couchbase = $couchbase; - } - - /** - * Gets the Couchbase instance used by the cache. - * - * @return Couchbase|null - */ - public function getCouchbase() - { - return $this->couchbase; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->couchbase->get($id) ?: false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return $this->couchbase->get($id) !== null; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 30 * 24 * 3600) { - $lifeTime = time() + $lifeTime; - } - - return $this->couchbase->set($id, $data, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->couchbase->delete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->couchbase->flush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $stats = $this->couchbase->getStats(); - $servers = $this->couchbase->getServers(); - $server = explode(':', $servers[0]); - $key = $server[0] . ':11210'; - $stats = $stats[$key]; - - return [ - Cache::STATS_HITS => $stats['get_hits'], - Cache::STATS_MISSES => $stats['get_misses'], - Cache::STATS_UPTIME => $stats['uptime'], - Cache::STATS_MEMORY_USAGE => $stats['bytes'], - Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php deleted file mode 100644 index b06f862..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php +++ /dev/null @@ -1,198 +0,0 @@ -collection = $collection->withOptions(['typeMap' => null]); - $this->database = new Database($collection->getManager(), $collection->getDatabaseName()); - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $document = $this->collection->findOne(['_id' => $id], [MongoDBCache::DATA_FIELD, MongoDBCache::EXPIRATION_FIELD]); - - if ($document === null) { - return false; - } - - if ($this->isExpired($document)) { - $this->createExpirationIndex(); - $this->doDelete($id); - - return false; - } - - return unserialize($document[MongoDBCache::DATA_FIELD]->getData()); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $document = $this->collection->findOne(['_id' => $id], [MongoDBCache::EXPIRATION_FIELD]); - - if ($document === null) { - return false; - } - - if ($this->isExpired($document)) { - $this->createExpirationIndex(); - $this->doDelete($id); - - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - try { - $this->collection->updateOne( - ['_id' => $id], - [ - '$set' => [ - MongoDBCache::EXPIRATION_FIELD => ($lifeTime > 0 ? new UTCDateTime((time() + $lifeTime) * 1000): null), - MongoDBCache::DATA_FIELD => new Binary(serialize($data), Binary::TYPE_GENERIC), - ], - ], - ['upsert' => true] - ); - } catch (Exception $e) { - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - try { - $this->collection->deleteOne(['_id' => $id]); - } catch (Exception $e) { - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - try { - // Use remove() in lieu of drop() to maintain any collection indexes - $this->collection->deleteMany([]); - } catch (Exception $e) { - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $uptime = null; - $memoryUsage = null; - - try { - $serverStatus = $this->database->command([ - 'serverStatus' => 1, - 'locks' => 0, - 'metrics' => 0, - 'recordStats' => 0, - 'repl' => 0, - ])->toArray()[0]; - $uptime = $serverStatus['uptime'] ?? null; - } catch (Exception $e) { - } - - try { - $collStats = $this->database->command(['collStats' => $this->collection->getCollectionName()])->toArray()[0]; - $memoryUsage = $collStats['size'] ?? null; - } catch (Exception $e) { - } - - return [ - Cache::STATS_HITS => null, - Cache::STATS_MISSES => null, - Cache::STATS_UPTIME => $uptime, - Cache::STATS_MEMORY_USAGE => $memoryUsage, - Cache::STATS_MEMORY_AVAILABLE => null, - ]; - } - - /** - * Check if the document is expired. - */ - private function isExpired(BSONDocument $document) : bool - { - return isset($document[MongoDBCache::EXPIRATION_FIELD]) && - $document[MongoDBCache::EXPIRATION_FIELD] instanceof UTCDateTime && - $document[MongoDBCache::EXPIRATION_FIELD]->toDateTime() < new DateTime(); - } - - private function createExpirationIndex() : void - { - if ($this->expirationIndexCreated) { - return; - } - - $this->collection->createIndex([MongoDBCache::EXPIRATION_FIELD => 1], ['background' => true, 'expireAfterSeconds' => 0]); - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php deleted file mode 100644 index 4b48520..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php +++ /dev/null @@ -1,281 +0,0 @@ -umask = $umask; - - if (! $this->createPathIfNeeded($directory)) { - throw new InvalidArgumentException(sprintf( - 'The directory "%s" does not exist and could not be created.', - $directory - )); - } - - if (! is_writable($directory)) { - throw new InvalidArgumentException(sprintf( - 'The directory "%s" is not writable.', - $directory - )); - } - - // YES, this needs to be *after* createPathIfNeeded() - $this->directory = realpath($directory); - $this->extension = (string) $extension; - - $this->directoryStringLength = strlen($this->directory); - $this->extensionStringLength = strlen($this->extension); - $this->isRunningOnWindows = defined('PHP_WINDOWS_VERSION_BUILD'); - } - - /** - * Gets the cache directory. - * - * @return string - */ - public function getDirectory() - { - return $this->directory; - } - - /** - * Gets the cache file extension. - * - * @return string - */ - public function getExtension() - { - return $this->extension; - } - - /** - * @param string $id - * - * @return string - */ - protected function getFilename($id) - { - $hash = hash('sha256', $id); - - // This ensures that the filename is unique and that there are no invalid chars in it. - if ($id === '' - || ((strlen($id) * 2 + $this->extensionStringLength) > 255) - || ($this->isRunningOnWindows && ($this->directoryStringLength + 4 + strlen($id) * 2 + $this->extensionStringLength) > 258) - ) { - // Most filesystems have a limit of 255 chars for each path component. On Windows the the whole path is limited - // to 260 chars (including terminating null char). Using long UNC ("\\?\" prefix) does not work with the PHP API. - // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259. - // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents - // collisions between the hash and bin2hex. - $filename = '_' . $hash; - } else { - $filename = bin2hex($id); - } - - return $this->directory - . DIRECTORY_SEPARATOR - . substr($hash, 0, 2) - . DIRECTORY_SEPARATOR - . $filename - . $this->extension; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - $filename = $this->getFilename($id); - - return @unlink($filename) || ! file_exists($filename); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - foreach ($this->getIterator() as $name => $file) { - if ($file->isDir()) { - // Remove the intermediate directories which have been created to balance the tree. It only takes effect - // if the directory is empty. If several caches share the same directory but with different file extensions, - // the other ones are not removed. - @rmdir($name); - } elseif ($this->isFilenameEndingWithExtension($name)) { - // If an extension is set, only remove files which end with the given extension. - // If no extension is set, we have no other choice than removing everything. - @unlink($name); - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $usage = 0; - foreach ($this->getIterator() as $name => $file) { - if ($file->isDir() || ! $this->isFilenameEndingWithExtension($name)) { - continue; - } - - $usage += $file->getSize(); - } - - $free = disk_free_space($this->directory); - - return [ - Cache::STATS_HITS => null, - Cache::STATS_MISSES => null, - Cache::STATS_UPTIME => null, - Cache::STATS_MEMORY_USAGE => $usage, - Cache::STATS_MEMORY_AVAILABLE => $free, - ]; - } - - /** - * Create path if needed. - * - * @return bool TRUE on success or if path already exists, FALSE if path cannot be created. - */ - private function createPathIfNeeded(string $path) : bool - { - if (! is_dir($path)) { - if (@mkdir($path, 0777 & (~$this->umask), true) === false && ! is_dir($path)) { - return false; - } - } - - return true; - } - - /** - * Writes a string content to file in an atomic way. - * - * @param string $filename Path to the file where to write the data. - * @param string $content The content to write - * - * @return bool TRUE on success, FALSE if path cannot be created, if path is not writable or an any other error. - */ - protected function writeFile(string $filename, string $content) : bool - { - $filepath = pathinfo($filename, PATHINFO_DIRNAME); - - if (! $this->createPathIfNeeded($filepath)) { - return false; - } - - if (! is_writable($filepath)) { - return false; - } - - $tmpFile = tempnam($filepath, 'swap'); - @chmod($tmpFile, 0666 & (~$this->umask)); - - if (file_put_contents($tmpFile, $content) !== false) { - @chmod($tmpFile, 0666 & (~$this->umask)); - if (@rename($tmpFile, $filename)) { - return true; - } - - @unlink($tmpFile); - } - - return false; - } - - private function getIterator() : Iterator - { - return new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($this->directory, FilesystemIterator::SKIP_DOTS), - RecursiveIteratorIterator::CHILD_FIRST - ); - } - - /** - * @param string $name The filename - */ - private function isFilenameEndingWithExtension(string $name) : bool - { - return $this->extension === '' - || strrpos($name, $this->extension) === (strlen($name) - $this->extensionStringLength); - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php deleted file mode 100644 index 8f34c9c..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php +++ /dev/null @@ -1,102 +0,0 @@ -getFilename($id); - - if (! is_file($filename)) { - return false; - } - - $resource = fopen($filename, 'r'); - $line = fgets($resource); - - if ($line !== false) { - $lifetime = (int) $line; - } - - if ($lifetime !== 0 && $lifetime < time()) { - fclose($resource); - - return false; - } - - while (($line = fgets($resource)) !== false) { - $data .= $line; - } - - fclose($resource); - - return unserialize($data); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $lifetime = -1; - $filename = $this->getFilename($id); - - if (! is_file($filename)) { - return false; - } - - $resource = fopen($filename, 'r'); - $line = fgets($resource); - - if ($line !== false) { - $lifetime = (int) $line; - } - - fclose($resource); - - return $lifetime === 0 || $lifetime > time(); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 0) { - $lifeTime = time() + $lifeTime; - } - - $data = serialize($data); - $filename = $this->getFilename($id); - - return $this->writeFile($filename, $lifeTime . PHP_EOL . $data); - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php deleted file mode 100644 index ee7ce98..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php +++ /dev/null @@ -1,18 +0,0 @@ -collection = $collection; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $document = $this->collection->findOne(['_id' => $id], [MongoDBCache::DATA_FIELD, MongoDBCache::EXPIRATION_FIELD]); - - if ($document === null) { - return false; - } - - if ($this->isExpired($document)) { - $this->createExpirationIndex(); - $this->doDelete($id); - - return false; - } - - return unserialize($document[MongoDBCache::DATA_FIELD]->bin); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $document = $this->collection->findOne(['_id' => $id], [MongoDBCache::EXPIRATION_FIELD]); - - if ($document === null) { - return false; - } - - if ($this->isExpired($document)) { - $this->createExpirationIndex(); - $this->doDelete($id); - - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - try { - $result = $this->collection->update( - ['_id' => $id], - [ - '$set' => [ - MongoDBCache::EXPIRATION_FIELD => ($lifeTime > 0 ? new MongoDate(time() + $lifeTime) : null), - MongoDBCache::DATA_FIELD => new MongoBinData(serialize($data), MongoBinData::BYTE_ARRAY), - ], - ], - ['upsert' => true, 'multiple' => false] - ); - } catch (MongoCursorException $e) { - return false; - } - - return ($result['ok'] ?? 1) == 1; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - $result = $this->collection->remove(['_id' => $id]); - - return ($result['ok'] ?? 1) == 1; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - // Use remove() in lieu of drop() to maintain any collection indexes - $result = $this->collection->remove(); - - return ($result['ok'] ?? 1) == 1; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $serverStatus = $this->collection->db->command([ - 'serverStatus' => 1, - 'locks' => 0, - 'metrics' => 0, - 'recordStats' => 0, - 'repl' => 0, - ]); - - $collStats = $this->collection->db->command(['collStats' => 1]); - - return [ - Cache::STATS_HITS => null, - Cache::STATS_MISSES => null, - Cache::STATS_UPTIME => $serverStatus['uptime'] ?? null, - Cache::STATS_MEMORY_USAGE => $collStats['size'] ?? null, - Cache::STATS_MEMORY_AVAILABLE => null, - ]; - } - - /** - * Check if the document is expired. - * - * @param array $document - */ - private function isExpired(array $document) : bool - { - return isset($document[MongoDBCache::EXPIRATION_FIELD]) && - $document[MongoDBCache::EXPIRATION_FIELD] instanceof MongoDate && - $document[MongoDBCache::EXPIRATION_FIELD]->sec < time(); - } - - private function createExpirationIndex() : void - { - if ($this->expirationIndexCreated) { - return; - } - - $this->expirationIndexCreated = true; - $this->collection->createIndex([MongoDBCache::EXPIRATION_FIELD => 1], ['background' => true, 'expireAfterSeconds' => 0]); - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php deleted file mode 100644 index 42bbd2c..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php +++ /dev/null @@ -1,104 +0,0 @@ -memcache = $memcache; - } - - /** - * Gets the memcache instance used by the cache. - * - * @return Memcache|null - */ - public function getMemcache() - { - return $this->memcache; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->memcache->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $flags = null; - $this->memcache->get($id, $flags); - - //if memcache has changed the value of "flags", it means the value exists - return $flags !== null; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 30 * 24 * 3600) { - $lifeTime = time() + $lifeTime; - } - - return $this->memcache->set($id, $data, 0, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - // Memcache::delete() returns false if entry does not exist - return $this->memcache->delete($id) || ! $this->doContains($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->memcache->flush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $stats = $this->memcache->getStats(); - - return [ - Cache::STATS_HITS => $stats['get_hits'], - Cache::STATS_MISSES => $stats['get_misses'], - Cache::STATS_UPTIME => $stats['uptime'], - Cache::STATS_MEMORY_USAGE => $stats['bytes'], - Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php deleted file mode 100644 index da966ae..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php +++ /dev/null @@ -1,170 +0,0 @@ -memcached = $memcached; - } - - /** - * Gets the memcached instance used by the cache. - * - * @return Memcached|null - */ - public function getMemcached() - { - return $this->memcached; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->memcached->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doFetchMultiple(array $keys) - { - return $this->memcached->getMulti($keys) ?: []; - } - - /** - * {@inheritdoc} - */ - protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) - { - foreach (array_keys($keysAndValues) as $id) { - $this->validateCacheId($id); - } - - if ($lifetime > 30 * 24 * 3600) { - $lifetime = time() + $lifetime; - } - - return $this->memcached->setMulti($keysAndValues, $lifetime); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $this->memcached->get($id); - - return $this->memcached->getResultCode() === Memcached::RES_SUCCESS; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $this->validateCacheId($id); - - if ($lifeTime > 30 * 24 * 3600) { - $lifeTime = time() + $lifeTime; - } - - return $this->memcached->set($id, $data, (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDeleteMultiple(array $keys) - { - return $this->memcached->deleteMulti($keys) - || $this->memcached->getResultCode() === Memcached::RES_NOTFOUND; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->memcached->delete($id) - || $this->memcached->getResultCode() === Memcached::RES_NOTFOUND; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->memcached->flush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $stats = $this->memcached->getStats(); - $servers = $this->memcached->getServerList(); - $key = $servers[0]['host'] . ':' . $servers[0]['port']; - $stats = $stats[$key]; - - return [ - Cache::STATS_HITS => $stats['get_hits'], - Cache::STATS_MISSES => $stats['get_misses'], - Cache::STATS_UPTIME => $stats['uptime'], - Cache::STATS_MEMORY_USAGE => $stats['bytes'], - Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], - ]; - } - - /** - * Validate the cache id - * - * @see https://github.com/memcached/memcached/blob/1.5.12/doc/protocol.txt#L41-L49 - * - * @param string $id - * - * @return void - * - * @throws InvalidCacheId - */ - private function validateCacheId($id) - { - if (strlen($id) > self::CACHE_ID_MAX_LENGTH) { - throw InvalidCacheId::exceedsMaxLength($id, self::CACHE_ID_MAX_LENGTH); - } - - if (strpos($id, ' ') !== false) { - throw InvalidCacheId::containsUnauthorizedCharacter($id, ' '); - } - - if (preg_match('/[\t\r\n]/', $id) === 1) { - throw InvalidCacheId::containsControlCharacter($id); - } - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php deleted file mode 100644 index 861e4dd..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php +++ /dev/null @@ -1,112 +0,0 @@ -provider = new LegacyMongoDBCache($collection); - } elseif ($collection instanceof Collection) { - $this->provider = new ExtMongoDBCache($collection); - } else { - throw new InvalidArgumentException('Invalid collection given - expected a MongoCollection or MongoDB\Collection instance'); - } - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->provider->doFetch($id); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return $this->provider->doContains($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - return $this->provider->doSave($id, $data, $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->provider->doDelete($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->provider->doFlush(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - return $this->provider->doGetStats(); - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php deleted file mode 100644 index d099d47..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php +++ /dev/null @@ -1,22 +0,0 @@ - infinite lifeTime). - * - * @return bool TRUE if the operation was successful, FALSE if it wasn't. - */ - public function saveMultiple(array $keysAndValues, $lifetime = 0); -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php deleted file mode 100644 index c061999..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php +++ /dev/null @@ -1,118 +0,0 @@ -includeFileForId($id); - - if ($value === null) { - return false; - } - - if ($value['lifetime'] !== 0 && $value['lifetime'] < time()) { - return false; - } - - return $value['data']; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $value = $this->includeFileForId($id); - - if ($value === null) { - return false; - } - - return $value['lifetime'] === 0 || $value['lifetime'] > time(); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 0) { - $lifeTime = time() + $lifeTime; - } - - $filename = $this->getFilename($id); - - $value = [ - 'lifetime' => $lifeTime, - 'data' => $data, - ]; - - if (is_object($data) && method_exists($data, '__set_state')) { - $value = var_export($value, true); - $code = sprintf('writeFile($filename, $code); - } - - /** - * @return array|null - */ - private function includeFileForId(string $id) : ?array - { - $fileName = $this->getFilename($id); - - // note: error suppression is still faster than `file_exists`, `is_file` and `is_readable` - set_error_handler(self::$emptyErrorHandler); - - $value = include $fileName; - - restore_error_handler(); - - if (! isset($value['lifetime'])) { - return null; - } - - return $value; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php deleted file mode 100644 index 6430d52..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php +++ /dev/null @@ -1,143 +0,0 @@ -client = $client; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $result = $this->client->get($id); - if ($result === null) { - return false; - } - - return unserialize($result); - } - - /** - * {@inheritdoc} - */ - protected function doFetchMultiple(array $keys) - { - $fetchedItems = call_user_func_array([$this->client, 'mget'], $keys); - - return array_map('unserialize', array_filter(array_combine($keys, $fetchedItems))); - } - - /** - * {@inheritdoc} - */ - protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) - { - if ($lifetime) { - $success = true; - - // Keys have lifetime, use SETEX for each of them - foreach ($keysAndValues as $key => $value) { - $response = (string) $this->client->setex($key, $lifetime, serialize($value)); - - if ($response == 'OK') { - continue; - } - - $success = false; - } - - return $success; - } - - // No lifetime, use MSET - $response = $this->client->mset(array_map(static function ($value) { - return serialize($value); - }, $keysAndValues)); - - return (string) $response == 'OK'; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return (bool) $this->client->exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $data = serialize($data); - if ($lifeTime > 0) { - $response = $this->client->setex($id, $lifeTime, $data); - } else { - $response = $this->client->set($id, $data); - } - - return $response === true || $response == 'OK'; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->client->del($id) >= 0; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteMultiple(array $keys) - { - return $this->client->del($keys) >= 0; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $response = $this->client->flushdb(); - - return $response === true || $response == 'OK'; - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $info = $this->client->info(); - - return [ - Cache::STATS_HITS => $info['Stats']['keyspace_hits'], - Cache::STATS_MISSES => $info['Stats']['keyspace_misses'], - Cache::STATS_UPTIME => $info['Server']['uptime_in_seconds'], - Cache::STATS_MEMORY_USAGE => $info['Memory']['used_memory'], - Cache::STATS_MEMORY_AVAILABLE => false, - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php deleted file mode 100644 index 3245705..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php +++ /dev/null @@ -1,181 +0,0 @@ -setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue()); - $this->redis = $redis; - } - - /** - * Gets the redis instance used by the cache. - * - * @return Redis|null - */ - public function getRedis() - { - return $this->redis; - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - return $this->redis->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doFetchMultiple(array $keys) - { - $fetchedItems = array_combine($keys, $this->redis->mget($keys)); - - // Redis mget returns false for keys that do not exist. So we need to filter those out unless it's the real data. - $keysToFilter = array_keys(array_filter($fetchedItems, static function ($item) : bool { - return $item === false; - })); - - if ($keysToFilter) { - $multi = $this->redis->multi(Redis::PIPELINE); - foreach ($keysToFilter as $key) { - $multi->exists($key); - } - $existItems = array_filter($multi->exec()); - $missedItemKeys = array_diff_key($keysToFilter, $existItems); - $fetchedItems = array_diff_key($fetchedItems, array_fill_keys($missedItemKeys, true)); - } - - return $fetchedItems; - } - - /** - * {@inheritdoc} - */ - protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) - { - if ($lifetime) { - // Keys have lifetime, use SETEX for each of them - $multi = $this->redis->multi(Redis::PIPELINE); - foreach ($keysAndValues as $key => $value) { - $multi->setex($key, $lifetime, $value); - } - $succeeded = array_filter($multi->exec()); - - return count($succeeded) == count($keysAndValues); - } - - // No lifetime, use MSET - return (bool) $this->redis->mset($keysAndValues); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - $exists = $this->redis->exists($id); - - if (is_bool($exists)) { - return $exists; - } - - return $exists > 0; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - if ($lifeTime > 0) { - return $this->redis->setex($id, $lifeTime, $data); - } - - return $this->redis->set($id, $data); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return $this->redis->del($id) >= 0; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteMultiple(array $keys) - { - return $this->redis->del($keys) >= 0; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->redis->flushDB(); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $info = $this->redis->info(); - - return [ - Cache::STATS_HITS => $info['keyspace_hits'], - Cache::STATS_MISSES => $info['keyspace_misses'], - Cache::STATS_UPTIME => $info['uptime_in_seconds'], - Cache::STATS_MEMORY_USAGE => $info['used_memory'], - Cache::STATS_MEMORY_AVAILABLE => false, - ]; - } - - /** - * Returns the serializer constant to use. If Redis is compiled with - * igbinary support, that is used. Otherwise the default PHP serializer is - * used. - * - * @return int One of the Redis::SERIALIZER_* constants - */ - protected function getSerializerValue() - { - if (defined('Redis::SERIALIZER_IGBINARY') && extension_loaded('igbinary')) { - return Redis::SERIALIZER_IGBINARY; - } - - return Redis::SERIALIZER_PHP; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php deleted file mode 100644 index 56deb07..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php +++ /dev/null @@ -1,206 +0,0 @@ -sqlite = $sqlite; - $this->table = (string) $table; - - $this->ensureTableExists(); - } - - private function ensureTableExists() : void - { - $this->sqlite->exec( - sprintf( - 'CREATE TABLE IF NOT EXISTS %s(%s TEXT PRIMARY KEY NOT NULL, %s BLOB, %s INTEGER)', - $this->table, - static::ID_FIELD, - static::DATA_FIELD, - static::EXPIRATION_FIELD - ) - ); - } - - /** - * {@inheritdoc} - */ - protected function doFetch($id) - { - $item = $this->findById($id); - - if (! $item) { - return false; - } - - return unserialize($item[self::DATA_FIELD]); - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return $this->findById($id, false) !== null; - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $statement = $this->sqlite->prepare(sprintf( - 'INSERT OR REPLACE INTO %s (%s) VALUES (:id, :data, :expire)', - $this->table, - implode(',', $this->getFields()) - )); - - $statement->bindValue(':id', $id); - $statement->bindValue(':data', serialize($data), SQLITE3_BLOB); - $statement->bindValue(':expire', $lifeTime > 0 ? time() + $lifeTime : null); - - return $statement->execute() instanceof SQLite3Result; - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - [$idField] = $this->getFields(); - - $statement = $this->sqlite->prepare(sprintf( - 'DELETE FROM %s WHERE %s = :id', - $this->table, - $idField - )); - - $statement->bindValue(':id', $id); - - return $statement->execute() instanceof SQLite3Result; - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - return $this->sqlite->exec(sprintf('DELETE FROM %s', $this->table)); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - // no-op. - } - - /** - * Find a single row by ID. - * - * @param mixed $id - * - * @return array|null - */ - private function findById($id, bool $includeData = true) : ?array - { - [$idField] = $fields = $this->getFields(); - - if (! $includeData) { - $key = array_search(static::DATA_FIELD, $fields); - unset($fields[$key]); - } - - $statement = $this->sqlite->prepare(sprintf( - 'SELECT %s FROM %s WHERE %s = :id LIMIT 1', - implode(',', $fields), - $this->table, - $idField - )); - - $statement->bindValue(':id', $id, SQLITE3_TEXT); - - $item = $statement->execute()->fetchArray(SQLITE3_ASSOC); - - if ($item === false) { - return null; - } - - if ($this->isExpired($item)) { - $this->doDelete($id); - - return null; - } - - return $item; - } - - /** - * Gets an array of the fields in our table. - * - * @return array - */ - private function getFields() : array - { - return [static::ID_FIELD, static::DATA_FIELD, static::EXPIRATION_FIELD]; - } - - /** - * Check if the item is expired. - * - * @param array $item - */ - private function isExpired(array $item) : bool - { - return isset($item[static::EXPIRATION_FIELD]) && - $item[self::EXPIRATION_FIELD] !== null && - $item[self::EXPIRATION_FIELD] < time(); - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php deleted file mode 100644 index 834b5b7..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php +++ /dev/null @@ -1,8 +0,0 @@ - $info['total_hit_count'], - Cache::STATS_MISSES => $info['total_miss_count'], - Cache::STATS_UPTIME => $info['total_cache_uptime'], - Cache::STATS_MEMORY_USAGE => $meminfo['memory_total'], - Cache::STATS_MEMORY_AVAILABLE => $meminfo['memory_free'], - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php deleted file mode 100644 index 9b3a485..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php +++ /dev/null @@ -1,104 +0,0 @@ -doContains($id) ? unserialize(xcache_get($id)) : false; - } - - /** - * {@inheritdoc} - */ - protected function doContains($id) - { - return xcache_isset($id); - } - - /** - * {@inheritdoc} - */ - protected function doSave($id, $data, $lifeTime = 0) - { - return xcache_set($id, serialize($data), (int) $lifeTime); - } - - /** - * {@inheritdoc} - */ - protected function doDelete($id) - { - return xcache_unset($id); - } - - /** - * {@inheritdoc} - */ - protected function doFlush() - { - $this->checkAuthorization(); - - xcache_clear_cache(XC_TYPE_VAR); - - return true; - } - - /** - * Checks that xcache.admin.enable_auth is Off. - * - * @return void - * - * @throws BadMethodCallException When xcache.admin.enable_auth is On. - */ - protected function checkAuthorization() - { - if (ini_get('xcache.admin.enable_auth')) { - throw new BadMethodCallException( - 'To use all features of \Doctrine\Common\Cache\XcacheCache, ' - . 'you must set "xcache.admin.enable_auth" to "Off" in your php.ini.' - ); - } - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - $this->checkAuthorization(); - - $info = xcache_info(XC_TYPE_VAR, 0); - - return [ - Cache::STATS_HITS => $info['hits'], - Cache::STATS_MISSES => $info['misses'], - Cache::STATS_UPTIME => null, - Cache::STATS_MEMORY_USAGE => $info['size'], - Cache::STATS_MEMORY_AVAILABLE => $info['avail'], - ]; - } -} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php deleted file mode 100644 index a6b67ef..0000000 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php +++ /dev/null @@ -1,69 +0,0 @@ -getNamespace(); - if (empty($namespace)) { - return zend_shm_cache_clear(); - } - - return zend_shm_cache_clear($namespace); - } - - /** - * {@inheritdoc} - */ - protected function doGetStats() - { - return null; - } -} diff --git a/vendor/doctrine/collections/.doctrine-project.json b/vendor/doctrine/collections/.doctrine-project.json deleted file mode 100644 index 57d2fef..0000000 --- a/vendor/doctrine/collections/.doctrine-project.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "active": true, - "name": "Collections", - "slug": "collections", - "docsSlug": "doctrine-collections", - "versions": [ - { - "name": "master", - "branchName": "master", - "slug": "latest", - "aliases": [ - "current", - "stable" - ] - } - ] -} diff --git a/vendor/doctrine/collections/CONTRIBUTING.md b/vendor/doctrine/collections/CONTRIBUTING.md deleted file mode 100644 index 83437da..0000000 --- a/vendor/doctrine/collections/CONTRIBUTING.md +++ /dev/null @@ -1,54 +0,0 @@ -# Contribute to Doctrine - -Thank you for contributing to Doctrine! - -Before we can merge your Pull-Request here are some guidelines that you need to follow. -These guidelines exist not to annoy you, but to keep the code base clean, -unified and future proof. - -## We only accept PRs to "master" - -Our branching strategy is "everything to master first", even -bugfixes and we then merge them into the stable branches. You should only -open pull requests against the master branch. Otherwise we cannot accept the PR. - -There is one exception to the rule, when we merged a bug into some stable branches -we do occasionally accept pull requests that merge the same bug fix into earlier -branches. - -## Coding Standard - -We use the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard). - -## Unit-Tests - -Please try to add a test for your pull-request. - -* If you want to contribute new functionality add unit- or functional tests - depending on the scope of the feature. - -You can run the unit-tests by calling ``vendor/bin/phpunit`` from the root of the project. -It will run all the project tests. - -In order to do that, you will need a fresh copy of doctrine/collections, and you -will have to run a composer installation in the project: - -```sh -git clone git@github.com:doctrine/collections.git -cd collections -curl -sS https://getcomposer.org/installer | php -- -./composer.phar install -``` - -## Travis - -We automatically run your pull request through [Travis CI](https://www.travis-ci.org) -against supported PHP versions. If you break the tests, we cannot merge your code, -so please make sure that your code is working before opening up a Pull-Request. - -## Getting merged - -Please allow us time to review your pull requests. We will give our best to review -everything as fast as possible, but cannot always live up to our own expectations. - -Thank you very much again for your contribution! diff --git a/vendor/doctrine/collections/LICENSE b/vendor/doctrine/collections/LICENSE deleted file mode 100644 index 5e781fc..0000000 --- a/vendor/doctrine/collections/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -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/vendor/doctrine/collections/README.md b/vendor/doctrine/collections/README.md deleted file mode 100644 index d089e51..0000000 --- a/vendor/doctrine/collections/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Doctrine Collections - -[![Build Status](https://travis-ci.org/doctrine/collections.svg?branch=master)](https://travis-ci.org/doctrine/collections) -[![Code Coverage](https://codecov.io/gh/doctrine/collections/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/collections/branch/master) - -Collections Abstraction library - -## Changelog - -### v1.6.1 - -This release, combined with the release of [`doctrine/collections` `v1.6.1`](https://github.com/doctrine/collections/releases/tag/v1.6.1), -fixes an issue where parsing annotations was not possible -for classes within `doctrine/collections`. - -Specifically, `v1.6.0` introduced Psalm-specific annotations -such as (for example) `@template` and `@template-implements`, -which were both incorrectly recognized as `@template`. - -`@template` has therefore been removed, and instead we use -the prefixed `@psalm-template`, which is no longer parsed -by `doctrine/collections` `v1.6.1` - -Total issues resolved: **1** - -- [186: Use `@psalm-template` annotation to avoid clashes](https://github.com/doctrine/collections/pull/186) thanks to @muglug - -### v1.6.0 - -This release bumps the minimum required PHP version to 7.1.3. - -Following improvements were introduced: - - * `ArrayCollection#filter()` now allows filtering by key, value or both. - * When using the `ClosureExpressionVisitor` over objects with a defined - accessor and property, the accessor is prioritised. - * Updated testing tools and coding standards, autoloading, which also - led to marginal performance improvements - * Introduced generic type docblock declarations from [psalm](https://github.com/vimeo/psalm), - which should allow users to declare `/** @var Collection */` - in their code, and leverage the type propagation deriving from that. - -Total issues resolved: **16** - -- [127: Use PSR-4](https://github.com/doctrine/collections/pull/127) thanks to @Nyholm -- [129: Remove space in method declaration](https://github.com/doctrine/collections/pull/129) thanks to @bounoable -- [130: Update build to add PHPCS and PHPStan](https://github.com/doctrine/collections/pull/130) thanks to @lcobucci -- [131: ClosureExpressionVisitor > Don't duplicate the accessor when the field already starts with it](https://github.com/doctrine/collections/pull/131) thanks to @ruudk -- [139: Apply Doctrine CS 2.1](https://github.com/doctrine/collections/pull/139) thanks to @Majkl578 -- [142: CS 4.0, version composer.lock, merge stages](https://github.com/doctrine/collections/pull/142) thanks to @Majkl578 -- [144: Update to PHPUnit 7](https://github.com/doctrine/collections/pull/144) thanks to @carusogabriel -- [146: Update changelog for v1.4.0 and v1.5.0](https://github.com/doctrine/collections/pull/146) thanks to @GromNaN -- [154: Update index.rst](https://github.com/doctrine/collections/pull/154) thanks to @chraiet -- [158: Extract Selectable method into own documentation section](https://github.com/doctrine/collections/pull/158) thanks to @SenseException -- [160: Update homepage](https://github.com/doctrine/collections/pull/160) thanks to @Majkl578 -- [165: Allow `ArrayCollection#filter()` to filter by key, value or both](https://github.com/doctrine/collections/issues/165) thanks to @0x13a -- [167: Allow `ArrayCollection#filter()` to filter by key and also value](https://github.com/doctrine/collections/pull/167) thanks to @0x13a -- [175: CI: Test against PHP 7.4snapshot instead of nightly (8.0)](https://github.com/doctrine/collections/pull/175) thanks to @Majkl578 -- [177: Generify collections using Psalm](https://github.com/doctrine/collections/pull/177) thanks to @nschoellhorn -- [178: Updated doctrine/coding-standard to 6.0](https://github.com/doctrine/collections/pull/178) thanks to @patrickjahns - -### v1.5.0 - -* [Require PHP 7.1+](https://github.com/doctrine/collections/pull/105) -* [Drop HHVM support](https://github.com/doctrine/collections/pull/118) - -### v1.4.0 - -* [Require PHP 5.6+](https://github.com/doctrine/collections/pull/105) -* [Add `ArrayCollection::createFrom()`](https://github.com/doctrine/collections/pull/91) -* [Support non-camel-case naming](https://github.com/doctrine/collections/pull/57) -* [Comparison `START_WITH`, `END_WITH`](https://github.com/doctrine/collections/pull/78) -* [Comparison `MEMBER_OF`](https://github.com/doctrine/collections/pull/66) -* [Add Contributing guide](https://github.com/doctrine/collections/pull/103) - -### v1.3.0 - -* [Explicit casting of first and max results in criteria API](https://github.com/doctrine/collections/pull/26) -* [Keep keys when using `ArrayCollection#matching()` with sorting](https://github.com/doctrine/collections/pull/49) -* [Made `AbstractLazyCollection#$initialized` protected for extensibility](https://github.com/doctrine/collections/pull/52) - -### v1.2.0 - -* Add a new ``AbstractLazyCollection`` - -### v1.1.0 - -* Deprecated ``Comparison::IS``, because it's only there for SQL semantics. - These are fixed in the ORM instead. -* Add ``Comparison::CONTAINS`` to perform partial string matches: - - $criteria->andWhere($criteria->expr()->contains('property', 'Foo')); diff --git a/vendor/doctrine/collections/composer.json b/vendor/doctrine/collections/composer.json deleted file mode 100644 index f0b6a4a..0000000 --- a/vendor/doctrine/collections/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "doctrine/collections", - "type": "library", - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "keywords": [ - "php", - "collections", - "array", - "iterators" - ], - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "^7.1.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan-shim": "^0.9.2", - "vimeo/psalm": "^3.8.1" - }, - "autoload": { - "psr-4": { "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\": "tests/Doctrine/Tests" - } - } -} diff --git a/vendor/doctrine/collections/docs/en/derived-collections.rst b/vendor/doctrine/collections/docs/en/derived-collections.rst deleted file mode 100644 index 03d9da5..0000000 --- a/vendor/doctrine/collections/docs/en/derived-collections.rst +++ /dev/null @@ -1,26 +0,0 @@ -Derived Collections -=================== - -You can create custom collection classes by extending the -``Doctrine\Common\Collections\ArrayCollection`` class. If the -``__construct`` semantics are different from the default ``ArrayCollection`` -you can override the ``createFrom`` method: - -.. code-block:: php - final class DerivedArrayCollection extends ArrayCollection - { - /** @var \stdClass */ - private $foo; - - public function __construct(\stdClass $foo, array $elements = []) - { - $this->foo = $foo; - - parent::__construct($elements); - } - - protected function createFrom(array $elements) : self - { - return new static($this->foo, $elements); - } - } diff --git a/vendor/doctrine/collections/docs/en/expression-builder.rst b/vendor/doctrine/collections/docs/en/expression-builder.rst deleted file mode 100644 index ad4055b..0000000 --- a/vendor/doctrine/collections/docs/en/expression-builder.rst +++ /dev/null @@ -1,173 +0,0 @@ -Expression Builder -================== - -The Expression Builder is a convenient fluent interface for -building expressions to be used with the ``Doctrine\Common\Collections\Criteria`` -class: - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $criteria = new Criteria(); - $criteria->where($expressionBuilder->eq('name', 'jwage')); - $criteria->orWhere($expressionBuilder->eq('name', 'romanb')); - - $collection->matching($criteria); - -The ``ExpressionBuilder`` has the following API: - -andX ----- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->andX( - $expressionBuilder->eq('foo', 1), - $expressionBuilder->eq('bar', 1) - ); - - $collection->matching(new Criteria($expression)); - -orX ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->orX( - $expressionBuilder->eq('foo', 1), - $expressionBuilder->eq('bar', 1) - ); - - $collection->matching(new Criteria($expression)); - -eq ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->eq('foo', 1); - - $collection->matching(new Criteria($expression)); - -gt ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->gt('foo', 1); - - $collection->matching(new Criteria($expression)); - -lt ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->lt('foo', 1); - - $collection->matching(new Criteria($expression)); - -gte ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->gte('foo', 1); - - $collection->matching(new Criteria($expression)); - -lte ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->lte('foo', 1); - - $collection->matching(new Criteria($expression)); - -neq ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->neq('foo', 1); - - $collection->matching(new Criteria($expression)); - -isNull ------- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->isNull('foo'); - - $collection->matching(new Criteria($expression)); - -in ---- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->in('foo', ['value1', 'value2']); - - $collection->matching(new Criteria($expression)); - -notIn ------ - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->notIn('foo', ['value1', 'value2']); - - $collection->matching(new Criteria($expression)); - -contains --------- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->contains('foo', 'value1'); - - $collection->matching(new Criteria($expression)); - -memberOf --------- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->memberOf('foo', ['value1', 'value2']); - - $collection->matching(new Criteria($expression)); - -startsWith ----------- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->startsWith('foo', 'hello'); - - $collection->matching(new Criteria($expression)); - -endsWith --------- - -.. code-block:: php - $expressionBuilder = Criteria::expr(); - - $expression = $expressionBuilder->endsWith('foo', 'world'); - - $collection->matching(new Criteria($expression)); diff --git a/vendor/doctrine/collections/docs/en/expressions.rst b/vendor/doctrine/collections/docs/en/expressions.rst deleted file mode 100644 index db943b2..0000000 --- a/vendor/doctrine/collections/docs/en/expressions.rst +++ /dev/null @@ -1,102 +0,0 @@ -Expressions -=========== - -The ``Doctrine\Common\Collections\Expr\Comparison`` class -can be used to create expressions to be used with the -``Doctrine\Common\Collections\Criteria`` class. It has the -following operator constants: - -- ``Comparison::EQ`` -- ``Comparison::NEQ`` -- ``Comparison::LT`` -- ``Comparison::LTE`` -- ``Comparison::GT`` -- ``Comparison::GTE`` -- ``Comparison::IS`` -- ``Comparison::IN`` -- ``Comparison::NIN`` -- ``Comparison::CONTAINS`` -- ``Comparison::MEMBER_OF`` -- ``Comparison::STARTS_WITH`` -- ``Comparison::ENDS_WITH`` - -The ``Doctrine\Common\Collections\Criteria`` class has the following -API to be used with expressions: - -where ------ - -Sets the where expression to evaluate when this Criteria is searched for. - -.. code-block:: php - $expr = new Comparison('key', Comparison::EQ, 'value'); - - $criteria->where($expr); - -andWhere --------- - -Appends the where expression to evaluate when this Criteria is searched for -using an AND with previous expression. - -.. code-block:: php - $expr = new Comparison('key', Comparison::EQ, 'value'); - - $criteria->andWhere($expr); - -orWhere -------- - -Appends the where expression to evaluate when this Criteria is searched for -using an OR with previous expression. - -.. code-block:: php - $expr1 = new Comparison('key', Comparison::EQ, 'value1'); - $expr2 = new Comparison('key', Comparison::EQ, 'value2'); - - $criteria->where($expr1); - $criteria->orWhere($expr2); - -orderBy -------- - -Sets the ordering of the result of this Criteria. - -.. code-block:: php - $criteria->orderBy(['name' => Criteria::ASC]); - -setFirstResult --------------- - -Set the number of first result that this Criteria should return. - -.. code-block:: php - $criteria->setFirstResult(0); - -getFirstResult --------------- - -Gets the current first result option of this Criteria. - -.. code-block:: php - $criteria->setFirstResult(10); - - echo $criteria->getFirstResult(); // 10 - -setMaxResults -------------- - -Sets the max results that this Criteria should return. - -.. code-block:: php - $criteria->setMaxResults(20); - -getMaxResults -------------- - -Gets the current max results option of this Criteria. - -.. code-block:: php - $criteria->setMaxResults(20); - - echo $criteria->getMaxResults(); // 20 diff --git a/vendor/doctrine/collections/docs/en/index.rst b/vendor/doctrine/collections/docs/en/index.rst deleted file mode 100644 index 447f76e..0000000 --- a/vendor/doctrine/collections/docs/en/index.rst +++ /dev/null @@ -1,327 +0,0 @@ -Introduction -============ - -Doctrine Collections is a library that contains classes for working with -arrays of data. Here is an example using the simple -``Doctrine\Common\Collections\ArrayCollection`` class: - -.. code-block:: php - filter(function($count) { - return $count > 1; - }); // [2, 3] - -Collection Methods -================== - -Doctrine Collections provides an interface named ``Doctrine\Common\Collections\Collection`` -that resembles the nature of a regular PHP array. That is, -it is essentially an **ordered map** that can also be used -like a list. - -A Collection has an internal iterator just like a PHP array. In addition, -a Collection can be iterated with external iterators, which is preferable. -To use an external iterator simply use the foreach language construct to -iterate over the collection, which calls ``getIterator()`` internally, or -explicitly retrieve an iterator though ``getIterator()`` which can then be -used to iterate over the collection. You can not rely on the internal iterator -of the collection being at a certain position unless you explicitly positioned it before. - -The methods available on the interface are: - -add ---- - -Adds an element at the end of the collection. - -.. code-block:: php - $collection->add('test'); - -clear ------ - -Clears the collection, removing all elements. - -.. code-block:: php - $collection->clear(); - -contains --------- - -Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection. - -.. code-block:: php - $collection = new Collection(['test']); - - $contains = $collection->contains('test'); // true - -containsKey ------------ - -Checks whether the collection contains an element with the specified key/index. - -.. code-block:: php - $collection = new Collection(['test' => true]); - - $contains = $collection->containsKey('test'); // true - -current -------- - -Gets the element of the collection at the current iterator position. - -.. code-block:: php - $collection = new Collection(['first', 'second', 'third']); - - $current = $collection->current(); // first - -get ---- - -Gets the element at the specified key/index. - -.. code-block:: php - $collection = new Collection([ - 'key' => 'value', - ]); - - $value = $collection->get('key'); // value - -getKeys -------- - -Gets all keys/indices of the collection. - -.. code-block:: php - $collection = new Collection(['a', 'b', 'c']); - - $keys = $collection->getKeys(); // [0, 1, 2] - -getValues ---------- - -Gets all values of the collection. - -.. code-block:: php - $collection = new Collection([ - 'key1' => 'value1', - 'key2' => 'value2', - 'key3' => 'value3', - ]); - - $values = $collection->getValues(); // ['value1', 'value2', 'value3'] - -isEmpty -------- - -Checks whether the collection is empty (contains no elements). - -.. code-block:: php - $collection = new Collection(['a', 'b', 'c']); - - $isEmpty = $collection->isEmpty(); // false - -first ------ - -Sets the internal iterator to the first element in the collection and returns this element. - -.. code-block:: php - $collection = new Collection(['first', 'second', 'third']); - - $first = $collection->first(); // first - -exists ------- - -Tests for the existence of an element that satisfies the given predicate. - -.. code-block:: php - $collection = new Collection(['first', 'second', 'third']); - - $exists = $collection->exists(function($key, $value) { - return $value === 'first'; - }); // true - -filter ------- - -Returns all the elements of this collection that satisfy the predicate. The order of the elements is preserved. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $filteredCollection = $collection->filter(function($count) { - return $count > 1; - }); // [2, 3] - -forAll ------- - -Tests whether the given predicate holds for all elements of this collection. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $forAll = $collection->forAll(function($key, $value) { - return $value > 1; - }); // false - -indexOf -------- - -Gets the index/key of a given element. The comparison of two elements is strict, that means not only the value but also the type must match. For objects this means reference equality. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $indexOf = $collection->indexOf(3); // 2 - -key ---- - -Gets the key/index of the element at the current iterator position. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $collection->next(); - - $key = $collection->key(); // 1 - -last ----- - -Sets the internal iterator to the last element in the collection and returns this element. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $last = $collection->last(); // 3 - -map ---- - -Applies the given function to each element in the collection and returns a new collection with the elements returned by the function. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $mappedCollection = $collection->map(function($value) { - return $value + 1; - }); // [2, 3, 4] - -next ----- - -Moves the internal iterator position to the next element and returns this element. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $next = $collection->next(); // 2 - -partition ---------- - -Partitions this collection in two collections according to a predicate. Keys are preserved in the resulting collections. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $mappedCollection = $collection->partition(function($key, $value) { - return $value > 1 - }); // [[2, 3], [1]] - -remove ------- - -Removes the element at the specified index from the collection. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $collection->remove(0); // [2, 3] - -removeElement -------------- - -Removes the specified element from the collection, if it is found. - -.. code-block:: php - $collection = new ArrayCollection([1, 2, 3]); - - $collection->removeElement(3); // [1, 2] - -set ---- - -Sets an element in the collection at the specified key/index. - -.. code-block:: php - $collection = new ArrayCollection(); - - $collection->set('name', 'jwage'); - -slice ------ - -Extracts a slice of $length elements starting at position $offset from the Collection. If $length is null it returns all elements from $offset to the end of the Collection. Keys have to be preserved by this method. Calling this method will only return the selected slice and NOT change the elements contained in the collection slice is called on. - -.. code-block:: php - $collection = new ArrayCollection([0, 1, 2, 3, 4, 5]); - - $slice = $collection->slice(1, 2); // [1, 2] - -toArray -------- - -Gets a native PHP array representation of the collection. - -.. code-block:: php - $collection = new ArrayCollection([0, 1, 2, 3, 4, 5]); - - $array = $collection->toArray(); // [0, 1, 2, 3, 4, 5] - -Selectable Methods -================== - -Some Doctrine Collections, like ``Doctrine\Common\Collections\ArrayCollection``, -implement an interface named ``Doctrine\Common\Collections\Selectable`` -that offers the usage of a powerful expressions API, where conditions -can be applied to a collection to get a result with matching elements -only. - -matching --------- - -Selects all elements from a selectable that match the expression and -returns a new collection containing these elements. - -.. code-block:: php - use Doctrine\Common\Collections\Criteria; - use Doctrine\Common\Collections\Expr\Comparison; - - $collection = new ArrayCollection([ - [ - 'name' => 'jwage', - ], - [ - 'name' => 'romanb', - ], - ]); - - $expr = new Comparison('name', '=', 'jwage'); - - $criteria = new Criteria(); - - $criteria->where($expr); - - $matched = $collection->matching($criteria); // ['jwage'] - -You can read more about expressions :ref:`here `. diff --git a/vendor/doctrine/collections/docs/en/lazy-collections.rst b/vendor/doctrine/collections/docs/en/lazy-collections.rst deleted file mode 100644 index b9cafb6..0000000 --- a/vendor/doctrine/collections/docs/en/lazy-collections.rst +++ /dev/null @@ -1,26 +0,0 @@ -Lazy Collections -================ - -To create a lazy collection you can extend the -``Doctrine\Common\Collections\AbstractLazyCollection`` class -and define the ``doInitialize`` method. Here is an example where -we lazily query the database for a collection of user records: - -.. code-block:: php - use Doctrine\DBAL\Connection; - - class UsersLazyCollection extends AbstractLazyCollection - { - /** @var Connection */ - private $connection; - - public function __construct(Connection $connection) - { - $this->connection = $connection; - } - - protected function doInitialize() : void - { - $this->collection = $this->connection->fetchAll('SELECT * FROM users'); - } - } diff --git a/vendor/doctrine/collections/docs/en/sidebar.rst b/vendor/doctrine/collections/docs/en/sidebar.rst deleted file mode 100644 index 69279a0..0000000 --- a/vendor/doctrine/collections/docs/en/sidebar.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. toctree:: - :depth: 3 - - index - expressions - expression-builder - derived-collections - lazy-collections diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php deleted file mode 100644 index 28976f1..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php +++ /dev/null @@ -1,369 +0,0 @@ - - */ -abstract class AbstractLazyCollection implements Collection -{ - /** - * The backed collection to use - * - * @psalm-var Collection - * @var Collection - */ - protected $collection; - - /** @var bool */ - protected $initialized = false; - - /** - * {@inheritDoc} - */ - public function count() - { - $this->initialize(); - - return $this->collection->count(); - } - - /** - * {@inheritDoc} - */ - public function add($element) - { - $this->initialize(); - - return $this->collection->add($element); - } - - /** - * {@inheritDoc} - */ - public function clear() - { - $this->initialize(); - $this->collection->clear(); - } - - /** - * {@inheritDoc} - */ - public function contains($element) - { - $this->initialize(); - - return $this->collection->contains($element); - } - - /** - * {@inheritDoc} - */ - public function isEmpty() - { - $this->initialize(); - - return $this->collection->isEmpty(); - } - - /** - * {@inheritDoc} - */ - public function remove($key) - { - $this->initialize(); - - return $this->collection->remove($key); - } - - /** - * {@inheritDoc} - */ - public function removeElement($element) - { - $this->initialize(); - - return $this->collection->removeElement($element); - } - - /** - * {@inheritDoc} - */ - public function containsKey($key) - { - $this->initialize(); - - return $this->collection->containsKey($key); - } - - /** - * {@inheritDoc} - */ - public function get($key) - { - $this->initialize(); - - return $this->collection->get($key); - } - - /** - * {@inheritDoc} - */ - public function getKeys() - { - $this->initialize(); - - return $this->collection->getKeys(); - } - - /** - * {@inheritDoc} - */ - public function getValues() - { - $this->initialize(); - - return $this->collection->getValues(); - } - - /** - * {@inheritDoc} - */ - public function set($key, $value) - { - $this->initialize(); - $this->collection->set($key, $value); - } - - /** - * {@inheritDoc} - */ - public function toArray() - { - $this->initialize(); - - return $this->collection->toArray(); - } - - /** - * {@inheritDoc} - */ - public function first() - { - $this->initialize(); - - return $this->collection->first(); - } - - /** - * {@inheritDoc} - */ - public function last() - { - $this->initialize(); - - return $this->collection->last(); - } - - /** - * {@inheritDoc} - */ - public function key() - { - $this->initialize(); - - return $this->collection->key(); - } - - /** - * {@inheritDoc} - */ - public function current() - { - $this->initialize(); - - return $this->collection->current(); - } - - /** - * {@inheritDoc} - */ - public function next() - { - $this->initialize(); - - return $this->collection->next(); - } - - /** - * {@inheritDoc} - */ - public function exists(Closure $p) - { - $this->initialize(); - - return $this->collection->exists($p); - } - - /** - * {@inheritDoc} - */ - public function filter(Closure $p) - { - $this->initialize(); - - return $this->collection->filter($p); - } - - /** - * {@inheritDoc} - */ - public function forAll(Closure $p) - { - $this->initialize(); - - return $this->collection->forAll($p); - } - - /** - * {@inheritDoc} - */ - public function map(Closure $func) - { - $this->initialize(); - - return $this->collection->map($func); - } - - /** - * {@inheritDoc} - */ - public function partition(Closure $p) - { - $this->initialize(); - - return $this->collection->partition($p); - } - - /** - * {@inheritDoc} - */ - public function indexOf($element) - { - $this->initialize(); - - return $this->collection->indexOf($element); - } - - /** - * {@inheritDoc} - */ - public function slice($offset, $length = null) - { - $this->initialize(); - - return $this->collection->slice($offset, $length); - } - - /** - * {@inheritDoc} - */ - public function getIterator() - { - $this->initialize(); - - return $this->collection->getIterator(); - } - - /** - * {@inheritDoc} - * - * @psalm-param TKey $offset - */ - public function offsetExists($offset) - { - $this->initialize(); - - return $this->collection->offsetExists($offset); - } - - /** - * {@inheritDoc} - * - * @param int|string $offset - * - * @return mixed - * - * @psalm-param TKey $offset - */ - public function offsetGet($offset) - { - $this->initialize(); - - return $this->collection->offsetGet($offset); - } - - /** - * {@inheritDoc} - * - * @param mixed $value - * - * @psalm-param TKey $offset - */ - public function offsetSet($offset, $value) - { - $this->initialize(); - $this->collection->offsetSet($offset, $value); - } - - /** - * {@inheritDoc} - * - * @psalm-param TKey $offset - */ - public function offsetUnset($offset) - { - $this->initialize(); - $this->collection->offsetUnset($offset); - } - - /** - * Is the lazy collection already initialized? - * - * @return bool - */ - public function isInitialized() - { - return $this->initialized; - } - - /** - * Initialize the collection - * - * @return void - */ - protected function initialize() - { - if ($this->initialized) { - return; - } - - $this->doInitialize(); - $this->initialized = true; - } - - /** - * Do the initialization logic - * - * @return void - */ - abstract protected function doInitialize(); -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php deleted file mode 100644 index e65a8fa..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php +++ /dev/null @@ -1,441 +0,0 @@ - - * @template-implements Selectable - */ -class ArrayCollection implements Collection, Selectable -{ - /** - * An array containing the entries of this collection. - * - * @psalm-var array - * @var array - */ - private $elements; - - /** - * Initializes a new ArrayCollection. - * - * @param array $elements - * - * @psalm-param array $elements - */ - public function __construct(array $elements = []) - { - $this->elements = $elements; - } - - /** - * {@inheritDoc} - */ - public function toArray() - { - return $this->elements; - } - - /** - * {@inheritDoc} - */ - public function first() - { - return reset($this->elements); - } - - /** - * Creates a new instance from the specified elements. - * - * This method is provided for derived classes to specify how a new - * instance should be created when constructor semantics have changed. - * - * @param array $elements Elements. - * - * @return static - * - * @psalm-param array $elements - * @psalm-return static - */ - protected function createFrom(array $elements) - { - return new static($elements); - } - - /** - * {@inheritDoc} - */ - public function last() - { - return end($this->elements); - } - - /** - * {@inheritDoc} - */ - public function key() - { - return key($this->elements); - } - - /** - * {@inheritDoc} - */ - public function next() - { - return next($this->elements); - } - - /** - * {@inheritDoc} - */ - public function current() - { - return current($this->elements); - } - - /** - * {@inheritDoc} - */ - public function remove($key) - { - if (! isset($this->elements[$key]) && ! array_key_exists($key, $this->elements)) { - return null; - } - - $removed = $this->elements[$key]; - unset($this->elements[$key]); - - return $removed; - } - - /** - * {@inheritDoc} - */ - public function removeElement($element) - { - $key = array_search($element, $this->elements, true); - - if ($key === false) { - return false; - } - - unset($this->elements[$key]); - - return true; - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - * - * @psalm-param TKey $offset - */ - public function offsetExists($offset) - { - return $this->containsKey($offset); - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - * - * @psalm-param TKey $offset - */ - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - */ - public function offsetSet($offset, $value) - { - if (! isset($offset)) { - $this->add($value); - - return; - } - - $this->set($offset, $value); - } - - /** - * Required by interface ArrayAccess. - * - * {@inheritDoc} - * - * @psalm-param TKey $offset - */ - public function offsetUnset($offset) - { - $this->remove($offset); - } - - /** - * {@inheritDoc} - */ - public function containsKey($key) - { - return isset($this->elements[$key]) || array_key_exists($key, $this->elements); - } - - /** - * {@inheritDoc} - */ - public function contains($element) - { - return in_array($element, $this->elements, true); - } - - /** - * {@inheritDoc} - */ - public function exists(Closure $p) - { - foreach ($this->elements as $key => $element) { - if ($p($key, $element)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - public function indexOf($element) - { - return array_search($element, $this->elements, true); - } - - /** - * {@inheritDoc} - */ - public function get($key) - { - return $this->elements[$key] ?? null; - } - - /** - * {@inheritDoc} - */ - public function getKeys() - { - return array_keys($this->elements); - } - - /** - * {@inheritDoc} - */ - public function getValues() - { - return array_values($this->elements); - } - - /** - * {@inheritDoc} - */ - public function count() - { - return count($this->elements); - } - - /** - * {@inheritDoc} - */ - public function set($key, $value) - { - $this->elements[$key] = $value; - } - - /** - * {@inheritDoc} - * - * @psalm-suppress InvalidPropertyAssignmentValue - * - * This breaks assumptions about the template type, but it would - * be a backwards-incompatible change to remove this method - */ - public function add($element) - { - $this->elements[] = $element; - - return true; - } - - /** - * {@inheritDoc} - */ - public function isEmpty() - { - return empty($this->elements); - } - - /** - * Required by interface IteratorAggregate. - * - * {@inheritDoc} - */ - public function getIterator() - { - return new ArrayIterator($this->elements); - } - - /** - * {@inheritDoc} - * - * @return static - * - * @psalm-template U - * @psalm-param Closure(T=):U $func - * @psalm-return static - */ - public function map(Closure $func) - { - return $this->createFrom(array_map($func, $this->elements)); - } - - /** - * {@inheritDoc} - * - * @return static - * - * @psalm-return static - */ - public function filter(Closure $p) - { - return $this->createFrom(array_filter($this->elements, $p, ARRAY_FILTER_USE_BOTH)); - } - - /** - * {@inheritDoc} - */ - public function forAll(Closure $p) - { - foreach ($this->elements as $key => $element) { - if (! $p($key, $element)) { - return false; - } - } - - return true; - } - - /** - * {@inheritDoc} - */ - public function partition(Closure $p) - { - $matches = $noMatches = []; - - foreach ($this->elements as $key => $element) { - if ($p($key, $element)) { - $matches[$key] = $element; - } else { - $noMatches[$key] = $element; - } - } - - return [$this->createFrom($matches), $this->createFrom($noMatches)]; - } - - /** - * Returns a string representation of this object. - * - * @return string - */ - public function __toString() - { - return self::class . '@' . spl_object_hash($this); - } - - /** - * {@inheritDoc} - */ - public function clear() - { - $this->elements = []; - } - - /** - * {@inheritDoc} - */ - public function slice($offset, $length = null) - { - return array_slice($this->elements, $offset, $length, true); - } - - /** - * {@inheritDoc} - */ - public function matching(Criteria $criteria) - { - $expr = $criteria->getWhereExpression(); - $filtered = $this->elements; - - if ($expr) { - $visitor = new ClosureExpressionVisitor(); - $filter = $visitor->dispatch($expr); - $filtered = array_filter($filtered, $filter); - } - - $orderings = $criteria->getOrderings(); - - if ($orderings) { - $next = null; - foreach (array_reverse($orderings) as $field => $ordering) { - $next = ClosureExpressionVisitor::sortByField($field, $ordering === Criteria::DESC ? -1 : 1, $next); - } - - uasort($filtered, $next); - } - - $offset = $criteria->getFirstResult(); - $length = $criteria->getMaxResults(); - - if ($offset || $length) { - $filtered = array_slice($filtered, (int) $offset, $length); - } - - return $this->createFrom($filtered); - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php deleted file mode 100644 index ab1e3f8..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php +++ /dev/null @@ -1,297 +0,0 @@ -ordered map that can also be used - * like a list. - * - * A Collection has an internal iterator just like a PHP array. In addition, - * a Collection can be iterated with external iterators, which is preferable. - * To use an external iterator simply use the foreach language construct to - * iterate over the collection (which calls {@link getIterator()} internally) or - * explicitly retrieve an iterator though {@link getIterator()} which can then be - * used to iterate over the collection. - * You can not rely on the internal iterator of the collection being at a certain - * position unless you explicitly positioned it before. Prefer iteration with - * external iterators. - * - * @phpstan-template TKey - * @psalm-template TKey of array-key - * @psalm-template T - * @template-extends IteratorAggregate - * @template-extends ArrayAccess - */ -interface Collection extends Countable, IteratorAggregate, ArrayAccess -{ - /** - * Adds an element at the end of the collection. - * - * @param mixed $element The element to add. - * - * @return true Always TRUE. - * - * @psalm-param T $element - */ - public function add($element); - - /** - * Clears the collection, removing all elements. - * - * @return void - */ - public function clear(); - - /** - * Checks whether an element is contained in the collection. - * This is an O(n) operation, where n is the size of the collection. - * - * @param mixed $element The element to search for. - * - * @return bool TRUE if the collection contains the element, FALSE otherwise. - * - * @psalm-param T $element - */ - public function contains($element); - - /** - * Checks whether the collection is empty (contains no elements). - * - * @return bool TRUE if the collection is empty, FALSE otherwise. - */ - public function isEmpty(); - - /** - * Removes the element at the specified index from the collection. - * - * @param string|int $key The key/index of the element to remove. - * - * @return mixed The removed element or NULL, if the collection did not contain the element. - * - * @psalm-param TKey $key - * @psalm-return T|null - */ - public function remove($key); - - /** - * Removes the specified element from the collection, if it is found. - * - * @param mixed $element The element to remove. - * - * @return bool TRUE if this collection contained the specified element, FALSE otherwise. - * - * @psalm-param T $element - */ - public function removeElement($element); - - /** - * Checks whether the collection contains an element with the specified key/index. - * - * @param string|int $key The key/index to check for. - * - * @return bool TRUE if the collection contains an element with the specified key/index, - * FALSE otherwise. - * - * @psalm-param TKey $key - */ - public function containsKey($key); - - /** - * Gets the element at the specified key/index. - * - * @param string|int $key The key/index of the element to retrieve. - * - * @return mixed - * - * @psalm-param TKey $key - * @psalm-return T|null - */ - public function get($key); - - /** - * Gets all keys/indices of the collection. - * - * @return int[]|string[] The keys/indices of the collection, in the order of the corresponding - * elements in the collection. - * - * @psalm-return TKey[] - */ - public function getKeys(); - - /** - * Gets all values of the collection. - * - * @return array The values of all elements in the collection, in the order they - * appear in the collection. - * - * @psalm-return T[] - */ - public function getValues(); - - /** - * Sets an element in the collection at the specified key/index. - * - * @param string|int $key The key/index of the element to set. - * @param mixed $value The element to set. - * - * @return void - * - * @psalm-param TKey $key - * @psalm-param T $value - */ - public function set($key, $value); - - /** - * Gets a native PHP array representation of the collection. - * - * @return array - * - * @psalm-return array - */ - public function toArray(); - - /** - * Sets the internal iterator to the first element in the collection and returns this element. - * - * @return mixed - * - * @psalm-return T|false - */ - public function first(); - - /** - * Sets the internal iterator to the last element in the collection and returns this element. - * - * @return mixed - * - * @psalm-return T|false - */ - public function last(); - - /** - * Gets the key/index of the element at the current iterator position. - * - * @return int|string|null - * - * @psalm-return TKey|null - */ - public function key(); - - /** - * Gets the element of the collection at the current iterator position. - * - * @return mixed - * - * @psalm-return T|false - */ - public function current(); - - /** - * Moves the internal iterator position to the next element and returns this element. - * - * @return mixed - * - * @psalm-return T|false - */ - public function next(); - - /** - * Tests for the existence of an element that satisfies the given predicate. - * - * @param Closure $p The predicate. - * - * @return bool TRUE if the predicate is TRUE for at least one element, FALSE otherwise. - * - * @psalm-param Closure(TKey=, T=):bool $p - */ - public function exists(Closure $p); - - /** - * Returns all the elements of this collection that satisfy the predicate p. - * The order of the elements is preserved. - * - * @param Closure $p The predicate used for filtering. - * - * @return Collection A collection with the results of the filter operation. - * - * @psalm-param Closure(T=):bool $p - * @psalm-return Collection - */ - public function filter(Closure $p); - - /** - * Tests whether the given predicate p holds for all elements of this collection. - * - * @param Closure $p The predicate. - * - * @return bool TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. - * - * @psalm-param Closure(TKey=, T=):bool $p - */ - public function forAll(Closure $p); - - /** - * Applies the given function to each element in the collection and returns - * a new collection with the elements returned by the function. - * - * @return Collection - * - * @psalm-template U - * @psalm-param Closure(T=):U $func - * @psalm-return Collection - */ - public function map(Closure $func); - - /** - * Partitions this collection in two collections according to a predicate. - * Keys are preserved in the resulting collections. - * - * @param Closure $p The predicate on which to partition. - * - * @return Collection[] An array with two elements. The first element contains the collection - * of elements where the predicate returned TRUE, the second element - * contains the collection of elements where the predicate returned FALSE. - * - * @psalm-param Closure(TKey=, T=):bool $p - * @psalm-return array{0: Collection, 1: Collection} - */ - public function partition(Closure $p); - - /** - * Gets the index/key of a given element. The comparison of two elements is strict, - * that means not only the value but also the type must match. - * For objects this means reference equality. - * - * @param mixed $element The element to search for. - * - * @return int|string|bool The key/index of the element or FALSE if the element was not found. - * - * @psalm-param T $element - * @psalm-return TKey|false - */ - public function indexOf($element); - - /** - * Extracts a slice of $length elements starting at position $offset from the Collection. - * - * If $length is null it returns all elements from $offset to the end of the Collection. - * Keys have to be preserved by this method. Calling this method will only return the - * selected slice and NOT change the elements contained in the collection slice is called on. - * - * @param int $offset The offset to start from. - * @param int|null $length The maximum number of elements to return, or null for no limit. - * - * @return array - * - * @psalm-return array - */ - public function slice($offset, $length = null); -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php deleted file mode 100644 index 6ddaf5e..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php +++ /dev/null @@ -1,222 +0,0 @@ -expression = $expression; - - $this->setFirstResult($firstResult); - $this->setMaxResults($maxResults); - - if ($orderings === null) { - return; - } - - $this->orderBy($orderings); - } - - /** - * Sets the where expression to evaluate when this Criteria is searched for. - * - * @return Criteria - */ - public function where(Expression $expression) - { - $this->expression = $expression; - - return $this; - } - - /** - * Appends the where expression to evaluate when this Criteria is searched for - * using an AND with previous expression. - * - * @return Criteria - */ - public function andWhere(Expression $expression) - { - if ($this->expression === null) { - return $this->where($expression); - } - - $this->expression = new CompositeExpression( - CompositeExpression::TYPE_AND, - [$this->expression, $expression] - ); - - return $this; - } - - /** - * Appends the where expression to evaluate when this Criteria is searched for - * using an OR with previous expression. - * - * @return Criteria - */ - public function orWhere(Expression $expression) - { - if ($this->expression === null) { - return $this->where($expression); - } - - $this->expression = new CompositeExpression( - CompositeExpression::TYPE_OR, - [$this->expression, $expression] - ); - - return $this; - } - - /** - * Gets the expression attached to this Criteria. - * - * @return Expression|null - */ - public function getWhereExpression() - { - return $this->expression; - } - - /** - * Gets the current orderings of this Criteria. - * - * @return string[] - */ - public function getOrderings() - { - return $this->orderings; - } - - /** - * Sets the ordering of the result of this Criteria. - * - * Keys are field and values are the order, being either ASC or DESC. - * - * @see Criteria::ASC - * @see Criteria::DESC - * - * @param string[] $orderings - * - * @return Criteria - */ - public function orderBy(array $orderings) - { - $this->orderings = array_map( - static function (string $ordering) : string { - return strtoupper($ordering) === Criteria::ASC ? Criteria::ASC : Criteria::DESC; - }, - $orderings - ); - - return $this; - } - - /** - * Gets the current first result option of this Criteria. - * - * @return int|null - */ - public function getFirstResult() - { - return $this->firstResult; - } - - /** - * Set the number of first result that this Criteria should return. - * - * @param int|null $firstResult The value to set. - * - * @return Criteria - */ - public function setFirstResult($firstResult) - { - $this->firstResult = $firstResult === null ? null : (int) $firstResult; - - return $this; - } - - /** - * Gets maxResults. - * - * @return int|null - */ - public function getMaxResults() - { - return $this->maxResults; - } - - /** - * Sets maxResults. - * - * @param int|null $maxResults The value to set. - * - * @return Criteria - */ - public function setMaxResults($maxResults) - { - $this->maxResults = $maxResults === null ? null : (int) $maxResults; - - return $this; - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php deleted file mode 100644 index 90ec794..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php +++ /dev/null @@ -1,262 +0,0 @@ -$accessor(); - } - } - - if (preg_match('/^is[A-Z]+/', $field) === 1 && method_exists($object, $field)) { - return $object->$field(); - } - - // __call should be triggered for get. - $accessor = $accessors[0] . $field; - - if (method_exists($object, '__call')) { - return $object->$accessor(); - } - - if ($object instanceof ArrayAccess) { - return $object[$field]; - } - - if (isset($object->$field)) { - return $object->$field; - } - - // camelcase field name to support different variable naming conventions - $ccField = preg_replace_callback('/_(.?)/', static function ($matches) { - return strtoupper($matches[1]); - }, $field); - - foreach ($accessors as $accessor) { - $accessor .= $ccField; - - if (method_exists($object, $accessor)) { - return $object->$accessor(); - } - } - - return $object->$field; - } - - /** - * Helper for sorting arrays of objects based on multiple fields + orientations. - * - * @param string $name - * @param int $orientation - * - * @return Closure - */ - public static function sortByField($name, $orientation = 1, ?Closure $next = null) - { - if (! $next) { - $next = static function () : int { - return 0; - }; - } - - return static function ($a, $b) use ($name, $next, $orientation) : int { - $aValue = ClosureExpressionVisitor::getObjectFieldValue($a, $name); - - $bValue = ClosureExpressionVisitor::getObjectFieldValue($b, $name); - - if ($aValue === $bValue) { - return $next($a, $b); - } - - return ($aValue > $bValue ? 1 : -1) * $orientation; - }; - } - - /** - * {@inheritDoc} - */ - public function walkComparison(Comparison $comparison) - { - $field = $comparison->getField(); - $value = $comparison->getValue()->getValue(); // shortcut for walkValue() - - switch ($comparison->getOperator()) { - case Comparison::EQ: - return static function ($object) use ($field, $value) : bool { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) === $value; - }; - - case Comparison::NEQ: - return static function ($object) use ($field, $value) : bool { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) !== $value; - }; - - case Comparison::LT: - return static function ($object) use ($field, $value) : bool { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) < $value; - }; - - case Comparison::LTE: - return static function ($object) use ($field, $value) : bool { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) <= $value; - }; - - case Comparison::GT: - return static function ($object) use ($field, $value) : bool { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) > $value; - }; - - case Comparison::GTE: - return static function ($object) use ($field, $value) : bool { - return ClosureExpressionVisitor::getObjectFieldValue($object, $field) >= $value; - }; - - case Comparison::IN: - return static function ($object) use ($field, $value) : bool { - $fieldValue = ClosureExpressionVisitor::getObjectFieldValue($object, $field); - - return in_array($fieldValue, $value, is_scalar($fieldValue)); - }; - - case Comparison::NIN: - return static function ($object) use ($field, $value) : bool { - $fieldValue = ClosureExpressionVisitor::getObjectFieldValue($object, $field); - - return ! in_array($fieldValue, $value, is_scalar($fieldValue)); - }; - - case Comparison::CONTAINS: - return static function ($object) use ($field, $value) { - return strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value) !== false; - }; - - case Comparison::MEMBER_OF: - return static function ($object) use ($field, $value) : bool { - $fieldValues = ClosureExpressionVisitor::getObjectFieldValue($object, $field); - - if (! is_array($fieldValues)) { - $fieldValues = iterator_to_array($fieldValues); - } - - return in_array($value, $fieldValues, true); - }; - - case Comparison::STARTS_WITH: - return static function ($object) use ($field, $value) : bool { - return strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value) === 0; - }; - - case Comparison::ENDS_WITH: - return static function ($object) use ($field, $value) : bool { - return $value === substr(ClosureExpressionVisitor::getObjectFieldValue($object, $field), -strlen($value)); - }; - - default: - throw new RuntimeException('Unknown comparison operator: ' . $comparison->getOperator()); - } - } - - /** - * {@inheritDoc} - */ - public function walkValue(Value $value) - { - return $value->getValue(); - } - - /** - * {@inheritDoc} - */ - public function walkCompositeExpression(CompositeExpression $expr) - { - $expressionList = []; - - foreach ($expr->getExpressionList() as $child) { - $expressionList[] = $this->dispatch($child); - } - - switch ($expr->getType()) { - case CompositeExpression::TYPE_AND: - return $this->andExpressions($expressionList); - case CompositeExpression::TYPE_OR: - return $this->orExpressions($expressionList); - default: - throw new RuntimeException('Unknown composite ' . $expr->getType()); - } - } - - /** - * @param array $expressions - */ - private function andExpressions(array $expressions) : callable - { - return static function ($object) use ($expressions) : bool { - foreach ($expressions as $expression) { - if (! $expression($object)) { - return false; - } - } - - return true; - }; - } - - /** - * @param array $expressions - */ - private function orExpressions(array $expressions) : callable - { - return static function ($object) use ($expressions) : bool { - foreach ($expressions as $expression) { - if ($expression($object)) { - return true; - } - } - - return false; - }; - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php deleted file mode 100644 index 13e193c..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php +++ /dev/null @@ -1,80 +0,0 @@ -'; - public const LT = '<'; - public const LTE = '<='; - public const GT = '>'; - public const GTE = '>='; - public const IS = '='; // no difference with EQ - public const IN = 'IN'; - public const NIN = 'NIN'; - public const CONTAINS = 'CONTAINS'; - public const MEMBER_OF = 'MEMBER_OF'; - public const STARTS_WITH = 'STARTS_WITH'; - public const ENDS_WITH = 'ENDS_WITH'; - - /** @var string */ - private $field; - - /** @var string */ - private $op; - - /** @var Value */ - private $value; - - /** - * @param string $field - * @param string $operator - * @param mixed $value - */ - public function __construct($field, $operator, $value) - { - if (! ($value instanceof Value)) { - $value = new Value($value); - } - - $this->field = $field; - $this->op = $operator; - $this->value = $value; - } - - /** - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * @return Value - */ - public function getValue() - { - return $this->value; - } - - /** - * @return string - */ - public function getOperator() - { - return $this->op; - } - - /** - * {@inheritDoc} - */ - public function visit(ExpressionVisitor $visitor) - { - return $visitor->walkComparison($this); - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php deleted file mode 100644 index e1f7114..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php +++ /dev/null @@ -1,68 +0,0 @@ -type = $type; - - foreach ($expressions as $expr) { - if ($expr instanceof Value) { - throw new RuntimeException('Values are not supported expressions as children of and/or expressions.'); - } - if (! ($expr instanceof Expression)) { - throw new RuntimeException('No expression given to CompositeExpression.'); - } - - $this->expressions[] = $expr; - } - } - - /** - * Returns the list of expressions nested in this composite. - * - * @return Expression[] - */ - public function getExpressionList() - { - return $this->expressions; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * {@inheritDoc} - */ - public function visit(ExpressionVisitor $visitor) - { - return $visitor->walkCompositeExpression($this); - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php deleted file mode 100644 index f40d529..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php +++ /dev/null @@ -1,14 +0,0 @@ -walkComparison($expr); - case $expr instanceof Value: - return $this->walkValue($expr); - case $expr instanceof CompositeExpression: - return $this->walkCompositeExpression($expr); - default: - throw new RuntimeException('Unknown Expression ' . get_class($expr)); - } - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php deleted file mode 100644 index 0830286..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php +++ /dev/null @@ -1,33 +0,0 @@ -value = $value; - } - - /** - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * {@inheritDoc} - */ - public function visit(ExpressionVisitor $visitor) - { - return $visitor->walkValue($this); - } -} diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php deleted file mode 100644 index 4c0f5fd..0000000 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php +++ /dev/null @@ -1,180 +0,0 @@ - - */ - public function matching(Criteria $criteria); -} diff --git a/vendor/doctrine/collections/psalm.xml.dist b/vendor/doctrine/collections/psalm.xml.dist deleted file mode 100644 index 8c5b066..0000000 --- a/vendor/doctrine/collections/psalm.xml.dist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/doctrine/common/.doctrine-project.json b/vendor/doctrine/common/.doctrine-project.json deleted file mode 100644 index 1f33c55..0000000 --- a/vendor/doctrine/common/.doctrine-project.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "active": true, - "name": "Common", - "slug": "common", - "docsSlug": "doctrine-common", - "versions": [ - { - "name": "3.1", - "branchName": "3.1.x", - "slug": "3.1", - "upcoming": true - }, - { - "name": "3.0", - "branchName": "3.0.x", - "slug": "3.0", - "current": true - }, - { - "name": "2.13", - "branchName": "2.13.x", - "slug": "2.13", - "maintained": false - }, - { - "name": "2.12", - "branchName": "2.12.x", - "slug": "2.12", - "maintained": false - }, - { - "name": "2.11", - "branchName": "2.11", - "slug": "2.11", - "maintained": false - } - ] -} diff --git a/vendor/doctrine/common/LICENSE b/vendor/doctrine/common/LICENSE deleted file mode 100644 index 8c38cc1..0000000 --- a/vendor/doctrine/common/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -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/vendor/doctrine/common/README.md b/vendor/doctrine/common/README.md deleted file mode 100644 index 603c38f..0000000 --- a/vendor/doctrine/common/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Doctrine Common - -[![Build Status](https://github.com/doctrine/common/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/common/actions) -[![codecov](https://codecov.io/gh/doctrine/common/branch/3.1.x/graph/badge.svg)](https://codecov.io/gh/doctrine/common) - -The Doctrine Common project is a library that provides extensions to core PHP functionality. - -## More resources: - -* [Website](https://www.doctrine-project.org/) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-common/en/latest/) -* [Downloads](https://github.com/doctrine/common/releases) diff --git a/vendor/doctrine/common/UPGRADE_TO_2_1 b/vendor/doctrine/common/UPGRADE_TO_2_1 deleted file mode 100644 index 891a2e5..0000000 --- a/vendor/doctrine/common/UPGRADE_TO_2_1 +++ /dev/null @@ -1,39 +0,0 @@ -This document details all the possible changes that you should investigate when updating -your project from Doctrine Common 2.0.x to 2.1 - -## AnnotationReader changes - -The annotation reader was heavily refactored between 2.0 and 2.1-RC1. In theory the operation of the new reader should be backwards compatible, but it has to be setup differently to work that way: - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); - // new code necessary starting here - $reader->setIgnoreNotImportedAnnotations(true); - $reader->setEnableParsePhpImports(false); - $reader = new \Doctrine\Common\Annotations\CachedReader( - new \Doctrine\Common\Annotations\IndexedReader($reader), new ArrayCache() - ); - -## Annotation Base class or @Annotation - -Beginning after 2.1-RC2 you have to either extend ``Doctrine\Common\Annotations\Annotation`` or add @Annotation to your annotations class-level docblock, otherwise the class will simply be ignored. - -## Removed methods on AnnotationReader - -* AnnotationReader::setAutoloadAnnotations() -* AnnotationReader::getAutoloadAnnotations() -* AnnotationReader::isAutoloadAnnotations() - -## AnnotationRegistry - -Autoloading through the PHP autoloader is removed from the 2.1 AnnotationReader. Instead you have to use the global AnnotationRegistry for loading purposes: - - \Doctrine\Common\Annotations\AnnotationRegistry::registerFile($fileWithAnnotations); - \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace($namespace, $dirs = null); - \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces($namespaces); - \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader($callable); - -The $callable for registering a loader accepts a class as first and only parameter and must try to silently autoload it. On success true has to be returned. -The registerAutoloadNamespace function registers a PSR-0 compatible silent autoloader for all classes with the given namespace in the given directories. -If null is passed as directory the include path will be used. - diff --git a/vendor/doctrine/common/UPGRADE_TO_2_2 b/vendor/doctrine/common/UPGRADE_TO_2_2 deleted file mode 100644 index 1d93a13..0000000 --- a/vendor/doctrine/common/UPGRADE_TO_2_2 +++ /dev/null @@ -1,61 +0,0 @@ -This document details all the possible changes that you should investigate when -updating your project from Doctrine Common 2.1 to 2.2: - -## Annotation Changes - -- AnnotationReader::setIgnoreNotImportedAnnotations has been removed, you need to - add ignore annotation names which are supposed to be ignored via - AnnotationReader::addGlobalIgnoredName - -- AnnotationReader::setAutoloadAnnotations was deprecated by the AnnotationRegistry - in 2.1 and has been removed in 2.2 - -- AnnotationReader::setEnableParsePhpImports was added to ease transition to the new - annotation mechanism in 2.1 and is removed in 2.2 - -- AnnotationReader::isParsePhpImportsEnabled is removed (see above) - -- AnnotationReader::setDefaultAnnotationNamespace was deprecated in favor of explicit - configuration in 2.1 and will be removed in 2.2 (for isolated projects where you - have full-control over _all_ available annotations, we offer a dedicated reader - class ``SimpleAnnotationReader``) - -- AnnotationReader::setAnnotationCreationFunction was deprecated in 2.1 and will be - removed in 2.2. We only offer two creation mechanisms which cannot be changed - anymore to allow the same reader instance to work with all annotations regardless - of which library they are coming from. - -- AnnotationReader::setAnnotationNamespaceAlias was deprecated in 2.1 and will be - removed in 2.2 (see setDefaultAnnotationNamespace) - -- If you use a class as annotation which has not the @Annotation marker in it's - class block, we will now throw an exception instead of silently ignoring it. You - can however still achieve the previous behavior using the @IgnoreAnnotation, or - AnnotationReader::addGlobalIgnoredName (the exception message will contain detailed - instructions when you run into this problem). - -## Cache Changes - -- Renamed old AbstractCache to CacheProvider - -- Dropped the support to the following functions of all cache providers: - - - CacheProvider::deleteByWildcard - - - CacheProvider::deleteByRegEx - - - CacheProvider::deleteByPrefix - - - CacheProvider::deleteBySuffix - -- CacheProvider::deleteAll will not remove ALL entries, it will only mark them as invalid - -- CacheProvider::flushAll will remove ALL entries, namespaced or not - -- Added support to MemcachedCache - -- Added support to WincacheCache - -## ClassLoader Changes - -- ClassLoader::fileExistsInIncludePath() no longer exists. Use the native stream_resolve_include_path() PHP function \ No newline at end of file diff --git a/vendor/doctrine/common/composer.json b/vendor/doctrine/common/composer.json deleted file mode 100644 index 0f14ca3..0000000 --- a/vendor/doctrine/common/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "doctrine/common", - "type": "library", - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "keywords": [ - "php", - "common", - "doctrine" - ], - "homepage": "https://www.doctrine-project.org/projects/common.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}, - {"name": "Marco Pivetta", "email": "ocramius@gmail.com"} - ], - "require": { - "php": "^7.1 || ^8.0", - "doctrine/persistence": "^2.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "doctrine/coding-standard": "^6.0 || ^8.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^4.0.5", - "vimeo/psalm": "^4.4" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\": "tests/Doctrine/Tests" - } - } -} diff --git a/vendor/doctrine/common/docs/en/index.rst b/vendor/doctrine/common/docs/en/index.rst deleted file mode 100644 index 7550d8b..0000000 --- a/vendor/doctrine/common/docs/en/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -Common Documentation -==================== - -Welcome to the Doctrine Common Library documentation. - -.. toctree:: - :depth: 2 - :glob: - - * diff --git a/vendor/doctrine/common/docs/en/reference/class-loading.rst b/vendor/doctrine/common/docs/en/reference/class-loading.rst deleted file mode 100644 index e193b46..0000000 --- a/vendor/doctrine/common/docs/en/reference/class-loading.rst +++ /dev/null @@ -1,242 +0,0 @@ -Class Loading -============= - -Class loading is an essential part of any PHP application that -makes heavy use of classes and interfaces. Unfortunately, a lot of -people and projects spend a lot of time and effort on custom and -specialized class loading strategies. It can quickly become a pain -to understand what is going on when using multiple libraries and/or -frameworks, each with its own way to do class loading. Class -loading should be simple and it is an ideal candidate for -convention over configuration. - -Overview --------- - -The Doctrine Common ClassLoader implements a simple and efficient -approach to class loading that is easy to understand and use. The -implementation is based on the widely used and accepted convention -of mapping namespace and class names to a directory structure. This -approach is used for example by Symfony2, the Zend Framework and of -course, Doctrine. - -For example, the following class: - -.. code-block:: php - - register(); - $dbalLoader->register(); - $ormLoader->register(); - -Do not be afraid of using multiple class loaders. Due to the -efficient class loading design you will not incur much overhead -from using many class loaders. Take a look at the implementation of -``ClassLoader#loadClass`` to see how simple and efficient the class -loading is. The iteration over the installed class loaders happens -in C (with the exception of using ``ClassLoader::classExists``). - -A ClassLoader can be used in the following other variations, -however, these are rarely used/needed: - - -- If only the second argument is not supplied, the class loader - will be responsible for the namespace prefix given in the first - argument and it will rely on the PHP include_path. - -- If only the first argument is not supplied, the class loader - will be responsible for *all* classes and it will try to look up - *all* classes starting at the directory given as the second - argument. - -- If both arguments are not supplied, the class loader will be - responsible for *all* classes and it will rely on the PHP - include_path. - - -File Extension --------------- - -By default, a ClassLoader uses the ``.php`` file extension for all -class files. You can change this behavior, for example to use a -ClassLoader to load classes from a library that uses the -".class.php" convention (but it must nevertheless adhere to the -directory structure convention!): - -.. code-block:: php - - setFileExtension('.class.php'); - $customLoader->register(); - -Namespace Separator -------------------- - -By default, a ClassLoader uses the ``\`` namespace separator. You -can change this behavior, for example to use a ClassLoader to load -legacy Zend Framework classes that still use the underscore "_" -separator: - -.. code-block:: php - - setNamespaceSeparator('_'); - $zend1Loader->register(); - -Failing Silently and class_exists ----------------------------------- - -A lot of class/autoloaders these days try to fail silently when a -class file is not found. For the most part this is necessary in -order to support using ``class_exists('ClassName', true)`` which is -supposed to return a boolean value but triggers autoloading. This -is a bad thing as it basically forces class loaders to fail -silently, which in turn requires costly file_exists or fopen calls -for each class being loaded, even though in at least 99% of the -cases this is not necessary (compare the number of -class_exists(..., true) invocations to the total number of classes -being loaded in a request). - -The Doctrine Common ClassLoader does not fail silently, by design. -It therefore does not need any costly checks for file existence. A -ClassLoader is always responsible for all classes with a certain -namespace prefix and if a class is requested to be loaded and can -not be found this is considered to be a fatal error. This also -means that using class_exists(..., true) to check for class -existence when using a Doctrine Common ClassLoader is not possible -but this is not a bad thing. What class\_exists(..., true) actually -means is two things: 1) Check whether the class is already -defined/exists (i.e. class_exists(..., false)) and if not 2) check -whether a class file can be loaded for that class. In the Doctrine -Common ClassLoader the two responsibilities of loading a class and -checking for its existence are separated, which can be observed by -the existence of the two methods ``loadClass`` and -``canLoadClass``. Thereby ``loadClass`` does not invoke -``canLoadClass`` internally, by design. However, you are free to -use it yourself to check whether a class can be loaded and the -following code snippet is thus equivalent to class\_exists(..., -true): - -.. code-block:: php - - canLoadClass('Foo')) { - // ... - } - -The only problem with this is that it is inconvenient as you need -to have a reference to the class loaders around (and there are -often multiple class loaders in use). Therefore, a simpler -alternative exists for the cases in which you really want to ask -all installed class loaders whether they can load the class: -``ClassLoader::classExists($className)``: - -.. code-block:: php - - ClassLoader is an autoloader for class files that can be - * installed on the SPL autoload stack. It is a class loader that either loads only classes - * of a specific namespace or all namespaces and it is suitable for working together - * with other autoloaders in the SPL autoload stack. - * - * If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader - * relies on the PHP include_path. - * - * @deprecated The ClassLoader is deprecated and will be removed in version 4.0 of doctrine/common. - */ -class ClassLoader -{ - /** - * PHP file extension. - * - * @var string - */ - protected $fileExtension = '.php'; - - /** - * Current namespace. - * - * @var string|null - */ - protected $namespace; - - /** - * Current include path. - * - * @var string|null - */ - protected $includePath; - - /** - * PHP namespace separator. - * - * @var string - */ - protected $namespaceSeparator = '\\'; - - /** - * Creates a new ClassLoader that loads classes of the - * specified namespace from the specified include path. - * - * If no include path is given, the ClassLoader relies on the PHP include_path. - * If neither a namespace nor an include path is given, the ClassLoader will - * be responsible for loading all classes, thereby relying on the PHP include_path. - * - * @param string|null $ns The namespace of the classes to load. - * @param string|null $includePath The base include path to use. - */ - public function __construct($ns = null, $includePath = null) - { - $this->namespace = $ns; - $this->includePath = $includePath; - } - - /** - * Sets the namespace separator used by classes in the namespace of this ClassLoader. - * - * @param string $sep The separator to use. - * - * @return void - */ - public function setNamespaceSeparator($sep) - { - $this->namespaceSeparator = $sep; - } - - /** - * Gets the namespace separator used by classes in the namespace of this ClassLoader. - * - * @return string - */ - public function getNamespaceSeparator() - { - return $this->namespaceSeparator; - } - - /** - * Sets the base include path for all class files in the namespace of this ClassLoader. - * - * @param string|null $includePath - * - * @return void - */ - public function setIncludePath($includePath) - { - $this->includePath = $includePath; - } - - /** - * Gets the base include path for all class files in the namespace of this ClassLoader. - * - * @return string|null - */ - public function getIncludePath() - { - return $this->includePath; - } - - /** - * Sets the file extension of class files in the namespace of this ClassLoader. - * - * @param string $fileExtension - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * Gets the file extension of class files in the namespace of this ClassLoader. - * - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Registers this ClassLoader on the SPL autoload stack. - * - * @return void - */ - public function register() - { - spl_autoload_register([$this, 'loadClass']); - } - - /** - * Removes this ClassLoader from the SPL autoload stack. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister([$this, 'loadClass']); - } - - /** - * Loads the given class or interface. - * - * @param string $className The name of the class to load. - * - * @return bool TRUE if the class has been successfully loaded, FALSE otherwise. - * - * @psalm-param class-string $className - */ - public function loadClass($className) - { - if (self::typeExists($className)) { - return true; - } - - if (! $this->canLoadClass($className)) { - return false; - } - - require($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '') - . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) - . $this->fileExtension; - - return self::typeExists($className); - } - - /** - * Asks this ClassLoader whether it can potentially load the class (file) with - * the given name. - * - * @param string $className The fully-qualified name of the class. - * - * @return bool TRUE if this ClassLoader can load the class, FALSE otherwise. - * - * @psalm-param class-string $className - */ - public function canLoadClass($className) - { - if ($this->namespace !== null && strpos($className, $this->namespace . $this->namespaceSeparator) !== 0) { - return false; - } - - $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension; - - if ($this->includePath !== null) { - return is_file($this->includePath . DIRECTORY_SEPARATOR . $file); - } - - return stream_resolve_include_path($file) !== false; - } - - /** - * Checks whether a class with a given name exists. A class "exists" if it is either - * already defined in the current request or if there is an autoloader on the SPL - * autoload stack that is a) responsible for the class in question and b) is able to - * load a class file in which the class definition resides. - * - * If the class is not already defined, each autoloader in the SPL autoload stack - * is asked whether it is able to tell if the class exists. If the autoloader is - * a ClassLoader, {@link canLoadClass} is used, otherwise the autoload - * function of the autoloader is invoked and expected to return a value that - * evaluates to TRUE if the class (file) exists. As soon as one autoloader reports - * that the class exists, TRUE is returned. - * - * Note that, depending on what kinds of autoloaders are installed on the SPL - * autoload stack, the class (file) might already be loaded as a result of checking - * for its existence. This is not the case with a ClassLoader, who separates - * these responsibilities. - * - * @param string $className The fully-qualified name of the class. - * - * @return bool TRUE if the class exists as per the definition given above, FALSE otherwise. - * - * @psalm-param class-string $className - */ - public static function classExists($className) - { - return self::typeExists($className, true); - } - - /** - * Gets the ClassLoader from the SPL autoload stack that is responsible - * for (and is able to load) the class with the given name. - * - * @param string $className The name of the class. - * - * @return ClassLoader|null The ClassLoader for the class or NULL if no such ClassLoader exists. - * - * @psalm-param class-string $className - */ - public static function getClassLoader($className) - { - foreach (spl_autoload_functions() as $loader) { - if (! is_array($loader)) { - continue; - } - - $classLoader = reset($loader); - - if ($classLoader instanceof ClassLoader && $classLoader->canLoadClass($className)) { - return $classLoader; - } - } - - return null; - } - - /** - * Checks whether a given type exists - * - * @param string $type - * @param bool $autoload - * - * @return bool - */ - private static function typeExists($type, $autoload = false) - { - return class_exists($type, $autoload) - || interface_exists($type, $autoload) - || trait_exists($type, $autoload); - } -} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php b/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php deleted file mode 100644 index a2aba0e..0000000 --- a/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php +++ /dev/null @@ -1,14 +0,0 @@ -proxyGenerator = $proxyGenerator; - $this->metadataFactory = $metadataFactory; - $this->autoGenerate = (int) $autoGenerate; - - if (! in_array($this->autoGenerate, self::AUTOGENERATE_MODES, true)) { - throw InvalidArgumentException::invalidAutoGenerateMode($autoGenerate); - } - } - - /** - * Gets a reference proxy instance for the entity of the given type and identified by - * the given identifier. - * - * @param string $className - * @param array $identifier - * - * @return Proxy - * - * @throws OutOfBoundsException - */ - public function getProxy($className, array $identifier) - { - $definition = $this->definitions[$className] ?? $this->getProxyDefinition($className); - $fqcn = $definition->proxyClassName; - $proxy = new $fqcn($definition->initializer, $definition->cloner); - - foreach ($definition->identifierFields as $idField) { - if (! isset($identifier[$idField])) { - throw OutOfBoundsException::missingPrimaryKeyValue($className, $idField); - } - - $definition->reflectionFields[$idField]->setValue($proxy, $identifier[$idField]); - } - - return $proxy; - } - - /** - * Generates proxy classes for all given classes. - * - * @param ClassMetadata[] $classes The classes (ClassMetadata instances) - * for which to generate proxies. - * @param string $proxyDir The target directory of the proxy classes. If not specified, the - * directory configured on the Configuration of the EntityManager used - * by this factory is used. - * - * @return int Number of generated proxies. - */ - public function generateProxyClasses(array $classes, $proxyDir = null) - { - $generated = 0; - - foreach ($classes as $class) { - if ($this->skipClass($class)) { - continue; - } - - $proxyFileName = $this->proxyGenerator->getProxyFileName($class->getName(), $proxyDir); - - $this->proxyGenerator->generateProxyClass($class, $proxyFileName); - - $generated += 1; - } - - return $generated; - } - - /** - * Reset initialization/cloning logic for an un-initialized proxy - * - * @return Proxy - * - * @throws InvalidArgumentException - */ - public function resetUninitializedProxy(Proxy $proxy) - { - if ($proxy->__isInitialized()) { - throw InvalidArgumentException::unitializedProxyExpected($proxy); - } - - $className = ClassUtils::getClass($proxy); - $definition = $this->definitions[$className] ?? $this->getProxyDefinition($className); - - $proxy->__setInitializer($definition->initializer); - $proxy->__setCloner($definition->cloner); - - return $proxy; - } - - /** - * Get a proxy definition for the given class name. - * - * @param string $className - * - * @return ProxyDefinition - * - * @psalm-param class-string $className - */ - private function getProxyDefinition($className) - { - $classMetadata = $this->metadataFactory->getMetadataFor($className); - $className = $classMetadata->getName(); // aliases and case sensitivity - - $this->definitions[$className] = $this->createProxyDefinition($className); - $proxyClassName = $this->definitions[$className]->proxyClassName; - - if (! class_exists($proxyClassName, false)) { - $fileName = $this->proxyGenerator->getProxyFileName($className); - - switch ($this->autoGenerate) { - case self::AUTOGENERATE_NEVER: - require $fileName; - break; - - case self::AUTOGENERATE_FILE_NOT_EXISTS: - if (! file_exists($fileName)) { - $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); - } - - require $fileName; - break; - - case self::AUTOGENERATE_ALWAYS: - $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); - require $fileName; - break; - - case self::AUTOGENERATE_EVAL: - $this->proxyGenerator->generateProxyClass($classMetadata, false); - break; - } - } - - return $this->definitions[$className]; - } - - /** - * Determine if this class should be skipped during proxy generation. - * - * @return bool - */ - abstract protected function skipClass(ClassMetadata $metadata); - - /** - * @param string $className - * - * @return ProxyDefinition - * - * @psalm-param class-string $className - */ - abstract protected function createProxyDefinition($className); -} - -interface_exists(ClassMetadata::class); -interface_exists(ClassMetadataFactory::class); diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php deleted file mode 100644 index 58d221a..0000000 --- a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php +++ /dev/null @@ -1,100 +0,0 @@ - Keys are the property names, and values are the default values - * for those properties. - */ - public function __getLazyProperties(); -} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php deleted file mode 100644 index a7f3957..0000000 --- a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php +++ /dev/null @@ -1,42 +0,0 @@ - */ - public $identifierFields; - - /** @var ReflectionProperty[] */ - public $reflectionFields; - - /** @var callable */ - public $initializer; - - /** @var callable */ - public $cloner; - - /** - * @param string $proxyClassName - * @param array $identifierFields - * @param array $reflectionFields - * @param callable $initializer - * @param callable $cloner - */ - public function __construct($proxyClassName, array $identifierFields, array $reflectionFields, $initializer, $cloner) - { - $this->proxyClassName = $proxyClassName; - $this->identifierFields = $identifierFields; - $this->reflectionFields = $reflectionFields; - $this->initializer = $initializer; - $this->cloner = $cloner; - } -} diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php deleted file mode 100644 index 5504078..0000000 --- a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php +++ /dev/null @@ -1,1194 +0,0 @@ -%s;\s*})i'; - - /** - * The namespace that contains all proxy classes. - * - * @var string - */ - private $proxyNamespace; - - /** - * The directory that contains all proxy classes. - * - * @var string - */ - private $proxyDirectory; - - /** - * Map of callables used to fill in placeholders set in the template. - * - * @var string[]|callable[] - */ - protected $placeholders = [ - 'baseProxyInterface' => Proxy::class, - 'additionalProperties' => '', - ]; - - /** - * Template used as a blueprint to generate proxies. - * - * @var string - */ - protected $proxyClassTemplate = '; - -/** - * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE\'S PROXY GENERATOR - */ -class extends \ implements \ -{ - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = ; - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = ; - - - - - - - - - - - - - - - - - - /** - * Forces initialization of the proxy - */ - public function __load() - { - $this->__initializer__ && $this->__initializer__->__invoke($this, \'__load\', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized() - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized) - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(\Closure $initializer = null) - { - $this->__initializer__ = $initializer; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer() - { - return $this->__initializer__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(\Closure $cloner = null) - { - $this->__cloner__ = $cloner; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner() - { - return $this->__cloner__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties() - { - return self::$lazyPropertiesDefaults; - } - - -} -'; - - /** - * Initializes a new instance of the ProxyFactory class that is - * connected to the given EntityManager. - * - * @param string $proxyDirectory The directory to use for the proxy classes. It must exist. - * @param string $proxyNamespace The namespace to use for the proxy classes. - * - * @throws InvalidArgumentException - */ - public function __construct($proxyDirectory, $proxyNamespace) - { - if (! $proxyDirectory) { - throw InvalidArgumentException::proxyDirectoryRequired(); - } - - if (! $proxyNamespace) { - throw InvalidArgumentException::proxyNamespaceRequired(); - } - - $this->proxyDirectory = $proxyDirectory; - $this->proxyNamespace = $proxyNamespace; - } - - /** - * Sets a placeholder to be replaced in the template. - * - * @param string $name - * @param string|callable $placeholder - * - * @throws InvalidArgumentException - */ - public function setPlaceholder($name, $placeholder) - { - if (! is_string($placeholder) && ! is_callable($placeholder)) { - throw InvalidArgumentException::invalidPlaceholder($name); - } - - $this->placeholders[$name] = $placeholder; - } - - /** - * Sets the base template used to create proxy classes. - * - * @param string $proxyClassTemplate - */ - public function setProxyClassTemplate($proxyClassTemplate) - { - $this->proxyClassTemplate = (string) $proxyClassTemplate; - } - - /** - * Generates a proxy class file. - * - * @param ClassMetadata $class Metadata for the original class. - * @param string|bool $fileName Filename (full path) for the generated class. If none is given, eval() is used. - * - * @throws InvalidArgumentException - * @throws UnexpectedValueException - */ - public function generateProxyClass(ClassMetadata $class, $fileName = false) - { - $this->verifyClassCanBeProxied($class); - - preg_match_all('(<([a-zA-Z]+)>)', $this->proxyClassTemplate, $placeholderMatches); - - $placeholderMatches = array_combine($placeholderMatches[0], $placeholderMatches[1]); - $placeholders = []; - - foreach ($placeholderMatches as $placeholder => $name) { - $placeholders[$placeholder] = $this->placeholders[$name] ?? [$this, 'generate' . $name]; - } - - foreach ($placeholders as & $placeholder) { - if (! is_callable($placeholder)) { - continue; - } - - $placeholder = call_user_func($placeholder, $class); - } - - $proxyCode = strtr($this->proxyClassTemplate, $placeholders); - - if (! $fileName) { - $proxyClassName = $this->generateNamespace($class) . '\\' . $this->generateProxyShortClassName($class); - - if (! class_exists($proxyClassName)) { - eval(substr($proxyCode, 5)); - } - - return; - } - - $parentDirectory = dirname($fileName); - - if (! is_dir($parentDirectory) && (@mkdir($parentDirectory, 0775, true) === false)) { - throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); - } - - if (! is_writable($parentDirectory)) { - throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); - } - - $tmpFileName = $fileName . '.' . uniqid('', true); - - file_put_contents($tmpFileName, $proxyCode); - @chmod($tmpFileName, 0664); - rename($tmpFileName, $fileName); - } - - /** - * @throws InvalidArgumentException - */ - private function verifyClassCanBeProxied(ClassMetadata $class) - { - if ($class->getReflectionClass()->isFinal()) { - throw InvalidArgumentException::classMustNotBeFinal($class->getName()); - } - - if ($class->getReflectionClass()->isAbstract()) { - throw InvalidArgumentException::classMustNotBeAbstract($class->getName()); - } - } - - /** - * Generates the proxy short class name to be used in the template. - * - * @return string - */ - private function generateProxyShortClassName(ClassMetadata $class) - { - $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); - $parts = explode('\\', strrev($proxyClassName), 2); - - return strrev($parts[0]); - } - - /** - * Generates the proxy namespace. - * - * @return string - */ - private function generateNamespace(ClassMetadata $class) - { - $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); - $parts = explode('\\', strrev($proxyClassName), 2); - - return strrev($parts[1]); - } - - /** - * Generates the original class name. - * - * @return string - */ - private function generateClassName(ClassMetadata $class) - { - return ltrim($class->getName(), '\\'); - } - - /** - * Generates the array representation of lazy loaded public properties and their default values. - * - * @return string - */ - private function generateLazyPropertiesNames(ClassMetadata $class) - { - $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); - $values = []; - - foreach ($lazyPublicProperties as $name) { - $values[$name] = null; - } - - return var_export($values, true); - } - - /** - * Generates the array representation of lazy loaded public properties names. - * - * @return string - */ - private function generateLazyPropertiesDefaults(ClassMetadata $class) - { - return var_export($this->getLazyLoadedPublicProperties($class), true); - } - - /** - * Generates the constructor code (un-setting public lazy loaded properties, setting identifier field values). - * - * @return string - */ - private function generateConstructorImpl(ClassMetadata $class) - { - $constructorImpl = <<<'EOT' - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - -EOT; - - $toUnset = array_map(static function (string $name): string { - return '$this->' . $name; - }, $this->getLazyLoadedPublicPropertiesNames($class)); - - return $constructorImpl . ($toUnset === [] ? '' : ' unset(' . implode(', ', $toUnset) . ");\n") - . <<<'EOT' - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } -EOT; - } - - /** - * Generates the magic getter invoked when lazy loaded public properties are requested. - * - * @return string - */ - private function generateMagicGet(ClassMetadata $class) - { - $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); - $reflectionClass = $class->getReflectionClass(); - $hasParentGet = false; - $returnReference = ''; - $inheritDoc = ''; - $name = '$name'; - $parametersString = '$name'; - $returnTypeHint = null; - - if ($reflectionClass->hasMethod('__get')) { - $hasParentGet = true; - $inheritDoc = '{@inheritDoc}'; - $methodReflection = $reflectionClass->getMethod('__get'); - - if ($methodReflection->returnsReference()) { - $returnReference = '& '; - } - - $methodParameters = $methodReflection->getParameters(); - $name = '$' . $methodParameters[0]->getName(); - - $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name']); - $returnTypeHint = $this->getMethodReturnType($methodReflection); - } - - if (empty($lazyPublicProperties) && ! $hasParentGet) { - return ''; - } - - $magicGet = <<__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); -EOT; - - if ($returnTypeHint === ': void') { - $magicGet .= "\n return;"; - } else { - $magicGet .= "\n return \$this->\$name;"; - } - - $magicGet .= <<<'EOT' - - } - - -EOT; - } - - if ($hasParentGet) { - $magicGet .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); -EOT; - - if ($returnTypeHint === ': void') { - $magicGet .= <<<'EOT' - - parent::__get($name); - return; -EOT; - } else { - $magicGet .= <<<'EOT' - - return parent::__get($name); -EOT; - } - } else { - $magicGet .= sprintf(<<getLazyLoadedPublicPropertiesNames($class); - $reflectionClass = $class->getReflectionClass(); - $hasParentSet = false; - $inheritDoc = ''; - $parametersString = '$name, $value'; - $returnTypeHint = null; - - if ($reflectionClass->hasMethod('__set')) { - $hasParentSet = true; - $inheritDoc = '{@inheritDoc}'; - $methodReflection = $reflectionClass->getMethod('__set'); - - $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name', 'value']); - $returnTypeHint = $this->getMethodReturnType($methodReflection); - } - - if (empty($lazyPublicProperties) && ! $hasParentSet) { - return ''; - } - - $magicSet = <<__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); - - $this->$name = $value; - - return; - } - - -EOT; - } - - if ($hasParentSet) { - $magicSet .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); -EOT; - - if ($returnTypeHint === ': void') { - $magicSet .= <<<'EOT' - - parent::__set($name, $value); - return; -EOT; - } else { - $magicSet .= <<<'EOT' - - return parent::__set($name, $value); -EOT; - } - } else { - $magicSet .= ' $this->$name = $value;'; - } - - return $magicSet . "\n }"; - } - - /** - * Generates the magic issetter invoked when lazy loaded public properties are checked against isset(). - * - * @return string - */ - private function generateMagicIsset(ClassMetadata $class) - { - $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); - $hasParentIsset = $class->getReflectionClass()->hasMethod('__isset'); - $parametersString = '$name'; - $returnTypeHint = null; - - if ($hasParentIsset) { - $methodReflection = $class->getReflectionClass()->getMethod('__isset'); - $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name']); - $returnTypeHint = $this->getMethodReturnType($methodReflection); - } - - if (empty($lazyPublicProperties) && ! $hasParentIsset) { - return ''; - } - - $inheritDoc = $hasParentIsset ? '{@inheritDoc}' : ''; - $magicIsset = <<__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); - - return isset($this->$name); - } - - -EOT; - } - - if ($hasParentIsset) { - $magicIsset .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); - - return parent::__isset($name); -EOT; - } else { - $magicIsset .= ' return false;'; - } - - return $magicIsset . "\n }"; - } - - /** - * Generates implementation for the `__sleep` method of proxies. - * - * @return string - */ - private function generateSleepImpl(ClassMetadata $class) - { - $reflectionClass = $class->getReflectionClass(); - - $hasParentSleep = $reflectionClass->hasMethod('__sleep'); - $inheritDoc = $hasParentSleep ? '{@inheritDoc}' : ''; - $returnTypeHint = $hasParentSleep ? $this->getMethodReturnType($reflectionClass->getMethod('__sleep')) : ''; - $sleepImpl = <<__isInitialized__) { - $properties = array_diff($properties, array_keys(self::$lazyPropertiesNames)); - } - - return $properties; - } -EOT; - } - - $allProperties = ['__isInitialized__']; - - foreach ($class->getReflectionClass()->getProperties() as $prop) { - assert($prop instanceof ReflectionProperty); - if ($prop->isStatic()) { - continue; - } - - $allProperties[] = $prop->isPrivate() - ? "\0" . $prop->getDeclaringClass()->getName() . "\0" . $prop->getName() - : $prop->getName(); - } - - $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); - $protectedProperties = array_diff($allProperties, $lazyPublicProperties); - - foreach ($allProperties as &$property) { - $property = var_export($property, true); - } - - foreach ($protectedProperties as &$property) { - $property = var_export($property, true); - } - - $allProperties = implode(', ', $allProperties); - $protectedProperties = implode(', ', $protectedProperties); - - return $sleepImpl . <<__isInitialized__) { - return [$allProperties]; - } - - return [$protectedProperties]; - } -EOT; - } - - /** - * Generates implementation for the `__wakeup` method of proxies. - * - * @return string - */ - private function generateWakeupImpl(ClassMetadata $class) - { - $reflectionClass = $class->getReflectionClass(); - - $hasParentWakeup = $reflectionClass->hasMethod('__wakeup'); - - $unsetPublicProperties = []; - foreach ($this->getLazyLoadedPublicPropertiesNames($class) as $lazyPublicProperty) { - $unsetPublicProperties[] = '$this->' . $lazyPublicProperty; - } - - $shortName = $this->generateProxyShortClassName($class); - $inheritDoc = $hasParentWakeup ? '{@inheritDoc}' : ''; - $returnTypeHint = $hasParentWakeup ? $this->getMethodReturnType($reflectionClass->getMethod('__wakeup')) : ''; - $wakeupImpl = <<__isInitialized__) { - \$this->__initializer__ = function ($shortName \$proxy) { - \$proxy->__setInitializer(null); - \$proxy->__setCloner(null); - - \$existingProperties = get_object_vars(\$proxy); - - foreach (\$proxy::\$lazyPropertiesDefaults as \$property => \$defaultValue) { - if ( ! array_key_exists(\$property, \$existingProperties)) { - \$proxy->\$property = \$defaultValue; - } - } - }; - -EOT; - - if (! empty($unsetPublicProperties)) { - $wakeupImpl .= "\n unset(" . implode(', ', $unsetPublicProperties) . ');'; - } - - $wakeupImpl .= "\n }"; - - if ($hasParentWakeup) { - $wakeupImpl .= "\n parent::__wakeup();"; - } - - $wakeupImpl .= "\n }"; - - return $wakeupImpl; - } - - /** - * Generates implementation for the `__clone` method of proxies. - * - * @return string - */ - private function generateCloneImpl(ClassMetadata $class) - { - $hasParentClone = $class->getReflectionClass()->hasMethod('__clone'); - $inheritDoc = $hasParentClone ? '{@inheritDoc}' : ''; - $callParentClone = $hasParentClone ? "\n parent::__clone();\n" : ''; - - return <<__cloner__ && \$this->__cloner__->__invoke(\$this, '__clone', []); -$callParentClone } -EOT; - } - - /** - * Generates decorated methods by picking those available in the parent class. - * - * @return string - */ - private function generateMethods(ClassMetadata $class) - { - $methods = ''; - $methodNames = []; - $reflectionMethods = $class->getReflectionClass()->getMethods(ReflectionMethod::IS_PUBLIC); - $skippedMethods = [ - '__sleep' => true, - '__clone' => true, - '__wakeup' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - ]; - - foreach ($reflectionMethods as $method) { - $name = $method->getName(); - - if ( - $method->isConstructor() || - isset($skippedMethods[strtolower($name)]) || - isset($methodNames[$name]) || - $method->isFinal() || - $method->isStatic() || - ( ! $method->isPublic()) - ) { - continue; - } - - $methodNames[$name] = true; - $methods .= "\n /**\n" - . " * {@inheritDoc}\n" - . " */\n" - . ' public function '; - - if ($method->returnsReference()) { - $methods .= '&'; - } - - $methods .= $name . '(' . $this->buildParametersString($method->getParameters()) . ')'; - $methods .= $this->getMethodReturnType($method); - $methods .= "\n" . ' {' . "\n"; - - if ($this->isShortIdentifierGetter($method, $class)) { - $identifier = lcfirst(substr($name, 3)); - $fieldType = $class->getTypeOfField($identifier); - $cast = in_array($fieldType, ['integer', 'smallint']) ? '(int) ' : ''; - - $methods .= ' if ($this->__isInitialized__ === false) {' . "\n"; - $methods .= ' '; - $methods .= $this->shouldProxiedMethodReturn($method) ? 'return ' : ''; - $methods .= $cast . ' parent::' . $method->getName() . "();\n"; - $methods .= ' }' . "\n\n"; - } - - $invokeParamsString = implode(', ', $this->getParameterNamesForInvoke($method->getParameters())); - $callParamsString = implode(', ', $this->getParameterNamesForParentCall($method->getParameters())); - - $methods .= "\n \$this->__initializer__ " - . '&& $this->__initializer__->__invoke($this, ' . var_export($name, true) - . ', [' . $invokeParamsString . ']);' - . "\n\n " - . ($this->shouldProxiedMethodReturn($method) ? 'return ' : '') - . 'parent::' . $name . '(' . $callParamsString . ');' - . "\n" . ' }' . "\n"; - } - - return $methods; - } - - /** - * Generates the Proxy file name. - * - * @param string $className - * @param string $baseDirectory Optional base directory for proxy file name generation. - * If not specified, the directory configured on the Configuration of the - * EntityManager will be used by this factory. - * - * @return string - * - * @psalm-param class-string $className - */ - public function getProxyFileName($className, $baseDirectory = null) - { - $baseDirectory = $baseDirectory ?: $this->proxyDirectory; - - return rtrim($baseDirectory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . Proxy::MARKER - . str_replace('\\', '', $className) . '.php'; - } - - /** - * Checks if the method is a short identifier getter. - * - * What does this mean? For proxy objects the identifier is already known, - * however accessing the getter for this identifier usually triggers the - * lazy loading, leading to a query that may not be necessary if only the - * ID is interesting for the userland code (for example in views that - * generate links to the entity, but do not display anything else). - * - * @param ReflectionMethod $method - * - * @return bool - */ - private function isShortIdentifierGetter($method, ClassMetadata $class) - { - $identifier = lcfirst(substr($method->getName(), 3)); - $startLine = $method->getStartLine(); - $endLine = $method->getEndLine(); - $cheapCheck = $method->getNumberOfParameters() === 0 - && substr($method->getName(), 0, 3) === 'get' - && in_array($identifier, $class->getIdentifier(), true) - && $class->hasField($identifier) - && ($endLine - $startLine <= 4); - - if ($cheapCheck) { - $code = file($method->getFileName()); - $code = trim(implode(' ', array_slice($code, $startLine - 1, $endLine - $startLine + 1))); - - $pattern = sprintf(self::PATTERN_MATCH_ID_METHOD, $method->getName(), $identifier); - - if (preg_match($pattern, $code)) { - return true; - } - } - - return false; - } - - /** - * Generates the list of public properties to be lazy loaded. - * - * @return array - */ - private function getLazyLoadedPublicPropertiesNames(ClassMetadata $class): array - { - $properties = []; - - foreach ($class->getReflectionClass()->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $name = $property->getName(); - - if ((! $class->hasField($name) && ! $class->hasAssociation($name)) || $class->isIdentifier($name)) { - continue; - } - - $properties[] = $name; - } - - return $properties; - } - - /** - * Generates the list of default values of public properties. - * - * @return mixed[] - */ - private function getLazyLoadedPublicProperties(ClassMetadata $class) - { - $defaultProperties = $class->getReflectionClass()->getDefaultProperties(); - $lazyLoadedPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); - $defaultValues = []; - - foreach ($class->getReflectionClass()->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $name = $property->getName(); - - if (! in_array($name, $lazyLoadedPublicProperties, true)) { - continue; - } - - if (array_key_exists($name, $defaultProperties)) { - $defaultValues[$name] = $defaultProperties[$name]; - } elseif (method_exists($property, 'getType')) { - $propertyType = $property->getType(); - if ($propertyType !== null && $propertyType->allowsNull()) { - $defaultValues[$name] = null; - } - } - } - - return $defaultValues; - } - - /** - * @param ReflectionParameter[] $parameters - * @param string[] $renameParameters - * - * @return string - */ - private function buildParametersString(array $parameters, array $renameParameters = []) - { - $parameterDefinitions = []; - - $i = -1; - foreach ($parameters as $param) { - assert($param instanceof ReflectionParameter); - $i++; - $parameterDefinition = ''; - $parameterType = $this->getParameterType($param); - - if ($parameterType !== null) { - $parameterDefinition .= $parameterType . ' '; - } - - if ($param->isPassedByReference()) { - $parameterDefinition .= '&'; - } - - if ($param->isVariadic()) { - $parameterDefinition .= '...'; - } - - $parameterDefinition .= '$' . ($renameParameters ? $renameParameters[$i] : $param->getName()); - - if ($param->isDefaultValueAvailable()) { - $parameterDefinition .= ' = ' . var_export($param->getDefaultValue(), true); - } - - $parameterDefinitions[] = $parameterDefinition; - } - - return implode(', ', $parameterDefinitions); - } - - /** - * @return string|null - */ - private function getParameterType(ReflectionParameter $parameter) - { - if (! $parameter->hasType()) { - return null; - } - - $declaringFunction = $parameter->getDeclaringFunction(); - - assert($declaringFunction instanceof ReflectionMethod); - - return $this->formatType($parameter->getType(), $declaringFunction, $parameter); - } - - /** - * @param ReflectionParameter[] $parameters - * - * @return string[] - */ - private function getParameterNamesForInvoke(array $parameters) - { - return array_map( - static function (ReflectionParameter $parameter) { - return '$' . $parameter->getName(); - }, - $parameters - ); - } - - /** - * @param ReflectionParameter[] $parameters - * - * @return string[] - */ - private function getParameterNamesForParentCall(array $parameters) - { - return array_map( - static function (ReflectionParameter $parameter) { - $name = ''; - - if ($parameter->isVariadic()) { - $name .= '...'; - } - - $name .= '$' . $parameter->getName(); - - return $name; - }, - $parameters - ); - } - - /** - * @return string - */ - private function getMethodReturnType(ReflectionMethod $method) - { - if (! $method->hasReturnType()) { - return ''; - } - - return ': ' . $this->formatType($method->getReturnType(), $method); - } - - /** - * @return bool - */ - private function shouldProxiedMethodReturn(ReflectionMethod $method) - { - if (! $method->hasReturnType()) { - return true; - } - - return strtolower($this->formatType($method->getReturnType(), $method)) !== 'void'; - } - - /** - * @return string - */ - private function formatType( - ReflectionType $type, - ReflectionMethod $method, - ?ReflectionParameter $parameter = null - ) { - if ($type instanceof ReflectionUnionType) { - return implode('|', array_map( - function (ReflectionType $unionedType) use ($method, $parameter) { - return $this->formatType($unionedType, $method, $parameter); - }, - $type->getTypes() - )); - } - - assert($type instanceof ReflectionNamedType); - - $name = $type->getName(); - $nameLower = strtolower($name); - - if ($nameLower === 'static') { - $name = 'static'; - } - - if ($nameLower === 'self') { - $name = $method->getDeclaringClass()->getName(); - } - - if ($nameLower === 'parent') { - $name = $method->getDeclaringClass()->getParentClass()->getName(); - } - - if (! $type->isBuiltin() && ! class_exists($name) && ! interface_exists($name) && $name !== 'static') { - if ($parameter !== null) { - throw UnexpectedValueException::invalidParameterTypeHint( - $method->getDeclaringClass()->getName(), - $method->getName(), - $parameter->getName() - ); - } - - throw UnexpectedValueException::invalidReturnTypeHint( - $method->getDeclaringClass()->getName(), - $method->getName() - ); - } - - if (! $type->isBuiltin() && $name !== 'static') { - $name = '\\' . $name; - } - - if ( - $type->allowsNull() - && ! in_array($name, ['mixed', 'null'], true) - && ($parameter === null || ! $parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() !== null) - ) { - $name = '?' . $name; - } - - return $name; - } -} - -interface_exists(ClassMetadata::class); diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php deleted file mode 100644 index d220232..0000000 --- a/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php +++ /dev/null @@ -1,112 +0,0 @@ -toArray(); - } - - if (! $maxDepth) { - return is_object($var) ? get_class($var) - : (is_array($var) ? 'Array(' . count($var) . ')' : $var); - } - - if (is_array($var)) { - $return = []; - - foreach ($var as $k => $v) { - $return[$k] = self::export($v, $maxDepth - 1); - } - - return $return; - } - - if (! $isObj) { - return $var; - } - - $return = new stdClass(); - if ($var instanceof DateTimeInterface) { - $return->__CLASS__ = get_class($var); - $return->date = $var->format('c'); - $return->timezone = $var->getTimezone()->getName(); - - return $return; - } - - $return->__CLASS__ = ClassUtils::getClass($var); - - if ($var instanceof Proxy) { - $return->__IS_PROXY__ = true; - $return->__PROXY_INITIALIZED__ = $var->__isInitialized(); - } - - if ($var instanceof ArrayObject || $var instanceof ArrayIterator) { - $return->__STORAGE__ = self::export($var->getArrayCopy(), $maxDepth - 1); - } - - return self::fillReturnWithClassAttributes($var, $return, $maxDepth); - } - - /** - * Fill the $return variable with class attributes - * Based on obj2array function from {@see https://secure.php.net/manual/en/function.get-object-vars.php#47075} - * - * @param object $var - * @param int $maxDepth - * - * @return mixed - */ - private static function fillReturnWithClassAttributes($var, stdClass $return, $maxDepth) - { - $clone = (array) $var; - - foreach (array_keys($clone) as $key) { - $aux = explode("\0", $key); - $name = end($aux); - if ($aux[0] === '') { - $name .= ':' . ($aux[1] === '*' ? 'protected' : $aux[1] . ':private'); - } - - $return->$name = self::export($clone[$key], $maxDepth - 1); - } - - return $return; - } - - /** - * Returns a string representation of an object. - * - * @param object $obj - * - * @return string - */ - public static function toString($obj) - { - return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj); - } -} diff --git a/vendor/doctrine/common/phpstan.neon.dist b/vendor/doctrine/common/phpstan.neon.dist deleted file mode 100644 index e63c669..0000000 --- a/vendor/doctrine/common/phpstan.neon.dist +++ /dev/null @@ -1,49 +0,0 @@ -parameters: - phpVersion: 70100 - level: 3 - paths: - - lib - - tests - excludes_analyse: - - lib/vendor/doctrine-build-common - - tests/Doctrine/Tests/Common/Proxy/InvalidReturnTypeClass.php - - tests/Doctrine/Tests/Common/Proxy/InvalidTypeHintClass.php - - tests/Doctrine/Tests/Common/Proxy/LazyLoadableObjectWithTypedProperties.php - - tests/Doctrine/Tests/Common/Proxy/MagicIssetClassWithInteger.php - - tests/Doctrine/Tests/Common/Proxy/NullableNonOptionalHintClass.php - - tests/Doctrine/Tests/Common/Proxy/Php8UnionTypes.php - - tests/Doctrine/Tests/Common/Proxy/ProxyGeneratorTest.php - - tests/Doctrine/Tests/Common/Proxy/ProxyLogicTypedPropertiesTest.php - - tests/Doctrine/Tests/Common/Proxy/SerializedClass.php - - tests/Doctrine/Tests/Common/Proxy/VariadicTypeHintClass.php - - tests/Doctrine/Tests/Common/Proxy/generated - ignoreErrors: - - '#Access to an undefined property Doctrine\\Common\\Proxy\\Proxy::\$publicField#' - - - message: '#^Result of method Doctrine\\Tests\\Common\\Proxy\\LazyLoadableObjectWithVoid::(adding|incrementing)AndReturningVoid\(\) \(void\) is used\.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' - - - message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicTest::\$initializerCallbackMock \(callable\(\): mixed&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php' - - - message: '#^Access to an undefined property Doctrine\\Common\\Proxy\\Proxy&Doctrine\\Tests\\Common\\Proxy\\LazyLoadableObject::\$non_existing_property\.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php' - - - message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php' - - - message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' - - - message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicVoidReturnTypeTest::\$initializerCallbackMock \(callable\(\): mixed&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' - - - message: '#^Method Doctrine\\Tests\\Common\\Proxy\\MagicIssetClassWithInteger::__isset\(\) should return bool but returns int\.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/MagicIssetClassWithInteger.php' - - - message: '#^Access to an undefined property Doctrine\\Tests\\Common\\Proxy\\MagicGetByRefClass\:\:\$nonExisting\.$#' - path: 'tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php' - -includes: - - vendor/phpstan/phpstan-phpunit/extension.neon - - vendor/phpstan/phpstan-phpunit/rules.neon diff --git a/vendor/doctrine/common/psalm.xml b/vendor/doctrine/common/psalm.xml deleted file mode 100644 index f49326f..0000000 --- a/vendor/doctrine/common/psalm.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/vendor/doctrine/event-manager/.doctrine-project.json b/vendor/doctrine/event-manager/.doctrine-project.json deleted file mode 100644 index f6feb43..0000000 --- a/vendor/doctrine/event-manager/.doctrine-project.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "active": true, - "name": "Event Manager", - "slug": "event-manager", - "docsSlug": "doctrine-event-manager", - "versions": [ - { - "name": "1.0", - "branchName": "master", - "slug": "latest", - "current": true, - "aliases": [ - "current", - "stable" - ] - } - ] -} diff --git a/vendor/doctrine/event-manager/LICENSE b/vendor/doctrine/event-manager/LICENSE deleted file mode 100644 index 8c38cc1..0000000 --- a/vendor/doctrine/event-manager/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -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/vendor/doctrine/event-manager/README.md b/vendor/doctrine/event-manager/README.md deleted file mode 100644 index 3aee6b6..0000000 --- a/vendor/doctrine/event-manager/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Doctrine Event Manager - -[![Build Status](https://travis-ci.org/doctrine/event-manager.svg)](https://travis-ci.org/doctrine/event-manager) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/event-manager/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/event-manager/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/event-manager/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/event-manager/?branch=master) - -The Doctrine Event Manager is a library that provides a simple event system. - -## More resources: - -* [Website](https://www.doctrine-project.org/) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-event-manager/en/latest/) -* [Downloads](https://github.com/doctrine/event-manager/releases) diff --git a/vendor/doctrine/event-manager/composer.json b/vendor/doctrine/event-manager/composer.json deleted file mode 100644 index 3f026fe..0000000 --- a/vendor/doctrine/event-manager/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "doctrine/event-manager", - "type": "library", - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "keywords": [ - "events", - "event", - "event dispatcher", - "event manager", - "event system" - ], - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}, - {"name": "Marco Pivetta", "email": "ocramius@gmail.com"} - ], - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" - }, - "conflict": { - "doctrine/common": "<2.9@dev" - }, - "config": { - "sort-packages": true - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\": "tests/Doctrine/Tests" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php b/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php deleted file mode 100644 index 9b9cc05..0000000 --- a/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php +++ /dev/null @@ -1,45 +0,0 @@ - => - * - * @var object[][] - */ - private $_listeners = []; - - /** - * Dispatches an event to all registered listeners. - * - * @param string $eventName The name of the event to dispatch. The name of the event is - * the name of the method that is invoked on listeners. - * @param EventArgs|null $eventArgs The event arguments to pass to the event handlers/listeners. - * If not supplied, the single empty EventArgs instance is used. - * - * @return void - */ - public function dispatchEvent($eventName, ?EventArgs $eventArgs = null) - { - if (! isset($this->_listeners[$eventName])) { - return; - } - - $eventArgs = $eventArgs ?? EventArgs::getEmptyInstance(); - - foreach ($this->_listeners[$eventName] as $listener) { - $listener->$eventName($eventArgs); - } - } - - /** - * Gets the listeners of a specific event or all listeners. - * - * @param string|null $event The name of the event. - * - * @return object[]|object[][] The event listeners for the specified event, or all event listeners. - */ - public function getListeners($event = null) - { - return $event ? $this->_listeners[$event] : $this->_listeners; - } - - /** - * Checks whether an event has any registered listeners. - * - * @param string $event - * - * @return bool TRUE if the specified event has any listeners, FALSE otherwise. - */ - public function hasListeners($event) - { - return ! empty($this->_listeners[$event]); - } - - /** - * Adds an event listener that listens on the specified events. - * - * @param string|string[] $events The event(s) to listen on. - * @param object $listener The listener object. - * - * @return void - */ - public function addEventListener($events, $listener) - { - // Picks the hash code related to that listener - $hash = spl_object_hash($listener); - - foreach ((array) $events as $event) { - // Overrides listener if a previous one was associated already - // Prevents duplicate listeners on same event (same instance only) - $this->_listeners[$event][$hash] = $listener; - } - } - - /** - * Removes an event listener from the specified events. - * - * @param string|string[] $events - * @param object $listener - * - * @return void - */ - public function removeEventListener($events, $listener) - { - // Picks the hash code related to that listener - $hash = spl_object_hash($listener); - - foreach ((array) $events as $event) { - unset($this->_listeners[$event][$hash]); - } - } - - /** - * Adds an EventSubscriber. The subscriber is asked for all the events it is - * interested in and added as a listener for these events. - * - * @param EventSubscriber $subscriber The subscriber. - * - * @return void - */ - public function addEventSubscriber(EventSubscriber $subscriber) - { - $this->addEventListener($subscriber->getSubscribedEvents(), $subscriber); - } - - /** - * Removes an EventSubscriber. The subscriber is asked for all the events it is - * interested in and removed as a listener for these events. - * - * @param EventSubscriber $subscriber The subscriber. - * - * @return void - */ - public function removeEventSubscriber(EventSubscriber $subscriber) - { - $this->removeEventListener($subscriber->getSubscribedEvents(), $subscriber); - } -} diff --git a/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php b/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php deleted file mode 100644 index 7d5e2ea..0000000 --- a/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php +++ /dev/null @@ -1,21 +0,0 @@ -input = $input; - $this->tokens = []; - - $this->reset(); - $this->scan($input); - } - - /** - * Resets the lexer. - * - * @return void - */ - public function reset() - { - $this->lookahead = null; - $this->token = null; - $this->peek = 0; - $this->position = 0; - } - - /** - * Resets the peek pointer to 0. - * - * @return void - */ - public function resetPeek() - { - $this->peek = 0; - } - - /** - * Resets the lexer position on the input to the given position. - * - * @param int $position Position to place the lexical scanner. - * - * @return void - */ - public function resetPosition($position = 0) - { - $this->position = $position; - } - - /** - * Retrieve the original lexer's input until a given position. - * - * @param int $position - * - * @return string - */ - public function getInputUntilPosition($position) - { - return substr($this->input, 0, $position); - } - - /** - * Checks whether a given token matches the current lookahead. - * - * @param int|string $token - * - * @return bool - */ - public function isNextToken($token) - { - return $this->lookahead !== null && $this->lookahead['type'] === $token; - } - - /** - * Checks whether any of the given tokens matches the current lookahead. - * - * @param array $tokens - * - * @return bool - */ - public function isNextTokenAny(array $tokens) - { - return $this->lookahead !== null && in_array($this->lookahead['type'], $tokens, true); - } - - /** - * Moves to the next token in the input string. - * - * @return bool - */ - public function moveNext() - { - $this->peek = 0; - $this->token = $this->lookahead; - $this->lookahead = isset($this->tokens[$this->position]) - ? $this->tokens[$this->position++] : null; - - return $this->lookahead !== null; - } - - /** - * Tells the lexer to skip input tokens until it sees a token with the given value. - * - * @param string $type The token type to skip until. - * - * @return void - */ - public function skipUntil($type) - { - while ($this->lookahead !== null && $this->lookahead['type'] !== $type) { - $this->moveNext(); - } - } - - /** - * Checks if given value is identical to the given token. - * - * @param mixed $value - * @param int|string $token - * - * @return bool - */ - public function isA($value, $token) - { - return $this->getType($value) === $token; - } - - /** - * Moves the lookahead token forward. - * - * @return array|null The next token or NULL if there are no more tokens ahead. - */ - public function peek() - { - if (isset($this->tokens[$this->position + $this->peek])) { - return $this->tokens[$this->position + $this->peek++]; - } - - return null; - } - - /** - * Peeks at the next token, returns it and immediately resets the peek. - * - * @return array|null The next token or NULL if there are no more tokens ahead. - */ - public function glimpse() - { - $peek = $this->peek(); - $this->peek = 0; - - return $peek; - } - - /** - * Scans the input string for tokens. - * - * @param string $input A query string. - * - * @return void - */ - protected function scan($input) - { - if (! isset($this->regex)) { - $this->regex = sprintf( - '/(%s)|%s/%s', - implode(')|(', $this->getCatchablePatterns()), - implode('|', $this->getNonCatchablePatterns()), - $this->getModifiers() - ); - } - - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - $matches = preg_split($this->regex, $input, -1, $flags); - - if ($matches === false) { - // Work around https://bugs.php.net/78122 - $matches = [[$input, 0]]; - } - - foreach ($matches as $match) { - // Must remain before 'value' assignment since it can change content - $type = $this->getType($match[0]); - - $this->tokens[] = [ - 'value' => $match[0], - 'type' => $type, - 'position' => $match[1], - ]; - } - } - - /** - * Gets the literal for a given token. - * - * @param int|string $token - * - * @return int|string - */ - public function getLiteral($token) - { - $className = static::class; - $reflClass = new ReflectionClass($className); - $constants = $reflClass->getConstants(); - - foreach ($constants as $name => $value) { - if ($value === $token) { - return $className . '::' . $name; - } - } - - return $token; - } - - /** - * Regex modifiers - * - * @return string - */ - protected function getModifiers() - { - return 'iu'; - } - - /** - * Lexical catchable patterns. - * - * @return array - */ - abstract protected function getCatchablePatterns(); - - /** - * Lexical non-catchable patterns. - * - * @return array - */ - abstract protected function getNonCatchablePatterns(); - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @param string $value - * - * @return int|string|null - */ - abstract protected function getType(&$value); -} diff --git a/vendor/doctrine/persistence/.doctrine-project.json b/vendor/doctrine/persistence/.doctrine-project.json deleted file mode 100644 index 23e2906..0000000 --- a/vendor/doctrine/persistence/.doctrine-project.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "active": true, - "name": "Persistence", - "slug": "persistence", - "docsSlug": "doctrine-persistence", - "versions": [ - { - "name": "3.0", - "branchName": "3.0.x", - "slug": "latest", - "upcoming": true - }, - { - "name": "2.1", - "branchName": "2.1.x", - "slug": "2.1", - "upcoming": true - }, - { - "name": "2.0", - "branchName": "2.0.x", - "slug": "2.0", - "current": true, - "aliases": [ - "current", - "stable" - ] - }, - { - "name": "1.4", - "branchName": "1.4.x", - "slug": "1.4", - "maintained": false - }, - { - "name": "1.3", - "branchName": "1.3.x", - "slug": "1.3", - "maintained": false - }, - { - "name": "1.2", - "branchName": "1.2.x", - "slug": "1.2", - "maintained": false - }, - { - "name": "1.1", - "branchName": "1.1.x", - "slug": "1.1", - "maintained": false - }, - { - "name": "1.0", - "branchName": "1.0.x", - "slug": "1.0", - "maintained": false - } - ] -} diff --git a/vendor/doctrine/persistence/.github/workflows/coding-standards.yml b/vendor/doctrine/persistence/.github/workflows/coding-standards.yml deleted file mode 100644 index 18fcfa0..0000000 --- a/vendor/doctrine/persistence/.github/workflows/coding-standards.yml +++ /dev/null @@ -1,50 +0,0 @@ - -name: "Coding Standards" - -on: - pull_request: - branches: - - "*.x" - - "master" - push: - branches: - - "*.x" - - "master" - -env: - COMPOSER_ROOT_VERSION: "2.1" - -jobs: - coding-standards: - name: "Coding Standards" - runs-on: "ubuntu-20.04" - - strategy: - matrix: - php-version: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: "none" - php-version: "${{ matrix.php-version }}" - tools: "cs2pr" - - - name: "Cache dependencies installed with Composer" - uses: "actions/cache@v2" - with: - path: "~/.composer/cache" - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" - - - name: "Install dependencies with Composer" - run: "composer install --no-interaction --no-progress --no-suggest" - - # https://github.com/doctrine/.github/issues/3 - - name: "Run PHP_CodeSniffer" - run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr" diff --git a/vendor/doctrine/persistence/.github/workflows/continuous-integration.yml b/vendor/doctrine/persistence/.github/workflows/continuous-integration.yml deleted file mode 100644 index eb32fcb..0000000 --- a/vendor/doctrine/persistence/.github/workflows/continuous-integration.yml +++ /dev/null @@ -1,79 +0,0 @@ - -name: "Continuous Integration" - -on: - pull_request: null - -env: - COMPOSER_ROOT_VERSION: "2.1" - -jobs: - phpunit: - name: "PHPUnit" - runs-on: "ubuntu-20.04" - - strategy: - matrix: - php-version: - - "7.1" - - "7.2" - - "7.3" - - "7.4" - - "8.0" - deps: - - "normal" - include: - - deps: "low" - php-version: "7.1" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - with: - fetch-depth: 2 - - - name: "Install PHP with pcov" - uses: "shivammathur/setup-php@v2" - if: "${{ matrix.php-version != '7.1' }}" - with: - php-version: "${{ matrix.php-version }}" - coverage: "pcov" - - - name: "Install PHP with xdebug" - uses: "shivammathur/setup-php@v2" - if: "${{ matrix.php-version == '7.1' }}" - with: - php-version: "${{ matrix.php-version }}" - coverage: "xdebug" - - - name: "Cache dependencies installed with composer" - uses: "actions/cache@v2" - with: - path: "~/.composer/cache" - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" - - # Remove this block when - # https://github.com/felixfbecker/php-language-server-protocol/pull/15 is - # merged and released - - name: "Remove dependency on vimeo/psalm for PHP8" - run: "composer remove --dev --no-update vimeo/psalm" - if: "${{ matrix.php-version == '8.0' }}" - - - name: "Downgrade Composer" - run: "composer self-update --1" - if: "${{ matrix.php-version == '7.1' }}" - - - name: "Update dependencies with composer" - run: "composer update --no-interaction --no-progress --no-suggest" - if: "${{ matrix.deps == 'normal' }}" - - - name: "Install lowest possible dependencies with composer" - run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-lowest" - if: "${{ matrix.deps == 'low' }}" - - - name: "Run PHPUnit" - run: "vendor/bin/phpunit --coverage-clover=coverage.xml" - - - name: "Upload to Codecov" - uses: "codecov/codecov-action@v1" diff --git a/vendor/doctrine/persistence/.github/workflows/release-on-milestone-closed.yml b/vendor/doctrine/persistence/.github/workflows/release-on-milestone-closed.yml deleted file mode 100644 index 70ccbdb..0000000 --- a/vendor/doctrine/persistence/.github/workflows/release-on-milestone-closed.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: "Automatic Releases" - -on: - milestone: - types: - - "closed" - -jobs: - release: - name: "Git tag, release & create merge-up PR" - runs-on: "ubuntu-20.04" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Release" - uses: "laminas/automatic-releases@v1" - with: - command-name: "laminas:automatic-releases:release" - env: - "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} - "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} - "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} - "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} - - - name: "Create Merge-Up Pull Request" - uses: "laminas/automatic-releases@v1" - with: - command-name: "laminas:automatic-releases:create-merge-up-pull-request" - env: - "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} - "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} - "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} - "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} - - - name: "Create and/or Switch to new Release Branch" - uses: "laminas/automatic-releases@v1" - with: - command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor" - env: - "GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }} - "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} - "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} - "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} - - - name: "Create new milestones" - uses: "laminas/automatic-releases@v1" - with: - command-name: "laminas:automatic-releases:create-milestones" - env: - "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} - "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} - "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} - "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} diff --git a/vendor/doctrine/persistence/.github/workflows/static-analysis.yml b/vendor/doctrine/persistence/.github/workflows/static-analysis.yml deleted file mode 100644 index 5288ee1..0000000 --- a/vendor/doctrine/persistence/.github/workflows/static-analysis.yml +++ /dev/null @@ -1,64 +0,0 @@ - -name: "Static Analysis" - -on: - pull_request: - branches: - - "*.x" - - "master" - push: - branches: - - "*.x" - - "master" -env: - COMPOSER_ROOT_VERSION: "2.1" - -jobs: - static-analysis-phpstan: - name: "Static Analysis with PHPStan" - runs-on: "ubuntu-20.04" - - strategy: - matrix: - php-version: - - "7.4" - - steps: - - name: "Checkout code" - uses: "actions/checkout@v2" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: "none" - php-version: "${{ matrix.php-version }}" - tools: "cs2pr" - - - name: "Cache dependencies installed with composer" - uses: "actions/cache@v2" - with: - path: "~/.composer/cache" - key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" - restore-keys: "php-${{ matrix.php-version }}-composer-locked-" - - - name: "Install dependencies with composer" - run: "composer install --no-interaction --no-progress --no-suggest" - - - name: "Run a static analysis with phpstan/phpstan" - run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr" - - static-analysis-psalm: - name: "Static Analysis with Psalm" - runs-on: "ubuntu-20.04" - - strategy: - matrix: - php-version: - - "7.4" - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Psalm - uses: docker://vimeo/psalm-github-actions diff --git a/vendor/doctrine/persistence/LICENSE b/vendor/doctrine/persistence/LICENSE deleted file mode 100644 index 8c38cc1..0000000 --- a/vendor/doctrine/persistence/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2015 Doctrine Project - -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/vendor/doctrine/persistence/README.md b/vendor/doctrine/persistence/README.md deleted file mode 100644 index a9f564e..0000000 --- a/vendor/doctrine/persistence/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Doctrine Persistence - -[![Build Status](https://travis-ci.org/doctrine/persistence.svg)](https://travis-ci.org/doctrine/persistence) -[![Code Coverage](https://codecov.io/gh/doctrine/persistence/branch/2.1.x/graph/badge.svg)](https://codecov.io/gh/doctrine/persistence/branch/2.1.x) - -The Doctrine Persistence project is a library that provides common abstractions for object mapper persistence. - -## More resources: - -* [Website](https://www.doctrine-project.org/) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-persistence/en/latest/index.html) -* [Downloads](https://github.com/doctrine/persistence/releases) diff --git a/vendor/doctrine/persistence/UPGRADE-1.2.md b/vendor/doctrine/persistence/UPGRADE-1.2.md deleted file mode 100644 index 0c0115d..0000000 --- a/vendor/doctrine/persistence/UPGRADE-1.2.md +++ /dev/null @@ -1,6 +0,0 @@ -UPGRADE FROM 1.x to 1.2 -======================= - -* Deprecated `ObjectManager::merge()`. Please handle merge operations in your application instead. -* Deprecated `ObjectManager::detach()`. Please use `ObjectManager::clear()` instead. -* Deprecated `PersistentObject` class. Please implement this functionality directly in your application if you want ActiveRecord style functionality. diff --git a/vendor/doctrine/persistence/composer.json b/vendor/doctrine/persistence/composer.json deleted file mode 100644 index ccf0b3d..0000000 --- a/vendor/doctrine/persistence/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "doctrine/persistence", - "type": "library", - "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "keywords": [ - "persistence", - "object", - "mapper", - "orm", - "odm" - ], - "homepage": "https://doctrine-project.org/projects/persistence.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}, - {"name": "Marco Pivetta", "email": "ocramius@gmail.com"} - ], - "require": { - "php": "^7.1 || ^8.0", - "doctrine/annotations": "^1.0", - "doctrine/cache": "^1.0", - "doctrine/collections": "^1.0", - "doctrine/event-manager": "^1.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.11", - "phpstan/phpstan": "^0.12", - "doctrine/coding-standard": "^6.0 || ^8.0", - "doctrine/common": "^3.0", - "phpunit/phpunit": "^7.5.20 || ^8.0 || ^9.0", - "vimeo/psalm": "^3.11" - }, - "conflict": { - "doctrine/common": "<2.10@dev" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common", - "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\": "tests/Doctrine/Tests", - "Doctrine\\Tests_PHP74\\": "tests/Doctrine/Tests_PHP74" - } - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/PersistentObject.php b/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/PersistentObject.php deleted file mode 100644 index d75f127..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/PersistentObject.php +++ /dev/null @@ -1,238 +0,0 @@ -getId(); // method exists through __call - */ -abstract class PersistentObject implements ObjectManagerAware -{ - /** @var ObjectManager|null */ - private static $objectManager = null; - - /** @var ClassMetadata|null */ - private $cm = null; - - /** - * Sets the object manager responsible for all persistent object base classes. - * - * @return void - */ - public static function setObjectManager(?ObjectManager $objectManager = null) - { - self::$objectManager = $objectManager; - } - - /** - * @return ObjectManager|null - */ - public static function getObjectManager() - { - return self::$objectManager; - } - - /** - * Injects the Doctrine Object Manager. - * - * @return void - * - * @throws RuntimeException - */ - public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata) - { - if ($objectManager !== self::$objectManager) { - throw new RuntimeException('Trying to use PersistentObject with different ObjectManager instances. ' . - 'Was PersistentObject::setObjectManager() called?'); - } - - $this->cm = $classMetadata; - } - - /** - * Sets a persistent fields value. - * - * @param string $field - * @param mixed[] $args - * - * @return void - * - * @throws BadMethodCallException When no persistent field exists by that name. - * @throws InvalidArgumentException When the wrong target object type is passed to an association. - */ - private function set($field, $args) - { - if ($this->cm->hasField($field) && ! $this->cm->isIdentifier($field)) { - $this->$field = $args[0]; - } elseif ($this->cm->hasAssociation($field) && $this->cm->isSingleValuedAssociation($field)) { - $targetClass = $this->cm->getAssociationTargetClass($field); - if (! ($args[0] instanceof $targetClass) && $args[0] !== null) { - throw new InvalidArgumentException("Expected persistent object of type '" . $targetClass . "'"); - } - - $this->$field = $args[0]; - $this->completeOwningSide($field, $targetClass, $args[0]); - } else { - throw new BadMethodCallException("no field with name '" . $field . "' exists on '" . $this->cm->getName() . "'"); - } - } - - /** - * Gets a persistent field value. - * - * @param string $field - * - * @return mixed - * - * @throws BadMethodCallException When no persistent field exists by that name. - */ - private function get($field) - { - if ($this->cm->hasField($field) || $this->cm->hasAssociation($field)) { - return $this->$field; - } - - throw new BadMethodCallException("no field with name '" . $field . "' exists on '" . $this->cm->getName() . "'"); - } - - /** - * If this is an inverse side association, completes the owning side. - * - * @param string $field - * @param ClassMetadata $targetClass - * @param object $targetObject - * - * @return void - */ - private function completeOwningSide($field, $targetClass, $targetObject) - { - // add this object on the owning side as well, for obvious infinite recursion - // reasons this is only done when called on the inverse side. - if (! $this->cm->isAssociationInverseSide($field)) { - return; - } - - $mappedByField = $this->cm->getAssociationMappedByTargetField($field); - $targetMetadata = self::$objectManager->getClassMetadata($targetClass); - - $setter = ($targetMetadata->isCollectionValuedAssociation($mappedByField) ? 'add' : 'set') . $mappedByField; - $targetObject->$setter($this); - } - - /** - * Adds an object to a collection. - * - * @param string $field - * @param mixed[] $args - * - * @return void - * - * @throws BadMethodCallException - * @throws InvalidArgumentException - */ - private function add($field, $args) - { - if (! $this->cm->hasAssociation($field) || ! $this->cm->isCollectionValuedAssociation($field)) { - throw new BadMethodCallException('There is no method add' . $field . '() on ' . $this->cm->getName()); - } - - $targetClass = $this->cm->getAssociationTargetClass($field); - if (! ($args[0] instanceof $targetClass)) { - throw new InvalidArgumentException("Expected persistent object of type '" . $targetClass . "'"); - } - - if (! ($this->$field instanceof Collection)) { - $this->$field = new ArrayCollection($this->$field ?: []); - } - - $this->$field->add($args[0]); - $this->completeOwningSide($field, $targetClass, $args[0]); - } - - /** - * Initializes Doctrine Metadata for this class. - * - * @return void - * - * @throws RuntimeException - */ - private function initializeDoctrine() - { - if ($this->cm !== null) { - return; - } - - if (! self::$objectManager) { - throw new RuntimeException('No runtime object manager set. Call PersistentObject#setObjectManager().'); - } - - $this->cm = self::$objectManager->getClassMetadata(static::class); - } - - /** - * Magic methods. - * - * @param string $method - * @param mixed[] $args - * - * @return mixed - * - * @throws BadMethodCallException - */ - public function __call($method, $args) - { - $this->initializeDoctrine(); - - $command = substr($method, 0, 3); - $field = lcfirst(substr($method, 3)); - if ($command === 'set') { - $this->set($field, $args); - } elseif ($command === 'get') { - return $this->get($field); - } elseif ($command === 'add') { - $this->add($field, $args); - } else { - throw new BadMethodCallException('There is no method ' . $method . ' on ' . $this->cm->getName()); - } - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php deleted file mode 100644 index 63ff9b0..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php +++ /dev/null @@ -1,249 +0,0 @@ -name = $name; - $this->connections = $connections; - $this->managers = $managers; - $this->defaultConnection = $defaultConnection; - $this->defaultManager = $defaultManager; - $this->proxyInterfaceName = $proxyInterfaceName; - } - - /** - * Fetches/creates the given services. - * - * A service in this context is connection or a manager instance. - * - * @param string $name The name of the service. - * - * @return ObjectManager The instance of the given service. - */ - abstract protected function getService($name); - - /** - * Resets the given services. - * - * A service in this context is connection or a manager instance. - * - * @param string $name The name of the service. - * - * @return void - */ - abstract protected function resetService($name); - - /** - * Gets the name of the registry. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getConnection($name = null) - { - if ($name === null) { - $name = $this->defaultConnection; - } - - if (! isset($this->connections[$name])) { - throw new InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name)); - } - - return $this->getService($this->connections[$name]); - } - - /** - * {@inheritdoc} - */ - public function getConnectionNames() - { - return $this->connections; - } - - /** - * {@inheritdoc} - */ - public function getConnections() - { - $connections = []; - foreach ($this->connections as $name => $id) { - $connections[$name] = $this->getService($id); - } - - return $connections; - } - - /** - * {@inheritdoc} - */ - public function getDefaultConnectionName() - { - return $this->defaultConnection; - } - - /** - * {@inheritdoc} - */ - public function getDefaultManagerName() - { - return $this->defaultManager; - } - - /** - * {@inheritdoc} - * - * @throws InvalidArgumentException - */ - public function getManager($name = null) - { - if ($name === null) { - $name = $this->defaultManager; - } - - if (! isset($this->managers[$name])) { - throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); - } - - return $this->getService($this->managers[$name]); - } - - /** - * {@inheritdoc} - */ - public function getManagerForClass($class) - { - // Check for namespace alias - if (strpos($class, ':') !== false) { - [$namespaceAlias, $simpleClassName] = explode(':', $class, 2); - $class = $this->getAliasNamespace($namespaceAlias) . '\\' . $simpleClassName; - } - - $proxyClass = new ReflectionClass($class); - - if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { - $parentClass = $proxyClass->getParentClass(); - - if (! $parentClass) { - return null; - } - - $class = $parentClass->getName(); - } - - foreach ($this->managers as $id) { - $manager = $this->getService($id); - - if (! $manager->getMetadataFactory()->isTransient($class)) { - return $manager; - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getManagerNames() - { - return $this->managers; - } - - /** - * {@inheritdoc} - */ - public function getManagers() - { - $dms = []; - foreach ($this->managers as $name => $id) { - $dms[$name] = $this->getService($id); - } - - return $dms; - } - - /** - * {@inheritdoc} - */ - public function getRepository($persistentObject, $persistentManagerName = null) - { - return $this - ->selectManager($persistentObject, $persistentManagerName) - ->getRepository($persistentObject); - } - - /** - * {@inheritdoc} - */ - public function resetManager($name = null) - { - if ($name === null) { - $name = $this->defaultManager; - } - - if (! isset($this->managers[$name])) { - throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); - } - - // force the creation of a new document manager - // if the current one is closed - $this->resetService($this->managers[$name]); - - return $this->getManager($name); - } - - private function selectManager(string $persistentObjectName, ?string $persistentManagerName = null): ObjectManager - { - if ($persistentManagerName !== null) { - return $this->getManager($persistentManagerName); - } - - return $this->getManagerForClass($persistentObjectName) ?? $this->getManager(); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php deleted file mode 100644 index 73e33b5..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php +++ /dev/null @@ -1,39 +0,0 @@ -object = $object; - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated entity. - * - * @deprecated - * - * @return object - */ - public function getEntity() - { - return $this->object; - } - - /** - * Retrieves the associated object. - * - * @return object - */ - public function getObject() - { - return $this->object; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php deleted file mode 100644 index 627cc5c..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php +++ /dev/null @@ -1,45 +0,0 @@ -classMetadata = $classMetadata; - $this->objectManager = $objectManager; - } - - /** - * Retrieves the associated ClassMetadata. - * - * @return ClassMetadata - */ - public function getClassMetadata() - { - return $this->classMetadata; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php deleted file mode 100644 index 510aff2..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php +++ /dev/null @@ -1,30 +0,0 @@ -objectManager = $objectManager; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php deleted file mode 100644 index ce288d8..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php +++ /dev/null @@ -1,58 +0,0 @@ -objectManager = $objectManager; - $this->entityClass = $entityClass; - } - - /** - * Retrieves the associated ObjectManager. - * - * @return ObjectManager - */ - public function getObjectManager() - { - return $this->objectManager; - } - - /** - * Returns the name of the entity class that is cleared, or null if all are cleared. - * - * @return string|null - */ - public function getEntityClass() - { - return $this->entityClass; - } - - /** - * Returns whether this event clears all entities. - * - * @return bool - */ - public function clearsAllEntities() - { - return $this->entityClass === null; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php deleted file mode 100644 index 177d944..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php +++ /dev/null @@ -1,114 +0,0 @@ -entityChangeSet = &$changeSet; - } - - /** - * Retrieves the entity changeset. - * - * @return mixed[][] - */ - public function getEntityChangeSet() - { - return $this->entityChangeSet; - } - - /** - * Checks if field has a changeset. - * - * @param string $field - * - * @return bool - */ - public function hasChangedField($field) - { - return isset($this->entityChangeSet[$field]); - } - - /** - * Gets the old value of the changeset of the changed field. - * - * @param string $field - * - * @return mixed - */ - public function getOldValue($field) - { - $this->assertValidField($field); - - return $this->entityChangeSet[$field][0]; - } - - /** - * Gets the new value of the changeset of the changed field. - * - * @param string $field - * - * @return mixed - */ - public function getNewValue($field) - { - $this->assertValidField($field); - - return $this->entityChangeSet[$field][1]; - } - - /** - * Sets the new value of this field. - * - * @param string $field - * @param mixed $value - * - * @return void - */ - public function setNewValue($field, $value) - { - $this->assertValidField($field); - - $this->entityChangeSet[$field][1] = $value; - } - - /** - * Asserts the field exists in changeset. - * - * @param string $field - * - * @return void - * - * @throws InvalidArgumentException - */ - private function assertValidField($field) - { - if (! isset($this->entityChangeSet[$field])) { - throw new InvalidArgumentException(sprintf( - 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', - $field, - get_class($this->getObject()) - )); - } - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php deleted file mode 100644 index 6f89e0c..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php +++ /dev/null @@ -1,92 +0,0 @@ - $persistentObject - * @psalm-return ObjectRepository - */ - public function getRepository($persistentObject, $persistentManagerName = null); - - /** - * Gets the object manager associated with a given class. - * - * @param string $class A persistent object class name. - * - * @return ObjectManager|null - */ - public function getManagerForClass($class); -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php deleted file mode 100644 index 89dfdbb..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php +++ /dev/null @@ -1,416 +0,0 @@ -cacheDriver = $cacheDriver; - } - - /** - * Gets the cache driver used by the factory to cache ClassMetadata instances. - * - * @return Cache|null - */ - public function getCacheDriver() - { - return $this->cacheDriver; - } - - /** - * Returns an array of all the loaded metadata currently in memory. - * - * @return ClassMetadata[] - */ - public function getLoadedMetadata() - { - return $this->loadedMetadata; - } - - /** - * Forces the factory to load the metadata of all classes known to the underlying - * mapping driver. - * - * @return ClassMetadata[] The ClassMetadata instances of all mapped classes. - */ - public function getAllMetadata() - { - if (! $this->initialized) { - $this->initialize(); - } - - $driver = $this->getDriver(); - $metadata = []; - foreach ($driver->getAllClassNames() as $className) { - $metadata[] = $this->getMetadataFor($className); - } - - return $metadata; - } - - /** - * Lazy initialization of this stuff, especially the metadata driver, - * since these are not needed at all when a metadata cache is active. - * - * @return void - */ - abstract protected function initialize(); - - /** - * Gets the fully qualified class-name from the namespace alias. - * - * @param string $namespaceAlias - * @param string $simpleClassName - * - * @return string - */ - abstract protected function getFqcnFromAlias($namespaceAlias, $simpleClassName); - - /** - * Returns the mapping driver implementation. - * - * @return MappingDriver - */ - abstract protected function getDriver(); - - /** - * Wakes up reflection after ClassMetadata gets unserialized from cache. - * - * @return void - */ - abstract protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService); - - /** - * Initializes Reflection after ClassMetadata was constructed. - * - * @return void - */ - abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService); - - /** - * Checks whether the class metadata is an entity. - * - * This method should return false for mapped superclasses or embedded classes. - * - * @return bool - */ - abstract protected function isEntity(ClassMetadata $class); - - /** - * Gets the class metadata descriptor for a class. - * - * @param string $className The name of the class. - * - * @return ClassMetadata - * - * @throws ReflectionException - * @throws MappingException - */ - public function getMetadataFor($className) - { - if (isset($this->loadedMetadata[$className])) { - return $this->loadedMetadata[$className]; - } - - // Check for namespace alias - if (strpos($className, ':') !== false) { - [$namespaceAlias, $simpleClassName] = explode(':', $className, 2); - - $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); - } else { - $realClassName = $this->getRealClass($className); - } - - if (isset($this->loadedMetadata[$realClassName])) { - // We do not have the alias name in the map, include it - return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; - } - - $loadingException = null; - - try { - if ($this->cacheDriver) { - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); - if ($cached instanceof ClassMetadata) { - $this->loadedMetadata[$realClassName] = $cached; - - $this->wakeupReflection($cached, $this->getReflectionService()); - } else { - foreach ($this->loadMetadata($realClassName) as $loadedClassName) { - $this->cacheDriver->save( - $loadedClassName . $this->cacheSalt, - $this->loadedMetadata[$loadedClassName] - ); - } - } - } else { - $this->loadMetadata($realClassName); - } - } catch (MappingException $loadingException) { - $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName); - - if (! $fallbackMetadataResponse) { - throw $loadingException; - } - - $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse; - } - - if ($className !== $realClassName) { - // We do not have the alias name in the map, include it - $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; - } - - return $this->loadedMetadata[$className]; - } - - /** - * Checks whether the factory has the metadata for a class loaded already. - * - * @param string $className - * - * @return bool TRUE if the metadata of the class in question is already loaded, FALSE otherwise. - */ - public function hasMetadataFor($className) - { - return isset($this->loadedMetadata[$className]); - } - - /** - * Sets the metadata descriptor for a specific class. - * - * NOTE: This is only useful in very special cases, like when generating proxy classes. - * - * @param string $className - * @param ClassMetadata $class - * - * @return void - */ - public function setMetadataFor($className, $class) - { - $this->loadedMetadata[$className] = $class; - } - - /** - * Gets an array of parent classes for the given entity class. - * - * @param string $name - * - * @return string[] - */ - protected function getParentClasses($name) - { - // Collect parent classes, ignoring transient (not-mapped) classes. - $parentClasses = []; - - foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { - if ($this->getDriver()->isTransient($parentClass)) { - continue; - } - - $parentClasses[] = $parentClass; - } - - return $parentClasses; - } - - /** - * Loads the metadata of the class in question and all it's ancestors whose metadata - * is still not loaded. - * - * Important: The class $name does not necessarily exist at this point here. - * Scenarios in a code-generation setup might have access to XML/YAML - * Mapping files without the actual PHP code existing here. That is why the - * {@see Doctrine\Common\Persistence\Mapping\ReflectionService} interface - * should be used for reflection. - * - * @param string $name The name of the class for which the metadata should get loaded. - * - * @return string[] - */ - protected function loadMetadata($name) - { - if (! $this->initialized) { - $this->initialize(); - } - - $loaded = []; - - $parentClasses = $this->getParentClasses($name); - $parentClasses[] = $name; - - // Move down the hierarchy of parent classes, starting from the topmost class - $parent = null; - $rootEntityFound = false; - $visited = []; - $reflService = $this->getReflectionService(); - foreach ($parentClasses as $className) { - if (isset($this->loadedMetadata[$className])) { - $parent = $this->loadedMetadata[$className]; - if ($this->isEntity($parent)) { - $rootEntityFound = true; - array_unshift($visited, $className); - } - - continue; - } - - $class = $this->newClassMetadataInstance($className); - $this->initializeReflection($class, $reflService); - - $this->doLoadMetadata($class, $parent, $rootEntityFound, $visited); - - $this->loadedMetadata[$className] = $class; - - $parent = $class; - - if ($this->isEntity($class)) { - $rootEntityFound = true; - array_unshift($visited, $className); - } - - $this->wakeupReflection($class, $reflService); - - $loaded[] = $className; - } - - return $loaded; - } - - /** - * Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions - * - * Override this method to implement a fallback strategy for failed metadata loading - * - * @param string $className - * - * @return ClassMetadata|null - */ - protected function onNotFoundMetadata($className) - { - return null; - } - - /** - * Actually loads the metadata from the underlying metadata. - * - * @param ClassMetadata $class - * @param ClassMetadata|null $parent - * @param bool $rootEntityFound - * @param string[] $nonSuperclassParents All parent class names - * that are not marked as mapped superclasses. - * - * @return void - */ - abstract protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents); - - /** - * Creates a new ClassMetadata instance for the given class name. - * - * @param string $className - * - * @return ClassMetadata - */ - abstract protected function newClassMetadataInstance($className); - - /** - * {@inheritDoc} - */ - public function isTransient($class) - { - if (! $this->initialized) { - $this->initialize(); - } - - // Check for namespace alias - if (strpos($class, ':') !== false) { - [$namespaceAlias, $simpleClassName] = explode(':', $class, 2); - $class = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); - } - - return $this->getDriver()->isTransient($class); - } - - /** - * Sets the reflectionService. - * - * @return void - */ - public function setReflectionService(ReflectionService $reflectionService) - { - $this->reflectionService = $reflectionService; - } - - /** - * Gets the reflection service associated with this metadata factory. - * - * @return ReflectionService - */ - public function getReflectionService() - { - if ($this->reflectionService === null) { - $this->reflectionService = new RuntimeReflectionService(); - } - - return $this->reflectionService; - } - - /** - * Gets the real class name of a class name that could be a proxy. - */ - private function getRealClass(string $class): string - { - $pos = strrpos($class, '\\' . Proxy::MARKER . '\\'); - - if ($pos === false) { - return $class; - } - - return substr($class, $pos + Proxy::MARKER_LENGTH + 2); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php deleted file mode 100644 index 7dc556c..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php +++ /dev/null @@ -1,154 +0,0 @@ -reader = $reader; - if (! $paths) { - return; - } - - $this->addPaths((array) $paths); - } - - /** - * Appends lookup paths to metadata driver. - * - * @param string[] $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * Retrieves the defined metadata lookup paths. - * - * @return string[] - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Append exclude lookup paths to metadata driver. - * - * @param string[] $paths - */ - public function addExcludePaths(array $paths) - { - $this->excludePaths = array_unique(array_merge($this->excludePaths, $paths)); - } - - /** - * Retrieve the defined metadata lookup exclude paths. - * - * @return string[] - */ - public function getExcludePaths() - { - return $this->excludePaths; - } - - /** - * Retrieve the current annotation reader - * - * @return Reader - */ - public function getReader() - { - return $this->reader; - } - - /** - * Gets the file extension used to look for mapping files under. - * - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * Returns whether the class with the specified name is transient. Only non-transient - * classes, that is entities and mapped superclasses, should have their metadata loaded. - * - * A class is non-transient if it is annotated with an annotation - * from the {@see AnnotationDriver::entityAnnotationClasses}. - * - * @param string $className - * - * @return bool - */ - public function isTransient($className) - { - $classAnnotations = $this->reader->getClassAnnotations(new ReflectionClass($className)); - - foreach ($classAnnotations as $annot) { - if (isset($this->entityAnnotationClasses[get_class($annot)])) { - return false; - } - } - - return true; - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - if ($this->classNames !== null) { - return $this->classNames; - } - - if (! $this->paths) { - throw MappingException::pathRequired(); - } - - $classes = []; - $includedFiles = []; - - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RegexIterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), - RecursiveIteratorIterator::LEAVES_ONLY - ), - '/^.+' . preg_quote($this->fileExtension) . '$/i', - RecursiveRegexIterator::GET_MATCH - ); - - foreach ($iterator as $file) { - $sourceFile = $file[0]; - - if (! preg_match('(^phar:)i', $sourceFile)) { - $sourceFile = realpath($sourceFile); - } - - foreach ($this->excludePaths as $excludePath) { - $exclude = str_replace('\\', '/', realpath($excludePath)); - $current = str_replace('\\', '/', $sourceFile); - - if (strpos($current, $exclude) !== false) { - continue 2; - } - } - - require_once $sourceFile; - - $includedFiles[] = $sourceFile; - } - } - - $declared = get_declared_classes(); - - foreach ($declared as $className) { - $rc = new ReflectionClass($className); - $sourceFile = $rc->getFileName(); - if (! in_array($sourceFile, $includedFiles) || $this->isTransient($className)) { - continue; - } - - $classes[] = $className; - } - - $this->classNames = $classes; - - return $classes; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php deleted file mode 100644 index a2eb17c..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php +++ /dev/null @@ -1,163 +0,0 @@ -addPaths((array) $paths); - $this->fileExtension = $fileExtension; - } - - /** - * Appends lookup paths to metadata driver. - * - * @param string[] $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * Retrieves the defined metadata lookup paths. - * - * @return string[] - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Gets the file extension used to look for mapping files under. - * - * @return string|null - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string|null $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - */ - public function findMappingFile($className) - { - $fileName = str_replace('\\', '.', $className) . $this->fileExtension; - - // Check whether file exists - foreach ($this->paths as $path) { - if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { - return $path . DIRECTORY_SEPARATOR . $fileName; - } - } - - throw MappingException::mappingFileNotFound($className, $fileName); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames($globalBasename) - { - $classes = []; - - if ($this->paths) { - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path), - RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - $fileName = $file->getBasename($this->fileExtension); - - if ($fileName === $file->getBasename() || $fileName === $globalBasename) { - continue; - } - - // NOTE: All files found here means classes are not transient! - $classes[] = str_replace('.', '\\', $fileName); - } - } - } - - return $classes; - } - - /** - * {@inheritDoc} - */ - public function fileExists($className) - { - $fileName = str_replace('\\', '.', $className) . $this->fileExtension; - - // Check whether file exists - foreach ((array) $this->paths as $path) { - if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php deleted file mode 100644 index 208a334..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php +++ /dev/null @@ -1,195 +0,0 @@ -locator = $locator; - } else { - $this->locator = new DefaultFileLocator((array) $locator, $fileExtension); - } - } - - /** - * Sets the global basename. - * - * @param string $file - * - * @return void - */ - public function setGlobalBasename($file) - { - $this->globalBasename = $file; - } - - /** - * Retrieves the global basename. - * - * @return string|null - */ - public function getGlobalBasename() - { - return $this->globalBasename; - } - - /** - * Gets the element of schema meta data for the class from the mapping file. - * This will lazily load the mapping file if it is not loaded yet. - * - * @param string $className - * - * @return ClassMetadata The element of schema meta data. - * - * @throws MappingException - */ - public function getElement($className) - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (isset($this->classCache[$className])) { - return $this->classCache[$className]; - } - - $result = $this->loadMappingFile($this->locator->findMappingFile($className)); - if (! isset($result[$className])) { - throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension()); - } - - $this->classCache[$className] = $result[$className]; - - return $result[$className]; - } - - /** - * {@inheritDoc} - */ - public function isTransient($className) - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (isset($this->classCache[$className])) { - return false; - } - - return ! $this->locator->fileExists($className); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - if ($this->classCache === null) { - $this->initialize(); - } - - if (! $this->classCache) { - return (array) $this->locator->getAllClassNames($this->globalBasename); - } - - return array_unique(array_merge( - array_keys($this->classCache), - (array) $this->locator->getAllClassNames($this->globalBasename) - )); - } - - /** - * Loads a mapping file with the given name and returns a map - * from class/entity names to their corresponding file driver elements. - * - * @param string $file The mapping file to load. - * - * @return ClassMetadata[] - */ - abstract protected function loadMappingFile($file); - - /** - * Initializes the class cache from all the global files. - * - * Using this feature adds a substantial performance hit to file drivers as - * more metadata has to be loaded into memory than might actually be - * necessary. This may not be relevant to scenarios where caching of - * metadata is in place, however hits very hard in scenarios where no - * caching is used. - * - * @return void - */ - protected function initialize() - { - $this->classCache = []; - if ($this->globalBasename === null) { - return; - } - - foreach ($this->locator->getPaths() as $path) { - $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension(); - if (! is_file($file)) { - continue; - } - - $this->classCache = array_merge( - $this->classCache, - $this->loadMappingFile($file) - ); - } - } - - /** - * Retrieves the locator used to discover mapping files by className. - * - * @return FileLocator - */ - public function getLocator() - { - return $this->locator; - } - - /** - * Sets the locator used to discover mapping files by className. - */ - public function setLocator(FileLocator $locator) - { - $this->locator = $locator; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php deleted file mode 100644 index a4dd570..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php +++ /dev/null @@ -1,53 +0,0 @@ -defaultDriver; - } - - /** - * Set the default driver. - * - * @return void - */ - public function setDefaultDriver(MappingDriver $driver) - { - $this->defaultDriver = $driver; - } - - /** - * Adds a nested driver. - * - * @param string $namespace - * - * @return void - */ - public function addDriver(MappingDriver $nestedDriver, $namespace) - { - $this->drivers[$namespace] = $nestedDriver; - } - - /** - * Gets the array of nested drivers. - * - * @return MappingDriver[] $drivers - */ - public function getDrivers() - { - return $this->drivers; - } - - /** - * {@inheritDoc} - */ - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - foreach ($this->drivers as $namespace => $driver) { - assert($driver instanceof MappingDriver); - if (strpos($className, $namespace) === 0) { - $driver->loadMetadataForClass($className, $metadata); - - return; - } - } - - if ($this->defaultDriver !== null) { - $this->defaultDriver->loadMetadataForClass($className, $metadata); - - return; - } - - throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers)); - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames() - { - $classNames = []; - $driverClasses = []; - - foreach ($this->drivers as $namespace => $driver) { - assert($driver instanceof MappingDriver); - $oid = spl_object_hash($driver); - - if (! isset($driverClasses[$oid])) { - $driverClasses[$oid] = $driver->getAllClassNames(); - } - - foreach ($driverClasses[$oid] as $className) { - if (strpos($className, $namespace) !== 0) { - continue; - } - - $classNames[$className] = true; - } - } - - if ($this->defaultDriver !== null) { - foreach ($this->defaultDriver->getAllClassNames() as $className) { - $classNames[$className] = true; - } - } - - return array_keys($classNames); - } - - /** - * {@inheritDoc} - */ - public function isTransient($className) - { - foreach ($this->drivers as $namespace => $driver) { - assert($driver instanceof MappingDriver); - if (strpos($className, $namespace) === 0) { - return $driver->isTransient($className); - } - } - - if ($this->defaultDriver !== null) { - return $this->defaultDriver->isTransient($className); - } - - return true; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php deleted file mode 100644 index 7b844ca..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php +++ /dev/null @@ -1,44 +0,0 @@ -metadata = $metadata; - - $this->loadMappingFile($this->locator->findMappingFile($className)); - } - - /** - * {@inheritDoc} - */ - protected function loadMappingFile($file) - { - $metadata = $this->metadata; - include $file; - - return [$metadata->getName() => $metadata]; - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php deleted file mode 100644 index 3f7b5ca..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php +++ /dev/null @@ -1,130 +0,0 @@ -addPaths((array) $paths); - } - - /** - * Adds paths. - * - * @param string[] $paths - * - * @return void - */ - public function addPaths(array $paths) - { - $this->paths = array_unique(array_merge($this->paths, $paths)); - } - - /** - * {@inheritdoc} - */ - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - $className::loadMetadata($metadata); - } - - /** - * {@inheritDoc} - * - * @todo Same code exists in AnnotationDriver, should we re-use it somehow or not worry about it? - */ - public function getAllClassNames() - { - if ($this->classNames !== null) { - return $this->classNames; - } - - if (! $this->paths) { - throw MappingException::pathRequired(); - } - - $classes = []; - $includedFiles = []; - - foreach ($this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path), - RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - if ($file->getBasename('.php') === $file->getBasename()) { - continue; - } - - $sourceFile = realpath($file->getPathName()); - require_once $sourceFile; - $includedFiles[] = $sourceFile; - } - } - - $declared = get_declared_classes(); - - foreach ($declared as $className) { - $rc = new ReflectionClass($className); - $sourceFile = $rc->getFileName(); - if (! in_array($sourceFile, $includedFiles) || $this->isTransient($className)) { - continue; - } - - $classes[] = $className; - } - - $this->classNames = $classes; - - return $classes; - } - - /** - * {@inheritdoc} - */ - public function isTransient($className) - { - return ! method_exists($className, 'loadMetadata'); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php deleted file mode 100644 index c7ea1ac..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php +++ /dev/null @@ -1,232 +0,0 @@ -addNamespacePrefixes($prefixes); - $this->fileExtension = $fileExtension; - - if (empty($nsSeparator)) { - throw new InvalidArgumentException('Namespace separator should not be empty'); - } - - $this->nsSeparator = (string) $nsSeparator; - } - - /** - * Adds Namespace Prefixes. - * - * @param string[] $prefixes - * - * @return void - */ - public function addNamespacePrefixes(array $prefixes) - { - $this->prefixes = array_merge($this->prefixes, $prefixes); - $this->paths = array_merge($this->paths, array_keys($prefixes)); - } - - /** - * Gets Namespace Prefixes. - * - * @return string[] - */ - public function getNamespacePrefixes() - { - return $this->prefixes; - } - - /** - * {@inheritDoc} - */ - public function getPaths() - { - return $this->paths; - } - - /** - * {@inheritDoc} - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * Sets the file extension used to look for mapping files under. - * - * @param string $fileExtension The file extension to set. - * - * @return void - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension = $fileExtension; - } - - /** - * {@inheritDoc} - */ - public function fileExists($className) - { - $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; - foreach ($this->paths as $path) { - if (! isset($this->prefixes[$path])) { - // global namespace class - if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { - return true; - } - - continue; - } - - $prefix = $this->prefixes[$path]; - - if (strpos($className, $prefix . '\\') !== 0) { - continue; - } - - $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; - if (is_file($filename)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - public function getAllClassNames($globalBasename = null) - { - $classes = []; - - if ($this->paths) { - foreach ((array) $this->paths as $path) { - if (! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); - } - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path), - RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - $fileName = $file->getBasename($this->fileExtension); - - if ($fileName === $file->getBasename() || $fileName === $globalBasename) { - continue; - } - - // NOTE: All files found here means classes are not transient! - if (isset($this->prefixes[$path])) { - // Calculate namespace suffix for given prefix as a relative path from basepath to file path - $nsSuffix = strtr( - substr(realpath($file->getPath()), strlen(realpath($path))), - $this->nsSeparator, - '\\' - ); - - $classes[] = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' . str_replace($this->nsSeparator, '\\', $fileName); - } else { - $classes[] = str_replace($this->nsSeparator, '\\', $fileName); - } - } - } - } - - return $classes; - } - - /** - * {@inheritDoc} - */ - public function findMappingFile($className) - { - $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; - foreach ($this->paths as $path) { - if (! isset($this->prefixes[$path])) { - if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { - return $path . DIRECTORY_SEPARATOR . $defaultFileName; - } - - continue; - } - - $prefix = $this->prefixes[$path]; - - if (strpos($className, $prefix . '\\') !== 0) { - continue; - } - - $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; - if (is_file($filename)) { - return $filename; - } - } - - throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1) . $this->fileExtension); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php deleted file mode 100644 index 1c5e0ca..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php +++ /dev/null @@ -1,96 +0,0 @@ -supportsTypedPropertiesWorkaround = version_compare((string) phpversion(), '7.4.0') >= 0; - } - - /** - * {@inheritDoc} - */ - public function getParentClasses($class) - { - if (! class_exists($class)) { - throw MappingException::nonExistingClass($class); - } - - return class_parents($class); - } - - /** - * {@inheritDoc} - */ - public function getClassShortName($class) - { - $reflectionClass = new ReflectionClass($class); - - return $reflectionClass->getShortName(); - } - - /** - * {@inheritDoc} - */ - public function getClassNamespace($class) - { - $reflectionClass = new ReflectionClass($class); - - return $reflectionClass->getNamespaceName(); - } - - /** - * {@inheritDoc} - */ - public function getClass($class) - { - return new ReflectionClass($class); - } - - /** - * {@inheritDoc} - */ - public function getAccessibleProperty($class, $property) - { - $reflectionProperty = new ReflectionProperty($class, $property); - - if ($reflectionProperty->isPublic()) { - $reflectionProperty = new RuntimePublicReflectionProperty($class, $property); - } elseif ($this->supportsTypedPropertiesWorkaround && ! array_key_exists($property, $this->getClass($class)->getDefaultProperties())) { - $reflectionProperty = new TypedNoDefaultReflectionProperty($class, $property); - } - - $reflectionProperty->setAccessible(true); - - return $reflectionProperty; - } - - /** - * {@inheritDoc} - */ - public function hasPublicMethod($class, $method) - { - try { - $reflectionMethod = new ReflectionMethod($class, $method); - } catch (ReflectionException $e) { - return false; - } - - return $reflectionMethod->isPublic(); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php deleted file mode 100644 index b2c33ba..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php +++ /dev/null @@ -1,71 +0,0 @@ -find($id). - * - * @param string $className The class name of the object to find. - * @param mixed $id The identity of the object to find. - * - * @return object|null The found object. - * - * @template T - * @psalm-param class-string $className - * @psalm-return T|null - */ - public function find($className, $id); - - /** - * Tells the ObjectManager to make an instance managed and persistent. - * - * The object will be entered into the database as a result of the flush operation. - * - * NOTE: The persist operation always considers objects that are not yet known to - * this ObjectManager as NEW. Do not pass detached objects to the persist operation. - * - * @param object $object The instance to make managed and persistent. - * - * @return void - */ - public function persist($object); - - /** - * Removes an object instance. - * - * A removed object will be removed from the database as a result of the flush operation. - * - * @param object $object The object instance to remove. - * - * @return void - */ - public function remove($object); - - /** - * Merges the state of a detached object into the persistence context - * of this ObjectManager and returns the managed copy of the object. - * The object passed to merge will not become associated/managed with this ObjectManager. - * - * @deprecated Merge operation is deprecated and will be removed in Persistence 2.0. - * Merging should be part of the business domain of an application rather than - * a generic operation of ObjectManager. - * - * @param object $object - * - * @return object - */ - public function merge($object); - - /** - * Clears the ObjectManager. All objects that are currently managed - * by this ObjectManager become detached. - * - * @param string|null $objectName if given, only objects of this type will get detached. - * - * @return void - */ - public function clear($objectName = null); - - /** - * Detaches an object from the ObjectManager, causing a managed object to - * become detached. Unflushed changes made to the object if any - * (including removal of the object), will not be synchronized to the database. - * Objects which previously referenced the detached object will continue to - * reference it. - * - * @deprecated Detach operation is deprecated and will be removed in Persistence 2.0. Please use - * {@see ObjectManager::clear()} instead. - * - * @param object $object The object to detach. - * - * @return void - */ - public function detach($object); - - /** - * Refreshes the persistent state of an object from the database, - * overriding any local changes that have not yet been persisted. - * - * @param object $object The object to refresh. - * - * @return void - */ - public function refresh($object); - - /** - * Flushes all changes to objects that have been queued up to now to the database. - * This effectively synchronizes the in-memory state of managed objects with the - * database. - * - * @return void - */ - public function flush(); - - /** - * Gets the repository for a class. - * - * @param string $className - * - * @return ObjectRepository - * - * @template T - * @psalm-param class-string $className - * @psalm-return ObjectRepository - */ - public function getRepository($className); - - /** - * Returns the ClassMetadata descriptor for a class. - * - * The class name must be the fully-qualified class name without a leading backslash - * (as it is returned by get_class($obj)). - * - * @param string $className - * - * @return ClassMetadata - */ - public function getClassMetadata($className); - - /** - * Gets the metadata factory used to gather the metadata of classes. - * - * @return ClassMetadataFactory - */ - public function getMetadataFactory(); - - /** - * Helper method to initialize a lazy loading proxy or persistent collection. - * - * This method is a no-op for other objects. - * - * @param object $obj - * - * @return void - */ - public function initializeObject($obj); - - /** - * Checks if the object is part of the current UnitOfWork and therefore managed. - * - * @param object $object - * - * @return bool - */ - public function contains($object); -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php deleted file mode 100644 index 2bf4335..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php +++ /dev/null @@ -1,29 +0,0 @@ -wrapped->find($className, $id); - } - - /** - * {@inheritdoc} - */ - public function persist($object) - { - $this->wrapped->persist($object); - } - - /** - * {@inheritdoc} - */ - public function remove($object) - { - $this->wrapped->remove($object); - } - - /** - * {@inheritdoc} - */ - public function merge($object) - { - return $this->wrapped->merge($object); - } - - /** - * {@inheritdoc} - */ - public function clear($objectName = null) - { - $this->wrapped->clear($objectName); - } - - /** - * {@inheritdoc} - */ - public function detach($object) - { - $this->wrapped->detach($object); - } - - /** - * {@inheritdoc} - */ - public function refresh($object) - { - $this->wrapped->refresh($object); - } - - /** - * {@inheritdoc} - */ - public function flush() - { - $this->wrapped->flush(); - } - - /** - * {@inheritdoc} - */ - public function getRepository($className) - { - return $this->wrapped->getRepository($className); - } - - /** - * {@inheritdoc} - */ - public function getClassMetadata($className) - { - return $this->wrapped->getClassMetadata($className); - } - - /** - * {@inheritdoc} - */ - public function getMetadataFactory() - { - return $this->wrapped->getMetadataFactory(); - } - - /** - * {@inheritdoc} - */ - public function initializeObject($obj) - { - $this->wrapped->initializeObject($obj); - } - - /** - * {@inheritdoc} - */ - public function contains($object) - { - return $this->wrapped->contains($object); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php deleted file mode 100644 index 1450e95..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php +++ /dev/null @@ -1,71 +0,0 @@ - The objects. - * - * @psalm-return T[] - */ - public function findAll(); - - /** - * Finds objects by a set of criteria. - * - * Optionally sorting and limiting details can be passed. An implementation may throw - * an UnexpectedValueException if certain values of the sorting or limiting details are - * not supported. - * - * @param mixed[] $criteria - * @param string[]|null $orderBy - * @param int|null $limit - * @param int|null $offset - * - * @return object[] The objects. - * - * @throws UnexpectedValueException - * - * @psalm-return T[] - */ - public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null); - - /** - * Finds a single object by a set of criteria. - * - * @param mixed[] $criteria The criteria. - * - * @return object|null The object. - * - * @psalm-return T|null - */ - public function findOneBy(array $criteria); - - /** - * Returns the class name of the object managed by the repository. - * - * @return string - */ - public function getClassName(); -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/PropertyChangedListener.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/PropertyChangedListener.php deleted file mode 100644 index 7ab057e..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/PropertyChangedListener.php +++ /dev/null @@ -1,22 +0,0 @@ -getName(); - - if ($object instanceof Proxy && ! $object->__isInitialized()) { - $originalInitializer = $object->__getInitializer(); - $object->__setInitializer(null); - $val = $object->$name ?? null; - $object->__setInitializer($originalInitializer); - - return $val; - } - - return isset($object->$name) ? parent::getValue($object) : null; - } - - /** - * {@inheritDoc} - * - * Avoids triggering lazy loading via `__set` if the provided object - * is a {@see \Doctrine\Common\Proxy\Proxy}. - * - * @link https://bugs.php.net/bug.php?id=63463 - */ - public function setValue($object, $value = null) - { - if (! ($object instanceof Proxy && ! $object->__isInitialized())) { - parent::setValue($object, $value); - - return; - } - - $originalInitializer = $object->__getInitializer(); - $object->__setInitializer(null); - parent::setValue($object, $value); - $object->__setInitializer($originalInitializer); - } -} diff --git a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Reflection/TypedNoDefaultReflectionProperty.php b/vendor/doctrine/persistence/lib/Doctrine/Persistence/Reflection/TypedNoDefaultReflectionProperty.php deleted file mode 100644 index 8c0479c..0000000 --- a/vendor/doctrine/persistence/lib/Doctrine/Persistence/Reflection/TypedNoDefaultReflectionProperty.php +++ /dev/null @@ -1,48 +0,0 @@ -isInitialized($object) ? parent::getValue($object) : null; - } - - /** - * {@inheritDoc} - * - * Works around the problem with setting typed no default properties to - * NULL which is not supported, instead unset() to uninitialize. - * - * @link https://github.com/doctrine/orm/issues/7999 - */ - public function setValue($object, $value = null) - { - if ($value === null && $this->hasType() && ! $this->getType()->allowsNull()) { - $propertyName = $this->getName(); - - $unsetter = function () use ($propertyName) { - unset($this->$propertyName); - }; - $unsetter = $unsetter->bindTo($object, $this->getDeclaringClass()->getName()); - $unsetter(); - - return; - } - - parent::setValue($object, $value); - } -} diff --git a/vendor/doctrine/persistence/psalm.xml b/vendor/doctrine/persistence/psalm.xml deleted file mode 100644 index d92c344..0000000 --- a/vendor/doctrine/persistence/psalm.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - -- cgit v1.2.3