From ed129739953f605e3aa30a3642287ae9d00eb059 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 21 Jul 2022 11:40:40 +0200 Subject: [PATCH] Composer update drupal core and some modules, add fractal block --- frontend/drupal9/composer.json | 1 + frontend/drupal9/composer.lock | 208 +-- .../drupal9/vendor/composer/autoload_psr4.php | 7 +- .../vendor/composer/autoload_static.php | 30 +- .../drupal9/vendor/composer/installed.json | 931 +++++++++++-- .../drupal9/vendor/composer/installed.php | 367 ++++-- .../drupal9/vendor/doctrine/cache/LICENSE | 19 + .../drupal9/vendor/doctrine/cache/README.md | 13 + .../vendor/doctrine/cache/UPGRADE-1.11.md | 15 + .../vendor/doctrine/cache/UPGRADE-1.4.md | 16 + .../vendor/doctrine/cache/composer.json | 56 + .../lib/Doctrine/Common/Cache/ApcCache.php | 106 ++ .../lib/Doctrine/Common/Cache/ApcuCache.php | 108 ++ .../lib/Doctrine/Common/Cache/ArrayCache.php | 115 ++ .../cache/lib/Doctrine/Common/Cache/Cache.php | 90 ++ .../Doctrine/Common/Cache/CacheProvider.php | 325 +++++ .../lib/Doctrine/Common/Cache/ChainCache.php | 198 +++ .../Doctrine/Common/Cache/ClearableCache.php | 21 + .../Common/Cache/CouchbaseBucketCache.php | 200 +++ .../Doctrine/Common/Cache/CouchbaseCache.php | 106 ++ .../Doctrine/Common/Cache/ExtMongoDBCache.php | 199 +++ .../lib/Doctrine/Common/Cache/FileCache.php | 292 +++++ .../Doctrine/Common/Cache/FilesystemCache.php | 105 ++ .../Doctrine/Common/Cache/FlushableCache.php | 18 + .../Doctrine/Common/Cache/InvalidCacheId.php | 38 + .../Common/Cache/LegacyMongoDBCache.php | 177 +++ .../Doctrine/Common/Cache/MemcacheCache.php | 105 ++ .../Doctrine/Common/Cache/MemcachedCache.php | 173 +++ .../Doctrine/Common/Cache/MongoDBCache.php | 116 ++ .../Common/Cache/MultiDeleteCache.php | 22 + .../Doctrine/Common/Cache/MultiGetCache.php | 23 + .../Common/Cache/MultiOperationCache.php | 12 + .../Doctrine/Common/Cache/MultiPutCache.php | 24 + .../Doctrine/Common/Cache/PhpFileCache.php | 120 ++ .../lib/Doctrine/Common/Cache/PredisCache.php | 147 +++ .../Common/Cache/Psr6/CacheAdapter.php | 340 +++++ .../Doctrine/Common/Cache/Psr6/CacheItem.php | 118 ++ .../Common/Cache/Psr6/DoctrineProvider.php | 135 ++ .../Common/Cache/Psr6/InvalidArgument.php | 13 + .../Common/Cache/Psr6/TypedCacheItem.php | 99 ++ .../lib/Doctrine/Common/Cache/RedisCache.php | 186 +++ .../Doctrine/Common/Cache/SQLite3Cache.php | 210 +++ .../lib/Doctrine/Common/Cache/Version.php | 11 + .../lib/Doctrine/Common/Cache/VoidCache.php | 61 + .../Doctrine/Common/Cache/WinCacheCache.php | 108 ++ .../lib/Doctrine/Common/Cache/XcacheCache.php | 106 ++ .../Doctrine/Common/Cache/ZendDataCache.php | 71 + .../collections/.doctrine-project.json | 26 + .../doctrine/collections/CONTRIBUTING.md | 54 + .../vendor/doctrine/collections/LICENSE | 19 + .../vendor/doctrine/collections/README.md | 92 ++ .../vendor/doctrine/collections/composer.json | 37 + .../docs/en/derived-collections.rst | 26 + .../docs/en/expression-builder.rst | 173 +++ .../collections/docs/en/expressions.rst | 102 ++ .../doctrine/collections/docs/en/index.rst | 328 +++++ .../collections/docs/en/lazy-collections.rst | 26 + .../doctrine/collections/docs/en/sidebar.rst | 8 + .../Collections/AbstractLazyCollection.php | 385 ++++++ .../Common/Collections/ArrayCollection.php | 463 +++++++ .../Common/Collections/Collection.php | 276 ++++ .../Doctrine/Common/Collections/Criteria.php | 225 ++++ .../Expr/ClosureExpressionVisitor.php | 265 ++++ .../Common/Collections/Expr/Comparison.php | 80 ++ .../Collections/Expr/CompositeExpression.php | 69 + .../Common/Collections/Expr/Expression.php | 14 + .../Collections/Expr/ExpressionVisitor.php | 59 + .../Common/Collections/Expr/Value.php | 33 + .../Common/Collections/ExpressionBuilder.php | 181 +++ .../Common/Collections/Selectable.php | 30 + .../doctrine/collections/phpstan.neon.dist | 17 + .../doctrine/collections/psalm.xml.dist | 65 + .../doctrine/common/.doctrine-project.json | 18 + .../doctrine/common/.github/FUNDING.yml | 3 + .../drupal9/vendor/doctrine/common/LICENSE | 19 + .../drupal9/vendor/doctrine/common/README.md | 11 + .../vendor/doctrine/common/UPGRADE_TO_2_1 | 39 + .../vendor/doctrine/common/UPGRADE_TO_2_2 | 61 + .../vendor/doctrine/common/composer.json | 54 + .../vendor/doctrine/common/docs/en/index.rst | 10 + .../docs/en/reference/class-loading.rst | 242 ++++ .../vendor/doctrine/common/humbug.json.dist | 11 + .../lib/Doctrine/Common/ClassLoader.php | 267 ++++ .../lib/Doctrine/Common/CommonException.php | 13 + .../common/lib/Doctrine/Common/Comparable.php | 28 + .../common/lib/Doctrine/Common/Lexer.php | 25 + .../Common/Proxy/AbstractProxyFactory.php | 246 ++++ .../lib/Doctrine/Common/Proxy/Autoloader.php | 80 ++ .../Exception/InvalidArgumentException.php | 106 ++ .../Proxy/Exception/OutOfBoundsException.php | 24 + .../Common/Proxy/Exception/ProxyException.php | 13 + .../Exception/UnexpectedValueException.php | 70 + .../lib/Doctrine/Common/Proxy/Proxy.php | 72 ++ .../Doctrine/Common/Proxy/ProxyDefinition.php | 51 + .../Doctrine/Common/Proxy/ProxyGenerator.php | 1152 +++++++++++++++++ .../lib/Doctrine/Common/Util/ClassUtils.php | 91 ++ .../common/lib/Doctrine/Common/Util/Debug.php | 167 +++ .../lib/Doctrine/Common/Util/Inflector.php | 19 + .../common/lib/Doctrine/Common/Version.php | 37 + .../vendor/doctrine/common/phpstan.neon.dist | 46 + .../event-manager/.doctrine-project.json | 18 + .../vendor/doctrine/event-manager/LICENSE | 19 + .../vendor/doctrine/event-manager/README.md | 13 + .../doctrine/event-manager/composer.json | 50 + .../lib/Doctrine/Common/EventArgs.php | 45 + .../lib/Doctrine/Common/EventManager.php | 132 ++ .../lib/Doctrine/Common/EventSubscriber.php | 21 + .../drupal9/vendor/doctrine/inflector/LICENSE | 19 + .../vendor/doctrine/inflector/README.md | 8 + .../vendor/doctrine/inflector/composer.json | 42 + .../doctrine/inflector/docs/en/index.rst | 227 ++++ .../Doctrine/Common/Inflector/Inflector.php | 284 ++++ .../Inflector/CachedWordInflector.php | 24 + .../GenericLanguageInflectorFactory.php | 66 + .../lib/Doctrine/Inflector/Inflector.php | 507 ++++++++ .../Doctrine/Inflector/InflectorFactory.php | 52 + .../lib/Doctrine/Inflector/Language.php | 19 + .../Inflector/LanguageInflectorFactory.php | 33 + .../Doctrine/Inflector/NoopWordInflector.php | 13 + .../Inflector/Rules/English/Inflectible.php | 182 +++ .../Rules/English/InflectorFactory.php | 21 + .../Inflector/Rules/English/Rules.php | 31 + .../Inflector/Rules/English/Uninflected.php | 193 +++ .../Inflector/Rules/French/Inflectible.php | 49 + .../Rules/French/InflectorFactory.php | 21 + .../Doctrine/Inflector/Rules/French/Rules.php | 31 + .../Inflector/Rules/French/Uninflected.php | 34 + .../Rules/NorwegianBokmal/Inflectible.php | 40 + .../NorwegianBokmal/InflectorFactory.php | 21 + .../Inflector/Rules/NorwegianBokmal/Rules.php | 31 + .../Rules/NorwegianBokmal/Uninflected.php | 36 + .../lib/Doctrine/Inflector/Rules/Pattern.php | 42 + .../lib/Doctrine/Inflector/Rules/Patterns.php | 34 + .../Rules/Portuguese/Inflectible.php | 104 ++ .../Rules/Portuguese/InflectorFactory.php | 21 + .../Inflector/Rules/Portuguese/Rules.php | 31 + .../Rules/Portuguese/Uninflected.php | 38 + .../lib/Doctrine/Inflector/Rules/Ruleset.php | 39 + .../Inflector/Rules/Spanish/Inflectible.php | 53 + .../Rules/Spanish/InflectorFactory.php | 21 + .../Inflector/Rules/Spanish/Rules.php | 31 + .../Inflector/Rules/Spanish/Uninflected.php | 36 + .../Doctrine/Inflector/Rules/Substitution.php | 30 + .../Inflector/Rules/Substitutions.php | 57 + .../Inflector/Rules/Transformation.php | 39 + .../Inflector/Rules/Transformations.php | 29 + .../Inflector/Rules/Turkish/Inflectible.php | 40 + .../Rules/Turkish/InflectorFactory.php | 21 + .../Inflector/Rules/Turkish/Rules.php | 31 + .../Inflector/Rules/Turkish/Uninflected.php | 36 + .../lib/Doctrine/Inflector/Rules/Word.php | 21 + .../Doctrine/Inflector/RulesetInflector.php | 56 + .../lib/Doctrine/Inflector/WordInflector.php | 10 + .../doctrine/inflector/phpstan.neon.dist | 13 + .../persistence/.doctrine-project.json | 24 + .../workflows/continuous-integration.yml | 38 + .../vendor/doctrine/persistence/LICENSE | 19 + .../vendor/doctrine/persistence/README.md | 12 + .../doctrine/persistence/UPGRADE-1.2.md | 6 + .../vendor/doctrine/persistence/composer.json | 56 + .../Doctrine/Common/NotifyPropertyChanged.php | 16 + .../Persistence/AbstractManagerRegistry.php | 16 + .../Common/Persistence/ConnectionRegistry.php | 16 + .../Persistence/Event/LifecycleEventArgs.php | 16 + .../Event/LoadClassMetadataEventArgs.php | 16 + .../Persistence/Event/ManagerEventArgs.php | 16 + .../Persistence/Event/OnClearEventArgs.php | 16 + .../Persistence/Event/PreUpdateEventArgs.php | 16 + .../Common/Persistence/ManagerRegistry.php | 16 + .../Mapping/AbstractClassMetadataFactory.php | 16 + .../Persistence/Mapping/ClassMetadata.php | 16 + .../Mapping/ClassMetadataFactory.php | 16 + .../Mapping/Driver/AnnotationDriver.php | 16 + .../Mapping/Driver/DefaultFileLocator.php | 16 + .../Persistence/Mapping/Driver/FileDriver.php | 16 + .../Mapping/Driver/FileLocator.php | 16 + .../Mapping/Driver/MappingDriver.php | 16 + .../Mapping/Driver/MappingDriverChain.php | 16 + .../Persistence/Mapping/Driver/PHPDriver.php | 16 + .../Mapping/Driver/StaticPHPDriver.php | 16 + .../Mapping/Driver/SymfonyFileLocator.php | 16 + .../Persistence/Mapping/MappingException.php | 16 + .../Persistence/Mapping/ReflectionService.php | 16 + .../Mapping/RuntimeReflectionService.php | 16 + .../Mapping/StaticReflectionService.php | 16 + .../Common/Persistence/ObjectManager.php | 16 + .../Common/Persistence/ObjectManagerAware.php | 16 + .../Persistence/ObjectManagerDecorator.php | 16 + .../Common/Persistence/ObjectRepository.php | 16 + .../Common/Persistence/PersistentObject.php | 235 ++++ .../lib/Doctrine/Common/Persistence/Proxy.php | 16 + .../Common/PropertyChangedListener.php | 16 + .../Persistence/AbstractManagerRegistry.php | 251 ++++ .../Persistence/ConnectionRegistry.php | 43 + .../Persistence/Event/LifecycleEventArgs.php | 63 + .../Event/LoadClassMetadataEventArgs.php | 48 + .../Persistence/Event/ManagerEventArgs.php | 33 + .../Persistence/Event/OnClearEventArgs.php | 61 + .../Persistence/Event/PreUpdateEventArgs.php | 116 ++ .../Doctrine/Persistence/ManagerRegistry.php | 92 ++ .../Mapping/AbstractClassMetadataFactory.php | 420 ++++++ .../Persistence/Mapping/ClassMetadata.php | 157 +++ .../Mapping/ClassMetadataFactory.php | 57 + .../Mapping/Driver/AnnotationDriver.php | 258 ++++ .../Mapping/Driver/DefaultFileLocator.php | 164 +++ .../Persistence/Mapping/Driver/FileDriver.php | 199 +++ .../Mapping/Driver/FileLocator.php | 57 + .../Mapping/Driver/MappingDriver.php | 41 + .../Mapping/Driver/MappingDriverChain.php | 149 +++ .../Persistence/Mapping/Driver/PHPDriver.php | 49 + .../Mapping/Driver/StaticPHPDriver.php | 134 ++ .../Mapping/Driver/SymfonyFileLocator.php | 233 ++++ .../Persistence/Mapping/MappingException.php | 98 ++ .../Persistence/Mapping/ReflectionService.php | 74 ++ .../Mapping/RuntimeReflectionService.php | 103 ++ .../Mapping/StaticReflectionService.php | 74 ++ .../Persistence/NotifyPropertyChanged.php | 25 + .../Doctrine/Persistence/ObjectManager.php | 160 +++ .../Persistence/ObjectManagerAware.php | 34 + .../Persistence/ObjectManagerDecorator.php | 120 ++ .../Doctrine/Persistence/ObjectRepository.php | 64 + .../Persistence/PropertyChangedListener.php | 26 + .../lib/Doctrine/Persistence/Proxy.php | 39 + .../vendor/doctrine/persistence/psalm.xml | 16 + .../scaffold/files/default.settings.php | 23 + frontend/drupal9/web/core/lib/Drupal.php | 2 +- .../Drupal/Core/File/FileSystemInterface.php | 4 +- .../core/lib/Drupal/Core/Form/FormBuilder.php | 7 +- .../Core/StreamWrapper/PublicStream.php | 24 + .../ImageStyleDownloadController.php | 82 +- .../src/Controller/OEmbedIframeController.php | 17 +- .../SecurityFileUploadEventSubscriber.php | 11 +- .../web/core/modules/system/system.module | 20 + .../SecurityFileUploadEventSubscriberTest.php | 3 +- .../web/modules/contrib/facets/composer.json | 2 +- .../modules/contrib/facets/facets.info.yml | 6 +- .../web/modules/contrib/facets/facets.install | 29 +- .../facets_range_widget.info.yml | 6 +- .../modules/facets_rest/facets_rest.info.yml | 6 +- .../tests/rest_view/rest_view.info.yml | 6 +- .../facets_searchbox_widget.info.yml | 6 +- .../facets_summary/facets_summary.info.yml | 6 +- .../src/FacetManager/DefaultFacetManager.php | 37 +- .../contrib/facets/src/Form/FacetForm.php | 60 +- .../facets/facet_source/SearchApiDisplay.php | 51 +- .../facets_custom_widget.info.yml | 6 +- .../facets_events_test.info.yml | 6 +- .../facets_processors_collection.info.yml | 6 +- .../facets_query_processor.info.yml | 6 +- .../facets_search_api_dependency.info.yml | 6 +- .../modules/contrib/facets_block/LICENSE.txt | 339 +++++ .../modules/contrib/facets_block/README.md | 53 + .../contrib/facets_block/composer.json | 24 + .../config/schema/facets_block.schema.yml | 21 + .../contrib/facets_block/facets_block.api.php | 29 + .../facets_block/facets_block.info.yml | 13 + .../contrib/facets_block/facets_block.install | 22 + .../contrib/facets_block/facets_block.module | 49 + .../facets_block/src/AddCssClasses.php | 36 + .../contrib/facets_block/src/AddJsClasses.php | 33 + .../src/Plugin/Block/FacetsBlock.php | 291 +++++ .../templates/facets-block.html.twig | 8 + .../tests/src/Functional/FacetsBlockTest.php | 74 ++ .../web/modules/contrib/metatag/CHANGELOG.txt | 8 + .../modules/contrib/metatag/metatag.info.yml | 6 +- .../metatag_app_links.info.yml | 6 +- .../metatag/metatag_dc/metatag_dc.info.yml | 6 +- .../metatag_dc_advanced.info.yml | 6 +- .../metatag_extended_perms.info.yml | 6 +- .../metatag_facebook.info.yml | 6 +- .../metatag_favicons.info.yml | 6 +- .../src/Plugin/metatag/Tag/MaskIcon.php | 10 + .../Functional/MetatagFaviconsTagsTest.php | 82 +- .../metatag_google_cse.info.yml | 6 +- .../metatag_google_plus.info.yml | 6 +- .../metatag_hreflang.info.yml | 6 +- .../metatag_mobile/metatag_mobile.info.yml | 6 +- .../metatag_open_graph.info.yml | 6 +- .../metatag_open_graph_products.info.yml | 6 +- .../metatag_page_manager.info.yml | 6 +- .../metatag_pinterest.info.yml | 6 +- .../metatag_routes/metatag_routes.info.yml | 6 +- .../metatag_twitter_cards.info.yml | 6 +- .../metatag_verification.info.yml | 6 +- .../metatag_verification.post_update.php | 41 + .../metatag_views/metatag_views.info.yml | 6 +- .../Field/FieldWidget/MetatagFirehose.php | 2 +- .../metatag_test_custom_route.info.yml | 6 +- .../metatag_test_integration.info.yml | 6 +- .../metatag_test_tag.info.yml | 6 +- .../modules/contrib/search_api/CHANGELOG.txt | 7 + .../search_api_db/search_api_db.info.yml | 6 +- .../search_api_db_defaults.info.yml | 6 +- .../search_api_db_test_autocomplete.info.yml | 6 +- .../contrib/search_api/search_api.info.yml | 6 +- .../views/cache/SearchApiCachePluginTrait.php | 36 +- .../search_api_test/search_api_test.info.yml | 6 +- .../search_api_test_bulk_form.info.yml | 6 +- .../search_api_test_db.info.yml | 6 +- .../search_api_test_events.info.yml | 6 +- .../search_api_test_example_content.info.yml | 6 +- ...i_test_example_content_references.info.yml | 6 +- .../search_api_test_excerpt.info.yml | 6 +- .../search_api_test_excerpt_field.info.yml | 6 +- .../search_api_test_extraction.info.yml | 6 +- .../search_api_test_hooks.info.yml | 6 +- ...arch_api_test_inconsistent_config.info.yml | 6 +- ...search_api_test_language_fallback.info.yml | 6 +- .../search_api_test_no_ui.info.yml | 6 +- .../search_api_test_node_indexing.info.yml | 6 +- .../search_api_test_tasks.info.yml | 6 +- .../search_api_test_views.info.yml | 6 +- .../web/modules/contrib/xmlsitemap/README.txt | 63 +- .../modules/contrib/xmlsitemap/composer.json | 4 +- .../config/schema/xmlsitemap.schema.yml | 4 +- .../contrib/xmlsitemap/js/xmlsitemap.js | 2 +- .../src/Commands/XmlSitemapCommands.php | 12 +- .../src/Controller/XmlSitemapController.php | 2 +- .../xmlsitemap/src/Entity/XmlSitemap.php | 22 +- .../xmlsitemap/src/Form/XmlSitemapForm.php | 6 +- .../Form/XmlSitemapLinkBundleSettingsForm.php | 4 +- .../src/Form/XmlSitemapRebuildForm.php | 2 +- .../src/Form/XmlSitemapSettingsForm.php | 4 +- .../xmlsitemap/src/XmlSitemapGenerator.php | 8 +- .../src/XmlSitemapGeneratorInterface.php | 6 +- .../xmlsitemap/src/XmlSitemapInterface.php | 37 +- .../xmlsitemap/src/XmlSitemapLinkStorage.php | 6 +- .../xmlsitemap/src/XmlSitemapListBuilder.php | 2 +- .../xmlsitemap/src/XmlSitemapWriter.php | 8 +- .../XmlSitemapEntityFunctionalTest.php | 2 +- .../Functional/XmlSitemapFunctionalTest.php | 4 +- .../Functional/XmlSitemapListBuilderTest.php | 2 +- .../XmlSitemapMenuFunctionalTest.php | 2 +- .../XmlSitemapMultilingualNodeTest.php | 2 +- .../XmlSitemapMultilingualTestBase.php | 4 +- .../XmlSitemapNodeFunctionalTest.php | 2 +- .../src/Functional/XmlSitemapRebuildTest.php | 4 +- .../XmlSitemapRobotsTxtIntegrationTest.php | 3 +- .../XmlSitemapTaxonomyFunctionalTest.php | 2 +- .../src/Functional/XmlSitemapTestBase.php | 12 +- .../src/Functional/XmlSitemapUnitTest.php | 4 +- .../tests/src/Kernel/ConfigReadOnlyTest.php | 70 + .../tests/src/Kernel/DirectoryTest.php | 4 +- .../tests/src/Kernel/KernelTestBase.php | 1 + .../tests/src/Kernel/MetatagNoIndexTest.php | 1 - .../tests/src/Kernel/XmlSitemapWriterTest.php | 2 +- .../contrib/xmlsitemap/xmlsitemap.api.php | 34 +- .../contrib/xmlsitemap/xmlsitemap.drush.inc | 12 +- .../contrib/xmlsitemap/xmlsitemap.info.yml | 11 +- .../contrib/xmlsitemap/xmlsitemap.install | 22 +- .../xmlsitemap/xmlsitemap.links.menu.yml | 2 +- .../contrib/xmlsitemap/xmlsitemap.module | 111 +- .../xmlsitemap/xmlsitemap.permissions.yml | 4 +- .../contrib/xmlsitemap/xmlsitemap.routing.yml | 10 +- .../xmlsitemap_custom.info.yml | 6 +- .../xmlsitemap_custom.module | 2 +- .../xmlsitemap_engines_test.info.yml | 10 +- .../xmlsitemap_engines_test.module | 2 +- .../xmlsitemap_engines.api.php | 2 +- .../xmlsitemap_engines.info.yml | 6 +- .../xmlsitemap_engines.module | 11 +- .../xmlsitemap_engines.post_update.php | 18 + .../contrib/xmlsitemap/xsl/xmlsitemap.xsl | 2 +- .../contrib/xmlsitemap/xsl/xmlsitemap.xsl.js | 2 +- .../web/sites/default/default.settings.php | 23 + 365 files changed, 21141 insertions(+), 778 deletions(-) create mode 100644 frontend/drupal9/vendor/doctrine/cache/LICENSE create mode 100644 frontend/drupal9/vendor/doctrine/cache/README.md create mode 100644 frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.11.md create mode 100644 frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.4.md create mode 100644 frontend/drupal9/vendor/doctrine/cache/composer.json create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseBucketCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/InvalidCacheId.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/LegacyMongoDBCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiGetCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiOperationCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/TypedCacheItem.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php create mode 100644 frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/.doctrine-project.json create mode 100644 frontend/drupal9/vendor/doctrine/collections/CONTRIBUTING.md create mode 100644 frontend/drupal9/vendor/doctrine/collections/LICENSE create mode 100644 frontend/drupal9/vendor/doctrine/collections/README.md create mode 100644 frontend/drupal9/vendor/doctrine/collections/composer.json create mode 100644 frontend/drupal9/vendor/doctrine/collections/docs/en/derived-collections.rst create mode 100644 frontend/drupal9/vendor/doctrine/collections/docs/en/expression-builder.rst create mode 100644 frontend/drupal9/vendor/doctrine/collections/docs/en/expressions.rst create mode 100644 frontend/drupal9/vendor/doctrine/collections/docs/en/index.rst create mode 100644 frontend/drupal9/vendor/doctrine/collections/docs/en/lazy-collections.rst create mode 100644 frontend/drupal9/vendor/doctrine/collections/docs/en/sidebar.rst create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php create mode 100644 frontend/drupal9/vendor/doctrine/collections/phpstan.neon.dist create mode 100644 frontend/drupal9/vendor/doctrine/collections/psalm.xml.dist create mode 100644 frontend/drupal9/vendor/doctrine/common/.doctrine-project.json create mode 100644 frontend/drupal9/vendor/doctrine/common/.github/FUNDING.yml create mode 100644 frontend/drupal9/vendor/doctrine/common/LICENSE create mode 100644 frontend/drupal9/vendor/doctrine/common/README.md create mode 100644 frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_1 create mode 100644 frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_2 create mode 100644 frontend/drupal9/vendor/doctrine/common/composer.json create mode 100644 frontend/drupal9/vendor/doctrine/common/docs/en/index.rst create mode 100644 frontend/drupal9/vendor/doctrine/common/docs/en/reference/class-loading.rst create mode 100644 frontend/drupal9/vendor/doctrine/common/humbug.json.dist create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php create mode 100644 frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Version.php create mode 100644 frontend/drupal9/vendor/doctrine/common/phpstan.neon.dist create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/.doctrine-project.json create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/LICENSE create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/README.md create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/composer.json create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventManager.php create mode 100644 frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/LICENSE create mode 100644 frontend/drupal9/vendor/doctrine/inflector/README.md create mode 100644 frontend/drupal9/vendor/doctrine/inflector/composer.json create mode 100644 frontend/drupal9/vendor/doctrine/inflector/docs/en/index.rst create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Language.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/LanguageInflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/NoopWordInflector.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Rules.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Inflectible.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Rules.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Inflectible.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Rules.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Pattern.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Rules.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Ruleset.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Rules.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitution.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/InflectorFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Rules.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Word.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php create mode 100644 frontend/drupal9/vendor/doctrine/inflector/phpstan.neon.dist create mode 100644 frontend/drupal9/vendor/doctrine/persistence/.doctrine-project.json create mode 100644 frontend/drupal9/vendor/doctrine/persistence/.github/workflows/continuous-integration.yml create mode 100644 frontend/drupal9/vendor/doctrine/persistence/LICENSE create mode 100644 frontend/drupal9/vendor/doctrine/persistence/README.md create mode 100644 frontend/drupal9/vendor/doctrine/persistence/UPGRADE-1.2.md create mode 100644 frontend/drupal9/vendor/doctrine/persistence/composer.json create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/NotifyPropertyChanged.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ConnectionRegistry.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ManagerRegistry.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/MappingException.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ObjectManager.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ObjectManagerAware.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ObjectRepository.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/PersistentObject.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Proxy.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/PropertyChangedListener.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LifecycleEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadataFactory.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/AnnotationDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/MappingDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/MappingDriverChain.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ReflectionService.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/NotifyPropertyChanged.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManager.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerDecorator.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/PropertyChangedListener.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Proxy.php create mode 100644 frontend/drupal9/vendor/doctrine/persistence/psalm.xml create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/LICENSE.txt create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/README.md create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/composer.json create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/config/schema/facets_block.schema.yml create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/facets_block.api.php create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/facets_block.info.yml create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/facets_block.install create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/facets_block.module create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/src/AddCssClasses.php create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/src/AddJsClasses.php create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/src/Plugin/Block/FacetsBlock.php create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/templates/facets-block.html.twig create mode 100644 frontend/drupal9/web/modules/contrib/facets_block/tests/src/Functional/FacetsBlockTest.php create mode 100644 frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.post_update.php create mode 100644 frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/ConfigReadOnlyTest.php create mode 100644 frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.post_update.php diff --git a/frontend/drupal9/composer.json b/frontend/drupal9/composer.json index 6781590c2..085948648 100755 --- a/frontend/drupal9/composer.json +++ b/frontend/drupal9/composer.json @@ -29,6 +29,7 @@ "drupal/entity_clone": "^1.0@beta", "drupal/eu_cookie_compliance": "^1.14", "drupal/facets": "^2.0", + "drupal/facets_block": "^1.4", "drupal/google_analytics": "^3.1", "drupal/google_cse": "^3.4", "drupal/google_tag": "^1.4", diff --git a/frontend/drupal9/composer.lock b/frontend/drupal9/composer.lock index e092b542e..9b998274a 100755 --- a/frontend/drupal9/composer.lock +++ b/frontend/drupal9/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "97bea759d444f1d827a8127bee107798", + "content-hash": "563dd71d4bd0fd9272be8b52ba16a604", "packages": [ { "name": "asm89/stack-cors", @@ -576,12 +576,8 @@ "role": "Contributors" }, { - "name": "iamcarrico", - "homepage": "https://www.drupal.org/user/1300542" - }, - { - "name": "mikeytown2", - "homepage": "https://www.drupal.org/user/282446" + "name": "NickDickinsonWilde", + "homepage": "https://www.drupal.org/user/3094661" }, { "name": "rupl", @@ -590,6 +586,10 @@ { "name": "thalles", "homepage": "https://www.drupal.org/user/3589086" + }, + { + "name": "Wim Leers", + "homepage": "https://www.drupal.org/user/99777" } ], "description": "Improved aggregation of CSS/JS files to speed up page load times.", @@ -814,16 +814,16 @@ }, { "name": "drupal/core", - "version": "9.4.2", + "version": "9.4.3", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "5a4d6acc99e279f70a914804ff3dd08111707de1" + "reference": "7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/5a4d6acc99e279f70a914804ff3dd08111707de1", - "reference": "5a4d6acc99e279f70a914804ff3dd08111707de1", + "url": "https://api.github.com/repos/drupal/core/zipball/7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad", + "reference": "7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad", "shasum": "" }, "require": { @@ -1066,13 +1066,13 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.4.2" + "source": "https://github.com/drupal/core/tree/9.4.3" }, - "time": "2022-07-07T01:18:39+00:00" + "time": "2022-07-20T15:11:38+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "9.4.2", + "version": "9.4.3", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -1116,13 +1116,13 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/9.4.2" + "source": "https://github.com/drupal/core-composer-scaffold/tree/9.4.3" }, "time": "2022-06-19T16:14:23+00:00" }, { "name": "drupal/core-project-message", - "version": "9.4.2", + "version": "9.4.3", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", @@ -1157,22 +1157,22 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-project-message/tree/9.4.2" + "source": "https://github.com/drupal/core-project-message/tree/9.4.3" }, "time": "2022-02-24T17:40:53+00:00" }, { "name": "drupal/core-recommended", - "version": "9.4.2", + "version": "9.4.3", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "c10da85434356b27e2bf0516a7b6f8103b473038" + "reference": "ff8662af0a5963a88ea856e9786e17a51f8e640c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/c10da85434356b27e2bf0516a7b6f8103b473038", - "reference": "c10da85434356b27e2bf0516a7b6f8103b473038", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/ff8662af0a5963a88ea856e9786e17a51f8e640c", + "reference": "ff8662af0a5963a88ea856e9786e17a51f8e640c", "shasum": "" }, "require": { @@ -1181,7 +1181,7 @@ "doctrine/annotations": "~1.13.2", "doctrine/lexer": "~1.2.3", "doctrine/reflection": "~1.2.3", - "drupal/core": "9.4.2", + "drupal/core": "9.4.3", "egulias/email-validator": "~3.2", "guzzlehttp/guzzle": "~6.5.8", "guzzlehttp/promises": "~1.5.1", @@ -1243,9 +1243,9 @@ ], "description": "Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/9.4.2" + "source": "https://github.com/drupal/core-recommended/tree/9.4.3" }, - "time": "2022-07-07T01:18:39+00:00" + "time": "2022-07-20T15:11:38+00:00" }, { "name": "drupal/ctools", @@ -1602,20 +1602,20 @@ }, { "name": "drupal/facets", - "version": "2.0.2", + "version": "2.0.5", "source": { "type": "git", "url": "https://git.drupalcode.org/project/facets.git", - "reference": "2.0.2" + "reference": "2.0.5" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/facets-2.0.2.zip", - "reference": "2.0.2", - "shasum": "17afc46d3f4e4300e8e69f23b3b01a4935b57104" + "url": "https://ftp.drupal.org/files/projects/facets-2.0.5.zip", + "reference": "2.0.5", + "shasum": "8be11b5bca088212270603cd3f3e69185022e379" }, "require": { - "drupal/core": "^9.2 || ^10.0" + "drupal/core": "^9.3 || ^10.0" }, "conflict": { "drupal/search_api": "<1.14" @@ -1623,7 +1623,7 @@ "require-dev": { "drupal/jquery_ui_slider": "~1.1", "drupal/jquery_ui_touch_punch": "~1.0", - "drupal/search_api": "~1.21" + "drupal/search_api": "^1.25||1.x-dev" }, "suggest": { "drupal/jquery_ui_slider": "Required for the 'Facets Range Widget' module to work", @@ -1632,8 +1632,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.2", - "datestamp": "1649151557", + "version": "2.0.5", + "datestamp": "1658315614", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -1649,14 +1649,6 @@ "name": "See all contributors", "homepage": "https://www.drupal.org/node/2348769/committers" }, - { - "name": "StryKaizer", - "homepage": "https://www.drupal.org/user/462700" - }, - { - "name": "borisson_", - "homepage": "https://www.drupal.org/user/2393360" - }, { "name": "drunken monkey", "homepage": "https://www.drupal.org/user/205582" @@ -1664,6 +1656,14 @@ { "name": "mkalkbrenner", "homepage": "https://www.drupal.org/user/124705" + }, + { + "name": "Nick_vh", + "homepage": "https://www.drupal.org/user/122682" + }, + { + "name": "StryKaizer", + "homepage": "https://www.drupal.org/user/462700" } ], "description": "The Facet module allows site builders to easily create and manage faceted search interfaces.", @@ -1674,6 +1674,55 @@ "irc": "irc://irc.freenode.org/drupal-search-api" } }, + { + "name": "drupal/facets_block", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/facets_block.git", + "reference": "8.x-1.04" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/facets_block-8.x-1.04.zip", + "reference": "8.x-1.04", + "shasum": "b20806b6174f941313182b4bd339ab7d5d1e6cf3" + }, + "require": { + "drupal/core": "^8 || ^9", + "drupal/facets": "^1.0 || ^2.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.04", + "datestamp": "1639331249", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Goran Nikolovski", + "homepage": "https://gorannikolovski.com", + "email": "goran@gorannikolovski.com", + "role": "Developer" + } + ], + "description": "Render Facets in a single block.", + "homepage": "https://www.drupal.org/project/facets_block", + "support": { + "source": "https://git.drupalcode.org/project/facets_block", + "issues": "https://www.drupal.org/project/issues/facets_block", + "email": "goran@gorannikolovski.com" + } + }, { "name": "drupal/google_analytics", "version": "3.1.0", @@ -2635,17 +2684,17 @@ }, { "name": "drupal/metatag", - "version": "1.19.0", + "version": "1.21.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/metatag.git", - "reference": "8.x-1.19" + "reference": "8.x-1.21" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/metatag-8.x-1.19.zip", - "reference": "8.x-1.19", - "shasum": "d70f59c034e971885ed4969a11bb392f6ab447ee" + "url": "https://ftp.drupal.org/files/projects/metatag-8.x-1.21.zip", + "reference": "8.x-1.21", + "shasum": "677ff7384b557390d4d1a36f335452e8172f741d" }, "require": { "drupal/core": "^9", @@ -2664,8 +2713,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.19", - "datestamp": "1641496014", + "version": "8.x-1.21", + "datestamp": "1657971667", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3203,17 +3252,17 @@ }, { "name": "drupal/search_api", - "version": "1.24.0", + "version": "1.25.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/search_api.git", - "reference": "8.x-1.24" + "reference": "8.x-1.25" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.24.zip", - "reference": "8.x-1.24", - "shasum": "c4e93b8cc5bcdf7c7817bec06470af223f919f6c" + "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.25.zip", + "reference": "8.x-1.25", + "shasum": "823bf5a6010cd08c7d1b287fcd855fbf81140e39" }, "require": { "drupal/core": "^9.2 || ^10.0" @@ -3234,8 +3283,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.24", - "datestamp": "1657180584", + "version": "8.x-1.25", + "datestamp": "1658149514", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3275,7 +3324,7 @@ }, { "name": "drupal/search_api_db", - "version": "1.24.0", + "version": "1.25.0", "require": { "drupal/core": "^9.2 || ^10.0", "drupal/search_api": "*" @@ -3283,8 +3332,8 @@ "type": "metapackage", "extra": { "drupal": { - "version": "8.x-1.24", - "datestamp": "1657180584", + "version": "8.x-1.25", + "datestamp": "1658149514", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3296,10 +3345,6 @@ "GPL-2.0-or-later" ], "authors": [ - { - "name": "Nick_vh", - "homepage": "https://www.drupal.org/user/122682" - }, { "name": "borisson_", "homepage": "https://www.drupal.org/user/2393360" @@ -3307,6 +3352,10 @@ { "name": "drunken monkey", "homepage": "https://www.drupal.org/user/205582" + }, + { + "name": "Nick_vh", + "homepage": "https://www.drupal.org/user/122682" } ], "description": "Offers an implementation of the Search API that uses database tables for indexing content.", @@ -3856,23 +3905,24 @@ }, { "name": "drupal/xmlsitemap", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/xmlsitemap.git", - "reference": "8.x-1.2" + "reference": "8.x-1.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/xmlsitemap-8.x-1.2.zip", - "reference": "8.x-1.2", - "shasum": "528736c96ee5f19abbf798d1f8aefb211bf11b5d" + "url": "https://ftp.drupal.org/files/projects/xmlsitemap-8.x-1.3.zip", + "reference": "8.x-1.3", + "shasum": "a2a20c5aab5682cc369d095cd2e21d67fc46df9b" }, "require": { - "drupal/core": "^8.8 || ^9", + "drupal/core": "^9", "ext-xmlwriter": "*" }, "require-dev": { + "drupal/config_readonly": "^1.0", "drupal/metatag": "^1.0", "drupal/robotstxt": "^1.0" }, @@ -3882,8 +3932,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.2", - "datestamp": "1638486168", + "version": "8.x-1.3", + "datestamp": "1658327425", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3900,14 +3950,6 @@ "GPL-2.0-or-later" ], "authors": [ - { - "name": "Dave Reid", - "homepage": "https://www.drupal.org/user/53892" - }, - { - "name": "RenatoG", - "homepage": "https://www.drupal.org/user/3326031" - }, { "name": "amateescu", "homepage": "https://www.drupal.org/user/729614" @@ -3916,6 +3958,10 @@ "name": "andrei.dincu", "homepage": "https://www.drupal.org/user/2628879" }, + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + }, { "name": "juampynr", "homepage": "https://www.drupal.org/user/682736" @@ -3928,6 +3974,10 @@ "name": "pifagor", "homepage": "https://www.drupal.org/user/2375692" }, + { + "name": "RenatoG", + "homepage": "https://www.drupal.org/user/3326031" + }, { "name": "tadityar", "homepage": "https://www.drupal.org/user/3094465" @@ -3937,7 +3987,7 @@ "homepage": "https://www.drupal.org/user/1835276" } ], - "description": "Creates XML sitemaps for the site", + "description": "Creates XML Sitemaps for the site", "homepage": "https://www.drupal.org/project/xmlsitemap", "support": { "source": "https://git.drupalcode.org/project/xmlsitemap", diff --git a/frontend/drupal9/vendor/composer/autoload_psr4.php b/frontend/drupal9/vendor/composer/autoload_psr4.php index 3bdca79c8..3ea39b5a3 100755 --- a/frontend/drupal9/vendor/composer/autoload_psr4.php +++ b/frontend/drupal9/vendor/composer/autoload_psr4.php @@ -55,9 +55,14 @@ return array( 'Drupal\\Composer\\Plugin\\Scaffold\\' => array($vendorDir . '/drupal/core-composer-scaffold'), 'Drupal\\Composer\\Plugin\\ProjectMessage\\' => array($vendorDir . '/drupal/core-project-message'), 'Drupal\\Component\\' => array($baseDir . '/web/core/lib/Drupal/Component'), + 'Doctrine\\Persistence\\' => array($vendorDir . '/doctrine/persistence/lib/Doctrine/Persistence'), + 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), + 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'), + '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/reflection/lib/Doctrine/Common'), + 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib/Doctrine/Common', $vendorDir . '/doctrine/event-manager/lib/Doctrine/Common', $vendorDir . '/doctrine/persistence/lib/Doctrine/Common', $vendorDir . '/doctrine/reflection/lib/Doctrine/Common'), 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'), 'Asm89\\Stack\\' => array($vendorDir . '/asm89/stack-cors/src/Asm89/Stack'), diff --git a/frontend/drupal9/vendor/composer/autoload_static.php b/frontend/drupal9/vendor/composer/autoload_static.php index 8350272d2..2d9ba93ce 100755 --- a/frontend/drupal9/vendor/composer/autoload_static.php +++ b/frontend/drupal9/vendor/composer/autoload_static.php @@ -114,7 +114,12 @@ class ComposerStaticInitd428c8960f3d72900807e718545d9f8d 'Drupal\\Composer\\Plugin\\Scaffold\\' => 32, 'Drupal\\Composer\\Plugin\\ProjectMessage\\' => 38, 'Drupal\\Component\\' => 17, + 'Doctrine\\Persistence\\' => 21, + 'Doctrine\\Inflector\\' => 19, 'Doctrine\\Common\\Lexer\\' => 22, + 'Doctrine\\Common\\Inflector\\' => 26, + 'Doctrine\\Common\\Collections\\' => 28, + 'Doctrine\\Common\\Cache\\' => 22, 'Doctrine\\Common\\Annotations\\' => 28, 'Doctrine\\Common\\' => 16, ), @@ -327,17 +332,40 @@ class ComposerStaticInitd428c8960f3d72900807e718545d9f8d array ( 0 => __DIR__ . '/../..' . '/web/core/lib/Drupal/Component', ), + 'Doctrine\\Persistence\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/persistence/lib/Doctrine/Persistence', + ), + 'Doctrine\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector', + ), 'Doctrine\\Common\\Lexer\\' => array ( 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', ), + 'Doctrine\\Common\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector', + ), + '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/reflection/lib/Doctrine/Common', + 0 => __DIR__ . '/..' . '/doctrine/common/lib/Doctrine/Common', + 1 => __DIR__ . '/..' . '/doctrine/event-manager/lib/Doctrine/Common', + 2 => __DIR__ . '/..' . '/doctrine/persistence/lib/Doctrine/Common', + 3 => __DIR__ . '/..' . '/doctrine/reflection/lib/Doctrine/Common', ), 'Composer\\Semver\\' => array ( diff --git a/frontend/drupal9/vendor/composer/installed.json b/frontend/drupal9/vendor/composer/installed.json index de03890be..cac1ea46f 100755 --- a/frontend/drupal9/vendor/composer/installed.json +++ b/frontend/drupal9/vendor/composer/installed.json @@ -369,6 +369,480 @@ }, "install-path": "../doctrine/annotations" }, + { + "name": "doctrine/cache", + "version": "1.13.0", + "version_normalized": "1.13.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "56cd022adb5514472cb144c087393c1821911d09" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/56cd022adb5514472cb144c087393c1821911d09", + "reference": "56cd022adb5514472cb144c087393c1821911d09", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^9", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "time": "2022-05-20T20:06:54+00:00", + "type": "library", + "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.13.0" + }, + "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.8", + "version_normalized": "1.6.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "1958a744696c6bb3bb0d28db2611dc11610e78af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/1958a744696c6bb3bb0d28db2611dc11610e78af", + "reference": "1958a744696c6bb3bb0d28db2611dc11610e78af", + "shasum": "" + }, + "require": { + "php": "^7.1.3 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", + "vimeo/psalm": "^4.2.1" + }, + "time": "2021-08-10T18:51:53+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.8" + }, + "install-path": "../doctrine/collections" + }, + { + "name": "doctrine/common", + "version": "2.13.3", + "version_normalized": "2.13.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "f3812c026e557892c34ef37f6ab808a6b567da7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/f3812c026e557892c34ef37f6ab808a6b567da7f", + "reference": "f3812c026e557892c34ef37f6ab808a6b567da7f", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/inflector": "^1.0", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^1.3.3", + "doctrine/reflection": "^1.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^1.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpunit/phpunit": "^7.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5" + }, + "time": "2020-06-05T16:46:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.11.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": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system 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/2.13.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%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/inflector", + "version": "1.4.4", + "version_normalized": "1.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", + "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "time": "2021-04-16T17:34:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector", + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "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 Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/1.4.4" + }, + "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%2Finflector", + "type": "tidelift" + } + ], + "install-path": "../doctrine/inflector" + }, { "name": "doctrine/lexer", "version": "1.2.3", @@ -448,6 +922,111 @@ ], "install-path": "../doctrine/lexer" }, + { + "name": "doctrine/persistence", + "version": "1.3.8", + "version_normalized": "1.3.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "7a6eac9fb6f61bba91328f15aa7547f4806ca288" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/7a6eac9fb6f61bba91328f15aa7547f4806ca288", + "reference": "7a6eac9fb6f61bba91328f15aa7547f4806ca288", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/reflection": "^1.2", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.10@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "vimeo/psalm": "^3.11" + }, + "time": "2020-06-20T12:56:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "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/1.3.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%2Fpersistence", + "type": "tidelift" + } + ], + "install-path": "../doctrine/persistence" + }, { "name": "doctrine/reflection", "version": "1.2.3", @@ -834,17 +1413,17 @@ }, { "name": "drupal/core", - "version": "9.4.2", - "version_normalized": "9.4.2.0", + "version": "9.4.3", + "version_normalized": "9.4.3.0", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "5a4d6acc99e279f70a914804ff3dd08111707de1" + "reference": "7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/5a4d6acc99e279f70a914804ff3dd08111707de1", - "reference": "5a4d6acc99e279f70a914804ff3dd08111707de1", + "url": "https://api.github.com/repos/drupal/core/zipball/7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad", + "reference": "7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad", "shasum": "" }, "require": { @@ -1015,7 +1594,7 @@ "drupal/workflows": "self.version", "drupal/workspaces": "self.version" }, - "time": "2022-07-07T01:18:39+00:00", + "time": "2022-07-20T15:11:38+00:00", "type": "drupal-core", "extra": { "drupal-scaffold": { @@ -1089,14 +1668,14 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.4.2" + "source": "https://github.com/drupal/core/tree/9.4.3" }, "install-path": "../../web/core" }, { "name": "drupal/core-composer-scaffold", - "version": "9.4.2", - "version_normalized": "9.4.2.0", + "version": "9.4.3", + "version_normalized": "9.4.3.0", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -1142,14 +1721,14 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/9.4.2" + "source": "https://github.com/drupal/core-composer-scaffold/tree/9.4.3" }, "install-path": "../drupal/core-composer-scaffold" }, { "name": "drupal/core-project-message", - "version": "9.4.2", - "version_normalized": "9.4.2.0", + "version": "9.4.3", + "version_normalized": "9.4.3.0", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", @@ -1186,23 +1765,23 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-project-message/tree/9.4.2" + "source": "https://github.com/drupal/core-project-message/tree/9.4.3" }, "install-path": "../drupal/core-project-message" }, { "name": "drupal/core-recommended", - "version": "9.4.2", - "version_normalized": "9.4.2.0", + "version": "9.4.3", + "version_normalized": "9.4.3.0", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "c10da85434356b27e2bf0516a7b6f8103b473038" + "reference": "ff8662af0a5963a88ea856e9786e17a51f8e640c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/c10da85434356b27e2bf0516a7b6f8103b473038", - "reference": "c10da85434356b27e2bf0516a7b6f8103b473038", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/ff8662af0a5963a88ea856e9786e17a51f8e640c", + "reference": "ff8662af0a5963a88ea856e9786e17a51f8e640c", "shasum": "" }, "require": { @@ -1211,7 +1790,7 @@ "doctrine/annotations": "~1.13.2", "doctrine/lexer": "~1.2.3", "doctrine/reflection": "~1.2.3", - "drupal/core": "9.4.2", + "drupal/core": "9.4.3", "egulias/email-validator": "~3.2", "guzzlehttp/guzzle": "~6.5.8", "guzzlehttp/promises": "~1.5.1", @@ -1266,7 +1845,7 @@ "conflict": { "webflo/drupal-core-strict": "*" }, - "time": "2022-07-07T01:18:39+00:00", + "time": "2022-07-20T15:11:38+00:00", "type": "metapackage", "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1274,7 +1853,7 @@ ], "description": "Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/9.4.2" + "source": "https://github.com/drupal/core-recommended/tree/9.4.3" }, "install-path": null }, @@ -1374,6 +1953,75 @@ }, "install-path": "../../web/modules/contrib/ctools" }, + { + "name": "drupal/devel", + "version": "4.1.5", + "version_normalized": "4.1.5.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/devel.git", + "reference": "4.1.5" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/devel-4.1.5.zip", + "reference": "4.1.5", + "shasum": "7d0b4397215f615a67ba80aab777e93918d497f9" + }, + "require": { + "doctrine/common": "^2.7", + "drupal/core": "^8.8 || ^9", + "symfony/var-dumper": "^4 || ^5" + }, + "conflict": { + "kint-php/kint": "<3" + }, + "require-dev": { + "drush/drush": "^10" + }, + "suggest": { + "kint-php/kint": "Kint provides an informative display of arrays/objects. Useful for debugging and developing." + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "4.1.5", + "datestamp": "1646072825", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9 || ^10" + } + } + }, + "installation-source": "dist", + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "drupalspoons", + "homepage": "https://www.drupal.org/user/3647684" + }, + { + "name": "moshe weitzman", + "homepage": "https://www.drupal.org/user/23" + } + ], + "description": "Various blocks, pages, and functions for developers.", + "homepage": "https://www.drupal.org/project/devel", + "support": { + "source": "https://gitlab.com/drupalspoons/devel", + "issues": "https://gitlab.com/drupalspoons/devel/-/issues", + "slack": "https://drupal.slack.com/archives/C012WAW1MH6" + }, + "install-path": "../../web/modules/contrib/devel" + }, { "name": "drupal/ds", "version": "3.13.0", @@ -1652,21 +2300,21 @@ }, { "name": "drupal/facets", - "version": "2.0.2", - "version_normalized": "2.0.2.0", + "version": "2.0.5", + "version_normalized": "2.0.5.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/facets.git", - "reference": "2.0.2" + "reference": "2.0.5" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/facets-2.0.2.zip", - "reference": "2.0.2", - "shasum": "17afc46d3f4e4300e8e69f23b3b01a4935b57104" + "url": "https://ftp.drupal.org/files/projects/facets-2.0.5.zip", + "reference": "2.0.5", + "shasum": "8be11b5bca088212270603cd3f3e69185022e379" }, "require": { - "drupal/core": "^9.2 || ^10.0" + "drupal/core": "^9.3 || ^10.0" }, "conflict": { "drupal/search_api": "<1.14" @@ -1674,7 +2322,7 @@ "require-dev": { "drupal/jquery_ui_slider": "~1.1", "drupal/jquery_ui_touch_punch": "~1.0", - "drupal/search_api": "~1.21" + "drupal/search_api": "^1.25||1.x-dev" }, "suggest": { "drupal/jquery_ui_slider": "Required for the 'Facets Range Widget' module to work", @@ -1683,8 +2331,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.2", - "datestamp": "1649151557", + "version": "2.0.5", + "datestamp": "1658315614", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -1701,14 +2349,6 @@ "name": "See all contributors", "homepage": "https://www.drupal.org/node/2348769/committers" }, - { - "name": "StryKaizer", - "homepage": "https://www.drupal.org/user/462700" - }, - { - "name": "borisson_", - "homepage": "https://www.drupal.org/user/2393360" - }, { "name": "drunken monkey", "homepage": "https://www.drupal.org/user/205582" @@ -1716,6 +2356,14 @@ { "name": "mkalkbrenner", "homepage": "https://www.drupal.org/user/124705" + }, + { + "name": "Nick_vh", + "homepage": "https://www.drupal.org/user/122682" + }, + { + "name": "StryKaizer", + "homepage": "https://www.drupal.org/user/462700" } ], "description": "The Facet module allows site builders to easily create and manage faceted search interfaces.", @@ -1727,6 +2375,58 @@ }, "install-path": "../../web/modules/contrib/facets" }, + { + "name": "drupal/facets_block", + "version": "1.4.0", + "version_normalized": "1.4.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/facets_block.git", + "reference": "8.x-1.04" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/facets_block-8.x-1.04.zip", + "reference": "8.x-1.04", + "shasum": "b20806b6174f941313182b4bd339ab7d5d1e6cf3" + }, + "require": { + "drupal/core": "^8 || ^9", + "drupal/facets": "^1.0 || ^2.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.04", + "datestamp": "1639331249", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "installation-source": "dist", + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Goran Nikolovski", + "homepage": "https://gorannikolovski.com", + "email": "goran@gorannikolovski.com", + "role": "Developer" + } + ], + "description": "Render Facets in a single block.", + "homepage": "https://www.drupal.org/project/facets_block", + "support": { + "source": "https://git.drupalcode.org/project/facets_block", + "issues": "https://www.drupal.org/project/issues/facets_block", + "email": "goran@gorannikolovski.com" + }, + "install-path": "../../web/modules/contrib/facets_block" + }, { "name": "drupal/google_analytics", "version": "3.1.0", @@ -2729,18 +3429,18 @@ }, { "name": "drupal/metatag", - "version": "1.19.0", - "version_normalized": "1.19.0.0", + "version": "1.21.0", + "version_normalized": "1.21.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/metatag.git", - "reference": "8.x-1.19" + "reference": "8.x-1.21" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/metatag-8.x-1.19.zip", - "reference": "8.x-1.19", - "shasum": "d70f59c034e971885ed4969a11bb392f6ab447ee" + "url": "https://ftp.drupal.org/files/projects/metatag-8.x-1.21.zip", + "reference": "8.x-1.21", + "shasum": "677ff7384b557390d4d1a36f335452e8172f741d" }, "require": { "drupal/core": "^9", @@ -2759,8 +3459,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.19", - "datestamp": "1641496014", + "version": "8.x-1.21", + "datestamp": "1657971667", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3324,18 +4024,18 @@ }, { "name": "drupal/search_api", - "version": "1.24.0", - "version_normalized": "1.24.0.0", + "version": "1.25.0", + "version_normalized": "1.25.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/search_api.git", - "reference": "8.x-1.24" + "reference": "8.x-1.25" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.24.zip", - "reference": "8.x-1.24", - "shasum": "c4e93b8cc5bcdf7c7817bec06470af223f919f6c" + "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.25.zip", + "reference": "8.x-1.25", + "shasum": "823bf5a6010cd08c7d1b287fcd855fbf81140e39" }, "require": { "drupal/core": "^9.2 || ^10.0" @@ -3356,8 +4056,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.24", - "datestamp": "1657180584", + "version": "8.x-1.25", + "datestamp": "1658149514", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3399,8 +4099,8 @@ }, { "name": "drupal/search_api_db", - "version": "1.24.0", - "version_normalized": "1.24.0.0", + "version": "1.25.0", + "version_normalized": "1.25.0.0", "require": { "drupal/core": "^9.2 || ^10.0", "drupal/search_api": "*" @@ -3408,8 +4108,8 @@ "type": "metapackage", "extra": { "drupal": { - "version": "8.x-1.24", - "datestamp": "1657180584", + "version": "8.x-1.25", + "datestamp": "1658149514", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3421,10 +4121,6 @@ "GPL-2.0-or-later" ], "authors": [ - { - "name": "Nick_vh", - "homepage": "https://www.drupal.org/user/122682" - }, { "name": "borisson_", "homepage": "https://www.drupal.org/user/2393360" @@ -3432,6 +4128,10 @@ { "name": "drunken monkey", "homepage": "https://www.drupal.org/user/205582" + }, + { + "name": "Nick_vh", + "homepage": "https://www.drupal.org/user/122682" } ], "description": "Offers an implementation of the Search API that uses database tables for indexing content.", @@ -3822,6 +4522,61 @@ }, "install-path": "../../web/modules/contrib/tvi" }, + { + "name": "drupal/twig_vardumper", + "version": "3.0.2", + "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/twig_vardumper.git", + "reference": "3.0.2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/twig_vardumper-3.0.2.zip", + "reference": "3.0.2", + "shasum": "fd9ecc9998c6da40406f77fd41eb4de21f1bccc5" + }, + "require": { + "drupal/core": "^9", + "symfony/var-dumper": "~5" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "3.0.2", + "datestamp": "1591885117", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "installation-source": "dist", + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Ruben Egiguren a.k.a keopx", + "homepage": "https://www.drupal.org/user/377362", + "email": "keopx@keopx.net" + } + ], + "description": "Twig vardumper provides a better dump() and vardumper() function that can help you debug Twig variables.", + "homepage": "https://www.drupal.org/project/twig_vardumper", + "keywords": [ + "Development", + "Drupal", + "Twig" + ], + "support": { + "source": "https://git.drupalcode.org/project/twig_vardumper", + "issues": "https://www.drupal.org/project/issues/twig_vardumper" + }, + "install-path": "../../web/modules/contrib/twig_vardumper" + }, { "name": "drupal/vardumper", "version": "1.6.0", @@ -4009,24 +4764,25 @@ }, { "name": "drupal/xmlsitemap", - "version": "1.2.0", - "version_normalized": "1.2.0.0", + "version": "1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/xmlsitemap.git", - "reference": "8.x-1.2" + "reference": "8.x-1.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/xmlsitemap-8.x-1.2.zip", - "reference": "8.x-1.2", - "shasum": "528736c96ee5f19abbf798d1f8aefb211bf11b5d" + "url": "https://ftp.drupal.org/files/projects/xmlsitemap-8.x-1.3.zip", + "reference": "8.x-1.3", + "shasum": "a2a20c5aab5682cc369d095cd2e21d67fc46df9b" }, "require": { - "drupal/core": "^8.8 || ^9", + "drupal/core": "^9", "ext-xmlwriter": "*" }, "require-dev": { + "drupal/config_readonly": "^1.0", "drupal/metatag": "^1.0", "drupal/robotstxt": "^1.0" }, @@ -4036,8 +4792,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.2", - "datestamp": "1638486168", + "version": "8.x-1.3", + "datestamp": "1658327425", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -4055,14 +4811,6 @@ "GPL-2.0-or-later" ], "authors": [ - { - "name": "Dave Reid", - "homepage": "https://www.drupal.org/user/53892" - }, - { - "name": "RenatoG", - "homepage": "https://www.drupal.org/user/3326031" - }, { "name": "amateescu", "homepage": "https://www.drupal.org/user/729614" @@ -4071,6 +4819,10 @@ "name": "andrei.dincu", "homepage": "https://www.drupal.org/user/2628879" }, + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + }, { "name": "juampynr", "homepage": "https://www.drupal.org/user/682736" @@ -4083,6 +4835,10 @@ "name": "pifagor", "homepage": "https://www.drupal.org/user/2375692" }, + { + "name": "RenatoG", + "homepage": "https://www.drupal.org/user/3326031" + }, { "name": "tadityar", "homepage": "https://www.drupal.org/user/3094465" @@ -4092,7 +4848,7 @@ "homepage": "https://www.drupal.org/user/1835276" } ], - "description": "Creates XML sitemaps for the site", + "description": "Creates XML Sitemaps for the site", "homepage": "https://www.drupal.org/project/xmlsitemap", "support": { "source": "https://git.drupalcode.org/project/xmlsitemap", @@ -8186,6 +8942,15 @@ "install-path": "../typo3/phar-stream-wrapper" } ], - "dev": false, - "dev-package-names": [] + "dev": true, + "dev-package-names": [ + "doctrine/cache", + "doctrine/collections", + "doctrine/common", + "doctrine/event-manager", + "doctrine/inflector", + "doctrine/persistence", + "drupal/devel", + "drupal/twig_vardumper" + ] } diff --git a/frontend/drupal9/vendor/composer/installed.php b/frontend/drupal9/vendor/composer/installed.php index 6eedcddce..2315f7f4e 100755 --- a/frontend/drupal9/vendor/composer/installed.php +++ b/frontend/drupal9/vendor/composer/installed.php @@ -5,9 +5,9 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1170d8cc597d72a1f4b56a41a58d772b7dc8572e', + 'reference' => '66fe03a785bbd04b46f9a2333f5da39ed5587eed', 'name' => 'drupal/recommended-project', - 'dev' => false, + 'dev' => true, ), 'versions' => array( 'asm89/stack-cors' => array( @@ -46,6 +46,51 @@ 'reference' => '648b0343343565c4a056bfc8392201385e8d89f0', 'dev_requirement' => false, ), + 'doctrine/cache' => array( + 'pretty_version' => '1.13.0', + 'version' => '1.13.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/cache', + 'aliases' => array(), + 'reference' => '56cd022adb5514472cb144c087393c1821911d09', + 'dev_requirement' => true, + ), + 'doctrine/collections' => array( + 'pretty_version' => '1.6.8', + 'version' => '1.6.8.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/collections', + 'aliases' => array(), + 'reference' => '1958a744696c6bb3bb0d28db2611dc11610e78af', + 'dev_requirement' => true, + ), + 'doctrine/common' => array( + 'pretty_version' => '2.13.3', + 'version' => '2.13.3.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/common', + 'aliases' => array(), + 'reference' => 'f3812c026e557892c34ef37f6ab808a6b567da7f', + 'dev_requirement' => true, + ), + 'doctrine/event-manager' => array( + 'pretty_version' => '1.1.1', + 'version' => '1.1.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/event-manager', + 'aliases' => array(), + 'reference' => '41370af6a30faa9dc0368c4a6814d596e81aba7f', + 'dev_requirement' => true, + ), + 'doctrine/inflector' => array( + 'pretty_version' => '1.4.4', + 'version' => '1.4.4.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/inflector', + 'aliases' => array(), + 'reference' => '4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9', + 'dev_requirement' => true, + ), 'doctrine/lexer' => array( 'pretty_version' => '1.2.3', 'version' => '1.2.3.0', @@ -55,6 +100,15 @@ 'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229', 'dev_requirement' => false, ), + 'doctrine/persistence' => array( + 'pretty_version' => '1.3.8', + 'version' => '1.3.8.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/persistence', + 'aliases' => array(), + 'reference' => '7a6eac9fb6f61bba91328f15aa7547f4806ca288', + 'dev_requirement' => true, + ), 'doctrine/reflection' => array( 'pretty_version' => '1.2.3', 'version' => '1.2.3.0', @@ -67,7 +121,7 @@ 'drupal/action' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/advagg' => array( @@ -82,13 +136,13 @@ 'drupal/aggregator' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/automated_cron' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/back_to_top' => array( @@ -103,31 +157,31 @@ 'drupal/ban' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/bartik' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/basic_auth' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/big_pipe' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/block' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/block_class' => array( @@ -142,73 +196,73 @@ 'drupal/block_content' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/book' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/breakpoint' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/ckeditor' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/ckeditor5' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/claro' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/classy' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/color' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/comment' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/config' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/config_translation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/contact' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/content_access' => array( @@ -223,57 +277,57 @@ 'drupal/content_moderation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/content_translation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/contextual' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core' => array( - 'pretty_version' => '9.4.2', - 'version' => '9.4.2.0', + 'pretty_version' => '9.4.3', + 'version' => '9.4.3.0', 'type' => 'drupal-core', 'install_path' => __DIR__ . '/../../web/core', 'aliases' => array(), - 'reference' => '5a4d6acc99e279f70a914804ff3dd08111707de1', + 'reference' => '7b1a403c093c7abc89ef3df1a6b05bdb19b3ffad', 'dev_requirement' => false, ), 'drupal/core-annotation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-assertion' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-bridge' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-class-finder' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-composer-scaffold' => array( - 'pretty_version' => '9.4.2', - 'version' => '9.4.2.0', + 'pretty_version' => '9.4.3', + 'version' => '9.4.3.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../drupal/core-composer-scaffold', 'aliases' => array(), @@ -283,90 +337,90 @@ 'drupal/core-datetime' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-dependency-injection' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-diff' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-discovery' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-event-dispatcher' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-file-cache' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-file-security' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-filesystem' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-front-matter' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-gettext' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-graph' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-http-foundation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-php-storage' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-plugin' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-project-message' => array( - 'pretty_version' => '9.4.2', - 'version' => '9.4.2.0', + 'pretty_version' => '9.4.3', + 'version' => '9.4.3.0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../drupal/core-project-message', 'aliases' => array(), @@ -376,52 +430,52 @@ 'drupal/core-proxy-builder' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-recommended' => array( - 'pretty_version' => '9.4.2', - 'version' => '9.4.2.0', + 'pretty_version' => '9.4.3', + 'version' => '9.4.3.0', 'type' => 'metapackage', 'install_path' => NULL, 'aliases' => array(), - 'reference' => 'c10da85434356b27e2bf0516a7b6f8103b473038', + 'reference' => 'ff8662af0a5963a88ea856e9786e17a51f8e640c', 'dev_requirement' => false, ), 'drupal/core-render' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-serialization' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-transliteration' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-utility' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-uuid' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/core-version' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/ctools' => array( @@ -436,21 +490,30 @@ 'drupal/datetime' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/datetime_range' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/dblog' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), + 'drupal/devel' => array( + 'pretty_version' => '4.1.5', + 'version' => '4.1.5.0', + 'type' => 'drupal-module', + 'install_path' => __DIR__ . '/../../web/modules/contrib/devel', + 'aliases' => array(), + 'reference' => '4.1.5', + 'dev_requirement' => true, + ), 'drupal/ds' => array( 'pretty_version' => '3.13.0', 'version' => '3.13.0.0', @@ -463,13 +526,13 @@ 'drupal/dynamic_page_cache' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/editor' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/entity' => array( @@ -493,7 +556,7 @@ 'drupal/entity_reference' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/eu_cookie_compliance' => array( @@ -506,48 +569,57 @@ 'dev_requirement' => false, ), 'drupal/facets' => array( - 'pretty_version' => '2.0.2', - 'version' => '2.0.2.0', + 'pretty_version' => '2.0.5', + 'version' => '2.0.5.0', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/contrib/facets', 'aliases' => array(), - 'reference' => '2.0.2', + 'reference' => '2.0.5', + 'dev_requirement' => false, + ), + 'drupal/facets_block' => array( + 'pretty_version' => '1.4.0', + 'version' => '1.4.0.0', + 'type' => 'drupal-module', + 'install_path' => __DIR__ . '/../../web/modules/contrib/facets_block', + 'aliases' => array(), + 'reference' => '8.x-1.04', 'dev_requirement' => false, ), 'drupal/field' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/field_layout' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/field_ui' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/file' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/filter' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/forum' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/google_analytics' => array( @@ -580,31 +652,31 @@ 'drupal/hal' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/help' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/help_topics' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/history' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/image' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/imce' => array( @@ -619,7 +691,7 @@ 'drupal/inline_form_errors' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/insert_view' => array( @@ -661,13 +733,13 @@ 'drupal/jsonapi' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/language' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/languageicons' => array( @@ -682,13 +754,13 @@ 'drupal/layout_builder' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/layout_discovery' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/lazy' => array( @@ -712,25 +784,25 @@ 'drupal/link' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/locale' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/media' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/media_library' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/menu_block' => array( @@ -754,7 +826,7 @@ 'drupal/menu_link_content' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/menu_position' => array( @@ -778,88 +850,88 @@ 'drupal/menu_ui' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/metatag' => array( - 'pretty_version' => '1.19.0', - 'version' => '1.19.0.0', + 'pretty_version' => '1.21.0', + 'version' => '1.21.0.0', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/contrib/metatag', 'aliases' => array(), - 'reference' => '8.x-1.19', + 'reference' => '8.x-1.21', 'dev_requirement' => false, ), 'drupal/migrate' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/migrate_drupal' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/migrate_drupal_multilingual' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/migrate_drupal_ui' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/minimal' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/mysql' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/node' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/olivero' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/options' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/page_cache' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/path' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/path_alias' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/pathauto' => array( @@ -874,7 +946,7 @@ 'drupal/pgsql' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/publication_date' => array( @@ -889,7 +961,7 @@ 'drupal/quickedit' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/quicktabs' => array( @@ -904,7 +976,7 @@ 'drupal/rdf' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/recommended-project' => array( @@ -913,7 +985,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1170d8cc597d72a1f4b56a41a58d772b7dc8572e', + 'reference' => '66fe03a785bbd04b46f9a2333f5da39ed5587eed', 'dev_requirement' => false, ), 'drupal/redirect' => array( @@ -937,7 +1009,7 @@ 'drupal/responsive_image' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/responsive_menu' => array( @@ -952,7 +1024,7 @@ 'drupal/rest' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/route_specific_breadcrumb' => array( @@ -976,21 +1048,21 @@ 'drupal/search' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/search_api' => array( - 'pretty_version' => '1.24.0', - 'version' => '1.24.0.0', + 'pretty_version' => '1.25.0', + 'version' => '1.25.0.0', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/contrib/search_api', 'aliases' => array(), - 'reference' => '8.x-1.24', + 'reference' => '8.x-1.25', 'dev_requirement' => false, ), 'drupal/search_api_db' => array( - 'pretty_version' => '1.24.0', - 'version' => '1.24.0.0', + 'pretty_version' => '1.25.0', + 'version' => '1.25.0.0', 'type' => 'metapackage', 'install_path' => NULL, 'aliases' => array(), @@ -1018,49 +1090,49 @@ 'drupal/serialization' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/settings_tray' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/seven' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/shortcut' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/sqlite' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/standard' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/stark' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/statistics' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/superfish' => array( @@ -1075,19 +1147,19 @@ 'drupal/syslog' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/system' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/taxonomy' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/taxonomy_menu' => array( @@ -1104,13 +1176,13 @@ 'drupal/telephone' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/text' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/token' => array( @@ -1125,19 +1197,19 @@ 'drupal/toolbar' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/tour' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/tracker' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/tvi' => array( @@ -1149,16 +1221,25 @@ 'reference' => '8.x-1.0-rc4', 'dev_requirement' => false, ), + 'drupal/twig_vardumper' => array( + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'type' => 'drupal-module', + 'install_path' => __DIR__ . '/../../web/modules/contrib/twig_vardumper', + 'aliases' => array(), + 'reference' => '3.0.2', + 'dev_requirement' => true, + ), 'drupal/update' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/user' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/vardumper' => array( @@ -1182,7 +1263,7 @@ 'drupal/views' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/views_slideshow' => array( @@ -1197,28 +1278,28 @@ 'drupal/views_ui' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/workflows' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/workspaces' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '9.4.2', + 0 => '9.4.3', ), ), 'drupal/xmlsitemap' => array( - 'pretty_version' => '1.2.0', - 'version' => '1.2.0.0', + 'pretty_version' => '1.3.0', + 'version' => '1.3.0.0', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/contrib/xmlsitemap', 'aliases' => array(), - 'reference' => '8.x-1.2', + 'reference' => '8.x-1.3', 'dev_requirement' => false, ), 'egulias/email-validator' => array( diff --git a/frontend/drupal9/vendor/doctrine/cache/LICENSE b/frontend/drupal9/vendor/doctrine/cache/LICENSE new file mode 100644 index 000000000..8c38cc1bc --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/LICENSE @@ -0,0 +1,19 @@ +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/frontend/drupal9/vendor/doctrine/cache/README.md b/frontend/drupal9/vendor/doctrine/cache/README.md new file mode 100644 index 000000000..a13196d15 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/README.md @@ -0,0 +1,13 @@ +# Doctrine Cache + +[![Build Status](https://github.com/doctrine/cache/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/cache/actions) +[![Code Coverage](https://codecov.io/gh/doctrine/cache/branch/1.10.x/graph/badge.svg)](https://codecov.io/gh/doctrine/cache/branch/1.10.x) + +[![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) + +This library is deprecated and will no longer receive bug fixes from the +Doctrine Project. Please use a different cache library, preferably PSR-6 or +PSR-16 instead. diff --git a/frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.11.md b/frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.11.md new file mode 100644 index 000000000..a33be2302 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.11.md @@ -0,0 +1,15 @@ +# Upgrade to 1.11 + +doctrine/cache will no longer be maintained and all cache implementations have +been marked as deprecated. These implementations will be removed in 2.0, which +will only contain interfaces to provide a lightweight package for backward +compatibility. + +There are two new classes to use in the `Doctrine\Common\Cache\Psr6` namespace: +* The `CacheAdapter` class allows using any Doctrine Cache as PSR-6 cache. This + is useful to provide a forward compatibility layer in libraries that accept + Doctrine cache implementations and switch to PSR-6. +* The `DoctrineProvider` class allows using any PSR-6 cache as Doctrine cache. + This implementation is designed for libraries that leak the cache and want to + switch to allowing PSR-6 implementations. This class is design to be used + during the transition phase of sunsetting doctrine/cache support. diff --git a/frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.4.md b/frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.4.md new file mode 100644 index 000000000..e1f8a503e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/UPGRADE-1.4.md @@ -0,0 +1,16 @@ +# 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/frontend/drupal9/vendor/doctrine/cache/composer.json b/frontend/drupal9/vendor/doctrine/cache/composer.json new file mode 100644 index 000000000..bd337f995 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/composer.json @@ -0,0 +1,56 @@ +{ + "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.5 || ^8.5 || ^9.5", + "predis/predis": "~1.0", + "doctrine/coding-standard": "^9", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "cache/integration-tests": "dev-master", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" + }, + "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" } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php new file mode 100644 index 000000000..742dff207 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php @@ -0,0 +1,106 @@ += 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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php new file mode 100644 index 000000000..afb501d31 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php @@ -0,0 +1,108 @@ + $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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php new file mode 100644 index 000000000..eca43b856 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php @@ -0,0 +1,115 @@ +> $data each element being a tuple of [$data, $expiration], where the expiration is int|bool */ + private $data = []; + + /** @var int */ + private $hitsCount = 0; + + /** @var int */ + private $missesCount = 0; + + /** @var int */ + private $upTime; + + /** + * {@inheritdoc} + */ + public function __construct() + { + $this->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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php new file mode 100644 index 000000000..4cfab6c0f --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php @@ -0,0 +1,90 @@ +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 mixed[]|null An associative array with server's statistics if available, NULL otherwise. + */ + public function getStats(); +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php new file mode 100644 index 000000000..180482a7b --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php @@ -0,0 +1,325 @@ +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 string[] $keys Array of keys to retrieve from cache + * + * @return mixed[] 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 mixed[] $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 string[] $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 mixed[]|null An associative array with server's statistics if available, NULL otherwise. + */ + abstract protected function doGetStats(); +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php new file mode 100644 index 000000000..a5b426120 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ChainCache.php @@ -0,0 +1,198 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php new file mode 100644 index 000000000..b94618e46 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php @@ -0,0 +1,21 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php new file mode 100644 index 000000000..63a60f4a2 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php @@ -0,0 +1,106 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php new file mode 100644 index 000000000..b20f913d4 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php @@ -0,0 +1,199 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php new file mode 100644 index 000000000..1d7fd4e77 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php @@ -0,0 +1,292 @@ +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; + } + + /** + * @return Iterator + */ + 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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php new file mode 100644 index 000000000..832e389b4 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php @@ -0,0 +1,105 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php new file mode 100644 index 000000000..ee7ce984e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php @@ -0,0 +1,18 @@ +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 mixed[] $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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php new file mode 100644 index 000000000..b86b6a6a3 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php @@ -0,0 +1,105 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php new file mode 100644 index 000000000..4261209ad --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php @@ -0,0 +1,173 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php new file mode 100644 index 000000000..562e66ca1 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php @@ -0,0 +1,116 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php new file mode 100644 index 000000000..d099d47b8 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiDeleteCache.php @@ -0,0 +1,22 @@ + 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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php new file mode 100644 index 000000000..83f2c81c0 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php @@ -0,0 +1,120 @@ +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 mixed[]|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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php new file mode 100644 index 000000000..7b53b9a7b --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php @@ -0,0 +1,147 @@ +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'], array_values($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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php new file mode 100644 index 000000000..d3693b7c6 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheAdapter.php @@ -0,0 +1,340 @@ + */ + private $deferredItems = []; + + public static function wrap(Cache $cache): CacheItemPoolInterface + { + if ($cache instanceof DoctrineProvider && ! $cache->getNamespace()) { + return $cache->getPool(); + } + + if ($cache instanceof SymfonyDoctrineProvider && ! $cache->getNamespace()) { + $getPool = function () { + // phpcs:ignore Squiz.Scope.StaticThisUsage.Found + return $this->pool; + }; + + return $getPool->bindTo($cache, SymfonyDoctrineProvider::class)(); + } + + return new self($cache); + } + + private function __construct(Cache $cache) + { + $this->cache = $cache; + } + + /** @internal */ + public function getCache(): Cache + { + return $this->cache; + } + + /** + * {@inheritDoc} + */ + public function getItem($key): CacheItemInterface + { + assert(self::validKey($key)); + + if (isset($this->deferredItems[$key])) { + $this->commit(); + } + + $value = $this->cache->fetch($key); + + if (PHP_VERSION_ID >= 80000) { + if ($value !== false) { + return new TypedCacheItem($key, $value, true); + } + + return new TypedCacheItem($key, null, false); + } + + if ($value !== false) { + return new CacheItem($key, $value, true); + } + + return new CacheItem($key, null, false); + } + + /** + * {@inheritDoc} + */ + public function getItems(array $keys = []): array + { + if ($this->deferredItems) { + $this->commit(); + } + + assert(self::validKeys($keys)); + + $values = $this->doFetchMultiple($keys); + $items = []; + + if (PHP_VERSION_ID >= 80000) { + foreach ($keys as $key) { + if (array_key_exists($key, $values)) { + $items[$key] = new TypedCacheItem($key, $values[$key], true); + } else { + $items[$key] = new TypedCacheItem($key, null, false); + } + } + + return $items; + } + + foreach ($keys as $key) { + if (array_key_exists($key, $values)) { + $items[$key] = new CacheItem($key, $values[$key], true); + } else { + $items[$key] = new CacheItem($key, null, false); + } + } + + return $items; + } + + /** + * {@inheritDoc} + */ + public function hasItem($key): bool + { + assert(self::validKey($key)); + + if (isset($this->deferredItems[$key])) { + $this->commit(); + } + + return $this->cache->contains($key); + } + + public function clear(): bool + { + $this->deferredItems = []; + + if (! $this->cache instanceof ClearableCache) { + return false; + } + + return $this->cache->deleteAll(); + } + + /** + * {@inheritDoc} + */ + public function deleteItem($key): bool + { + assert(self::validKey($key)); + unset($this->deferredItems[$key]); + + return $this->cache->delete($key); + } + + /** + * {@inheritDoc} + */ + public function deleteItems(array $keys): bool + { + foreach ($keys as $key) { + assert(self::validKey($key)); + unset($this->deferredItems[$key]); + } + + return $this->doDeleteMultiple($keys); + } + + public function save(CacheItemInterface $item): bool + { + return $this->saveDeferred($item) && $this->commit(); + } + + public function saveDeferred(CacheItemInterface $item): bool + { + if (! $item instanceof CacheItem && ! $item instanceof TypedCacheItem) { + return false; + } + + $this->deferredItems[$item->getKey()] = $item; + + return true; + } + + public function commit(): bool + { + if (! $this->deferredItems) { + return true; + } + + $now = microtime(true); + $itemsCount = 0; + $byLifetime = []; + $expiredKeys = []; + + foreach ($this->deferredItems as $key => $item) { + $lifetime = ($item->getExpiry() ?? $now) - $now; + + if ($lifetime < 0) { + $expiredKeys[] = $key; + + continue; + } + + ++$itemsCount; + $byLifetime[(int) $lifetime][$key] = $item->get(); + } + + $this->deferredItems = []; + + switch (count($expiredKeys)) { + case 0: + break; + case 1: + $this->cache->delete(current($expiredKeys)); + break; + default: + $this->doDeleteMultiple($expiredKeys); + break; + } + + if ($itemsCount === 1) { + return $this->cache->save($key, $item->get(), (int) $lifetime); + } + + $success = true; + foreach ($byLifetime as $lifetime => $values) { + $success = $this->doSaveMultiple($values, $lifetime) && $success; + } + + return $success; + } + + public function __destruct() + { + $this->commit(); + } + + /** + * @param mixed $key + */ + private static function validKey($key): bool + { + if (! is_string($key)) { + throw new InvalidArgument(sprintf('Cache key must be string, "%s" given.', is_object($key) ? get_class($key) : gettype($key))); + } + + if ($key === '') { + throw new InvalidArgument('Cache key length must be greater than zero.'); + } + + if (strpbrk($key, self::RESERVED_CHARACTERS) !== false) { + throw new InvalidArgument(sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); + } + + return true; + } + + /** + * @param mixed[] $keys + */ + private static function validKeys(array $keys): bool + { + foreach ($keys as $key) { + self::validKey($key); + } + + return true; + } + + /** + * @param mixed[] $keys + */ + private function doDeleteMultiple(array $keys): bool + { + if ($this->cache instanceof MultiDeleteCache) { + return $this->cache->deleteMultiple($keys); + } + + $success = true; + foreach ($keys as $key) { + $success = $this->cache->delete($key) && $success; + } + + return $success; + } + + /** + * @param mixed[] $keys + * + * @return mixed[] + */ + private function doFetchMultiple(array $keys): array + { + if ($this->cache instanceof MultiGetCache) { + return $this->cache->fetchMultiple($keys); + } + + $values = []; + foreach ($keys as $key) { + $value = $this->cache->fetch($key); + if (! $value) { + continue; + } + + $values[$key] = $value; + } + + return $values; + } + + /** + * @param mixed[] $keysAndValues + */ + private function doSaveMultiple(array $keysAndValues, int $lifetime = 0): bool + { + if ($this->cache instanceof MultiPutCache) { + return $this->cache->saveMultiple($keysAndValues, $lifetime); + } + + $success = true; + foreach ($keysAndValues as $key => $value) { + $success = $this->cache->save($key, $value, $lifetime) && $success; + } + + return $success; + } +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php new file mode 100644 index 000000000..0b6f0a28d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/CacheItem.php @@ -0,0 +1,118 @@ +key = $key; + $this->value = $data; + $this->isHit = $isHit; + } + + public function getKey(): string + { + return $this->key; + } + + /** + * {@inheritDoc} + * + * @return mixed + */ + public function get() + { + return $this->value; + } + + public function isHit(): bool + { + return $this->isHit; + } + + /** + * {@inheritDoc} + */ + public function set($value): self + { + $this->value = $value; + + return $this; + } + + /** + * {@inheritDoc} + */ + public function expiresAt($expiration): self + { + if ($expiration === null) { + $this->expiry = null; + } elseif ($expiration instanceof DateTimeInterface) { + $this->expiry = (float) $expiration->format('U.u'); + } else { + throw new TypeError(sprintf( + 'Expected $expiration to be an instance of DateTimeInterface or null, got %s', + is_object($expiration) ? get_class($expiration) : gettype($expiration) + )); + } + + return $this; + } + + /** + * {@inheritDoc} + */ + public function expiresAfter($time): self + { + if ($time === null) { + $this->expiry = null; + } elseif ($time instanceof DateInterval) { + $this->expiry = microtime(true) + DateTime::createFromFormat('U', 0)->add($time)->format('U.u'); + } elseif (is_int($time)) { + $this->expiry = $time + microtime(true); + } else { + throw new TypeError(sprintf( + 'Expected $time to be either an integer, an instance of DateInterval or null, got %s', + is_object($time) ? get_class($time) : gettype($time) + )); + } + + return $this; + } + + /** + * @internal + */ + public function getExpiry(): ?float + { + return $this->expiry; + } +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php new file mode 100644 index 000000000..3b0f416c1 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/DoctrineProvider.php @@ -0,0 +1,135 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Doctrine\Common\Cache\Psr6; + +use Doctrine\Common\Cache\Cache; +use Doctrine\Common\Cache\CacheProvider; +use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\Cache\Adapter\DoctrineAdapter as SymfonyDoctrineAdapter; +use Symfony\Contracts\Service\ResetInterface; + +use function rawurlencode; + +/** + * This class was copied from the Symfony Framework, see the original copyright + * notice above. The code is distributed subject to the license terms in + * https://github.com/symfony/symfony/blob/ff0cf61278982539c49e467db9ab13cbd342f76d/LICENSE + */ +final class DoctrineProvider extends CacheProvider +{ + /** @var CacheItemPoolInterface */ + private $pool; + + public static function wrap(CacheItemPoolInterface $pool): Cache + { + if ($pool instanceof CacheAdapter) { + return $pool->getCache(); + } + + if ($pool instanceof SymfonyDoctrineAdapter) { + $getCache = function () { + // phpcs:ignore Squiz.Scope.StaticThisUsage.Found + return $this->provider; + }; + + return $getCache->bindTo($pool, SymfonyDoctrineAdapter::class)(); + } + + return new self($pool); + } + + private function __construct(CacheItemPoolInterface $pool) + { + $this->pool = $pool; + } + + /** @internal */ + public function getPool(): CacheItemPoolInterface + { + return $this->pool; + } + + public function reset(): void + { + if ($this->pool instanceof ResetInterface) { + $this->pool->reset(); + } + + $this->setNamespace($this->getNamespace()); + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + $item = $this->pool->getItem(rawurlencode($id)); + + return $item->isHit() ? $item->get() : false; + } + + /** + * {@inheritdoc} + * + * @return bool + */ + protected function doContains($id) + { + return $this->pool->hasItem(rawurlencode($id)); + } + + /** + * {@inheritdoc} + * + * @return bool + */ + protected function doSave($id, $data, $lifeTime = 0) + { + $item = $this->pool->getItem(rawurlencode($id)); + + if (0 < $lifeTime) { + $item->expiresAfter($lifeTime); + } + + return $this->pool->save($item->set($data)); + } + + /** + * {@inheritdoc} + * + * @return bool + */ + protected function doDelete($id) + { + return $this->pool->deleteItem(rawurlencode($id)); + } + + /** + * {@inheritdoc} + * + * @return bool + */ + protected function doFlush() + { + return $this->pool->clear(); + } + + /** + * {@inheritdoc} + * + * @return array|null + */ + protected function doGetStats() + { + return null; + } +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php new file mode 100644 index 000000000..196f1bca9 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Psr6/InvalidArgument.php @@ -0,0 +1,13 @@ +key; + } + + public function get(): mixed + { + return $this->value; + } + + public function isHit(): bool + { + return $this->isHit; + } + + public function set(mixed $value): static + { + $this->value = $value; + + return $this; + } + + /** + * {@inheritDoc} + */ + public function expiresAt($expiration): static + { + if ($expiration === null) { + $this->expiry = null; + } elseif ($expiration instanceof DateTimeInterface) { + $this->expiry = (float) $expiration->format('U.u'); + } else { + throw new TypeError(sprintf( + 'Expected $expiration to be an instance of DateTimeInterface or null, got %s', + get_debug_type($expiration) + )); + } + + return $this; + } + + /** + * {@inheritDoc} + */ + public function expiresAfter($time): static + { + if ($time === null) { + $this->expiry = null; + } elseif ($time instanceof DateInterval) { + $this->expiry = microtime(true) + DateTime::createFromFormat('U', 0)->add($time)->format('U.u'); + } elseif (is_int($time)) { + $this->expiry = $time + microtime(true); + } else { + throw new TypeError(sprintf( + 'Expected $time to be either an integer, an instance of DateInterval or null, got %s', + get_debug_type($time) + )); + } + + return $this; + } + + /** + * @internal + */ + public function getExpiry(): ?float + { + return $this->expiry; + } +} diff --git a/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php new file mode 100644 index 000000000..57d5cd451 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php @@ -0,0 +1,186 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php new file mode 100644 index 000000000..a7ad1d47d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php @@ -0,0 +1,210 @@ +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 mixed[]|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. + * + * @psalm-return array{string, string, string} + */ + private function getFields(): array + { + return [static::ID_FIELD, static::DATA_FIELD, static::EXPIRATION_FIELD]; + } + + /** + * Check if the item is expired. + * + * @param mixed[] $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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php new file mode 100644 index 000000000..6395acb9e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php @@ -0,0 +1,11 @@ + $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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php new file mode 100644 index 000000000..c532dfc2e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php @@ -0,0 +1,106 @@ +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/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php new file mode 100644 index 000000000..012762ae4 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php @@ -0,0 +1,71 @@ +getNamespace(); + if (empty($namespace)) { + return zend_shm_cache_clear(); + } + + return zend_shm_cache_clear($namespace); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + return null; + } +} diff --git a/frontend/drupal9/vendor/doctrine/collections/.doctrine-project.json b/frontend/drupal9/vendor/doctrine/collections/.doctrine-project.json new file mode 100644 index 000000000..a0c1a6eb6 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/.doctrine-project.json @@ -0,0 +1,26 @@ +{ + "active": true, + "name": "Collections", + "slug": "collections", + "docsSlug": "doctrine-collections", + "versions": [ + { + "name": "2.0", + "branchName": "2.0.x", + "slug": "latest", + "upcoming": true + }, + { + "name": "1.7", + "branchName": "1.7.x", + "slug": "1.7", + "upcoming": true + }, + { + "name": "1.6", + "branchName": "1.6.x", + "slug": "1.6", + "current": true + } + ] +} diff --git a/frontend/drupal9/vendor/doctrine/collections/CONTRIBUTING.md b/frontend/drupal9/vendor/doctrine/collections/CONTRIBUTING.md new file mode 100644 index 000000000..0f3a03b47 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# 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 +``` + +## Github Actions + +We automatically run your pull request through Github Actions 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/frontend/drupal9/vendor/doctrine/collections/LICENSE b/frontend/drupal9/vendor/doctrine/collections/LICENSE new file mode 100644 index 000000000..5e781fce4 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/LICENSE @@ -0,0 +1,19 @@ +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/frontend/drupal9/vendor/doctrine/collections/README.md b/frontend/drupal9/vendor/doctrine/collections/README.md new file mode 100644 index 000000000..5b37bad23 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/README.md @@ -0,0 +1,92 @@ +# Doctrine Collections + +[![Build Status](https://github.com/doctrine/collections/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/collections/actions) +[![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/frontend/drupal9/vendor/doctrine/collections/composer.json b/frontend/drupal9/vendor/doctrine/collections/composer.json new file mode 100644 index 000000000..9a6494e7c --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/composer.json @@ -0,0 +1,37 @@ +{ + "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.5 || ^8.5 || ^9.1.5", + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^0.12", + "vimeo/psalm": "^4.2.1" + }, + "autoload": { + "psr-4": { "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Tests\\": "tests/Doctrine/Tests" + } + } +} diff --git a/frontend/drupal9/vendor/doctrine/collections/docs/en/derived-collections.rst b/frontend/drupal9/vendor/doctrine/collections/docs/en/derived-collections.rst new file mode 100644 index 000000000..03d9da5d6 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/docs/en/derived-collections.rst @@ -0,0 +1,26 @@ +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/frontend/drupal9/vendor/doctrine/collections/docs/en/expression-builder.rst b/frontend/drupal9/vendor/doctrine/collections/docs/en/expression-builder.rst new file mode 100644 index 000000000..ad4055b54 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/docs/en/expression-builder.rst @@ -0,0 +1,173 @@ +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/frontend/drupal9/vendor/doctrine/collections/docs/en/expressions.rst b/frontend/drupal9/vendor/doctrine/collections/docs/en/expressions.rst new file mode 100644 index 000000000..db943b246 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/docs/en/expressions.rst @@ -0,0 +1,102 @@ +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/frontend/drupal9/vendor/doctrine/collections/docs/en/index.rst b/frontend/drupal9/vendor/doctrine/collections/docs/en/index.rst new file mode 100644 index 000000000..936f9efa3 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/docs/en/index.rst @@ -0,0 +1,328 @@ +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($element) { + return $element > 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 for which your callback function returns `true`. +The order and keys of the elements are preserved. + +.. code-block:: php + $collection = new ArrayCollection([1, 2, 3]); + + $filteredCollection = $collection->filter(function($element) { + return $element > 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/frontend/drupal9/vendor/doctrine/collections/docs/en/lazy-collections.rst b/frontend/drupal9/vendor/doctrine/collections/docs/en/lazy-collections.rst new file mode 100644 index 000000000..b9cafb60b --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/docs/en/lazy-collections.rst @@ -0,0 +1,26 @@ +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/frontend/drupal9/vendor/doctrine/collections/docs/en/sidebar.rst b/frontend/drupal9/vendor/doctrine/collections/docs/en/sidebar.rst new file mode 100644 index 000000000..69279a0bb --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/docs/en/sidebar.rst @@ -0,0 +1,8 @@ +.. toctree:: + :depth: 3 + + index + expressions + expression-builder + derived-collections + lazy-collections diff --git a/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php new file mode 100644 index 000000000..b7b84c69f --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php @@ -0,0 +1,385 @@ + + */ +abstract class AbstractLazyCollection implements Collection +{ + /** + * The backed collection to use + * + * @psalm-var Collection + * @var Collection + */ + protected $collection; + + /** @var bool */ + protected $initialized = false; + + /** + * {@inheritDoc} + * + * @return int + */ + #[ReturnTypeWillChange] + 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} + * + * @return Traversable + * @psalm-return Traversable + */ + #[ReturnTypeWillChange] + public function getIterator() + { + $this->initialize(); + + return $this->collection->getIterator(); + } + + /** + * {@inheritDoc} + * + * @psalm-param TKey $offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + $this->initialize(); + + return $this->collection->offsetExists($offset); + } + + /** + * {@inheritDoc} + * + * @param int|string $offset + * @psalm-param TKey $offset + * + * @return mixed + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + $this->initialize(); + + return $this->collection->offsetGet($offset); + } + + /** + * {@inheritDoc} + * + * @param mixed $value + * @psalm-param TKey $offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + $this->initialize(); + $this->collection->offsetSet($offset, $value); + } + + /** + * {@inheritDoc} + * + * @psalm-param TKey $offset + * + * @return void + */ + #[ReturnTypeWillChange] + 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/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php new file mode 100644 index 000000000..df04f9842 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php @@ -0,0 +1,463 @@ + + * @template-implements Selectable + * @psalm-consistent-constructor + */ +class ArrayCollection implements Collection, Selectable +{ + /** + * An array containing the entries of this collection. + * + * @psalm-var array + * @var mixed[] + */ + 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. + * @psalm-param array $elements + * + * @return static + * @psalm-return static + * + * @psalm-template K of array-key + * @psalm-template V + */ + 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 + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return $this->containsKey($offset); + } + + /** + * Required by interface ArrayAccess. + * + * {@inheritDoc} + * + * @psalm-param TKey $offset + * + * @return mixed + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Required by interface ArrayAccess. + * + * {@inheritDoc} + * + * @return void + */ + #[ReturnTypeWillChange] + 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 + * + * @return void + */ + #[ReturnTypeWillChange] + 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} + * + * @return int + */ + #[ReturnTypeWillChange] + 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); + } + + /** + * {@inheritDoc} + * + * @return Traversable + * @psalm-return Traversable + */ + #[ReturnTypeWillChange] + public function getIterator() + { + return new ArrayIterator($this->elements); + } + + /** + * {@inheritDoc} + * + * @psalm-param Closure(T=):U $func + * + * @return static + * @psalm-return static + * + * @psalm-template U + */ + 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/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php new file mode 100644 index 000000000..bba3d6869 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php @@ -0,0 +1,276 @@ +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. + * + * @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. + * @psalm-param T $element + * + * @return true Always TRUE. + */ + 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. + * @psalm-param T $element + * + * @return bool TRUE if the collection contains the element, FALSE otherwise. + */ + 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. + * @psalm-param TKey $key + * + * @return mixed The removed element or NULL, if the collection did not contain the element. + * @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. + * @psalm-param T $element + * + * @return bool TRUE if this collection contained the specified element, FALSE otherwise. + */ + 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. + * @psalm-param TKey $key + * + * @return bool TRUE if the collection contains an element with the specified key/index, + * FALSE otherwise. + */ + public function containsKey($key); + + /** + * Gets the element at the specified key/index. + * + * @param string|int $key The key/index of the element to retrieve. + * @psalm-param TKey $key + * + * @return mixed + * @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 mixed[] 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. + * @psalm-param TKey $key + * @psalm-param T $value + * + * @return void + */ + public function set($key, $value); + + /** + * Gets a native PHP array representation of the collection. + * + * @return mixed[] + * @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. + * @psalm-param Closure(TKey=, T=):bool $p + * + * @return bool TRUE if the predicate is TRUE for at least one element, FALSE otherwise. + */ + 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. + * @psalm-param Closure(T=):bool $p + * + * @return Collection A collection with the results of the filter operation. + * @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. + * @psalm-param Closure(TKey=, T=):bool $p + * + * @return bool TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. + */ + 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. + * + * @psalm-param Closure(T=):U $func + * + * @return Collection + * @psalm-return Collection + * + * @psalm-template U + */ + 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. + * @psalm-param Closure(TKey=, T=):bool $p + * + * @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-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. + * @psalm-param T $element + * + * @return int|string|bool The key/index of the element or FALSE if the element was not found. + * @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 mixed[] + * @psalm-return array + */ + public function slice($offset, $length = null); +} diff --git a/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php new file mode 100644 index 000000000..9027e0707 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php @@ -0,0 +1,225 @@ +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; + + 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; + + return $this; + } +} diff --git a/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php new file mode 100644 index 000000000..b15ef7a83 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php @@ -0,0 +1,265 @@ +$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 callable[] $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 callable[] $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/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php new file mode 100644 index 000000000..13e193cb5 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php @@ -0,0 +1,80 @@ +'; + 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/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php new file mode 100644 index 000000000..924942bd6 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php @@ -0,0 +1,69 @@ +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/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php new file mode 100644 index 000000000..f40d529b6 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php @@ -0,0 +1,14 @@ +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/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php new file mode 100644 index 000000000..0830286e1 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php @@ -0,0 +1,33 @@ +value = $value; + } + + /** + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritDoc} + */ + public function visit(ExpressionVisitor $visitor) + { + return $visitor->walkValue($this); + } +} diff --git a/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php new file mode 100644 index 000000000..ebb21caaf --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php @@ -0,0 +1,181 @@ + + * @psalm-return Collection + */ + public function matching(Criteria $criteria); +} diff --git a/frontend/drupal9/vendor/doctrine/collections/phpstan.neon.dist b/frontend/drupal9/vendor/doctrine/collections/phpstan.neon.dist new file mode 100644 index 000000000..9fa9195a8 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/phpstan.neon.dist @@ -0,0 +1,17 @@ +parameters: + level: 3 + paths: + - lib + ignoreErrors: + # Making classes final as suggested would be a BC-break + - + message: '~Unsafe usage of new static\(\)\.~' + paths: + - 'lib/Doctrine/Common/Collections/ArrayCollection.php' + - 'lib/Doctrine/Common/Collections/Criteria.php' + - + message: '~Array \(array\\) does not accept key int\.~' + path: 'lib/Doctrine/Common/Collections/ArrayCollection.php' + + # This class is new in PHP 8.1 and PHPStan does not know it yet. + - '/Attribute class ReturnTypeWillChange does not exist./' diff --git a/frontend/drupal9/vendor/doctrine/collections/psalm.xml.dist b/frontend/drupal9/vendor/doctrine/collections/psalm.xml.dist new file mode 100644 index 000000000..3b5d11113 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/collections/psalm.xml.dist @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/drupal9/vendor/doctrine/common/.doctrine-project.json b/frontend/drupal9/vendor/doctrine/common/.doctrine-project.json new file mode 100644 index 000000000..d29ce6d4e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/.doctrine-project.json @@ -0,0 +1,18 @@ +{ + "active": true, + "name": "Common", + "slug": "common", + "docsSlug": "doctrine-common", + "versions": [ + { + "name": "master", + "branchName": "master", + "slug": "latest" + }, + { + "name": "2.11", + "branchName": "2.11", + "current": true + } + ] +} diff --git a/frontend/drupal9/vendor/doctrine/common/.github/FUNDING.yml b/frontend/drupal9/vendor/doctrine/common/.github/FUNDING.yml new file mode 100644 index 000000000..af1c7e712 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/.github/FUNDING.yml @@ -0,0 +1,3 @@ +patreon: phpdoctrine +tidelift: packagist/doctrine%2Fcommon +custom: https://www.doctrine-project.org/sponsorship.html diff --git a/frontend/drupal9/vendor/doctrine/common/LICENSE b/frontend/drupal9/vendor/doctrine/common/LICENSE new file mode 100644 index 000000000..8c38cc1bc --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/LICENSE @@ -0,0 +1,19 @@ +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/frontend/drupal9/vendor/doctrine/common/README.md b/frontend/drupal9/vendor/doctrine/common/README.md new file mode 100644 index 000000000..5cffb1abc --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/README.md @@ -0,0 +1,11 @@ +# Doctrine Common + +[![Build Status](https://secure.travis-ci.org/doctrine/common.png)](https://travis-ci.org/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/frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_1 b/frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_1 new file mode 100644 index 000000000..891a2e5c2 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_1 @@ -0,0 +1,39 @@ +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/frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_2 b/frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_2 new file mode 100644 index 000000000..1d93a131e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/UPGRADE_TO_2_2 @@ -0,0 +1,61 @@ +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/frontend/drupal9/vendor/doctrine/common/composer.json b/frontend/drupal9/vendor/doctrine/common/composer.json new file mode 100644 index 000000000..92aa5ec37 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/composer.json @@ -0,0 +1,54 @@ +{ + "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, persistence interfaces, proxies, event system 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/inflector": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/lexer": "^1.0", + "doctrine/annotations": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/reflection": "^1.0", + "doctrine/persistence": "^1.3.3" + }, + "require-dev": { + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpunit/phpunit": "^7.0", + "doctrine/coding-standard": "^1.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5" + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "autoload-dev": { + "psr-4": { + "Doctrine\\Tests\\": "tests/Doctrine/Tests" + } + }, + "extra": { + "branch-alias": { + "dev-master": "2.11.x-dev" + } + } +} diff --git a/frontend/drupal9/vendor/doctrine/common/docs/en/index.rst b/frontend/drupal9/vendor/doctrine/common/docs/en/index.rst new file mode 100644 index 000000000..7550d8b97 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/docs/en/index.rst @@ -0,0 +1,10 @@ +Common Documentation +==================== + +Welcome to the Doctrine Common Library documentation. + +.. toctree:: + :depth: 2 + :glob: + + * diff --git a/frontend/drupal9/vendor/doctrine/common/docs/en/reference/class-loading.rst b/frontend/drupal9/vendor/doctrine/common/docs/en/reference/class-loading.rst new file mode 100644 index 000000000..e193b460e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/docs/en/reference/class-loading.rst @@ -0,0 +1,242 @@ +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. + * + * @author Roman Borschel + * @since 2.0 + * + * @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 boolean TRUE if the class has been successfully loaded, FALSE otherwise. + */ + 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 boolean TRUE if this ClassLoader can load the class, FALSE otherwise. + */ + 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 (false !== stream_resolve_include_path($file)); + } + + /** + * 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 boolean TRUE if the class exists as per the definition given above, FALSE otherwise. + */ + 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. + */ + public static function getClassLoader($className) + { + foreach (spl_autoload_functions() as $loader) { + if (is_array($loader) + && ($classLoader = reset($loader)) + && $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/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php new file mode 100644 index 000000000..bf60621d5 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php @@ -0,0 +1,13 @@ + + * @author Guilherme Blanco + */ +interface Comparable +{ + /** + * Compares the current object to the passed $other. + * + * Returns 0 if they are semantically equal, 1 if the other object + * is less than the current one, or -1 if its more than the current one. + * + * This method should not check for identity using ===, only for semantical equality for example + * when two different DateTime instances point to the exact same Date + TZ. + * + * @param mixed $other + * + * @return int + */ + public function compareTo($other); +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php new file mode 100644 index 000000000..8f92c2652 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php @@ -0,0 +1,25 @@ + + * @author Jonathan Wage + * @author Roman Borschel + * + * @deprecated Use Doctrine\Common\Lexer\AbstractLexer from doctrine/lexer package instead. + */ +abstract class Lexer extends AbstractLexer +{ +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php new file mode 100644 index 000000000..14c4ccfcb --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php @@ -0,0 +1,246 @@ + + */ +abstract class AbstractProxyFactory +{ + /** + * Never autogenerate a proxy and rely that it was generated by some + * process before deployment. + * + * @var integer + */ + const AUTOGENERATE_NEVER = 0; + + /** + * Always generates a new proxy in every request. + * + * This is only sane during development. + * + * @var integer + */ + const AUTOGENERATE_ALWAYS = 1; + + /** + * Autogenerate the proxy class when the proxy file does not exist. + * + * This strategy causes a file exists call whenever any proxy is used the + * first time in a request. + * + * @var integer + */ + const AUTOGENERATE_FILE_NOT_EXISTS = 2; + + /** + * Generate the proxy classes using eval(). + * + * This strategy is only sane for development, and even then it gives me + * the creeps a little. + * + * @var integer + */ + const AUTOGENERATE_EVAL = 3; + + private const AUTOGENERATE_MODES = [ + self::AUTOGENERATE_NEVER, + self::AUTOGENERATE_ALWAYS, + self::AUTOGENERATE_FILE_NOT_EXISTS, + self::AUTOGENERATE_EVAL, + ]; + + /** + * @var \Doctrine\Persistence\Mapping\ClassMetadataFactory + */ + private $metadataFactory; + + /** + * @var \Doctrine\Common\Proxy\ProxyGenerator the proxy generator responsible for creating the proxy classes/files. + */ + private $proxyGenerator; + + /** + * @var int Whether to automatically (re)generate proxy classes. + */ + private $autoGenerate; + + /** + * @var \Doctrine\Common\Proxy\ProxyDefinition[] + */ + private $definitions = []; + + /** + * @param \Doctrine\Common\Proxy\ProxyGenerator $proxyGenerator + * @param \Doctrine\Persistence\Mapping\ClassMetadataFactory $metadataFactory + * @param bool|int $autoGenerate + * + * @throws \Doctrine\Common\Proxy\Exception\InvalidArgumentException When auto generate mode is not valid. + */ + public function __construct(ProxyGenerator $proxyGenerator, ClassMetadataFactory $metadataFactory, $autoGenerate) + { + $this->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 \Doctrine\Common\Proxy\Proxy + * + * @throws \Doctrine\Common\Proxy\Exception\OutOfBoundsException + */ + public function getProxy($className, array $identifier) + { + $definition = isset($this->definitions[$className]) + ? $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 \Doctrine\Persistence\Mapping\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 + * + * @param \Doctrine\Common\Proxy\Proxy $proxy + * + * @return \Doctrine\Common\Proxy\Proxy + * + * @throws \Doctrine\Common\Proxy\Exception\InvalidArgumentException + */ + public function resetUninitializedProxy(Proxy $proxy) + { + if ($proxy->__isInitialized()) { + throw InvalidArgumentException::unitializedProxyExpected($proxy); + } + + $className = ClassUtils::getClass($proxy); + $definition = isset($this->definitions[$className]) + ? $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 + */ + 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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $metadata + * + * @return bool + */ + abstract protected function skipClass(ClassMetadata $metadata); + + /** + * @param string $className + * + * @return ProxyDefinition + */ + abstract protected function createProxyDefinition($className); +} + +interface_exists(ClassMetadata::class); +interface_exists(ClassMetadataFactory::class); diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php new file mode 100644 index 000000000..72eb26144 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php @@ -0,0 +1,80 @@ + + * + * @internal + */ +class Autoloader +{ + /** + * Resolves proxy class name to a filename based on the following pattern. + * + * 1. Remove Proxy namespace from class name. + * 2. Remove namespace separators from remaining class name. + * 3. Return PHP filename from proxy-dir with the result from 2. + * + * @param string $proxyDir + * @param string $proxyNamespace + * @param string $className + * + * @return string + * + * @throws InvalidArgumentException + */ + public static function resolveFile($proxyDir, $proxyNamespace, $className) + { + if (0 !== strpos($className, $proxyNamespace)) { + throw InvalidArgumentException::notProxyClass($className, $proxyNamespace); + } + + // remove proxy namespace from class name + $classNameRelativeToProxyNamespace = substr($className, strlen($proxyNamespace)); + + // remove namespace separators from remaining class name + $fileName = str_replace('\\', '', $classNameRelativeToProxyNamespace); + + return $proxyDir . DIRECTORY_SEPARATOR . $fileName . '.php'; + } + + /** + * Registers and returns autoloader callback for the given proxy dir and namespace. + * + * @param string $proxyDir + * @param string $proxyNamespace + * @param callable|null $notFoundCallback Invoked when the proxy file is not found. + * + * @return \Closure + * + * @throws InvalidArgumentException + */ + public static function register($proxyDir, $proxyNamespace, $notFoundCallback = null) + { + $proxyNamespace = ltrim($proxyNamespace, '\\'); + + if ( ! (null === $notFoundCallback || is_callable($notFoundCallback))) { + throw InvalidArgumentException::invalidClassNotFoundCallback($notFoundCallback); + } + + $autoloader = function ($className) use ($proxyDir, $proxyNamespace, $notFoundCallback) { + if (0 === strpos($className, $proxyNamespace)) { + $file = Autoloader::resolveFile($proxyDir, $proxyNamespace, $className); + + if ($notFoundCallback && ! file_exists($file)) { + call_user_func($notFoundCallback, $proxyDir, $proxyNamespace, $className); + } + + require $file; + } + }; + + spl_autoload_register($autoloader); + + return $autoloader; + } +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php new file mode 100644 index 000000000..e993cb930 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php @@ -0,0 +1,106 @@ + + */ +class InvalidArgumentException extends BaseInvalidArgumentException implements ProxyException +{ + /** + * @return self + */ + public static function proxyDirectoryRequired() + { + return new self('You must configure a proxy directory. See docs for details'); + } + + /** + * @param string $className + * @param string $proxyNamespace + * + * @return self + */ + public static function notProxyClass($className, $proxyNamespace) + { + return new self(sprintf('The class "%s" is not part of the proxy namespace "%s"', $className, $proxyNamespace)); + } + + /** + * @param string $name + * + * @return self + */ + public static function invalidPlaceholder($name) + { + return new self(sprintf('Provided placeholder for "%s" must be either a string or a valid callable', $name)); + } + + /** + * @return self + */ + public static function proxyNamespaceRequired() + { + return new self('You must configure a proxy namespace'); + } + + /** + * @param Proxy $proxy + * + * @return self + */ + public static function unitializedProxyExpected(Proxy $proxy) + { + return new self(sprintf('Provided proxy of type "%s" must not be initialized.', get_class($proxy))); + } + + /** + * @param mixed $callback + * + * @return self + */ + public static function invalidClassNotFoundCallback($callback) + { + $type = is_object($callback) ? get_class($callback) : gettype($callback); + + return new self(sprintf('Invalid \$notFoundCallback given: must be a callable, "%s" given', $type)); + } + + /** + * @param string $className + * + * @return self + */ + public static function classMustNotBeAbstract($className) + { + return new self(sprintf('Unable to create a proxy for an abstract class "%s".', $className)); + } + + /** + * @param string $className + * + * @return self + */ + public static function classMustNotBeFinal($className) + { + return new self(sprintf('Unable to create a proxy for a final class "%s".', $className)); + } + + /** + * @param mixed $value + * + * @return self + */ + public static function invalidAutoGenerateMode($value) : self + { + return new self(sprintf('Invalid auto generate mode "%s" given.', $value)); + } +} + +interface_exists(Proxy::class); diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php new file mode 100644 index 000000000..8044aafcd --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php @@ -0,0 +1,24 @@ + + */ +class OutOfBoundsException extends BaseOutOfBoundsException implements ProxyException +{ + /** + * @param string $className + * @param string $idField + * + * @return self + */ + public static function missingPrimaryKeyValue($className, $idField) + { + return new self(sprintf("Missing value for primary key %s on %s", $idField, $className)); + } +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php new file mode 100644 index 000000000..a06599faf --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php @@ -0,0 +1,13 @@ + + */ +interface ProxyException +{ +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php new file mode 100644 index 000000000..b25b37b62 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php @@ -0,0 +1,70 @@ + + */ +class UnexpectedValueException extends BaseUnexpectedValueException implements ProxyException +{ + /** + * @param string $proxyDirectory + * + * @return self + */ + public static function proxyDirectoryNotWritable($proxyDirectory) + { + return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory)); + } + + /** + * @param string $className + * @param string $methodName + * @param string $parameterName + * @param \Exception|null $previous + * + * @return self + */ + public static function invalidParameterTypeHint( + $className, + $methodName, + $parameterName, + \Exception $previous = null + ) { + return new self( + sprintf( + 'The type hint of parameter "%s" in method "%s" in class "%s" is invalid.', + $parameterName, + $methodName, + $className + ), + 0, + $previous + ); + } + + /** + * @param string $className + * @param string $methodName + * @param \Exception|null $previous + * + * @return self + */ + public static function invalidReturnTypeHint($className, $methodName, \Exception $previous = null) + { + return new self( + sprintf( + 'The return type of method "%s" in class "%s" is invalid.', + $methodName, + $className + ), + 0, + $previous + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php new file mode 100644 index 000000000..50eba01cb --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php @@ -0,0 +1,72 @@ + + * @author Marco Pivetta + * @since 2.4 + */ +interface Proxy extends BaseProxy +{ + /** + * Marks the proxy as initialized or not. + * + * @param boolean $initialized + * + * @return void + */ + public function __setInitialized($initialized); + + /** + * Sets the initializer callback to be used when initializing the proxy. That + * initializer should accept 3 parameters: $proxy, $method and $params. Those + * are respectively the proxy object that is being initialized, the method name + * that triggered initialization and the parameters passed to that method. + * + * @param Closure|null $initializer + * + * @return void + */ + public function __setInitializer(Closure $initializer = null); + + /** + * Retrieves the initializer callback used to initialize the proxy. + * + * @see __setInitializer + * + * @return Closure|null + */ + public function __getInitializer(); + + /** + * Sets the callback to be used when cloning the proxy. That initializer should accept + * a single parameter, which is the cloned proxy instance itself. + * + * @param Closure|null $cloner + * + * @return void + */ + public function __setCloner(Closure $cloner = null); + + /** + * Retrieves the callback to be used when cloning the proxy. + * + * @see __setCloner + * + * @return Closure|null + */ + public function __getCloner(); + + /** + * Retrieves the list of lazy loaded properties for a given proxy + * + * @return array Keys are the property names, and values are the default values + * for those properties. + */ + public function __getLazyProperties(); +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php new file mode 100644 index 000000000..e81036f2e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php @@ -0,0 +1,51 @@ + + */ +class ProxyDefinition +{ + /** + * @var string + */ + public $proxyClassName; + + /** + * @var array + */ + 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/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php new file mode 100644 index 000000000..464706823 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php @@ -0,0 +1,1152 @@ + + * @since 2.4 + */ +class ProxyGenerator +{ + /** + * Used to match very simple id methods that don't need + * to be decorated since the identifier is known. + */ + const PATTERN_MATCH_ID_METHOD = '((public\s+)?(function\s+%s\s*\(\)\s*)\s*(?::\s*\??\s*\\\\?[a-z_\x7f-\xff][\w\x7f-\xff]*(?:\\\\[a-z_\x7f-\xff][\w\x7f-\xff]*)*\s*)?{\s*return\s*\$this->%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 \Doctrine\Persistence\Mapping\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] = isset($this->placeholders[$name]) + ? $this->placeholders[$name] + : [$this, 'generate' . $name]; + } + + foreach ($placeholders as & $placeholder) { + if (is_callable($placeholder)) { + $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) && (false === @mkdir($parentDirectory, 0775, true))) { + 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); + } + + /** + * @param ClassMetadata $class + * + * @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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateClassName(ClassMetadata $class) + { + return ltrim($class->getName(), '\\'); + } + + /** + * Generates the array representation of lazy loaded public properties and their default values. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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). + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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)); + + $constructorImpl .= ($toUnset === [] ? '' : ' unset(' . implode(', ', $toUnset) . ");\n") + . <<<'EOT' + + $this->__initializer__ = $initializer; + $this->__cloner__ = $cloner; + } +EOT; + + return $constructorImpl; + } + + /** + * Generates the magic getter invoked when lazy loaded public properties are requested. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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); + $hasParentSet = $class->getReflectionClass()->hasMethod('__set'); + $parametersString = '$name, $value'; + $returnTypeHint = null; + + if ($hasParentSet) { + $methodReflection = $class->getReflectionClass()->getMethod('__set'); + $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name', 'value']); + $returnTypeHint = $this->getMethodReturnType($methodReflection); + } + + if (empty($lazyPublicProperties) && ! $hasParentSet) { + return ''; + } + + $inheritDoc = $hasParentSet ? '{@inheritDoc}' : ''; + $magicSet = sprintf(<<<'EOT' + /** + * %s + * @param string $name + * @param mixed $value + */ + public function __set(%s)%s + { + +EOT + , $inheritDoc, $parametersString, $returnTypeHint); + + if ( ! empty($lazyPublicProperties)) { + $magicSet .= <<<'EOT' + if (\array_key_exists($name, self::$lazyPropertiesNames)) { + $this->__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]); + + 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(). + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateSleepImpl(ClassMetadata $class) + { + $hasParentSleep = $class->getReflectionClass()->hasMethod('__sleep'); + $inheritDoc = $hasParentSleep ? '{@inheritDoc}' : ''; + $sleepImpl = <<__isInitialized__) { + $properties = array_diff($properties, array_keys(self::$lazyPropertiesNames)); + } + + return $properties; + } +EOT; + } + + $allProperties = ['__isInitialized__']; + + /* @var $prop \ReflectionProperty */ + foreach ($class->getReflectionClass()->getProperties() as $prop) { + 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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @return string + */ + private function generateWakeupImpl(ClassMetadata $class) + { + $unsetPublicProperties = []; + $hasWakeup = $class->getReflectionClass()->hasMethod('__wakeup'); + + foreach ($this->getLazyLoadedPublicPropertiesNames($class) as $lazyPublicProperty) { + $unsetPublicProperties[] = '$this->' . $lazyPublicProperty; + } + + $shortName = $this->generateProxyShortClassName($class); + $inheritDoc = $hasWakeup ? '{@inheritDoc}' : ''; + $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 ($hasWakeup) { + $wakeupImpl .= "\n parent::__wakeup();"; + } + + $wakeupImpl .= "\n }"; + + return $wakeupImpl; + } + + /** + * Generates implementation for the `__clone` method of proxies. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $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 + */ + 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 + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @return boolean + */ + 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. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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)) { + $properties[] = $name; + } + } + + return $properties; + } + + /** + * Generates the list of default values of public properties. + * + * @param \Doctrine\Persistence\Mapping\ClassMetadata $class + * + * @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 (null !== $propertyType && $propertyType->allowsNull()) { + $defaultValues[$name] = null; + } + } + } + + return $defaultValues; + } + + /** + * @param \ReflectionParameter[] $parameters + * @param string[] $renameParameters + * + * @return string + */ + private function buildParametersString(array $parameters, array $renameParameters = []) + { + $parameterDefinitions = []; + + /* @var $param \ReflectionParameter */ + $i = -1; + foreach ($parameters as $param) { + $i++; + $parameterDefinition = ''; + + if ($parameterType = $this->getParameterType($param)) { + $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); + } + + /** + * @param \ReflectionParameter $parameter + * + * @return string|null + */ + private function getParameterType(\ReflectionParameter $parameter) + { + if ( ! $parameter->hasType()) { + return null; + } + + return $this->formatType($parameter->getType(), $parameter->getDeclaringFunction(), $parameter); + } + + /** + * @param \ReflectionParameter[] $parameters + * + * @return string[] + */ + private function getParameterNamesForInvoke(array $parameters) + { + return array_map( + function (\ReflectionParameter $parameter) { + return '$' . $parameter->getName(); + }, + $parameters + ); + } + + /** + * @param \ReflectionParameter[] $parameters + * + * @return string[] + */ + private function getParameterNamesForParentCall(array $parameters) + { + return array_map( + function (\ReflectionParameter $parameter) { + $name = ''; + + if ($parameter->isVariadic()) { + $name .= '...'; + } + + $name .= '$' . $parameter->getName(); + + return $name; + }, + $parameters + ); + } + + /** + * @param \ReflectionMethod $method + * + * @return string + */ + private function getMethodReturnType(\ReflectionMethod $method) + { + if ( ! $method->hasReturnType()) { + return ''; + } + + return ': ' . $this->formatType($method->getReturnType(), $method); + } + + /** + * @param \ReflectionMethod $method + * + * @return bool + */ + private function shouldProxiedMethodReturn(\ReflectionMethod $method) + { + if ( ! $method->hasReturnType()) { + return true; + } + + return 'void' !== strtolower($this->formatType($method->getReturnType(), $method)); + } + + /** + * @param \ReflectionType $type + * @param \ReflectionMethod $method + * @param \ReflectionParameter|null $parameter + * + * @return string + */ + private function formatType( + \ReflectionType $type, + \ReflectionMethod $method, + \ReflectionParameter $parameter = null + ) { + $name = $type->getName(); + $nameLower = strtolower($name); + + if ('self' === $nameLower) { + $name = $method->getDeclaringClass()->getName(); + } + + if ('parent' === $nameLower) { + $name = $method->getDeclaringClass()->getParentClass()->getName(); + } + + if ( ! $type->isBuiltin() && ! class_exists($name) && ! interface_exists($name)) { + if (null !== $parameter) { + throw UnexpectedValueException::invalidParameterTypeHint( + $method->getDeclaringClass()->getName(), + $method->getName(), + $parameter->getName() + ); + } + + throw UnexpectedValueException::invalidReturnTypeHint( + $method->getDeclaringClass()->getName(), + $method->getName() + ); + } + + if ( ! $type->isBuiltin()) { + $name = '\\' . $name; + } + + if ($type->allowsNull() + && (null === $parameter || ! $parameter->isDefaultValueAvailable() || null !== $parameter->getDefaultValue()) + ) { + $name = '?' . $name; + } + + return $name; + } +} + +interface_exists(ClassMetadata::class); diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php new file mode 100644 index 000000000..5756a84b8 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php @@ -0,0 +1,91 @@ + + * @author Johannes Schmitt + */ +class ClassUtils +{ + /** + * Gets the real class name of a class name that could be a proxy. + * + * @param string $class + * + * @return string + */ + public static function getRealClass($class) + { + if (false === $pos = strrpos($class, '\\' . Proxy::MARKER . '\\')) { + return $class; + } + + return substr($class, $pos + Proxy::MARKER_LENGTH + 2); + } + + /** + * Gets the real class name of an object (even if its a proxy). + * + * @param object $object + * + * @return string + */ + public static function getClass($object) + { + return self::getRealClass(get_class($object)); + } + + /** + * Gets the real parent class name of a class or object. + * + * @param string $className + * + * @return string + */ + public static function getParentClass($className) + { + return get_parent_class(self::getRealClass($className)); + } + + /** + * Creates a new reflection class. + * + * @param string $class + * + * @return \ReflectionClass + */ + public static function newReflectionClass($class) + { + return new \ReflectionClass(self::getRealClass($class)); + } + + /** + * Creates a new reflection object. + * + * @param object $object + * + * @return \ReflectionClass + */ + public static function newReflectionObject($object) + { + return self::newReflectionClass(self::getClass($object)); + } + + /** + * Given a class name and a proxy namespace returns the proxy name. + * + * @param string $className + * @param string $proxyNamespace + * + * @return string + */ + public static function generateProxyClassName($className, $proxyNamespace) + { + return rtrim($proxyNamespace, '\\') . '\\' . Proxy::MARKER . '\\' . ltrim($className, '\\'); + } +} diff --git a/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php new file mode 100644 index 000000000..b54622573 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php @@ -0,0 +1,167 @@ + + * @author Jonathan Wage + * @author Roman Borschel + * @author Giorgio Sironi + * + * @deprecated The Debug class is deprecated, please use symfony/var-dumper instead. + */ +final class Debug +{ + /** + * Private constructor (prevents instantiation). + */ + private function __construct() + { + } + + /** + * Prints a dump of the public, protected and private properties of $var. + * + * @link https://xdebug.org/ + * + * @param mixed $var The variable to dump. + * @param integer $maxDepth The maximum nesting level for object properties. + * @param boolean $stripTags Whether output should strip HTML tags. + * @param boolean $echo Send the dumped value to the output buffer + * + * @return string + */ + public static function dump($var, $maxDepth = 2, $stripTags = true, $echo = true) + { + $html = ini_get('html_errors'); + + if ($html !== true) { + ini_set('html_errors', true); + } + + if (extension_loaded('xdebug')) { + ini_set('xdebug.var_display_max_depth', $maxDepth); + } + + $var = self::export($var, $maxDepth); + + ob_start(); + var_dump($var); + + $dump = ob_get_contents(); + + ob_end_clean(); + + $dumpText = ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump); + + ini_set('html_errors', $html); + + if ($echo) { + echo $dumpText; + } + + return $dumpText; + } + + /** + * @param mixed $var + * @param int $maxDepth + * + * @return mixed + */ + public static function export($var, $maxDepth) + { + $return = null; + $isObj = is_object($var); + + if ($var instanceof Collection) { + $var = $var->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 \stdClass $return + * @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/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php new file mode 100644 index 000000000..f41c54aa8 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php @@ -0,0 +1,19 @@ + + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * + * @deprecated The Version class is deprecated, please refrain from checking the version of doctrine/common. + */ +class Version +{ + /** + * Current Doctrine Version. + */ + const VERSION = '2.12.0-DEV'; + + /** + * Compares a Doctrine version with the current one. + * + * @param string $version Doctrine version to compare. + * + * @return int -1 if older, 0 if it is the same, 1 if version passed as argument is newer. + */ + public static function compare($version) + { + $currentVersion = str_replace(' ', '', strtolower(self::VERSION)); + $version = str_replace(' ', '', $version); + + return version_compare($version, $currentVersion); + } +} diff --git a/frontend/drupal9/vendor/doctrine/common/phpstan.neon.dist b/frontend/drupal9/vendor/doctrine/common/phpstan.neon.dist new file mode 100644 index 000000000..56ba1e6bc --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/common/phpstan.neon.dist @@ -0,0 +1,46 @@ +parameters: + level: 3 + paths: + - %currentWorkingDirectory%/lib + - %currentWorkingDirectory%/tests + autoload_directories: + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/ClassLoaderTest + excludes_analyse: + - %currentWorkingDirectory%/lib/vendor/doctrine-build-common + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/InvalidReturnTypeClass.php + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/InvalidTypeHintClass.php + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/SerializedClass.php + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/VariadicTypeHintClass.php + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTypedPropertiesTest.php + - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/LazyLoadableObjectWithTypedProperties.php + - %currentWorkingDirectory%/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: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' + - + message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicTest::\$initializerCallbackMock \(callable&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#' + path: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php' + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject(&stdClass)?::(load|getName)\(\)\.$#' + path: '%currentWorkingDirectory%/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: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php' + - + message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#' + path: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php' + - + message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#' + path: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' + - + message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicVoidReturnTypeTest::\$initializerCallbackMock \(callable&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#' + path: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php' + - + message: '#^Method Doctrine\\Tests\\Common\\Proxy\\MagicIssetClassWithInteger::__isset\(\) should return bool but returns int\.$#' + path: '%currentWorkingDirectory%/tests/Doctrine/Tests/Common/Proxy/MagicIssetClassWithInteger.php' + +includes: + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-phpunit/rules.neon diff --git a/frontend/drupal9/vendor/doctrine/event-manager/.doctrine-project.json b/frontend/drupal9/vendor/doctrine/event-manager/.doctrine-project.json new file mode 100644 index 000000000..f6feb43c4 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/event-manager/.doctrine-project.json @@ -0,0 +1,18 @@ +{ + "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/frontend/drupal9/vendor/doctrine/event-manager/LICENSE b/frontend/drupal9/vendor/doctrine/event-manager/LICENSE new file mode 100644 index 000000000..8c38cc1bc --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/event-manager/LICENSE @@ -0,0 +1,19 @@ +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/frontend/drupal9/vendor/doctrine/event-manager/README.md b/frontend/drupal9/vendor/doctrine/event-manager/README.md new file mode 100644 index 000000000..3aee6b6f0 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/event-manager/README.md @@ -0,0 +1,13 @@ +# 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/frontend/drupal9/vendor/doctrine/event-manager/composer.json b/frontend/drupal9/vendor/doctrine/event-manager/composer.json new file mode 100644 index 000000000..3f026fe8b --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/event-manager/composer.json @@ -0,0 +1,50 @@ +{ + "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/frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php b/frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php new file mode 100644 index 000000000..9b9cc0565 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventArgs.php @@ -0,0 +1,45 @@ + => + * + * @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/frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php b/frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php new file mode 100644 index 000000000..7d5e2ea3f --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/event-manager/lib/Doctrine/Common/EventSubscriber.php @@ -0,0 +1,21 @@ +build(); + +By default it will create an English inflector. If you want to use another language, just pass the language +you want to create an inflector for to the ``createForLanguage()`` method: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + use Doctrine\Inflector\Language; + + $inflector = InflectorFactory::createForLanguage(Language::SPANISH)->build(); + +The supported languages are as follows: + +- ``Language::ENGLISH`` +- ``Language::FRENCH`` +- ``Language::NORWEGIAN_BOKMAL`` +- ``Language::PORTUGUESE`` +- ``Language::SPANISH`` +- ``Language::TURKISH`` + +If you want to manually construct the inflector instead of using a factory, you can do so like this: + +.. code-block:: php + + use Doctrine\Inflector\CachedWordInflector; + use Doctrine\Inflector\RulesetInflector; + use Doctrine\Inflector\Rules\English; + + $inflector = new Inflector( + new CachedWordInflector(new RulesetInflector( + English\Rules::getSingularRuleset() + )), + new CachedWordInflector(new RulesetInflector( + English\Rules::getPluralRuleset() + )) + ); + +Adding Languages +---------------- + +If you are interested in adding support for your language, take a look at the other languages defined in the +``Doctrine\Inflector\Rules`` namespace and the tests located in ``Doctrine\Tests\Inflector\Rules``. You can copy +one of the languages and update the rules for your language. + +Once you have done this, send a pull request to the ``doctrine/inflector`` repository with the additions. + +Custom Setup +============ + +If you want to setup custom singular and plural rules, you can configure these in the factory: + +.. code-block:: php + + use Doctrine\Inflector\InflectorFactory; + use Doctrine\Inflector\Rules\Pattern; + use Doctrine\Inflector\Rules\Patterns; + use Doctrine\Inflector\Rules\Ruleset; + use Doctrine\Inflector\Rules\Substitution; + use Doctrine\Inflector\Rules\Substitutions; + use Doctrine\Inflector\Rules\Transformation; + use Doctrine\Inflector\Rules\Transformations; + use Doctrine\Inflector\Rules\Word; + + $inflector = InflectorFactory::create() + ->withSingularRules( + new Ruleset( + new Transformations( + new Transformation(new Pattern('/^(bil)er$/i'), '\1'), + new Transformation(new Pattern('/^(inflec|contribu)tors$/i'), '\1ta') + ), + new Patterns(new Pattern('singulars')), + new Substitutions(new Substitution(new Word('spins'), new Word('spinor'))) + ) + ) + ->withPluralRules( + new Ruleset( + new Transformations( + new Transformation(new Pattern('^(bil)er$'), '\1'), + new Transformation(new Pattern('^(inflec|contribu)tors$'), '\1ta') + ), + new Patterns(new Pattern('noflect'), new Pattern('abtuse')), + new Substitutions( + new Substitution(new Word('amaze'), new Word('amazable')), + new Substitution(new Word('phone'), new Word('phonezes')) + ) + ) + ) + ->build(); + +No operation inflector +---------------------- + +The ``Doctrine\Inflector\NoopWordInflector`` may be used to configure an inflector that doesn't perform any operation for +pluralization and/or singularization. If will simply return the input as output. + +This is an implementation of the `Null Object design pattern `_. + +.. code-block:: php + + use Doctrine\Inflector\Inflector; + use Doctrine\Inflector\NoopWordInflector; + + $inflector = new Inflector(new NoopWordInflector(), new NoopWordInflector()); + +Tableize +======== + +Converts ``ModelName`` to ``model_name``: + +.. code-block:: php + + echo $inflector->tableize('ModelName'); // model_name + +Classify +======== + +Converts ``model_name`` to ``ModelName``: + +.. code-block:: php + + echo $inflector->classify('model_name'); // ModelName + +Camelize +======== + +This method uses `Classify`_ and then converts the first character to lowercase: + +.. code-block:: php + + echo $inflector->camelize('model_name'); // modelName + +Capitalize +========== + +Takes a string and capitalizes all of the words, like PHP's built-in +``ucwords`` function. This extends that behavior, however, by allowing the +word delimiters to be configured, rather than only separating on +whitespace. + +Here is an example: + +.. code-block:: php + + $string = 'top-o-the-morning to all_of_you!'; + + echo $inflector->capitalize($string); // Top-O-The-Morning To All_of_you! + + echo $inflector->capitalize($string, '-_ '); // Top-O-The-Morning To All_Of_You! + +Pluralize +========= + +Returns a word in plural form. + +.. code-block:: php + + echo $inflector->pluralize('browser'); // browsers + +Singularize +=========== + +Returns a word in singular form. + +.. code-block:: php + + echo $inflector->singularize('browsers'); // browser + +Urlize +====== + +Generate a URL friendly string from a string of text: + +.. code-block:: php + + echo $inflector->urlize('My first blog post'); // my-first-blog-post + +Unaccent +======== + +You can unaccent a string of text using the ``unaccent()`` method: + +.. code-block:: php + + echo $inflector->unaccent('año'); // ano + +Legacy API +========== + +As of 1.4.0, the API present in Inflector 1.x has been marked as deprecated. In the 2.x release series, +the legacy API has been dropped completely. +Support for languages other than English is available in the 2.0 API only. + +Acknowledgements +================ + +The language rules in this library have been adapted from several different sources, including but not limited to: + +- `Ruby On Rails Inflector `_ +- `ICanBoogie Inflector `_ +- `CakePHP Inflector `_ diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php new file mode 100644 index 000000000..763b11676 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -0,0 +1,284 @@ +. + */ + +namespace Doctrine\Common\Inflector; + +use Doctrine\Inflector\Inflector as InflectorObject; +use Doctrine\Inflector\InflectorFactory; +use Doctrine\Inflector\LanguageInflectorFactory; +use Doctrine\Inflector\Rules\Pattern; +use Doctrine\Inflector\Rules\Patterns; +use Doctrine\Inflector\Rules\Ruleset; +use Doctrine\Inflector\Rules\Substitution; +use Doctrine\Inflector\Rules\Substitutions; +use Doctrine\Inflector\Rules\Transformation; +use Doctrine\Inflector\Rules\Transformations; +use Doctrine\Inflector\Rules\Word; +use InvalidArgumentException; +use function array_keys; +use function array_map; +use function array_unshift; +use function array_values; +use function sprintf; +use function trigger_error; +use const E_USER_DEPRECATED; + +/** + * @deprecated + */ +class Inflector +{ + /** + * @var LanguageInflectorFactory|null + */ + private static $factory; + + /** @var InflectorObject|null */ + private static $instance; + + private static function getInstance() : InflectorObject + { + if (self::$factory === null) { + self::$factory = self::createFactory(); + } + + if (self::$instance === null) { + self::$instance = self::$factory->build(); + } + + return self::$instance; + } + + private static function createFactory() : LanguageInflectorFactory + { + return InflectorFactory::create(); + } + + /** + * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. + * + * @deprecated + */ + public static function tableize(string $word) : string + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->tableize($word); + } + + /** + * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. + */ + public static function classify(string $word) : string + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->classify($word); + } + + /** + * Camelizes a word. This uses the classify() method and turns the first character to lowercase. + * + * @deprecated + */ + public static function camelize(string $word) : string + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->camelize($word); + } + + /** + * Uppercases words with configurable delimiters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimiters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimiter-separated words capitalized. + * + * @deprecated + */ + public static function ucwords(string $string, string $delimiters = " \n\t\r\0\x0B-") : string + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please use the "ucwords" function instead.', __METHOD__), E_USER_DEPRECATED); + + return ucwords($string, $delimiters); + } + + /** + * Clears Inflectors inflected value caches, and resets the inflection + * rules to the initial values. + * + * @deprecated + */ + public static function reset() : void + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + self::$factory = null; + self::$instance = null; + } + + /** + * Adds custom inflection $rules, of either 'plural' or 'singular' $type. + * + * ### Usage: + * + * {{{ + * Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables')); + * Inflector::rules('plural', array( + * 'rules' => array('/^(inflect)ors$/i' => '\1ables'), + * 'uninflected' => array('dontinflectme'), + * 'irregular' => array('red' => 'redlings') + * )); + * }}} + * + * @param string $type The type of inflection, either 'plural' or 'singular' + * @param array|iterable $rules An array of rules to be added. + * @param boolean $reset If true, will unset default inflections for all + * new rules that are being defined in $rules. + * + * @return void + * + * @deprecated + */ + public static function rules(string $type, iterable $rules, bool $reset = false) : void + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + if (self::$factory === null) { + self::$factory = self::createFactory(); + } + + self::$instance = null; + + switch ($type) { + case 'singular': + self::$factory->withSingularRules(self::buildRuleset($rules), $reset); + break; + case 'plural': + self::$factory->withPluralRules(self::buildRuleset($rules), $reset); + break; + default: + throw new InvalidArgumentException(sprintf('Cannot define custom inflection rules for type "%s".', $type)); + } + } + + /** + * @param array|iterable $rules An array of rules to be added. + */ + private static function buildRuleset(iterable $rules) : Ruleset + { + $regular = []; + $irregular = []; + $uninflected = []; + + foreach ($rules as $rule => $pattern) { + if ( ! is_array($pattern)) { + $regular[$rule] = $pattern; + + continue; + } + + switch ($rule) { + case 'uninflected': + $uninflected = $pattern; + break; + case 'irregular': + $irregular = $pattern; + break; + case 'rules': + $regular = $pattern; + break; + } + } + + return new Ruleset( + new Transformations(...array_map( + static function (string $pattern, string $replacement) : Transformation { + return new Transformation(new Pattern($pattern), $replacement); + }, + array_keys($regular), + array_values($regular) + )), + new Patterns(...array_map( + static function (string $pattern) : Pattern { + return new Pattern($pattern); + }, + $uninflected + )), + new Substitutions(...array_map( + static function (string $word, string $to) : Substitution { + return new Substitution(new Word($word), new Word($to)); + }, + array_keys($irregular), + array_values($irregular) + )) + ); + } + + /** + * Returns a word in plural form. + * + * @param string $word The word in singular form. + * + * @return string The word in plural form. + * + * @deprecated + */ + public static function pluralize(string $word) : string + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->pluralize($word); + } + + /** + * Returns a word in singular form. + * + * @param string $word The word in plural form. + * + * @return string The word in singular form. + * + * @deprecated + */ + public static function singularize(string $word) : string + { + @trigger_error(sprintf('The "%s" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.', __METHOD__), E_USER_DEPRECATED); + + return self::getInstance()->singularize($word); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php new file mode 100644 index 000000000..2d529087d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/CachedWordInflector.php @@ -0,0 +1,24 @@ +wordInflector = $wordInflector; + } + + public function inflect(string $word): string + { + return $this->cache[$word] ?? $this->cache[$word] = $this->wordInflector->inflect($word); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php new file mode 100644 index 000000000..166061d28 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/GenericLanguageInflectorFactory.php @@ -0,0 +1,66 @@ +singularRulesets[] = $this->getSingularRuleset(); + $this->pluralRulesets[] = $this->getPluralRuleset(); + } + + final public function build(): Inflector + { + return new Inflector( + new CachedWordInflector(new RulesetInflector( + ...$this->singularRulesets + )), + new CachedWordInflector(new RulesetInflector( + ...$this->pluralRulesets + )) + ); + } + + final public function withSingularRules(?Ruleset $singularRules, bool $reset = false): LanguageInflectorFactory + { + if ($reset) { + $this->singularRulesets = []; + } + + if ($singularRules instanceof Ruleset) { + array_unshift($this->singularRulesets, $singularRules); + } + + return $this; + } + + final public function withPluralRules(?Ruleset $pluralRules, bool $reset = false): LanguageInflectorFactory + { + if ($reset) { + $this->pluralRulesets = []; + } + + if ($pluralRules instanceof Ruleset) { + array_unshift($this->pluralRulesets, $pluralRules); + } + + return $this; + } + + abstract protected function getSingularRuleset(): Ruleset; + + abstract protected function getPluralRuleset(): Ruleset; +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php new file mode 100644 index 000000000..610a4cf4d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Inflector.php @@ -0,0 +1,507 @@ + 'A', + 'Á' => 'A', + 'Â' => 'A', + 'Ã' => 'A', + 'Ä' => 'Ae', + 'Æ' => 'Ae', + 'Å' => 'Aa', + 'æ' => 'a', + 'Ç' => 'C', + 'È' => 'E', + 'É' => 'E', + 'Ê' => 'E', + 'Ë' => 'E', + 'Ì' => 'I', + 'Í' => 'I', + 'Î' => 'I', + 'Ï' => 'I', + 'Ñ' => 'N', + 'Ò' => 'O', + 'Ó' => 'O', + 'Ô' => 'O', + 'Õ' => 'O', + 'Ö' => 'Oe', + 'Ù' => 'U', + 'Ú' => 'U', + 'Û' => 'U', + 'Ü' => 'Ue', + 'Ý' => 'Y', + 'ß' => 'ss', + 'à' => 'a', + 'á' => 'a', + 'â' => 'a', + 'ã' => 'a', + 'ä' => 'ae', + 'å' => 'aa', + 'ç' => 'c', + 'è' => 'e', + 'é' => 'e', + 'ê' => 'e', + 'ë' => 'e', + 'ì' => 'i', + 'í' => 'i', + 'î' => 'i', + 'ï' => 'i', + 'ñ' => 'n', + 'ò' => 'o', + 'ó' => 'o', + 'ô' => 'o', + 'õ' => 'o', + 'ö' => 'oe', + 'ù' => 'u', + 'ú' => 'u', + 'û' => 'u', + 'ü' => 'ue', + 'ý' => 'y', + 'ÿ' => 'y', + 'Ā' => 'A', + 'ā' => 'a', + 'Ă' => 'A', + 'ă' => 'a', + 'Ą' => 'A', + 'ą' => 'a', + 'Ć' => 'C', + 'ć' => 'c', + 'Ĉ' => 'C', + 'ĉ' => 'c', + 'Ċ' => 'C', + 'ċ' => 'c', + 'Č' => 'C', + 'č' => 'c', + 'Ď' => 'D', + 'ď' => 'd', + 'Đ' => 'D', + 'đ' => 'd', + 'Ē' => 'E', + 'ē' => 'e', + 'Ĕ' => 'E', + 'ĕ' => 'e', + 'Ė' => 'E', + 'ė' => 'e', + 'Ę' => 'E', + 'ę' => 'e', + 'Ě' => 'E', + 'ě' => 'e', + 'Ĝ' => 'G', + 'ĝ' => 'g', + 'Ğ' => 'G', + 'ğ' => 'g', + 'Ġ' => 'G', + 'ġ' => 'g', + 'Ģ' => 'G', + 'ģ' => 'g', + 'Ĥ' => 'H', + 'ĥ' => 'h', + 'Ħ' => 'H', + 'ħ' => 'h', + 'Ĩ' => 'I', + 'ĩ' => 'i', + 'Ī' => 'I', + 'ī' => 'i', + 'Ĭ' => 'I', + 'ĭ' => 'i', + 'Į' => 'I', + 'į' => 'i', + 'İ' => 'I', + 'ı' => 'i', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ĵ' => 'J', + 'ĵ' => 'j', + 'Ķ' => 'K', + 'ķ' => 'k', + 'ĸ' => 'k', + 'Ĺ' => 'L', + 'ĺ' => 'l', + 'Ļ' => 'L', + 'ļ' => 'l', + 'Ľ' => 'L', + 'ľ' => 'l', + 'Ŀ' => 'L', + 'ŀ' => 'l', + 'Ł' => 'L', + 'ł' => 'l', + 'Ń' => 'N', + 'ń' => 'n', + 'Ņ' => 'N', + 'ņ' => 'n', + 'Ň' => 'N', + 'ň' => 'n', + 'ʼn' => 'N', + 'Ŋ' => 'n', + 'ŋ' => 'N', + 'Ō' => 'O', + 'ō' => 'o', + 'Ŏ' => 'O', + 'ŏ' => 'o', + 'Ő' => 'O', + 'ő' => 'o', + 'Œ' => 'OE', + 'œ' => 'oe', + 'Ø' => 'O', + 'ø' => 'o', + 'Ŕ' => 'R', + 'ŕ' => 'r', + 'Ŗ' => 'R', + 'ŗ' => 'r', + 'Ř' => 'R', + 'ř' => 'r', + 'Ś' => 'S', + 'ś' => 's', + 'Ŝ' => 'S', + 'ŝ' => 's', + 'Ş' => 'S', + 'ş' => 's', + 'Š' => 'S', + 'š' => 's', + 'Ţ' => 'T', + 'ţ' => 't', + 'Ť' => 'T', + 'ť' => 't', + 'Ŧ' => 'T', + 'ŧ' => 't', + 'Ũ' => 'U', + 'ũ' => 'u', + 'Ū' => 'U', + 'ū' => 'u', + 'Ŭ' => 'U', + 'ŭ' => 'u', + 'Ů' => 'U', + 'ů' => 'u', + 'Ű' => 'U', + 'ű' => 'u', + 'Ų' => 'U', + 'ų' => 'u', + 'Ŵ' => 'W', + 'ŵ' => 'w', + 'Ŷ' => 'Y', + 'ŷ' => 'y', + 'Ÿ' => 'Y', + 'Ź' => 'Z', + 'ź' => 'z', + 'Ż' => 'Z', + 'ż' => 'z', + 'Ž' => 'Z', + 'ž' => 'z', + 'ſ' => 's', + '€' => 'E', + '£' => '', + ]; + + /** @var WordInflector */ + private $singularizer; + + /** @var WordInflector */ + private $pluralizer; + + public function __construct(WordInflector $singularizer, WordInflector $pluralizer) + { + $this->singularizer = $singularizer; + $this->pluralizer = $pluralizer; + } + + /** + * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. + */ + public function tableize(string $word): string + { + $tableized = preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word); + + if ($tableized === null) { + throw new RuntimeException(sprintf( + 'preg_replace returned null for value "%s"', + $word + )); + } + + return mb_strtolower($tableized); + } + + /** + * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. + */ + public function classify(string $word): string + { + return str_replace([' ', '_', '-'], '', ucwords($word, ' _-')); + } + + /** + * Camelizes a word. This uses the classify() method and turns the first character to lowercase. + */ + public function camelize(string $word): string + { + return lcfirst($this->classify($word)); + } + + /** + * Uppercases words with configurable delimiters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimiters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * capitalize($string); + * // Top-O-The-Morning To All_of_you! + * + * echo $inflector->capitalize($string, '-_ '); + * // Top-O-The-Morning To All_Of_You! + * ?> + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimiter-separated words capitalized. + */ + public function capitalize(string $string, string $delimiters = " \n\t\r\0\x0B-"): string + { + return ucwords($string, $delimiters); + } + + /** + * Checks if the given string seems like it has utf8 characters in it. + * + * @param string $string The string to check for utf8 characters in. + */ + public function seemsUtf8(string $string): bool + { + for ($i = 0; $i < strlen($string); $i++) { + if (ord($string[$i]) < 0x80) { + continue; // 0bbbbbbb + } + + if ((ord($string[$i]) & 0xE0) === 0xC0) { + $n = 1; // 110bbbbb + } elseif ((ord($string[$i]) & 0xF0) === 0xE0) { + $n = 2; // 1110bbbb + } elseif ((ord($string[$i]) & 0xF8) === 0xF0) { + $n = 3; // 11110bbb + } elseif ((ord($string[$i]) & 0xFC) === 0xF8) { + $n = 4; // 111110bb + } elseif ((ord($string[$i]) & 0xFE) === 0xFC) { + $n = 5; // 1111110b + } else { + return false; // Does not match any model + } + + for ($j = 0; $j < $n; $j++) { // n bytes matching 10bbbbbb follow ? + if (++$i === strlen($string) || ((ord($string[$i]) & 0xC0) !== 0x80)) { + return false; + } + } + } + + return true; + } + + /** + * Remove any illegal characters, accents, etc. + * + * @param string $string String to unaccent + * + * @return string Unaccented string + */ + public function unaccent(string $string): string + { + if (preg_match('/[\x80-\xff]/', $string) === false) { + return $string; + } + + if ($this->seemsUtf8($string)) { + $string = strtr($string, self::ACCENTED_CHARACTERS); + } else { + $characters = []; + + // Assume ISO-8859-1 if not UTF-8 + $characters['in'] = + chr(128) + . chr(131) + . chr(138) + . chr(142) + . chr(154) + . chr(158) + . chr(159) + . chr(162) + . chr(165) + . chr(181) + . chr(192) + . chr(193) + . chr(194) + . chr(195) + . chr(196) + . chr(197) + . chr(199) + . chr(200) + . chr(201) + . chr(202) + . chr(203) + . chr(204) + . chr(205) + . chr(206) + . chr(207) + . chr(209) + . chr(210) + . chr(211) + . chr(212) + . chr(213) + . chr(214) + . chr(216) + . chr(217) + . chr(218) + . chr(219) + . chr(220) + . chr(221) + . chr(224) + . chr(225) + . chr(226) + . chr(227) + . chr(228) + . chr(229) + . chr(231) + . chr(232) + . chr(233) + . chr(234) + . chr(235) + . chr(236) + . chr(237) + . chr(238) + . chr(239) + . chr(241) + . chr(242) + . chr(243) + . chr(244) + . chr(245) + . chr(246) + . chr(248) + . chr(249) + . chr(250) + . chr(251) + . chr(252) + . chr(253) + . chr(255); + + $characters['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'; + + $string = strtr($string, $characters['in'], $characters['out']); + + $doubleChars = []; + + $doubleChars['in'] = [ + chr(140), + chr(156), + chr(198), + chr(208), + chr(222), + chr(223), + chr(230), + chr(240), + chr(254), + ]; + + $doubleChars['out'] = ['OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th']; + + $string = str_replace($doubleChars['in'], $doubleChars['out'], $string); + } + + return $string; + } + + /** + * Convert any passed string to a url friendly string. + * Converts 'My first blog post' to 'my-first-blog-post' + * + * @param string $string String to urlize. + * + * @return string Urlized string. + */ + public function urlize(string $string): string + { + // Remove all non url friendly characters with the unaccent function + $unaccented = $this->unaccent($string); + + if (function_exists('mb_strtolower')) { + $lowered = mb_strtolower($unaccented); + } else { + $lowered = strtolower($unaccented); + } + + $replacements = [ + '/\W/' => ' ', + '/([A-Z]+)([A-Z][a-z])/' => '\1_\2', + '/([a-z\d])([A-Z])/' => '\1_\2', + '/[^A-Z^a-z^0-9^\/]+/' => '-', + ]; + + $urlized = $lowered; + + foreach ($replacements as $pattern => $replacement) { + $replaced = preg_replace($pattern, $replacement, $urlized); + + if ($replaced === null) { + throw new RuntimeException(sprintf( + 'preg_replace returned null for value "%s"', + $urlized + )); + } + + $urlized = $replaced; + } + + return trim($urlized, '-'); + } + + /** + * Returns a word in singular form. + * + * @param string $word The word in plural form. + * + * @return string The word in singular form. + */ + public function singularize(string $word): string + { + return $this->singularizer->inflect($word); + } + + /** + * Returns a word in plural form. + * + * @param string $word The word in singular form. + * + * @return string The word in plural form. + */ + public function pluralize(string $word): string + { + return $this->pluralizer->inflect($word); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php new file mode 100644 index 000000000..a0740a741 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/InflectorFactory.php @@ -0,0 +1,52 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php new file mode 100644 index 000000000..e2656cc45 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Uninflected.php @@ -0,0 +1,193 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php new file mode 100644 index 000000000..3cf2444ae --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/French/Uninflected.php @@ -0,0 +1,34 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php new file mode 100644 index 000000000..5d878c6d2 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/NorwegianBokmal/Uninflected.php @@ -0,0 +1,36 @@ +pattern = $pattern; + + if (isset($this->pattern[0]) && $this->pattern[0] === '/') { + $this->regex = $this->pattern; + } else { + $this->regex = '/' . $this->pattern . '/i'; + } + } + + public function getPattern(): string + { + return $this->pattern; + } + + public function getRegex(): string + { + return $this->regex; + } + + public function matches(string $word): bool + { + return preg_match($this->getRegex(), $word) === 1; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php new file mode 100644 index 000000000..e8d45cb75 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Patterns.php @@ -0,0 +1,34 @@ +patterns = $patterns; + + $patterns = array_map(static function (Pattern $pattern): string { + return $pattern->getPattern(); + }, $this->patterns); + + $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; + } + + public function matches(string $word): bool + { + return preg_match($this->regex, $word, $regs) === 1; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php new file mode 100644 index 000000000..95564d495 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Inflectible.php @@ -0,0 +1,104 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php new file mode 100644 index 000000000..58c34f9b5 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Portuguese/Uninflected.php @@ -0,0 +1,38 @@ +regular = $regular; + $this->uninflected = $uninflected; + $this->irregular = $irregular; + } + + public function getRegular(): Transformations + { + return $this->regular; + } + + public function getUninflected(): Patterns + { + return $this->uninflected; + } + + public function getIrregular(): Substitutions + { + return $this->irregular; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php new file mode 100644 index 000000000..c6862fa40 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Inflectible.php @@ -0,0 +1,53 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php new file mode 100644 index 000000000..c743b3931 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/Uninflected.php @@ -0,0 +1,36 @@ +from = $from; + $this->to = $to; + } + + public function getFrom(): Word + { + return $this->from; + } + + public function getTo(): Word + { + return $this->to; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php new file mode 100644 index 000000000..17ee29619 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php @@ -0,0 +1,57 @@ +substitutions[$substitution->getFrom()->getWord()] = $substitution; + } + } + + public function getFlippedSubstitutions(): Substitutions + { + $substitutions = []; + + foreach ($this->substitutions as $substitution) { + $substitutions[] = new Substitution( + $substitution->getTo(), + $substitution->getFrom() + ); + } + + return new Substitutions(...$substitutions); + } + + public function inflect(string $word): string + { + $lowerWord = strtolower($word); + + if (isset($this->substitutions[$lowerWord])) { + $firstLetterUppercase = $lowerWord[0] !== $word[0]; + + $toWord = $this->substitutions[$lowerWord]->getTo()->getWord(); + + if ($firstLetterUppercase) { + return strtoupper($toWord[0]) . substr($toWord, 1); + } + + return $toWord; + } + + return $word; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php new file mode 100644 index 000000000..30dcd5945 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php @@ -0,0 +1,39 @@ +pattern = $pattern; + $this->replacement = $replacement; + } + + public function getPattern(): Pattern + { + return $this->pattern; + } + + public function getReplacement(): string + { + return $this->replacement; + } + + public function inflect(string $word): string + { + return (string) preg_replace($this->pattern->getRegex(), $this->replacement, $word); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php new file mode 100644 index 000000000..b6a48fa80 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php @@ -0,0 +1,29 @@ +transformations = $transformations; + } + + public function inflect(string $word): string + { + foreach ($this->transformations as $transformation) { + if ($transformation->getPattern()->matches($word)) { + return $transformation->inflect($word); + } + } + + return $word; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php new file mode 100644 index 000000000..d7b7064cb --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Inflectible.php @@ -0,0 +1,40 @@ +getFlippedSubstitutions() + ); + } + + public static function getPluralRuleset(): Ruleset + { + return new Ruleset( + new Transformations(...Inflectible::getPlural()), + new Patterns(...Uninflected::getPlural()), + new Substitutions(...Inflectible::getIrregular()) + ); + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php new file mode 100644 index 000000000..a75d24863 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Turkish/Uninflected.php @@ -0,0 +1,36 @@ +word = $word; + } + + public function getWord(): string + { + return $this->word; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php new file mode 100644 index 000000000..12b2ed5be --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/RulesetInflector.php @@ -0,0 +1,56 @@ +rulesets = array_merge([$ruleset], $rulesets); + } + + public function inflect(string $word): string + { + if ($word === '') { + return ''; + } + + foreach ($this->rulesets as $ruleset) { + if ($ruleset->getUninflected()->matches($word)) { + return $word; + } + + $inflected = $ruleset->getIrregular()->inflect($word); + + if ($inflected !== $word) { + return $inflected; + } + + $inflected = $ruleset->getRegular()->inflect($word); + + if ($inflected !== $word) { + return $inflected; + } + } + + return $word; + } +} diff --git a/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php new file mode 100644 index 000000000..b88b1d696 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/inflector/lib/Doctrine/Inflector/WordInflector.php @@ -0,0 +1,10 @@ +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()); + } + } +} + +class_exists(\Doctrine\Common\Persistence\PersistentObject::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Proxy.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Proxy.php new file mode 100644 index 000000000..c872c450e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Proxy.php @@ -0,0 +1,16 @@ +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; + } + } + } + + /** + * {@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($persistentObjectName, $persistentManagerName = null) + { + return $this + ->selectManager($persistentObjectName, $persistentManagerName) + ->getRepository($persistentObjectName); + } + + /** + * {@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(); + } +} + +class_exists(\Doctrine\Common\Persistence\AbstractManagerRegistry::class); +interface_exists(ObjectManager::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php new file mode 100644 index 000000000..a822c7193 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ConnectionRegistry.php @@ -0,0 +1,43 @@ +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; + } +} + +class_exists(\Doctrine\Common\Persistence\Event\LifecycleEventArgs::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php new file mode 100644 index 000000000..31aae4a0d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/LoadClassMetadataEventArgs.php @@ -0,0 +1,48 @@ +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; + } +} + +class_exists(\Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php new file mode 100644 index 000000000..66dd90350 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/ManagerEventArgs.php @@ -0,0 +1,33 @@ +objectManager = $objectManager; + } + + /** + * Retrieves the associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} + +class_exists(\Doctrine\Common\Persistence\Event\ManagerEventArgs::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php new file mode 100644 index 000000000..cc263c133 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/OnClearEventArgs.php @@ -0,0 +1,61 @@ +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; + } +} + +class_exists(\Doctrine\Common\Persistence\Event\OnClearEventArgs::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php new file mode 100644 index 000000000..b9f837644 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php @@ -0,0 +1,116 @@ +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()) + )); + } + } +} + +class_exists(\Doctrine\Common\Persistence\Event\PreUpdateEventArgs::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php new file mode 100644 index 000000000..b28664ce4 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ManagerRegistry.php @@ -0,0 +1,92 @@ +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); + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory::class); +interface_exists(ClassMetadata::class); +interface_exists(ReflectionService::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php new file mode 100644 index 000000000..7b995d566 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/ClassMetadata.php @@ -0,0 +1,157 @@ +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; + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php new file mode 100644 index 000000000..4f49bc2df --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php @@ -0,0 +1,164 @@ +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; + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\DefaultFileLocator::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php new file mode 100644 index 000000000..c8c783a6e --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php @@ -0,0 +1,199 @@ +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; + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\FileDriver::class); +interface_exists(FileLocator::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php new file mode 100644 index 000000000..b14baf244 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/FileLocator.php @@ -0,0 +1,57 @@ +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) + { + /** @var MappingDriver $driver */ + foreach ($this->drivers as $namespace => $driver) { + 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 = []; + + /** @var MappingDriver $driver */ + foreach ($this->drivers as $namespace => $driver) { + $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) + { + /** @var MappingDriver $driver */ + foreach ($this->drivers as $namespace => $driver) { + if (strpos($className, $namespace) === 0) { + return $driver->isTransient($className); + } + } + + if ($this->defaultDriver !== null) { + return $this->defaultDriver->isTransient($className); + } + + return true; + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class); +interface_exists(ClassMetadata::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php new file mode 100644 index 000000000..4f1d9488d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/PHPDriver.php @@ -0,0 +1,49 @@ +metadata = $metadata; + + $this->loadMappingFile($this->locator->findMappingFile($className)); + } + + /** + * {@inheritDoc} + */ + protected function loadMappingFile($file) + { + $metadata = $this->metadata; + include $file; + + return [$metadata->getName() => $metadata]; + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\PHPDriver::class); +interface_exists(ClassMetadata::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php new file mode 100644 index 000000000..848b3bd0a --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php @@ -0,0 +1,134 @@ +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'); + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver::class); +interface_exists(ClassMetadata::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php new file mode 100644 index 000000000..3124c6662 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php @@ -0,0 +1,233 @@ +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); + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php new file mode 100644 index 000000000..9729e5f63 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php @@ -0,0 +1,98 @@ +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(); + } +} + +class_exists(\Doctrine\Common\Persistence\Mapping\RuntimeReflectionService::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php new file mode 100644 index 000000000..ac24e4572 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/StaticReflectionService.php @@ -0,0 +1,74 @@ +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. + */ + 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 + */ + 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); +} + +interface_exists(\Doctrine\Common\Persistence\ObjectManager::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php new file mode 100644 index 000000000..2593b7c66 --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectManagerAware.php @@ -0,0 +1,34 @@ +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); + } +} + +class_exists(\Doctrine\Common\Persistence\ObjectManagerDecorator::class); diff --git a/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php new file mode 100644 index 000000000..7661be20d --- /dev/null +++ b/frontend/drupal9/vendor/doctrine/persistence/lib/Doctrine/Persistence/ObjectRepository.php @@ -0,0 +1,64 @@ + + + + + + + + + diff --git a/frontend/drupal9/web/core/assets/scaffold/files/default.settings.php b/frontend/drupal9/web/core/assets/scaffold/files/default.settings.php index 72be7750b..f3dca008f 100644 --- a/frontend/drupal9/web/core/assets/scaffold/files/default.settings.php +++ b/frontend/drupal9/web/core/assets/scaffold/files/default.settings.php @@ -490,6 +490,29 @@ $settings['update_free_access'] = FALSE; */ # $settings['file_public_path'] = 'sites/default/files'; +/** + * Additional public file schemes: + * + * Public schemes are URI schemes that allow download access to all users for + * all files within that scheme. + * + * The "public" scheme is always public, and the "private" scheme is always + * private, but other schemes, such as "https", "s3", "example", or others, + * can be either public or private depending on the site. By default, they're + * private, and access to individual files is controlled via + * hook_file_download(). + * + * Typically, if a scheme should be public, a module makes it public by + * implementing hook_file_download(), and granting access to all users for all + * files. This could be either the same module that provides the stream wrapper + * for the scheme, or a different module that decides to make the scheme + * public. However, in cases where a site needs to make a scheme public, but + * is unable to add code in a module to do so, the scheme may be added to this + * variable, the result of which is that system_file_download() grants public + * access to all files within that scheme. + */ +# $settings['file_additional_public_schemes'] = ['example']; + /** * Private file path: * diff --git a/frontend/drupal9/web/core/lib/Drupal.php b/frontend/drupal9/web/core/lib/Drupal.php index c2d79f15a..48cb4aa4b 100644 --- a/frontend/drupal9/web/core/lib/Drupal.php +++ b/frontend/drupal9/web/core/lib/Drupal.php @@ -75,7 +75,7 @@ class Drupal { /** * The current system version. */ - const VERSION = '9.4.2'; + const VERSION = '9.4.3'; /** * Core API compatibility. diff --git a/frontend/drupal9/web/core/lib/Drupal/Core/File/FileSystemInterface.php b/frontend/drupal9/web/core/lib/Drupal/Core/File/FileSystemInterface.php index c1781b694..59d2ee37f 100644 --- a/frontend/drupal9/web/core/lib/Drupal/Core/File/FileSystemInterface.php +++ b/frontend/drupal9/web/core/lib/Drupal/Core/File/FileSystemInterface.php @@ -37,14 +37,14 @@ interface FileSystemInterface { * * @see \Drupal\Core\File\FileSystemInterface::INSECURE_EXTENSION_REGEX */ - public const INSECURE_EXTENSIONS = ['phar', 'php', 'pl', 'py', 'cgi', 'asp', 'js']; + public const INSECURE_EXTENSIONS = ['phar', 'php', 'pl', 'py', 'cgi', 'asp', 'js', 'htaccess']; /** * The regex pattern used when checking for insecure file types. * * @see \Drupal\Core\File\FileSystemInterface::INSECURE_EXTENSIONS */ - public const INSECURE_EXTENSION_REGEX = '/\.(phar|php|pl|py|cgi|asp|js)(\.|$)/i'; + public const INSECURE_EXTENSION_REGEX = '/\.(phar|php|pl|py|cgi|asp|js|htaccess)(\.|$)/i'; /** * Moves an uploaded file to a new location. diff --git a/frontend/drupal9/web/core/lib/Drupal/Core/Form/FormBuilder.php b/frontend/drupal9/web/core/lib/Drupal/Core/Form/FormBuilder.php index 4ed0faed7..98eb32634 100644 --- a/frontend/drupal9/web/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/frontend/drupal9/web/core/lib/Drupal/Core/Form/FormBuilder.php @@ -1217,7 +1217,12 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS // #access=FALSE on an element usually allow access for some users, so forms // submitted with self::submitForm() may bypass access restriction and be // treated as high-privilege users instead. - $process_input = empty($element['#disabled']) && !in_array($element['#type'], ['item', 'value'], TRUE) && (($form_state->isProgrammed() && $form_state->isBypassingProgrammedAccessChecks()) || ($form_state->isProcessingInput() && (!isset($element['#access']) || $element['#access']))); + $process_input = empty($element['#disabled']) && + !in_array($element['#type'], ['item', 'value'], TRUE) && + ( + ($form_state->isProgrammed() && $form_state->isBypassingProgrammedAccessChecks()) || + ($form_state->isProcessingInput() && (!isset($element['#access']) || (($element['#access'] instanceof AccessResultInterface && $element['#access']->isAllowed()) || ($element['#access'] === TRUE)))) + ); // Set the element's #value property. if (!isset($element['#value']) && !array_key_exists('#value', $element)) { diff --git a/frontend/drupal9/web/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/frontend/drupal9/web/core/lib/Drupal/Core/StreamWrapper/PublicStream.php index e89e43219..1747bf37c 100644 --- a/frontend/drupal9/web/core/lib/Drupal/Core/StreamWrapper/PublicStream.php +++ b/frontend/drupal9/web/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -115,4 +115,28 @@ class PublicStream extends LocalStream { return Settings::get('file_public_path', $site_path . '/files'); } + /** + * {@inheritdoc} + */ + protected function getLocalPath($uri = NULL) { + $path = parent::getLocalPath($uri); + if (!$path || (strpos($path, 'vfs://') === 0)) { + return $path; + } + + if (Settings::get('sa_core_2022_012_override') === TRUE) { + return $path; + } + + $private_path = Settings::get('file_private_path'); + if ($private_path) { + $private_path = realpath($private_path); + if ($private_path && strpos($path, $private_path) === 0) { + return FALSE; + } + } + + return $path; + } + } diff --git a/frontend/drupal9/web/core/modules/image/src/Controller/ImageStyleDownloadController.php b/frontend/drupal9/web/core/modules/image/src/Controller/ImageStyleDownloadController.php index 6ded44fab..c943452b5 100644 --- a/frontend/drupal9/web/core/modules/image/src/Controller/ImageStyleDownloadController.php +++ b/frontend/drupal9/web/core/modules/image/src/Controller/ImageStyleDownloadController.php @@ -6,6 +6,7 @@ use Drupal\Component\Utility\Crypt; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Image\ImageFactory; use Drupal\Core\Lock\LockBackendInterface; +use Drupal\Core\Site\Settings; use Drupal\Core\StreamWrapper\StreamWrapperManager; use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; use Drupal\image\ImageStyleInterface; @@ -114,21 +115,25 @@ class ImageStyleDownloadController extends FileDownloadController { $target = $request->query->get('file'); $image_uri = $scheme . '://' . $target; - // Check that the style is defined, the scheme is valid, and the image - // derivative token is valid. Sites which require image derivatives to be - // generated without a token can set the + // Check that the style is defined and the scheme is valid. + $valid = !empty($image_style) && $this->streamWrapperManager->isValidScheme($scheme); + + // Also validate the derivative token. Sites which require image + // derivatives to be generated without a token can set the // 'image.settings:allow_insecure_derivatives' configuration to TRUE to - // bypass the latter check, but this will increase the site's vulnerability + // bypass this check, but this will increase the site's vulnerability // to denial-of-service attacks. To prevent this variable from leaving the // site vulnerable to the most serious attacks, a token is always required // when a derivative of a style is requested. // The $target variable for a derivative of a style has // styles//... as structure, so we check if the $target variable // starts with styles/. - $valid = !empty($image_style) && $this->streamWrapperManager->isValidScheme($scheme); + $token = $request->query->get(IMAGE_DERIVATIVE_TOKEN, ''); + $token_is_valid = hash_equals($image_style->getPathToken($image_uri), $token); if (!$this->config('image.settings')->get('allow_insecure_derivatives') || strpos(ltrim($target, '\/'), 'styles/') === 0) { - $valid &= hash_equals($image_style->getPathToken($image_uri), $request->query->get(IMAGE_DERIVATIVE_TOKEN, '')); + $valid = $valid && $token_is_valid; } + if (!$valid) { // Return a 404 (Page Not Found) rather than a 403 (Access Denied) as the // image token is for DDoS protection rather than access checking. 404s @@ -138,11 +143,23 @@ class ImageStyleDownloadController extends FileDownloadController { } $derivative_uri = $image_style->buildUri($image_uri); + $derivative_scheme = $this->streamWrapperManager->getScheme($derivative_uri); + + if ($token_is_valid) { + $is_public = ($scheme !== 'private'); + } + else { + $core_schemes = ['public', 'private', 'temporary']; + $additional_public_schemes = array_diff(Settings::get('file_additional_public_schemes', []), $core_schemes); + $public_schemes = array_merge(['public'], $additional_public_schemes); + $is_public = in_array($derivative_scheme, $public_schemes, TRUE); + } + $headers = []; - // If using the private scheme, let other modules provide headers and + // If not using a public scheme, let other modules provide headers and // control access to the file. - if ($scheme == 'private') { + if (!$is_public) { $headers = $this->moduleHandler()->invokeAll('file_download', [$image_uri]); if (in_array(-1, $headers) || empty($headers)) { throw new AccessDeniedHttpException(); @@ -150,14 +167,14 @@ class ImageStyleDownloadController extends FileDownloadController { } // Don't try to generate file if source is missing. - if (!file_exists($image_uri)) { + if (!$this->sourceImageExists($image_uri, $token_is_valid)) { // If the image style converted the extension, it has been added to the // original file, resulting in filenames like image.png.jpeg. So to find // the actual source image, we remove the extension and check if that // image exists. $path_info = pathinfo(StreamWrapperManager::getTarget($image_uri)); $converted_image_uri = sprintf('%s://%s%s%s', $this->streamWrapperManager->getScheme($derivative_uri), $path_info['dirname'], DIRECTORY_SEPARATOR, $path_info['filename']); - if (!file_exists($converted_image_uri)) { + if (!$this->sourceImageExists($converted_image_uri, $token_is_valid)) { $this->logger->notice('Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', ['%source_image_path' => $image_uri, '%derivative_path' => $derivative_uri]); return new Response($this->t('Error generating image, missing source file.'), 404); } @@ -196,9 +213,9 @@ class ImageStyleDownloadController extends FileDownloadController { ]; // \Drupal\Core\EventSubscriber\FinishResponseSubscriber::onRespond() // sets response as not cacheable if the Cache-Control header is not - // already modified. We pass in FALSE for non-private schemes for the - // $public parameter to make sure we don't change the headers. - return new BinaryFileResponse($uri, 200, $headers, $scheme !== 'private'); + // already modified. When $is_public is TRUE, the following sets the + // Cache-Control header to "public". + return new BinaryFileResponse($uri, 200, $headers, $is_public); } else { $this->logger->notice('Unable to generate the derived image located at %path.', ['%path' => $derivative_uri]); @@ -206,4 +223,43 @@ class ImageStyleDownloadController extends FileDownloadController { } } + /** + * Checks whether the provided source image exists. + * + * @param string $image_uri + * The URI for the source image. + * @param bool $token_is_valid + * Whether a valid image token was supplied. + * + * @return bool + * Whether the source image exists. + */ + private function sourceImageExists(string $image_uri, bool $token_is_valid): bool { + $exists = file_exists($image_uri); + + // If the file doesn't exist, we can stop here. + if (!$exists) { + return FALSE; + } + + if ($token_is_valid) { + return TRUE; + } + + if (StreamWrapperManager::getScheme($image_uri) !== 'public') { + return TRUE; + } + + $image_path = $this->fileSystem->realpath($image_uri); + $private_path = Settings::get('file_private_path'); + if ($private_path) { + $private_path = realpath($private_path); + if ($private_path && strpos($image_path, $private_path) === 0) { + return FALSE; + } + } + + return TRUE; + } + } diff --git a/frontend/drupal9/web/core/modules/media/src/Controller/OEmbedIframeController.php b/frontend/drupal9/web/core/modules/media/src/Controller/OEmbedIframeController.php index 5e7b12ff3..9da8f9050 100644 --- a/frontend/drupal9/web/core/modules/media/src/Controller/OEmbedIframeController.php +++ b/frontend/drupal9/web/core/modules/media/src/Controller/OEmbedIframeController.php @@ -116,10 +116,23 @@ class OEmbedIframeController implements ContainerInjectionInterface { * The response object. * * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException - * Will be thrown if the 'hash' parameter does not match the expected hash - * of the 'url' parameter. + * Will be thrown if either + * - the 'hash' parameter does not match the expected hash of the 'url' + * parameter; + * - the iframe_domain is set in media.settings and does not match the host + * in the request. */ public function render(Request $request) { + // @todo Move domain check logic to a separate method. + $allowed_domain = \Drupal::config('media.settings')->get('iframe_domain'); + if ($allowed_domain) { + $allowed_host = parse_url($allowed_domain, PHP_URL_HOST); + $host = parse_url($request->getSchemeAndHttpHost(), PHP_URL_HOST); + if ($allowed_host !== $host) { + throw new AccessDeniedHttpException('This resource is not available'); + } + } + $url = $request->query->get('url'); $max_width = $request->query->getInt('max_width'); $max_height = $request->query->getInt('max_height'); diff --git a/frontend/drupal9/web/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php b/frontend/drupal9/web/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php index 4aeeb574d..4bf03463d 100644 --- a/frontend/drupal9/web/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php +++ b/frontend/drupal9/web/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php @@ -63,6 +63,15 @@ class SecurityFileUploadEventSubscriber implements EventSubscriberInterface { $filename = array_shift($filename_parts); // Remove final extension. $final_extension = (string) array_pop($filename_parts); + // Check if we're dealing with a dot file that is also an insecure extension + // e.g. .htaccess. In this scenario there is only one 'part' and the + // extension becomes the filename. We use the original filename from the + // event rather than the trimmed version above. + $insecure_uploads = $this->config->get('allow_insecure_uploads'); + if (!$insecure_uploads && $final_extension === '' && str_contains($event->getFilename(), '.') && in_array(strtolower($filename), FileSystemInterface::INSECURE_EXTENSIONS, TRUE)) { + $final_extension = $filename; + $filename = ''; + } $extensions = $event->getAllowedExtensions(); if (!empty($extensions) && !in_array(strtolower($final_extension), $extensions, TRUE)) { @@ -76,7 +85,7 @@ class SecurityFileUploadEventSubscriber implements EventSubscriberInterface { return; } - if (!$this->config->get('allow_insecure_uploads') && in_array(strtolower($final_extension), FileSystemInterface::INSECURE_EXTENSIONS, TRUE)) { + if (!$insecure_uploads && in_array(strtolower($final_extension), FileSystemInterface::INSECURE_EXTENSIONS, TRUE)) { if (empty($extensions) || in_array('txt', $extensions, TRUE)) { // Add .txt to potentially executable files prior to munging to help prevent // exploits. This results in a filenames like filename.php being changed to diff --git a/frontend/drupal9/web/core/modules/system/system.module b/frontend/drupal9/web/core/modules/system/system.module index a1b51cc7c..deba8f16a 100644 --- a/frontend/drupal9/web/core/modules/system/system.module +++ b/frontend/drupal9/web/core/modules/system/system.module @@ -27,6 +27,8 @@ use Drupal\Core\PageCache\RequestPolicyInterface; use Drupal\Core\Queue\QueueGarbageCollectionInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Routing\StackedRouteMatchInterface; +use Drupal\Core\Site\Settings; +use Drupal\Core\StreamWrapper\StreamWrapperManager; use Drupal\Core\Url; use GuzzleHttp\Exception\TransferException; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -1385,3 +1387,21 @@ function system_page_top() { } } } + +/** + * Implements hook_file_download(). + */ +function system_file_download($uri) { + $core_schemes = ['public', 'private', 'temporary']; + $additional_public_schemes = array_diff(Settings::get('file_additional_public_schemes', []), $core_schemes); + if ($additional_public_schemes) { + $scheme = StreamWrapperManager::getScheme($uri); + if (in_array($scheme, $additional_public_schemes, TRUE)) { + return [ + // Returning any header grants access, and setting the 'Cache-Control' + // header is appropriate for public files. + 'Cache-Control' => 'public', + ]; + } + } +} diff --git a/frontend/drupal9/web/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php b/frontend/drupal9/web/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php index f51f750b4..ffeaa0de1 100644 --- a/frontend/drupal9/web/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php +++ b/frontend/drupal9/web/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php @@ -84,7 +84,8 @@ class SecurityFileUploadEventSubscriberTest extends UnitTestCase { 'filename is munged' => ['foo.phar.png.php.jpg', 'jpg png', 'foo.phar_.png_.php_.jpg'], 'filename is munged regardless of case' => ['FOO.pHAR.PNG.PhP.jpg', 'jpg png', 'FOO.pHAR_.PNG_.PhP_.jpg'], 'null bytes are removed' => ['foo' . chr(0) . '.txt' . chr(0), '', 'foo.txt'], - 'dot files are renamed' => ['.htaccess', '', 'htaccess'], + 'dot files are renamed' => ['.git', '', 'git'], + 'htaccess files are renamed even if allowed' => ['.htaccess', 'htaccess txt', '.htaccess_.txt', '.htaccess'], ]; } diff --git a/frontend/drupal9/web/modules/contrib/facets/composer.json b/frontend/drupal9/web/modules/contrib/facets/composer.json index fd3469879..0d5046a8b 100644 --- a/frontend/drupal9/web/modules/contrib/facets/composer.json +++ b/frontend/drupal9/web/modules/contrib/facets/composer.json @@ -16,7 +16,7 @@ }, "license": "GPL-2.0+", "require-dev": { - "drupal/search_api": "^1.24||1.x-dev", + "drupal/search_api": "^1.25||1.x-dev", "drupal/jquery_ui_slider": "~1.1", "drupal/jquery_ui_touch_punch": "~1.0" }, diff --git a/frontend/drupal9/web/modules/contrib/facets/facets.info.yml b/frontend/drupal9/web/modules/contrib/facets/facets.info.yml index 9143b9993..207542796 100644 --- a/frontend/drupal9/web/modules/contrib/facets/facets.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/facets.info.yml @@ -8,7 +8,7 @@ test_dependencies: - search_api:search_api - drupal:views -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/facets.install b/frontend/drupal9/web/modules/contrib/facets/facets.install index a547869ea..c19c3afbb 100644 --- a/frontend/drupal9/web/modules/contrib/facets/facets.install +++ b/frontend/drupal9/web/modules/contrib/facets/facets.install @@ -219,6 +219,23 @@ function facets_update_8009() { * Enable facet block caching for the views with "Search API tag or time" cache. */ function facets_update_8010() { + // Moved to facets_update_8012(). +} + +/** + * Resave facets for consistent configuration export. + */ +function facets_update_8011() { + $facets = Facet::loadMultiple(); + foreach ($facets as $facet) { + $facet->save(); + } +} + +/** + * Update facet block caching for the views with "Search API tag or time" cache. + */ +function facets_update_8012() { $facet_storage = \Drupal::entityTypeManager()->getStorage('facets_facet'); $processed_views = []; /** @var \Drupal\facets\FacetInterface $facet */ @@ -239,16 +256,6 @@ function facets_update_8010() { } } return !empty($processed_views) - ? sprintf('Facet caching was enabled for the following views: %s.', implode(', ', $processed_views)) + ? sprintf('Facet caching was updated for the following views: %s.', implode(', ', $processed_views)) : 'There are no views with search API cache plugins and facets in the same time, so nothing has been updated.'; } - -/** - * Resave facets for consistent configuration export. - */ -function facets_update_8011() { - $facets = Facet::loadMultiple(); - foreach ($facets as $facet) { - $facet->save(); - } -} diff --git a/frontend/drupal9/web/modules/contrib/facets/modules/facets_range_widget/facets_range_widget.info.yml b/frontend/drupal9/web/modules/contrib/facets/modules/facets_range_widget/facets_range_widget.info.yml index 6d5624031..882dff427 100644 --- a/frontend/drupal9/web/modules/contrib/facets/modules/facets_range_widget/facets_range_widget.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/modules/facets_range_widget/facets_range_widget.info.yml @@ -12,7 +12,7 @@ test_dependencies: - facets:facets - drupal:views -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/facets_rest.info.yml b/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/facets_rest.info.yml index 08d9dea4e..a39a8d8ca 100644 --- a/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/facets_rest.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/facets_rest.info.yml @@ -12,7 +12,7 @@ test_dependencies: - drupal:views - drupal:rest -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/tests/rest_view/rest_view.info.yml b/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/tests/rest_view/rest_view.info.yml index fa68af573..4aa47e166 100644 --- a/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/tests/rest_view/rest_view.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/modules/facets_rest/tests/rest_view/rest_view.info.yml @@ -12,7 +12,7 @@ dependencies: - search_api:search_api_test_db - facets:facets_rest -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/modules/facets_searchbox_widget/facets_searchbox_widget.info.yml b/frontend/drupal9/web/modules/contrib/facets/modules/facets_searchbox_widget/facets_searchbox_widget.info.yml index 21252ebac..c6e06de0b 100644 --- a/frontend/drupal9/web/modules/contrib/facets/modules/facets_searchbox_widget/facets_searchbox_widget.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/modules/facets_searchbox_widget/facets_searchbox_widget.info.yml @@ -10,7 +10,7 @@ test_dependencies: - facets:facets - drupal:views -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/modules/facets_summary/facets_summary.info.yml b/frontend/drupal9/web/modules/contrib/facets/modules/facets_summary/facets_summary.info.yml index c7801dd65..0379366c2 100644 --- a/frontend/drupal9/web/modules/contrib/facets/modules/facets_summary/facets_summary.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/modules/facets_summary/facets_summary.info.yml @@ -10,7 +10,7 @@ test_dependencies: - search_api:search_api - drupal:views -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/src/FacetManager/DefaultFacetManager.php b/frontend/drupal9/web/modules/contrib/facets/src/FacetManager/DefaultFacetManager.php index 66f348482..a51f86bd3 100644 --- a/frontend/drupal9/web/modules/contrib/facets/src/FacetManager/DefaultFacetManager.php +++ b/frontend/drupal9/web/modules/contrib/facets/src/FacetManager/DefaultFacetManager.php @@ -9,6 +9,7 @@ use Drupal\facets\Event\PostBuildFacet; use Drupal\facets\Exception\InvalidProcessorException; use Drupal\facets\FacetInterface; use Drupal\facets\FacetSource\FacetSourcePluginManager; +use Drupal\facets\Plugin\facets\facet_source\SearchApiDisplay; use Drupal\facets\Processor\BuildProcessorInterface; use Drupal\facets\Processor\PostQueryProcessorInterface; use Drupal\facets\Processor\PreQueryProcessorInterface; @@ -164,8 +165,20 @@ class DefaultFacetManager { ] ); $query_type_plugin->execute(); - // Merge cache medata that gathered from facet and its processors. + // Merge cache metadata that gathered from facet and its processors. if ($query_is_cacheable) { + if ($query->hasTag('alter_cache_metadata')) { + $facet_source = $facet->getFacetSource(); + if ($facet_source instanceof SearchApiDisplay) { + // Avoid a loop when saving a view. The Search API cache plugin for + // views "preExecutes" a query to collect cache metadata from + // modules that alter this query. Our SearchApiDisplay must not ask + // the view for its cache metadata at this point which is in a + // random state. + $facet_source->setDisplayEditInProgress(TRUE); + } + } + $query->addCacheableDependency($facet); } } @@ -371,13 +384,17 @@ class DefaultFacetManager { * Throws an exception when an invalid processor is linked to the facet. */ public function build(FacetInterface $facet) { - $facet = $this->processBuild($facet); + $built_facet = $this->processBuild($facet); + // The build process might have returned a previously built and statically + // cached instance of the facet object. So we need to ensure that the cache + // metadata is updated on the outer object, too. + $facet->addCacheableDependency($built_facet); - if ($facet->getOnlyVisibleWhenFacetSourceIsVisible()) { + if ($built_facet->getOnlyVisibleWhenFacetSourceIsVisible()) { // Block rendering and processing should be stopped when the facet source // is not available on the page. Returning an empty array here is enough // to halt all further processing. - $facet_source = $facet->getFacetSource(); + $facet_source = $built_facet->getFacetSource(); if (is_null($facet_source) || !$facet_source->isRenderedInCurrentRequest()) { return []; } @@ -385,19 +402,19 @@ class DefaultFacetManager { // We include this build even if empty, it may contain attached libraries. /** @var \Drupal\facets\Widget\WidgetPluginInterface $widget */ - $widget = $facet->getWidgetInstance(); - $build = $widget->build($facet); + $widget = $built_facet->getWidgetInstance(); + $build = $widget->build($built_facet); // No results behavior handling. Return a custom text or false depending on // settings. - if (empty($facet->getResults())) { - $empty_behavior = $facet->getEmptyBehavior(); + if (empty($built_facet->getResults())) { + $empty_behavior = $built_facet->getEmptyBehavior(); if ($empty_behavior && $empty_behavior['behavior'] === 'text') { return [ [ 0 => $build, '#type' => 'container', '#attributes' => [ - 'data-drupal-facet-id' => $facet->id(), + 'data-drupal-facet-id' => $built_facet->id(), 'class' => ['facet-empty'], ], 'empty_text' => [ @@ -418,7 +435,7 @@ class DefaultFacetManager { 0 => $build, '#type' => 'container', '#attributes' => [ - 'data-drupal-facet-id' => $facet->id(), + 'data-drupal-facet-id' => $built_facet->id(), 'class' => ['facet-empty', 'facet-hidden'], ], ], diff --git a/frontend/drupal9/web/modules/contrib/facets/src/Form/FacetForm.php b/frontend/drupal9/web/modules/contrib/facets/src/Form/FacetForm.php index ea9a24cfc..cff300c32 100644 --- a/frontend/drupal9/web/modules/contrib/facets/src/Form/FacetForm.php +++ b/frontend/drupal9/web/modules/contrib/facets/src/Form/FacetForm.php @@ -807,39 +807,43 @@ class FacetForm extends EntityForm { )); $facet->setHardLimit($form_state->getValue(['facet_settings', 'hard_limit'])); - $facet->setExclude($form_state->getValue(['facet_settings', 'exclude'])); - $facet->setUseHierarchy($form_state->getValue( + + $facet_uses_hierarchy = $form_state->getValue( [ 'facet_settings', 'use_hierarchy', ] - )); - $facet->setKeepHierarchyParentsActive($form_state->getValue( - [ - 'facet_settings', - 'keep_hierarchy_parents_active', - ] - )); - $hierarchy_id = $form_state->getValue(['facet_settings', 'hierarchy']); - $facet->setHierarchy($hierarchy_id, $form_state->getValue( - [ - 'facet_settings', - $hierarchy_id, - ] - )); - $facet->setExpandHierarchy($form_state->getValue( - [ - 'facet_settings', - 'expand_hierarchy', - ] - )); - $facet->setEnableParentWhenChildGetsDisabled($form_state->getValue( - [ - 'facet_settings', - 'enable_parent_when_child_gets_disabled', - ] - )); + ); + $facet->setUseHierarchy($facet_uses_hierarchy); + if ($facet_uses_hierarchy) { + $facet->setKeepHierarchyParentsActive($form_state->getValue( + [ + 'facet_settings', + 'keep_hierarchy_parents_active', + ] + )); + $hierarchy_id = $form_state->getValue(['facet_settings', 'hierarchy']); + $facet->setHierarchy($hierarchy_id, $form_state->getValue( + [ + 'facet_settings', + $hierarchy_id, + ] + )); + $facet->setExpandHierarchy($form_state->getValue( + [ + 'facet_settings', + 'expand_hierarchy', + ] + )); + $facet->setEnableParentWhenChildGetsDisabled($form_state->getValue( + [ + 'facet_settings', + 'enable_parent_when_child_gets_disabled', + ] + )); + } + $facet->set('show_title', $form_state->getValue( [ 'facet_settings', diff --git a/frontend/drupal9/web/modules/contrib/facets/src/Plugin/facets/facet_source/SearchApiDisplay.php b/frontend/drupal9/web/modules/contrib/facets/src/Plugin/facets/facet_source/SearchApiDisplay.php index 3553a1586..017f34f2d 100644 --- a/frontend/drupal9/web/modules/contrib/facets/src/Plugin/facets/facet_source/SearchApiDisplay.php +++ b/frontend/drupal9/web/modules/contrib/facets/src/Plugin/facets/facet_source/SearchApiDisplay.php @@ -5,6 +5,7 @@ namespace Drupal\facets\Plugin\facets\facet_source; use Drupal\Component\Plugin\DependentPluginInterface; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheableDependencyInterface; +use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandler; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; @@ -83,6 +84,13 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo */ protected $moduleHandler; + /** + * Indicates if the display is edited and saved. + * + * @var bool + */ + protected $display_edit_in_progress = FALSE; + /** * Constructs a SearchApiBaseFacetSource object. * @@ -176,6 +184,8 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo // configuration for views. If that configuration exists, we can execute // that view and try to use its results. $display_definition = $this->getDisplay()->getPluginDefinition(); + $view = NULL; + if ($results === NULL && isset($display_definition['view_id'])) { $view = Views::getView($display_definition['view_id']); $view->setDisplay($display_definition['view_display']); @@ -185,6 +195,15 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo } if (!$results instanceof ResultSetInterface) { + if ($view) { + foreach ($facets as $facet) { + // In case of an empty result we must inherit the cache metadata of + // the query. It will know if no results is a valid "result" or a + // temporary issue or an error and set the metadata accordingly. + $facet->addCacheableDependency($view->getQuery()); + } + } + return; } @@ -206,10 +225,13 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo 'results' => $facet_results[$facet->getFieldIdentifier()] ?? [], ]; - // Get the Facet Specific Query Type so we can process the results + // Get the Facet Specific Query Type, so we can process the results // using the build() function of the query type. $query_type = $this->queryTypePluginManager->createInstance($facet->getQueryType(), $configuration); $query_type->build(); + + // Merge the runtime cache metadata of the query. + $facet->addCacheableDependency($results->getQuery()); } } @@ -439,6 +461,9 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo */ public function getCacheContexts() { if ($views_display = $this->getViewsDisplay()) { + if ($this->isDisplayEditInProgress()) { + return []; + } return $views_display ->getDisplay() ->getCacheMetadata() @@ -459,6 +484,9 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo */ public function getCacheTags() { if ($views_display = $this->getViewsDisplay()) { + if ($this->isDisplayEditInProgress()) { + return []; + } return Cache::mergeTags( $views_display->getDisplay()->getCacheMetadata()->getCacheTags(), $views_display->getCacheTags() @@ -479,6 +507,9 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo */ public function getCacheMaxAge() { if ($views_display = $this->getViewsDisplay()) { + if ($this->isDisplayEditInProgress()) { + return CacheBackendInterface::CACHE_PERMANENT; + } $cache_plugin = $views_display->getDisplay()->getPlugin('cache'); return Cache::mergeMaxAges( $views_display->getDisplay()->getCacheMetadata()->getCacheMaxAge(), @@ -524,4 +555,22 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo } } + /** + * Is the display currently edited and saved? + * + * @return bool + */ + public function isDisplayEditInProgress(): bool { + return $this->display_edit_in_progress; + } + + /** + * Set the state, that the display is currently edited and saved. + * + * @param bool $display_edit_in_progress + */ + public function setDisplayEditInProgress(bool $display_edit_in_progress): void { + $this->display_edit_in_progress = $display_edit_in_progress; + } + } diff --git a/frontend/drupal9/web/modules/contrib/facets/tests/facets_custom_widget/facets_custom_widget.info.yml b/frontend/drupal9/web/modules/contrib/facets/tests/facets_custom_widget/facets_custom_widget.info.yml index 95b915ffa..ea2031afa 100644 --- a/frontend/drupal9/web/modules/contrib/facets/tests/facets_custom_widget/facets_custom_widget.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/tests/facets_custom_widget/facets_custom_widget.info.yml @@ -5,7 +5,7 @@ package: 'Testing' hidden: true core_version_requirement: ^9.2 || ^10.0 -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/tests/facets_events_test/facets_events_test.info.yml b/frontend/drupal9/web/modules/contrib/facets/tests/facets_events_test/facets_events_test.info.yml index 84cf57401..fe663febe 100644 --- a/frontend/drupal9/web/modules/contrib/facets/tests/facets_events_test/facets_events_test.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/tests/facets_events_test/facets_events_test.info.yml @@ -5,7 +5,7 @@ package: 'Testing' hidden: true core_version_requirement: ^9.2 || ^10.0 -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/tests/facets_processors_collection/facets_processors_collection.info.yml b/frontend/drupal9/web/modules/contrib/facets/tests/facets_processors_collection/facets_processors_collection.info.yml index 0b5b986ae..5496a079e 100644 --- a/frontend/drupal9/web/modules/contrib/facets/tests/facets_processors_collection/facets_processors_collection.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/tests/facets_processors_collection/facets_processors_collection.info.yml @@ -7,7 +7,7 @@ core_version_requirement: ^9.2 || ^10.0 dependencies: - facets:facets -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/tests/facets_query_processor/facets_query_processor.info.yml b/frontend/drupal9/web/modules/contrib/facets/tests/facets_query_processor/facets_query_processor.info.yml index 6eeb1cc76..f97b71d54 100644 --- a/frontend/drupal9/web/modules/contrib/facets/tests/facets_query_processor/facets_query_processor.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/tests/facets_query_processor/facets_query_processor.info.yml @@ -5,7 +5,7 @@ package: 'Testing' hidden: true core_version_requirement: ^9.2 || ^10.0 -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets/tests/facets_search_api_dependency/facets_search_api_dependency.info.yml b/frontend/drupal9/web/modules/contrib/facets/tests/facets_search_api_dependency/facets_search_api_dependency.info.yml index 57efe0587..d782478c1 100644 --- a/frontend/drupal9/web/modules/contrib/facets/tests/facets_search_api_dependency/facets_search_api_dependency.info.yml +++ b/frontend/drupal9/web/modules/contrib/facets/tests/facets_search_api_dependency/facets_search_api_dependency.info.yml @@ -9,7 +9,7 @@ dependencies: - drupal:views core_version_requirement: ^9.2 || ^10.0 -# Information added by Drupal.org packaging script on 2022-07-09 -version: '2.0.4' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '2.0.5' project: 'facets' -datestamp: 1657367472 +datestamp: 1658315617 diff --git a/frontend/drupal9/web/modules/contrib/facets_block/LICENSE.txt b/frontend/drupal9/web/modules/contrib/facets_block/LICENSE.txt new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/frontend/drupal9/web/modules/contrib/facets_block/README.md b/frontend/drupal9/web/modules/contrib/facets_block/README.md new file mode 100644 index 000000000..899be33c4 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/README.md @@ -0,0 +1,53 @@ +CONTENTS OF THIS FILE +--------------------- + + * Introduction + * Requirements + * Installation + * Configuration + * Maintainers + + +INTRODUCTION +------------ + +The Facets Block module allows the user to render all Facets in a single block. + + * For a full description of the module, visit the project page: + https://www.drupal.org/project/facets_block + + * To submit bug reports and feature suggestions, or to track changes: + https://www.drupal.org/project/issues/facets_block + + +REQUIREMENTS +------------ + +This module requires the Facets module to be installed. + + +INSTALLATION +------------ + + * Install the Facets Block module as you would normally install a contributed + Drupal module. Visit https://www.drupal.org/node/1897420 for further + information. + + +CONFIGURATION +------------- + + 1. Make sure that you configured Facets on your site. + 2. Go to the Block layout page and place a new "Facets Block" block. + 3. In the block configuration form you can select which Facets you want to + display in this block. + + +MAINTAINERS +----------- + + * Goran Nikolovski (gnikolovski) - https://www.drupal.org/u/gnikolovski + +Supporting organization: + + * Studio Present - https://www.drupal.org/studio-present diff --git a/frontend/drupal9/web/modules/contrib/facets_block/composer.json b/frontend/drupal9/web/modules/contrib/facets_block/composer.json new file mode 100644 index 000000000..c873de56a --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/composer.json @@ -0,0 +1,24 @@ +{ + "name": "drupal/facets_block", + "description": "Render Facets in a single block.", + "type": "drupal-module", + "homepage": "https://www.drupal.org/project/facets_block", + "authors": [ + { + "name": "Goran Nikolovski", + "email": "goran@gorannikolovski.com", + "homepage": "https://gorannikolovski.com", + "role": "Developer" + } + ], + "support": { + "issues": "https://www.drupal.org/project/issues/facets_block", + "email": "goran@gorannikolovski.com" + }, + "license": "GPL-2.0+", + "minimum-stability": "dev", + "require": { + "drupal/core": "^8 || ^9", + "drupal/facets": "^1.0 || ^2.0" + } +} diff --git a/frontend/drupal9/web/modules/contrib/facets_block/config/schema/facets_block.schema.yml b/frontend/drupal9/web/modules/contrib/facets_block/config/schema/facets_block.schema.yml new file mode 100644 index 000000000..5c14a524a --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/config/schema/facets_block.schema.yml @@ -0,0 +1,21 @@ +block.settings.facets_block: + type: block_settings + label: 'Facets Block settings' + mapping: + show_title: + type: boolean + label: 'Show Facet titles' + exclude_empty_facets: + type: boolean + label: 'Exclude empty facets' + hide_empty_block: + type: boolean + label: 'Hide empty block' + facets_to_include: + type: sequence + label: 'Facets to include' + sequence: + type: string + add_js_classes: + type: boolean + label: 'Add JS classes for Facets block' diff --git a/frontend/drupal9/web/modules/contrib/facets_block/facets_block.api.php b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.api.php new file mode 100644 index 000000000..ae1ca1ea6 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.api.php @@ -0,0 +1,29 @@ + '', + 'content' => Link::fromTextAndUrl(t('Home page'), Url::fromRoute('', [], [ + 'query' => ['filter' => 'recent-posts'], + ])), + ]; +} diff --git a/frontend/drupal9/web/modules/contrib/facets_block/facets_block.info.yml b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.info.yml new file mode 100644 index 000000000..512a24fa2 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.info.yml @@ -0,0 +1,13 @@ +name: 'Facets Block' +description: 'Render Facets in a single block.' +package: 'Other' +type: module +core: 8.x +core_version_requirement: ^8 || ^9 +dependencies: + - facets:facets + +# Information added by Drupal.org packaging script on 2021-12-12 +version: '8.x-1.04' +project: 'facets_block' +datestamp: 1639331251 diff --git a/frontend/drupal9/web/modules/contrib/facets_block/facets_block.install b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.install new file mode 100644 index 000000000..774c04a2b --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.install @@ -0,0 +1,22 @@ +listAll('block.block.facetsblock') as $block_config_name) { + $block = $config_factory->getEditable($block_config_name); + $settings = $block->get('settings'); + $settings['add_js_classes'] = TRUE; + $block->set('settings', $settings); + $block->save(); + } + +} diff --git a/frontend/drupal9/web/modules/contrib/facets_block/facets_block.module b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.module new file mode 100644 index 000000000..042bace3a --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/facets_block.module @@ -0,0 +1,49 @@ +' . t('About') . ''; + $output .= '

' . t('Render Facets in a single block.') . '

'; + return $output; + } +} + +/** + * Implements hook_theme(). + */ +function facets_block_theme($existing, $type, $theme, $path) { + return [ + 'facets_block' => [ + 'variables' => [ + 'show_title' => TRUE, + 'facets' => '', + ], + ], + ]; +} + +/** + * Implements hook_block_view_BASE_BLOCK_ID_alter(). + */ +function facets_block_block_view_facets_block_alter(array &$build, BlockPluginInterface $block) { + if (!empty($build['#configuration']['add_js_classes'])) { + $build['#pre_render'][] = '\Drupal\facets_block\AddJsClasses::preRender'; + } + + if (!empty($build['#configuration']['hide_empty_block'])) { + $build['#pre_render'][] = '\Drupal\facets_block\AddCssClasses::preRender'; + } +} diff --git a/frontend/drupal9/web/modules/contrib/facets_block/src/AddCssClasses.php b/frontend/drupal9/web/modules/contrib/facets_block/src/AddCssClasses.php new file mode 100644 index 000000000..c6d217e2f --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/src/AddCssClasses.php @@ -0,0 +1,36 @@ +facetsManager = $facets_manager; + $this->moduleHandler = $module_handler; + $this->pluginManagerBlock = $plugin_manager_block; + $this->currentUser = $current_user; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('facets.manager'), + $container->get('module_handler'), + $container->get('plugin.manager.block'), + $container->get('current_user') + ); + } + + /** + * {@inheritdoc} + */ + public function blockForm($form, FormStateInterface $form_state) { + $form['block_settings'] = [ + '#type' => 'fieldset', + '#title' => 'Settings', + ]; + + $form['block_settings']['show_title'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Show Facet titles'), + '#default_value' => isset($this->configuration['show_title']) ? $this->configuration['show_title'] : TRUE, + ]; + + $form['block_settings']['exclude_empty_facets'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Exclude empty facets'), + '#default_value' => isset($this->configuration['exclude_empty_facets']) ? $this->configuration['exclude_empty_facets'] : TRUE, + ]; + + $form['block_settings']['hide_empty_block'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Hide empty block'), + '#description' => $this->t("Don't render the Facets Block if no facets are available (for instance when no search results are found)."), + '#default_value' => isset($this->configuration['hide_empty_block']) ? $this->configuration['hide_empty_block'] : FALSE, + ]; + + $form['block_settings']['add_js_classes'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Add JS classes for Facets block'), + '#default_value' => $this->configuration['add_js_classes'] ?? FALSE, + ]; + + $form['block_settings']['facets_to_include'] = [ + '#type' => 'checkboxes', + '#title' => $this->t('Facets to include'), + '#default_value' => isset($this->configuration['facets_to_include']) ? $this->configuration['facets_to_include'] : [], + '#options' => $this->getAvailableFacets(), + ]; + + return $form; + } + + /** + * Returns a list of available facets. + * + * @return array + * An array of enabled facets. + */ + protected function getAvailableFacets() { + $enabled_facets = $this->facetsManager->getEnabledFacets(); + uasort($enabled_facets, [$this, 'sortFacetsByWeight']); + + $available_facets = []; + + if ($this->moduleHandler->moduleExists('facets_summary')) { + $available_facets['facets_summary_block:summary'] = $this->t('Summary'); + } + + foreach ($enabled_facets as $facet) { + /** @var \Drupal\facets\Entity\Facet $facet */ + $available_facets['facet_block:' . $facet->id()] = $facet->getName(); + } + + return $available_facets; + } + + /** + * Sorts array of objects by object weight property. + * + * @param \Drupal\facets\FacetInterface $a + * A facet. + * @param \Drupal\facets\FacetInterface $b + * A facet. + * + * @return int + * Sort value. + */ + protected function sortFacetsByWeight(FacetInterface $a, FacetInterface $b) { + $a_weight = $a->getWeight(); + $b_weight = $b->getWeight(); + + if ($a_weight == $b_weight) { + return 0; + } + + return ($a_weight < $b_weight) ? -1 : 1; + } + + /** + * {@inheritdoc} + */ + public function blockSubmit($form, FormStateInterface $form_state) { + $this->configuration['show_title'] = $form_state->getValue([ + 'block_settings', + 'show_title', + ]); + $this->configuration['exclude_empty_facets'] = $form_state->getValue([ + 'block_settings', + 'exclude_empty_facets', + ]); + $this->configuration['hide_empty_block'] = $form_state->getValue([ + 'block_settings', + 'hide_empty_block', + ]); + $this->configuration['facets_to_include'] = $form_state->getValue([ + 'block_settings', + 'facets_to_include', + ]); + $this->configuration['add_js_classes'] = $form_state->getValue([ + 'block_settings', + 'add_js_classes', + ]); + } + + /** + * Builds facets. + * + * @param array $facets_to_include + * A list of facets to display. + * + * @return array + * An array of facets. + * + * @throws \Drupal\Component\Plugin\Exception\PluginException + */ + protected function buildFacets(array $facets_to_include) { + $facets = []; + + $available_facets = $this->getAvailableFacets(); + + foreach ($available_facets as $plugin_id => $facet_title) { + if (isset($facets_to_include[$plugin_id]) && $facets_to_include[$plugin_id] === $plugin_id) { + $block_plugin = $this->pluginManagerBlock->createInstance($plugin_id, []); + + if ($block_plugin && $block_plugin->access($this->currentUser)) { + $build = $block_plugin->build(); + + $exclude_empty_facets = !isset($this->configuration['exclude_empty_facets']) ? TRUE : $this->configuration['exclude_empty_facets']; + + // Skip empty facets. + $is_empty = FALSE; + + if (!$build) { + $is_empty = TRUE; + } + elseif (isset($build[0]['#attributes']['class']) && in_array('facet-empty', $build[0]['#attributes']['class'])) { + $is_empty = TRUE; + } + // Check if Summary Facet is empty. + elseif (isset($build['#items']) && count($build['#items']) == 0) { + $is_empty = TRUE; + } + + if ($exclude_empty_facets && $is_empty) { + continue; + } + + if (empty($build['#attributes'])) { + $build['#attributes'] = []; + } + + $facets[] = [ + 'title' => $facet_title, + 'content' => $build, + 'attributes' => new Attribute($build['#attributes']), + ]; + } + } + } + + return $facets; + } + + /** + * {@inheritdoc} + */ + public function build() { + $show_title = !isset($this->configuration['show_title']) ? TRUE : $this->configuration['show_title']; + $facets_to_include = !isset($this->configuration['facets_to_include']) ? [] : $this->configuration['facets_to_include']; + $facets = $this->buildFacets($facets_to_include); + + // Allow other modules to alter the facets array. + $this->moduleHandler->alter('facets_block_facets', $facets); + + return [ + '#theme' => 'facets_block', + '#show_title' => $show_title, + '#facets' => $facets, + ]; + } + +} diff --git a/frontend/drupal9/web/modules/contrib/facets_block/templates/facets-block.html.twig b/frontend/drupal9/web/modules/contrib/facets_block/templates/facets-block.html.twig new file mode 100644 index 000000000..9d126bb00 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/templates/facets-block.html.twig @@ -0,0 +1,8 @@ +{% for facet in facets %} +
+ {% if show_title %} +

{{ facet.title }}

+ {% endif %} +
{{ facet.content }}
+
+{% endfor %} diff --git a/frontend/drupal9/web/modules/contrib/facets_block/tests/src/Functional/FacetsBlockTest.php b/frontend/drupal9/web/modules/contrib/facets_block/tests/src/Functional/FacetsBlockTest.php new file mode 100644 index 000000000..0cfc913fd --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/facets_block/tests/src/Functional/FacetsBlockTest.php @@ -0,0 +1,74 @@ +drupalCreateUser([ + 'administer blocks', + 'administer site configuration', + 'access administration pages', + ]); + + $this->drupalLogin($admin_user); + } + + /** + * Test that the block is available. + */ + public function testBlockAvailability() { + $this->drupalGet('/admin/structure/block'); + $this->clickLink('Place block'); + $this->assertSession()->pageTextContains('Facets Block'); + $this->assertSession()->linkByHrefExists('admin/structure/block/add/facets_block/', 0); + } + + /** + * Test that the block can be placed. + */ + public function testBlockPlacement() { + $this->drupalPlaceBlock('facets_block', [ + 'region' => 'content', + 'label' => 'Facets Block', + 'id' => 'facetsblock', + ]); + + $this->drupalGet('admin/structure/block'); + $this->assertSession()->pageTextContains('Facets Block'); + + $this->drupalGet(''); + $this->assertSession()->pageTextContains('Facets Block'); + } + +} diff --git a/frontend/drupal9/web/modules/contrib/metatag/CHANGELOG.txt b/frontend/drupal9/web/modules/contrib/metatag/CHANGELOG.txt index 4553d4786..27dd4c0c1 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/CHANGELOG.txt +++ b/frontend/drupal9/web/modules/contrib/metatag/CHANGELOG.txt @@ -1,3 +1,11 @@ +Metatag 8.x-1.21, 2022-07-16 +---------------------------- +#3268439 by Dave Reid: Follow-up to fix the scroll height feature. +#3295600 by DamienMcKenna, saranchuk_hys, Eugene Bocharov, Didier Misson, + loopy1492, Maplinx, W01F, jaydub, kazah: MaskIcon doesn't work properly. +#3295757 by sleitner, DamienMcKenna: Fix regression from Google tag fix. + + Metatag 8.x-1.20, 2022-07-12 ---------------------------- #3257588 by Eugene Bocharov, lobodacyril, jippie1948, Kasey_MK, djween, awasson, diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag.info.yml index aab4eb2b3..28521059c 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag.info.yml @@ -10,7 +10,7 @@ dependencies: test_dependencies: - devel:devel -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_app_links/metatag_app_links.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_app_links/metatag_app_links.info.yml index 5b973e1a8..66b5dbd25 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_app_links/metatag_app_links.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_app_links/metatag_app_links.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_dc/metatag_dc.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_dc/metatag_dc.info.yml index 4239455f5..c0cd12727 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_dc/metatag_dc.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_dc/metatag_dc.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info.yml index 90f6bc055..3f4d170dc 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info.yml @@ -7,7 +7,7 @@ dependencies: - metatag:metatag - metatag:metatag_dc -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_extended_perms/metatag_extended_perms.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_extended_perms/metatag_extended_perms.info.yml index 3ddc228e5..71796bbb2 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_extended_perms/metatag_extended_perms.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_extended_perms/metatag_extended_perms.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_facebook/metatag_facebook.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_facebook/metatag_facebook.info.yml index 146253402..cbba4f093 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_facebook/metatag_facebook.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_facebook/metatag_facebook.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/metatag_favicons.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/metatag_favicons.info.yml index c0229bf46..58d4d9be1 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/metatag_favicons.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/metatag_favicons.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/src/Plugin/metatag/Tag/MaskIcon.php b/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/src/Plugin/metatag/Tag/MaskIcon.php index 630b83cdb..16ff43d70 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/src/Plugin/metatag/Tag/MaskIcon.php +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/src/Plugin/metatag/Tag/MaskIcon.php @@ -66,6 +66,16 @@ class MaskIcon extends LinkRelBase { public function output() { $values = $this->value; + // Make sure the value is an array, if it is not then assume it was assigned + // before the "color" attribute was added, so place the original string as + // the 'href' element and leave the 'color' element blank. + if (!is_array($values)) { + $values = [ + 'href' => $values, + 'color' => '', + ]; + } + // Build the output. $element['#tag'] = 'link'; $element['#attributes'] = [ diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/tests/src/Functional/MetatagFaviconsTagsTest.php b/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/tests/src/Functional/MetatagFaviconsTagsTest.php index c8aeb8c84..4a7dde16c 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/tests/src/Functional/MetatagFaviconsTagsTest.php +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_favicons/tests/src/Functional/MetatagFaviconsTagsTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\metatag_favicons\Functional; use Drupal\Tests\metatag\Functional\MetatagTagsTestBase; +use Drupal\metatag\Entity\MetatagDefaults; /** * Tests that each of the Metatag Favicons tags work correctly. @@ -10,11 +11,28 @@ use Drupal\Tests\metatag\Functional\MetatagTagsTestBase; * @group metatag */ class MetatagFaviconsTagsTest extends MetatagTagsTestBase { + + public function testTagsArePresent() {return;} + /** + * Confirm that each tag can be saved and that the output is correct. + * + * Each tag is passed in one at a time (using the dataProvider) to make it + * easier to distinguish when a problem occurs. + * + * @param string $tag_name + * The tag to test. + * + * @dataProvider tagsInputOutputProvider + */ + public function testTagsInputOutput($tag_name) {return;} + public function tagsInputOutputProvider() { + return []; + } /** * {@inheritdoc} */ - protected static $modules = ['metatag_favicons']; + protected static $modules = ['metatag_favicons', 'field_ui']; /** * {@inheritdoc} @@ -227,12 +245,12 @@ class MetatagFaviconsTagsTest extends MetatagTagsTestBase { } /** - * Test mask_icon. + * Test mask_icon as it currently works. * * The mask_icon is a separate test case because of it's unusual structure. * Mask_icon exists of 2 parts, an href and a color. */ - public function testMaskIcon() { + public function _testMaskIconCurrent() { // Test that mask icon fields are available. $this->drupalGet('admin/config/search/metatag/global'); $this->assertSession()->statusCodeEquals(200); @@ -248,7 +266,8 @@ class MetatagFaviconsTagsTest extends MetatagTagsTestBase { $this->assertSession()->pageTextContains('Saved the Global Metatag defaults.'); $this->drupalGet('user'); - $this->xpath("//link[@rel='mask-icon' and @href='mask_icon_href']"); + $xpath = $this->xpath("//link[@rel='mask-icon' and @href='mask_icon_href']"); + self::assertEquals((string) $xpath[0]->getAttribute('href'), 'mask_icon_href'); // Add a mask_icon color and check if it's correctly shown in the meta // tags. @@ -260,7 +279,60 @@ class MetatagFaviconsTagsTest extends MetatagTagsTestBase { $this->assertSession()->pageTextContains('Saved the Global Metatag defaults.'); $this->drupalGet('user'); - $this->xpath("//link[@rel='mask-icon' and @href='mask_icon_href' and @color='#FFFFFF']"); + $xpath = $this->xpath("//link[@rel='mask-icon' and @href='mask_icon_href' and @color='#FFFFFF']"); + self::assertEquals((string) $xpath[0]->getAttribute('href'), 'mask_icon_href'); + } + + /** + * Legacy data for the MaskIcon tag just stored a single string, not an array. + */ + public function testMaskIconLegacy() { + $this->loginUser1(); + // Add a metatag field to the entity type test_entity. + $this->createContentType(['type' => 'page']); + $this->drupalGet('admin/structure/types/manage/page/fields/add-field'); + $this->assertSession()->statusCodeEquals(200); + $edit = [ + 'label' => 'Metatag', + 'field_name' => 'metatag', + 'new_storage_type' => 'metatag', + ]; + $this->submitForm($edit, 'Save and continue'); + $this->submitForm([], 'Save field settings'); + + // Create a demo node of this content type so it can be tested. + $this->drupalGet('node/add/page'); + $this->assertSession()->statusCodeEquals(200); + $edit = [ + 'title[0][value]' => 'Hello, world!', + 'field_metatag[0][favicons][mask_icon][href]' => 'mask_icon_href', + ]; + $this->submitForm($edit, 'Save'); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->pageTextContains('page Hello, World! has been created.'); + $xpath = $this->xpath("//link[@rel='mask-icon' and @href='mask_icon_href']"); + self::assertEquals((string) $xpath[0]->getAttribute('href'), 'mask_icon_href'); + + // Update the database record. + \Drupal::database()->update('node__field_metatag') + ->fields([ + 'field_metatag_value' => serialize([ + 'mask_icon' => 'mask_icon_href', + ]), + ]) + ->condition('entity_id', 1) + ->execute(); + + // Clear caches to make sure the node is reloaded. + drupal_flush_all_caches(); + + // Reload the node. + $this->drupalGet('node/1'); + $this->assertSession()->statusCodeEquals(200); + + // Confirm the mask icon value. + $xpath = $this->xpath("//link[@rel='mask-icon' and @href='mask_icon_href']"); + self::assertEquals((string) $xpath[0]->getAttribute('href'), 'mask_icon_href'); } } diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info.yml index 41a532710..5f9abe92c 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info.yml index 689b5de53..48fed0168 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info.yml index 30abb7ac4..76ae29563 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_mobile/metatag_mobile.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_mobile/metatag_mobile.info.yml index 83651c22c..9c9c38ead 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_mobile/metatag_mobile.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_mobile/metatag_mobile.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph/metatag_open_graph.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph/metatag_open_graph.info.yml index 2ea6da8e8..118903f84 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph/metatag_open_graph.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph/metatag_open_graph.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph_products/metatag_open_graph_products.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph_products/metatag_open_graph_products.info.yml index 72c0bfc38..e9437eec7 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph_products/metatag_open_graph_products.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_open_graph_products/metatag_open_graph_products.info.yml @@ -7,7 +7,7 @@ dependencies: - metatag:metatag - metatag:metatag_open_graph -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_page_manager/metatag_page_manager.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_page_manager/metatag_page_manager.info.yml index e60d99335..8af8163b1 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_page_manager/metatag_page_manager.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_page_manager/metatag_page_manager.info.yml @@ -7,7 +7,7 @@ dependencies: - page_manager:page_manager - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_pinterest/metatag_pinterest.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_pinterest/metatag_pinterest.info.yml index 67c1f0308..180845e9c 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_pinterest/metatag_pinterest.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_pinterest/metatag_pinterest.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_routes/metatag_routes.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_routes/metatag_routes.info.yml index 9945fea8e..c96420079 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_routes/metatag_routes.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_routes/metatag_routes.info.yml @@ -5,7 +5,7 @@ core_version_requirement: ^9 dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info.yml index 414bdf90e..89270318b 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.info.yml index a8fdffc7e..19adb3c0c 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.info.yml @@ -6,7 +6,7 @@ package: SEO dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.post_update.php b/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.post_update.php new file mode 100644 index 000000000..555ba18a3 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_verification/metatag_verification.post_update.php @@ -0,0 +1,41 @@ +update($sandbox, 'metatag_defaults', function (MetatagDefaults $metatag_defaults) { + if ($metatag_defaults->hasTag('google')) { + $tags = $metatag_defaults->get('tags'); + + // Don't do anything if the google_site_verification tag is already + // defined. + if (!empty($tags['google_site_verification'])) { + return FALSE; + } + + // Only change the data if the 'google' value is not one of the accepted + // values for that tag. + if (strpos($tags['google'], 'nositelinkssearchbox') === FALSE + && strpos($tags['google'], 'nopagereadaloud') === FALSE + && strpos($tags['google'], 'notranslate') === FALSE) { + // Set the verification tag to the old value, delete the old value and + // then update the record. + $tags['google_site_verification'] = $tags['google']; + unset($tags['google']); + $metatag_defaults->set('tags', $tags); + return TRUE; + } + } + return FALSE; + }); +} diff --git a/frontend/drupal9/web/modules/contrib/metatag/metatag_views/metatag_views.info.yml b/frontend/drupal9/web/modules/contrib/metatag/metatag_views/metatag_views.info.yml index d15b68c2a..82f238601 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/metatag_views/metatag_views.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/metatag_views/metatag_views.info.yml @@ -7,7 +7,7 @@ dependencies: - metatag:metatag - drupal:views -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/src/Plugin/Field/FieldWidget/MetatagFirehose.php b/frontend/drupal9/web/modules/contrib/metatag/src/Plugin/Field/FieldWidget/MetatagFirehose.php index b5709c98d..22d4a612f 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/src/Plugin/Field/FieldWidget/MetatagFirehose.php +++ b/frontend/drupal9/web/modules/contrib/metatag/src/Plugin/Field/FieldWidget/MetatagFirehose.php @@ -202,7 +202,7 @@ class MetatagFirehose extends WidgetBase implements ContainerFactoryPluginInterf // Scroll height configuration. $scroll_height = $settings->get('tag_scroll_max_height'); - if (!empty($scrollheight)) { + if (!empty($scroll_height)) { $form['#attached']['drupalSettings']['metatag']['max_height'] = $scroll_height; $form['#attached']['library'][] = 'metatag/firehose_widget'; $element['#attributes']['class'][] = 'metatags'; diff --git a/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_custom_route/metatag_test_custom_route.info.yml b/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_custom_route/metatag_test_custom_route.info.yml index 88dbbb85a..d00da2f57 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_custom_route/metatag_test_custom_route.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_custom_route/metatag_test_custom_route.info.yml @@ -6,7 +6,7 @@ package: Testing dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_integration/metatag_test_integration.info.yml b/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_integration/metatag_test_integration.info.yml index 374b3ef55..92f5fa06b 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_integration/metatag_test_integration.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_integration/metatag_test_integration.info.yml @@ -5,7 +5,7 @@ package: Testing dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_tag/metatag_test_tag.info.yml b/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_tag/metatag_test_tag.info.yml index 5a4fe794f..b64134aea 100644 --- a/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_tag/metatag_test_tag.info.yml +++ b/frontend/drupal9/web/modules/contrib/metatag/tests/modules/metatag_test_tag/metatag_test_tag.info.yml @@ -6,7 +6,7 @@ package: Testing dependencies: - metatag:metatag -# Information added by Drupal.org packaging script on 2022-07-12 -version: '8.x-1.20' +# Information added by Drupal.org packaging script on 2022-07-16 +version: '8.x-1.21' project: 'metatag' -datestamp: 1657649279 +datestamp: 1657971671 diff --git a/frontend/drupal9/web/modules/contrib/search_api/CHANGELOG.txt b/frontend/drupal9/web/modules/contrib/search_api/CHANGELOG.txt index 7d9d30eda..4608c0034 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/CHANGELOG.txt +++ b/frontend/drupal9/web/modules/contrib/search_api/CHANGELOG.txt @@ -1,3 +1,10 @@ +Search API 1.25 (2022-07-18): +----------------------------- +- #3296006 by mkalkbrenner, borisson_, drunken monkey: Fixed Views caching for + failed searches. +- #3295564 by mkalkbrenner, drunken monkey, borisson_: Fixed broken Views + caching with Facets 2.0.4. + Search API 1.24 (2022-07-07): ----------------------------- - #3292241 by drunken monkey: Fixed test fails. diff --git a/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db.info.yml b/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db.info.yml index 014d79055..a68d90f32 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db.info.yml @@ -6,7 +6,7 @@ core_version_requirement: ^9.2 || ^10.0 dependencies: - search_api:search_api -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db_defaults/search_api_db_defaults.info.yml b/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db_defaults/search_api_db_defaults.info.yml index 6d39e9b59..84c519521 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db_defaults/search_api_db_defaults.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/search_api_db_defaults/search_api_db_defaults.info.yml @@ -13,7 +13,7 @@ dependencies: - drupal:views - search_api:search_api_db -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/tests/search_api_db_test_autocomplete/search_api_db_test_autocomplete.info.yml b/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/tests/search_api_db_test_autocomplete/search_api_db_test_autocomplete.info.yml index 11d66311a..fbfdd98b9 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/tests/search_api_db_test_autocomplete/search_api_db_test_autocomplete.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/modules/search_api_db/tests/search_api_db_test_autocomplete/search_api_db_test_autocomplete.info.yml @@ -8,7 +8,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/search_api.info.yml b/frontend/drupal9/web/modules/contrib/search_api/search_api.info.yml index 2cc0a891d..052b89553 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/search_api.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/search_api.info.yml @@ -6,7 +6,7 @@ core_version_requirement: ^9.2 || ^10.0 lifecycle: stable configure: search_api.overview -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/src/Plugin/views/cache/SearchApiCachePluginTrait.php b/frontend/drupal9/web/modules/contrib/search_api/src/Plugin/views/cache/SearchApiCachePluginTrait.php index 9d1a2e36a..3068cfef4 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/src/Plugin/views/cache/SearchApiCachePluginTrait.php +++ b/frontend/drupal9/web/modules/contrib/search_api/src/Plugin/views/cache/SearchApiCachePluginTrait.php @@ -110,7 +110,7 @@ trait SearchApiCachePluginTrait { * {@inheritdoc} */ public function cacheSet($type) { - if ($type != 'results') { + if ($type !== 'results') { parent::cacheSet($type); return; } @@ -124,7 +124,33 @@ trait SearchApiCachePluginTrait { 'search_api results' => $query->getSearchApiResults(), ]; + // Get the max-age value according to the configuration of the view. $expire = $this->cacheSetMaxAge($type); + // Get the max-age value of the executed query. A 3rd party module might + // have set a different value on the query, especially in case of an error. + // Search API advises backend implementations to set a max-age of "0" on + // the query in case of errors before throwing exceptions. + $query_max_age = $query->getCacheMaxAge(); + + // If the max-age set on the query at runtime is anything else than + // Cache::PERMANENT we must handle it. + if ($query_max_age !== Cache::PERMANENT) { + // If the max-age set on the query at runtime is lower than the value + // configured in the view's caching settings, we must use the value + // provided by the query. That mathematical rule covers the case of no + // caching (max-age is "0") as well. + // In case that Cache::PERMANENT is configured for the view, any runtime + // value set on the query has precedence. + if ($expire === Cache::PERMANENT || $query_max_age < $expire) { + $expire = $query_max_age; + } + } + + if ($expire === 0) { + // Don't cache the results. + return; + } + if ($expire !== Cache::PERMANENT) { $expire += (int) $view->getRequest()->server->get('REQUEST_TIME'); } @@ -138,7 +164,7 @@ trait SearchApiCachePluginTrait { * {@inheritdoc} */ public function cacheGet($type) { - if ($type != 'results') { + if ($type !== 'results') { return parent::cacheGet($type); } @@ -258,6 +284,12 @@ trait SearchApiCachePluginTrait { // every single cacheable display in the view, thus we are resetting the // query to its original unprocessed state. $query = $this->getQuery(TRUE)->getSearchApiQuery(); + // Add a tag to the query to indicate that this is not a real search but the + // save process of a view. Modules like facets can use this information to + // not perform their normal search time tasks on this query. This is + // especially important when an event handler would add caching information + // to the query. + $query->addTag('alter_cache_metadata'); $query->preExecute(); // Allow modules that alter the query to add their cache metadata to the // view. diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test/search_api_test.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test/search_api_test.info.yml index e770091c0..a66b77922 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test/search_api_test.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test/search_api_test.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_bulk_form/search_api_test_bulk_form.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_bulk_form/search_api_test_bulk_form.info.yml index 3c8a20a3f..b17bb4f8b 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_bulk_form/search_api_test_bulk_form.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_bulk_form/search_api_test_bulk_form.info.yml @@ -10,7 +10,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_db/search_api_test_db.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_db/search_api_test_db.info.yml index 9bd4f206c..ba229d548 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_db/search_api_test_db.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_db/search_api_test_db.info.yml @@ -8,7 +8,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_events/search_api_test_events.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_events/search_api_test_events.info.yml index 256ef1a33..01360e84b 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_events/search_api_test_events.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_events/search_api_test_events.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content/search_api_test_example_content.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content/search_api_test_example_content.info.yml index c7c57c564..e7b7a4c78 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content/search_api_test_example_content.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content/search_api_test_example_content.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content_references/search_api_test_example_content_references.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content_references/search_api_test_example_content_references.info.yml index 03ccc0a25..60bb9857a 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content_references/search_api_test_example_content_references.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_example_content_references/search_api_test_example_content_references.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt/search_api_test_excerpt.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt/search_api_test_excerpt.info.yml index 3b7cd930c..215810771 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt/search_api_test_excerpt.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt/search_api_test_excerpt.info.yml @@ -9,7 +9,7 @@ dependencies: - drupal:views hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt_field/search_api_test_excerpt_field.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt_field/search_api_test_excerpt_field.info.yml index fd2176b58..57487da9e 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt_field/search_api_test_excerpt_field.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_excerpt_field/search_api_test_excerpt_field.info.yml @@ -9,7 +9,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_extraction/search_api_test_extraction.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_extraction/search_api_test_extraction.info.yml index d4274aa9e..f13c2eade 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_extraction/search_api_test_extraction.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_extraction/search_api_test_extraction.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_hooks/search_api_test_hooks.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_hooks/search_api_test_hooks.info.yml index e1fef45ea..e71128aed 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_hooks/search_api_test_hooks.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_hooks/search_api_test_hooks.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_inconsistent_config/search_api_test_inconsistent_config.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_inconsistent_config/search_api_test_inconsistent_config.info.yml index ab14286d0..9a2af03ee 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_inconsistent_config/search_api_test_inconsistent_config.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_inconsistent_config/search_api_test_inconsistent_config.info.yml @@ -8,7 +8,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_language_fallback/search_api_test_language_fallback.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_language_fallback/search_api_test_language_fallback.info.yml index 1af29ce70..0bbb66f62 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_language_fallback/search_api_test_language_fallback.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_language_fallback/search_api_test_language_fallback.info.yml @@ -5,7 +5,7 @@ package: 'Search API' core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_no_ui/search_api_test_no_ui.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_no_ui/search_api_test_no_ui.info.yml index 545203a79..20d676964 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_no_ui/search_api_test_no_ui.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_no_ui/search_api_test_no_ui.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_node_indexing/search_api_test_node_indexing.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_node_indexing/search_api_test_node_indexing.info.yml index f0721c919..bed042b5c 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_node_indexing/search_api_test_node_indexing.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_node_indexing/search_api_test_node_indexing.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_tasks/search_api_test_tasks.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_tasks/search_api_test_tasks.info.yml index 231f9cb7e..c2a0ca66f 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_tasks/search_api_test_tasks.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_tasks/search_api_test_tasks.info.yml @@ -7,7 +7,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_views/search_api_test_views.info.yml b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_views/search_api_test_views.info.yml index 1f692bafb..163b10a53 100644 --- a/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_views/search_api_test_views.info.yml +++ b/frontend/drupal9/web/modules/contrib/search_api/tests/modules/search_api_test_views/search_api_test_views.info.yml @@ -12,7 +12,7 @@ dependencies: core_version_requirement: ^9.2 || ^10.0 hidden: true -# Information added by Drupal.org packaging script on 2022-07-07 -version: '8.x-1.24' +# Information added by Drupal.org packaging script on 2022-07-18 +version: '8.x-1.25' project: 'search_api' -datestamp: 1657180588 +datestamp: 1658149520 diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/README.txt b/frontend/drupal9/web/modules/contrib/xmlsitemap/README.txt index 4900aa9d2..10b8b30cb 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/README.txt +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/README.txt @@ -1,87 +1,92 @@ - CONTENTS OF THIS FILE --------------------- * Introduction - * Installing + * Installation * Uninstalling * Frequently Asked Questions (FAQ) * Known Issues * More Information * How Can You Contribute? + * Maintainers INTRODUCTION ------------ -Current Maintainer: Dave Reid -Co-maintainer: Kiam -Co-maintainer: Earnie -Co-maintainer: Darren Oh -Co-maintainer: Andrei-Marius Dincu -Original Author: Matthew Loar - XML Sitemap automatically creates a sitemap that conforms to the sitemaps.org specification. This helps search engines keep their search results up to date. -INSTALLING +INSTALLATION ---------- -See https://www.drupal.org/getting-started/install-contrib for instructions on -how to install or update Drupal modules. + * Install as you would normally install a contributed Drupal module. Visit + https://www.drupal.org/node/1897420 for further information. -Once XML Sitemap is installed and enabled, you can adjust the settings for your -site's sitemap at admin/config/search/xmlsitemap. Your can view your site's -sitemap at http://yoursite.com/sitemap.xml. + * Once XML Sitemap is installed and enabled, you can adjust the settings for your + site's sitemap at admin/config/search/xmlsitemap. Your can view your site's + sitemap at http://yoursite.com/sitemap.xml. -It is highly recommended that you have clean URLs enabled for this module. + * It is highly recommended that you have clean URLs enabled for this module. UNINSTALLING ------------ Because Drupal does not uninstall modules in reverse order of their -dependencies, if you want to uninstall all the XML sitemap modules, be sure to -disable and uninstall all the sub-modules before the base XML sitemap module. +dependencies, if you want to uninstall all the XML Sitemap modules, be sure to +disable and uninstall all the sub-modules before the base XML Sitemap module. To help fix this bug in Drupal core, visit https://www.drupal.org/node/151452. FREQUENTLY ASKED QUESTIONS (FAQ) -------------------------------- -- There are no frequently asked questions at this time. + * There are no frequently asked questions at this time. KNOWN ISSUES ------------ -- See https://www.drupal.org/node/482550 for a list of the current known issues. + * See https://www.drupal.org/node/482550 for a list of the current known issues. MORE INFORMATION ---------------- -- To issue any bug reports, feature or support requests, see the module issue - queue at https://www.drupal.org/project/issues/xmlsitemap. + * To issue any bug reports, feature or support requests, see the module issue + queue at https://www.drupal.org/project/issues/xmlsitemap. -- For additional documentation, see the online module handbook at - https://www.drupal.org/handbook/modules/xmlsitemap. + * For additional documentation, see the online module handbook at + https://www.drupal.org/handbook/modules/xmlsitemap. -- You can view the sitemap.org specification at http://sitemaps.org. + * You can view the sitemap.org specification at http://sitemaps.org. HOW CAN YOU CONTRIBUTE? ----------------------- -- Report any bugs, feature requests, etc. in the issue tracker. + * Report any bugs, feature requests, etc. in the issue tracker. https://www.drupal.org/project/issues/xmlsitemap -- Help translate this module. + * Help translate this module. http://localize.drupal.org/translate/projects/xmlsitemap -- Write a review for this module at drupalmodules.com. + * Write a review for this module at drupalmodules.com. http://drupalmodules.com/module/xml-sitemap -- Help keep development active by donating to the developer. + * Help keep development active by donating to the developer. http://davereid.chipin.com/ + + +MAINTAINERS +------------ + +Current maintainers: + * Dave Reid (Dave Reid) - https://www.drupal.org/user/53892 + * Co-maintainer: Alberto Paderno (apaderno) - https://www.drupal.org/user/55077 + * Co-maintainer: Earnie https://www.drupal.org/user/86710 + * Co-maintainer: Darren Oh - https://www.drupal.org/user/30772> + * Co-maintainer: Andrei Dincu (andrei.dincu) - https://www.drupal.org/user/2628879 + * Original Author: Matthew Loar (SamAMac) - https://www.drupal.org/user/24879 \ No newline at end of file diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/composer.json b/frontend/drupal9/web/modules/contrib/xmlsitemap/composer.json index a5f01c849..532d04f78 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/composer.json +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/xmlsitemap", - "description": "Creates XML sitemaps for the site", + "description": "Creates XML Sitemaps for the site", "type": "drupal-module", "license": "GPL-2.0-or-later", "homepage": "https://www.drupal.org/project/xmlsitemap", @@ -9,9 +9,11 @@ "source": "https://git.drupalcode.org/project/xmlsitemap" }, "require": { + "drupal/core": "^9", "ext-xmlwriter": "*" }, "require-dev": { + "drupal/config_readonly": "^1.0", "drupal/metatag": "^1.0", "drupal/robotstxt": "^1.0" }, diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/config/schema/xmlsitemap.schema.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/config/schema/xmlsitemap.schema.yml index 7500619d7..361b1308b 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/config/schema/xmlsitemap.schema.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/config/schema/xmlsitemap.schema.yml @@ -2,7 +2,7 @@ xmlsitemap.settings: type: config_object - label: 'XML sitemap settings' + label: 'XML Sitemap settings' mapping: minimum_lifetime: type: integer @@ -49,7 +49,7 @@ xmlsitemap.settings: xmlsitemap.settings.*.*: type: config_object - label: 'XML sitemap entity bundle settings' + label: 'XML Sitemap entity bundle settings' mapping: status: type: boolean diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/js/xmlsitemap.js b/frontend/drupal9/web/modules/contrib/xmlsitemap/js/xmlsitemap.js index ba2545c15..f86e4de8f 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/js/xmlsitemap.js +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/js/xmlsitemap.js @@ -1,6 +1,6 @@ /** * @file - * Default JavaScript file for XML sitemap. + * Default JavaScript file for XML Sitemap. */ (function ($, Drupal) { diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Commands/XmlSitemapCommands.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Commands/XmlSitemapCommands.php index 6805c83b3..4cb836642 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Commands/XmlSitemapCommands.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Commands/XmlSitemapCommands.php @@ -8,7 +8,7 @@ use Drupal\Core\Extension\ModuleHandlerInterface; use Drush\Commands\DrushCommands; /** - * Drush commands for XML sitemap. + * Drush commands for XML Sitemap. */ class XmlSitemapCommands extends DrushCommands { @@ -51,7 +51,7 @@ class XmlSitemapCommands extends DrushCommands { } /** - * Regenerate the XML sitemap files. + * Regenerate the XML Sitemap files. * * @validate-module-enabled xmlsitemap * @@ -65,7 +65,7 @@ class XmlSitemapCommands extends DrushCommands { } /** - * Dump and re-process all possible XML sitemap data, then regenerate files. + * Dump and re-process all possible XML Sitemap data, then regenerate files. * * @validate-module-enabled xmlsitemap * @@ -85,7 +85,7 @@ class XmlSitemapCommands extends DrushCommands { } /** - * Process un-indexed XML sitemap links. + * Process un-indexed XML Sitemap links. * * @param array $options * An associative array of options obtained from cli, aliases, config, etc. @@ -106,10 +106,10 @@ class XmlSitemapCommands extends DrushCommands { $count_after = $this->connection->select('xmlsitemap', 'x')->countQuery()->execute()->fetchField(); if ($count_after == $count_before) { - $this->output()->writeln(dt('No new XML sitemap links to index.')); + $this->output()->writeln(dt('No new XML Sitemap links to index.')); } else { - $this->output()->writeln(dt('Indexed @count new XML sitemap links.', ['@count' => $count_after - $count_before])); + $this->output()->writeln(dt('Indexed @count new XML Sitemap links.', ['@count' => $count_after - $count_before])); } } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Controller/XmlSitemapController.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Controller/XmlSitemapController.php index d6e98d604..ccd7535ab 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Controller/XmlSitemapController.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Controller/XmlSitemapController.php @@ -165,7 +165,7 @@ class XmlSitemapController extends ControllerBase { // Make sure the strings in the XSL content are translated properly. $replacements = [ 'Sitemap file' => $this->t('Sitemap file'), - 'Generated by the Drupal XML sitemap module.' => $this->t('Generated by the Drupal XML sitemap module.', ['@link-xmlsitemap' => 'https://www.drupal.org/project/xmlsitemap']), + 'Generated by the Drupal XML Sitemap module.' => $this->t('Generated by the Drupal XML Sitemap module.', ['@link-xmlsitemap' => 'https://www.drupal.org/project/xmlsitemap']), 'Number of sitemaps in this index' => $this->t('Number of sitemaps in this index'), 'Click on the table headers to change sorting.' => $this->t('Click on the table headers to change sorting.'), 'Sitemap URL' => $this->t('Sitemap URL'), diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Entity/XmlSitemap.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Entity/XmlSitemap.php index ff744d565..354c0eb67 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Entity/XmlSitemap.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Entity/XmlSitemap.php @@ -10,7 +10,7 @@ use Drupal\xmlsitemap\XmlSitemapInterface; * * @ConfigEntityType( * id = "xmlsitemap", - * label = @Translation("XML sitemap"), + * label = @Translation("XML Sitemap"), * handlers = { * "storage" = "Drupal\xmlsitemap\XmlSitemapStorage", * "list_builder" = "Drupal\xmlsitemap\XmlSitemapListBuilder", @@ -157,7 +157,7 @@ class XmlSitemap extends ConfigEntityBase implements XmlSitemapInterface { /** * {@inheritdoc} */ - public function setChunks($chunks) { + public function setChunks(int $chunks) { $this->chunks = $chunks; return $this; } @@ -165,7 +165,7 @@ class XmlSitemap extends ConfigEntityBase implements XmlSitemapInterface { /** * {@inheritdoc} */ - public function setLinks($links) { + public function setLinks(int $links) { $this->links = $links; return $this; } @@ -173,7 +173,7 @@ class XmlSitemap extends ConfigEntityBase implements XmlSitemapInterface { /** * {@inheritdoc} */ - public function setMaxFileSize($max_filesize) { + public function setMaxFileSize(int $max_filesize) { $this->max_filesize = $max_filesize; return $this; } @@ -189,7 +189,7 @@ class XmlSitemap extends ConfigEntityBase implements XmlSitemapInterface { /** * {@inheritdoc} */ - public function setUpdated($updated) { + public function setUpdated(int $updated) { $this->updated = $updated; return $this; } @@ -211,4 +211,16 @@ class XmlSitemap extends ConfigEntityBase implements XmlSitemapInterface { return NULL; } + /** + * {@inheritdoc} + */ + public function saveState(): void { + \Drupal::state()->set('xmlsitemap.' . $this->id(), [ + 'chunks' => $this->getChunks(), + 'links' => $this->getLinks(), + 'max_filesize' => $this->getMaxFileSize(), + 'updated' => $this->getUpdated(), + ]); + } + } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapForm.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapForm.php index b7d27ca6e..d11de5211 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapForm.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapForm.php @@ -34,7 +34,7 @@ class XmlSitemapForm extends EntityForm { '#title' => $this->t('Label'), '#maxlength' => 255, '#default_value' => $xmlsitemap->label(), - '#description' => $this->t('Label for the XML sitemap.'), + '#description' => $this->t('Label for the XML Sitemap.'), '#required' => TRUE, ]; $form['context'] = [ @@ -44,7 +44,7 @@ class XmlSitemapForm extends EntityForm { if (!xmlsitemap_get_context_info()) { $form['context']['empty'] = [ '#type' => 'markup', - '#markup' => '

' . $this->t('There are currently no XML sitemap contexts available.') . '

', + '#markup' => '

' . $this->t('There are currently no XML Sitemap contexts available.') . '

', ]; } @@ -84,6 +84,8 @@ class XmlSitemapForm extends EntityForm { } catch (EntityStorageException $ex) { $this->messenger()->addError($this->t('There is another sitemap saved with the same context.')); + $form_state->setRedirect('entity.xmlsitemap.add_form'); + return; } $form_state->setRedirect('xmlsitemap.admin_search'); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapLinkBundleSettingsForm.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapLinkBundleSettingsForm.php index 78ec13902..327714b88 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapLinkBundleSettingsForm.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapLinkBundleSettingsForm.php @@ -72,7 +72,7 @@ class XmlSitemapLinkBundleSettingsForm extends ConfigFormBase { $this->bundle_type = $bundle; $request = $this->getRequest(); - $form['#title'] = $this->t('@bundle XML sitemap settings', ['@bundle' => $bundle]); + $form['#title'] = $this->t('@bundle XML Sitemap settings', ['@bundle' => $bundle]); xmlsitemap_add_link_bundle_settings($form, $form_state, $entity, $bundle); $form['xmlsitemap']['#type'] = 'markup'; @@ -118,7 +118,7 @@ class XmlSitemapLinkBundleSettingsForm extends ConfigFormBase { $entity_info = $form['xmlsitemap']['#entity_info']; if (!empty($form['xmlsitemap']['#show_message'])) { - $this->messenger()->addStatus($this->t('XML sitemap settings for the %bundle have been saved.', ['%bundle' => $entity_info['bundles'][$bundle]['label']])); + $this->messenger()->addStatus($this->t('XML Sitemap settings for the %bundle have been saved.', ['%bundle' => $entity_info['bundles'][$bundle]['label']])); } // Unset the form values since we have already saved the bundle settings and diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapRebuildForm.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapRebuildForm.php index b32b6dba5..7ad3453aa 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapRebuildForm.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapRebuildForm.php @@ -70,7 +70,7 @@ class XmlSitemapRebuildForm extends ConfigFormBase { } else { $request->query->set('destination', 'admin/config/search/xmlsitemap'); - $this->messenger()->addWarning($this->t('A rebuild is not necessary. If you are just wanting to regenerate the XML sitemap files, you can run cron manually.', [ + $this->messenger()->addWarning($this->t('A rebuild is not necessary. If you are just wanting to regenerate the XML Sitemap files, you can run cron manually.', [ '@link-cron' => Url::fromRoute('system.run_cron', [], ['query' => $this->getDestinationArray()]), ])); $this->setRequest($request); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapSettingsForm.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapSettingsForm.php index a3a5b8588..8c4fb4278 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapSettingsForm.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/Form/XmlSitemapSettingsForm.php @@ -130,7 +130,7 @@ class XmlSitemapSettingsForm extends ConfigFormBase { $form['xsl'] = [ '#type' => 'checkbox', '#title' => $this->t('Include a stylesheet in the sitemaps for humans.'), - '#description' => $this->t('When enabled, this will add formatting and tables with sorting to make it easier to view the XML sitemap data instead of viewing raw XML output. Search engines will ignore this.'), + '#description' => $this->t('When enabled, this will add formatting and tables with sorting to make it easier to view the XML Sitemap data instead of viewing raw XML output. Search engines will ignore this.'), '#default_value' => $config->get('xsl'), ]; $form['prefetch_aliases'] = [ @@ -196,7 +196,7 @@ class XmlSitemapSettingsForm extends ConfigFormBase { '#default_value' => $config->get('path'), '#size' => 30, '#maxlength' => 255, - '#description' => $this->t('Subdirectory where the sitemap data will be stored. This folder must not be shared with any other Drupal site or install using XML sitemap.'), + '#description' => $this->t('Subdirectory where the sitemap data will be stored. This folder must not be shared with any other Drupal site or install using XML Sitemap.'), '#field_prefix' => file_build_uri(''), '#required' => TRUE, ]; diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGenerator.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGenerator.php index 16fd9241a..9202c2588 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGenerator.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGenerator.php @@ -205,7 +205,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface { $this->setMemoryLimit(); if ($this->state->get('xmlsitemap_developer_mode')) { - $this->logger->notice('Starting XML sitemap generation. Memory usage: @memory-peak.', [ + $this->logger->notice('Starting XML Sitemap generation. Memory usage: @memory-peak.', [ '@memory-peak' => format_size(memory_get_peak_usage(TRUE)), ]); } @@ -318,7 +318,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface { // Ensure every link starts with a slash. // @see \Drupal\Core\Url::fromInternalUri() if ($link['loc'][0] !== '/') { - trigger_error("The XML sitemap link path {$link['loc']} for {$link['type']} {$link['id']} is invalid because it does not start with a slash.", E_USER_ERROR); + trigger_error("The XML Sitemap link path {$link['loc']} for {$link['type']} {$link['id']} is invalid because it does not start with a slash.", E_USER_ERROR); $link['loc'] = '/' . $link['loc']; } @@ -457,7 +457,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface { $context['sandbox']['max'] = $sitemap->getChunks(); $sitemap->setUpdated($this->time->getRequestTime()); xmlsitemap_sitemap_get_max_filesize($sitemap); - xmlsitemap_sitemap_save($sitemap); + $sitemap->saveState(); $context['finished'] = 1; return; @@ -496,7 +496,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface { $this->messenger->addStatus($this->t('The sitemaps were regenerated.')); // Show a watchdog message that the sitemap was regenerated. - $this->logger->notice('Finished XML sitemap generation in @elapsed. Memory usage: @memory-peak.', ['@elapsed' => $elapsed, '@memory-peak' => format_size(memory_get_peak_usage(TRUE))]); + $this->logger->notice('Finished XML Sitemap generation in @elapsed. Memory usage: @memory-peak.', ['@elapsed' => $elapsed, '@memory-peak' => format_size(memory_get_peak_usage(TRUE))]); } else { $this->messenger->addError($this->t('The sitemaps were not successfully regenerated.')); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGeneratorInterface.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGeneratorInterface.php index 087bdb6ac..2ebeaacbd 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGeneratorInterface.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapGeneratorInterface.php @@ -61,7 +61,7 @@ interface XmlSitemapGeneratorInterface { * Generate one page (chunk) of the sitemap. * * @param XmlSitemapInterface $sitemap - * An unserialized data array for an XML sitemap. + * An unserialized data array for an XML Sitemap. * @param string $page * An integer of the specific page of the sitemap to generate. */ @@ -71,7 +71,7 @@ interface XmlSitemapGeneratorInterface { * Generates one chunk of the sitemap. * * @param \Drupal\xmlsitemap\XmlSitemapInterface $sitemap - * The XML sitemap config entity. + * The XML Sitemap config entity. * @param \Drupal\xmlsitemap\XmlSitemapWriter $writer * XML writer object. * @param int $chunk @@ -83,7 +83,7 @@ interface XmlSitemapGeneratorInterface { * Generate the index sitemap. * * @param \Drupal\xmlsitemap\XmlSitemapInterface $sitemap - * The XML sitemap config entity. + * The XML Sitemap config entity. * @param int|null $pages * The number of pages to write in the sitemap. Defaults to the value of * $sitemap->getChunks(). diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapInterface.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapInterface.php index 66b7e89ce..1d7ec50cd 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapInterface.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapInterface.php @@ -20,7 +20,7 @@ interface XmlSitemapInterface extends ConfigEntityInterface { /** * Returns the sitemap chunks number. * - * @return int + * @return int|null * The chunks number. */ public function getChunks(); @@ -28,7 +28,7 @@ interface XmlSitemapInterface extends ConfigEntityInterface { /** * Returns the sitemap links number. * - * @return int + * @return int|null * The links number. */ public function getLinks(); @@ -36,7 +36,7 @@ interface XmlSitemapInterface extends ConfigEntityInterface { /** * Returns the sitemap maximum file size. * - * @return int + * @return int|null * The maximum file size. */ public function getMaxFileSize(); @@ -50,10 +50,10 @@ interface XmlSitemapInterface extends ConfigEntityInterface { public function getContext(); /** - * Returns the sitemap context. + * Returns the timestamp of when the sitemap was last updated. * - * @return array - * The context. + * @return int|null + * The timestamp. */ public function getUpdated(); @@ -82,24 +82,24 @@ interface XmlSitemapInterface extends ConfigEntityInterface { /** * Sets the number of chunks. * - * @param string $chunks + * @param int $chunks * The number of chunks. * * @return \Drupal\xmlsitemap\XmlSitemapInterface * The class instance that this method is called on. */ - public function setChunks($chunks); + public function setChunks(int $chunks); /** * Sets the number of links. * - * @param string $links + * @param int $links * The number of links. * * @return \Drupal\xmlsitemap\XmlSitemapInterface * The class instance that this method is called on. */ - public function setLinks($links); + public function setLinks(int $links); /** * Sets the maximum file size of the sitemap. @@ -110,7 +110,7 @@ interface XmlSitemapInterface extends ConfigEntityInterface { * @return \Drupal\xmlsitemap\XmlSitemapInterface * The class instance that this method is called on. */ - public function setMaxFileSize($max_filesize); + public function setMaxFileSize(int $max_filesize); /** * Sets the context for the sitemap. @@ -124,21 +124,21 @@ interface XmlSitemapInterface extends ConfigEntityInterface { public function setContext($context); /** - * Sets if the sitemap was updated. + * Sets the timestamp of when the sitemap was updated. * - * @param bool $updated - * Check is sitemap was updated. + * @param int $updated + * The timestamp. * * @return \Drupal\xmlsitemap\XmlSitemapInterface * The class instance that this method is called on. */ - public function setUpdated($updated); + public function setUpdated(int $updated); /** * Returns the sitemap with the context specified as parameter. * * @param array $context - * An optional XML sitemap context array to use to find the correct XML + * An optional XML Sitemap context array to use to find the correct XML * sitemap. If not provided, the current site's context will be used. * * @return \Drupal\xmlsitemap\XmlSitemapInterface @@ -146,4 +146,9 @@ interface XmlSitemapInterface extends ConfigEntityInterface { */ public static function loadByContext(array $context = NULL); + /** + * Save the state information about the sitemap. + */ + public function saveState(): void; + } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapLinkStorage.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapLinkStorage.php index 15c4f6b25..2a641c60d 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapLinkStorage.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapLinkStorage.php @@ -155,17 +155,17 @@ class XmlSitemapLinkStorage implements XmlSitemapLinkStorageInterface { // Temporary validation checks. // @todo Remove in final? if ($link['priority'] < 0 || $link['priority'] > 1) { - trigger_error("The XML sitemap link for {$link['type']} {$link['id']} has an invalid priority of {$link['priority']}.
" . var_export($link, TRUE), E_USER_ERROR); + trigger_error("The XML Sitemap link for {$link['type']} {$link['id']} has an invalid priority of {$link['priority']}.
" . var_export($link, TRUE), E_USER_ERROR); } if ($link['changecount'] < 0) { - trigger_error("The XML sitemap link for {$link['type']} {$link['id']} has a negative changecount value. Please report this to https://www.drupal.org/node/516928.
" . var_export($link, TRUE), E_USER_ERROR); + trigger_error("The XML Sitemap link for {$link['type']} {$link['id']} has a negative changecount value. Please report this to https://www.drupal.org/node/516928.
" . var_export($link, TRUE), E_USER_ERROR); $link['changecount'] = 0; } // Throw an error with the link does not start with a slash. // @see \Drupal\Core\Url::fromInternalUri() if ($link['loc'][0] !== '/') { - trigger_error("The XML sitemap link path {$link['loc']} for {$link['type']} {$link['id']} is invalid because it does not start with a slash.", E_USER_ERROR); + trigger_error("The XML Sitemap link path {$link['loc']} for {$link['type']} {$link['id']} is invalid because it does not start with a slash.", E_USER_ERROR); } // Check if this is a changed link and set the regenerate flag if necessary. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapListBuilder.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapListBuilder.php index f30ae2071..0abbc1207 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapListBuilder.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapListBuilder.php @@ -72,7 +72,7 @@ class XmlSitemapListBuilder extends ConfigEntityListBuilder { * {@inheritdoc} */ public function buildHeader() { - $header['label'] = $this->t('XmlSitemap'); + $header['label'] = $this->t('XML Sitemap'); if ($this->moduleHandler->moduleExists('language')) { $header['language'] = $this->t('Language'); } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapWriter.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapWriter.php index e00c82e51..9908d5eaa 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapWriter.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/src/XmlSitemapWriter.php @@ -7,7 +7,7 @@ use Drupal\Core\Template\Attribute; use Drupal\Core\Url; /** - * Extended class for writing XML sitemap files. + * Extended class for writing XML Sitemap files. */ class XmlSitemapWriter extends \XMLWriter { @@ -50,7 +50,7 @@ class XmlSitemapWriter extends \XMLWriter { * Constructors and XmlSitemapWriter object. * * @param \Drupal\xmlsitemap\XmlSitemapInterface $sitemap - * The XML sitemap. + * The XML Sitemap. * @param int|string $page * The current page of the sitemap being generated. * @@ -61,7 +61,7 @@ class XmlSitemapWriter extends \XMLWriter { */ public function __construct(XmlSitemapInterface $sitemap, $page) { if ($page !== 'index' && !filter_var($page, FILTER_VALIDATE_INT)) { - throw new \InvalidArgumentException("Invalid XML sitemap page $page."); + throw new \InvalidArgumentException("Invalid XML Sitemap page $page."); } $this->sitemap = $sitemap; @@ -185,7 +185,7 @@ class XmlSitemapWriter extends \XMLWriter { } /** - * Writes an full XML sitemap element tag. + * Writes an full XML Sitemap element tag. * * @param string $name * The element name. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapEntityFunctionalTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapEntityFunctionalTest.php index 1b2815f2e..a24cecdc9 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapEntityFunctionalTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapEntityFunctionalTest.php @@ -16,7 +16,7 @@ class XmlSitemapEntityFunctionalTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['entity_test']; + protected static $modules = ['entity_test']; /** * {@inheritdoc} diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapFunctionalTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapFunctionalTest.php index da6210ffb..f4f11d40f 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapFunctionalTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapFunctionalTest.php @@ -12,7 +12,7 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['path', 'help']; + protected static $modules = ['path', 'help']; /** * {@inheritdoc} @@ -86,7 +86,7 @@ class XmlSitemapFunctionalTest extends XmlSitemapTestBase { $this->drupalLogin($this->admin_user); $this->state->set('xmlsitemap_generated_last', $this->time->getRequestTime()); $this->state->set('xmlsitemap_rebuild_needed', TRUE); - $this->assertXMLSitemapProblems('The XML sitemap data is out of sync and needs to be completely rebuilt.'); + $this->assertXMLSitemapProblems('The XML Sitemap data is out of sync and needs to be completely rebuilt.'); $this->clickLink('completely rebuilt'); $this->assertSession()->statusCodeEquals(200); $this->state->set('xmlsitemap_rebuild_needed', FALSE); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapListBuilderTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapListBuilderTest.php index 1479b669f..115e8a4df 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapListBuilderTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapListBuilderTest.php @@ -16,7 +16,7 @@ class XmlSitemapListBuilderTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['language', 'locale', 'content_translation']; + protected static $modules = ['language', 'locale', 'content_translation']; /** * Entity type manager service. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMenuFunctionalTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMenuFunctionalTest.php index d5f686996..1c4d4b2ad 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMenuFunctionalTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMenuFunctionalTest.php @@ -15,7 +15,7 @@ class XmlSitemapMenuFunctionalTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['menu_link_content', 'menu_ui']; + protected static $modules = ['menu_link_content', 'menu_ui']; /** * Entity type bundle info service. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualNodeTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualNodeTest.php index 0694e0845..339130674 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualNodeTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualNodeTest.php @@ -16,7 +16,7 @@ class XmlSitemapMultilingualNodeTest extends XmlSitemapMultilingualTestBase { /** * {@inheritdoc} */ - public static $modules = ['config_translation']; + protected static $modules = ['config_translation']; /** * {@inheritdoc} diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualTestBase.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualTestBase.php index fcbeae9ff..f03efd8e4 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualTestBase.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapMultilingualTestBase.php @@ -6,14 +6,14 @@ use Drupal\language\Entity\ConfigurableLanguage; use Drupal\xmlsitemap\Entity\XmlSitemap; /** - * Common base test class for XML sitemap internationalization tests. + * Common base test class for XML Sitemap internationalization tests. */ abstract class XmlSitemapMultilingualTestBase extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['language', 'locale', 'content_translation']; + protected static $modules = ['language', 'locale', 'content_translation']; /** * Set up an administrative user account and testing keys. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapNodeFunctionalTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapNodeFunctionalTest.php index c65842f8e..2c30a67c3 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapNodeFunctionalTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapNodeFunctionalTest.php @@ -23,7 +23,7 @@ class XmlSitemapNodeFunctionalTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['taxonomy']; + protected static $modules = ['taxonomy']; /** * Nodes created during the test for testCron() method. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRebuildTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRebuildTest.php index cb4428fde..44b21cb55 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRebuildTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRebuildTest.php @@ -15,7 +15,7 @@ class XmlSitemapRebuildTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['path', 'help', 'block']; + protected static $modules = ['path', 'help', 'block']; /** * {@inheritdoc} @@ -42,7 +42,7 @@ class XmlSitemapRebuildTest extends XmlSitemapTestBase { $this->drupalLogin($this->admin_user); $this->drupalGet('admin/config/search/xmlsitemap/rebuild'); $this->assertSession()->statusCodeEquals(200); - $this->assertSession()->pageTextContains("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies."); + $this->assertSession()->pageTextContains("This action rebuilds your site's XML Sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML Sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies."); $this->drupalPostForm(NULL, [], 'Save configuration'); $this->assertSession()->pageTextContains('The sitemap links were rebuilt.'); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRobotsTxtIntegrationTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRobotsTxtIntegrationTest.php index 9db1b426c..7cc998658 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRobotsTxtIntegrationTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapRobotsTxtIntegrationTest.php @@ -9,14 +9,13 @@ use Drupal\xmlsitemap\Entity\XmlSitemap; * Tests the robots.txt file existence. * * @group xmlsitemap - * @dependencies robotstxt */ class XmlSitemapRobotsTxtIntegrationTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['robotstxt']; + protected static $modules = ['robotstxt']; /** * Test if sitemap link is included in robots.txt file. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTaxonomyFunctionalTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTaxonomyFunctionalTest.php index 5a9a8eb96..97d12693e 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTaxonomyFunctionalTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTaxonomyFunctionalTest.php @@ -15,7 +15,7 @@ class XmlSitemapTaxonomyFunctionalTest extends XmlSitemapTestBase { /** * {@inheritdoc} */ - public static $modules = ['taxonomy']; + protected static $modules = ['taxonomy']; /** * {@inheritdoc} diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTestBase.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTestBase.php index 1336503bb..405578fe0 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTestBase.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapTestBase.php @@ -25,7 +25,7 @@ abstract class XmlSitemapTestBase extends BrowserTestBase { * * @var array */ - public static $modules = ['node', 'system', 'user', 'xmlsitemap']; + protected static $modules = ['node', 'system', 'user', 'xmlsitemap']; /** * The admin user account. @@ -159,10 +159,10 @@ abstract class XmlSitemapTestBase extends BrowserTestBase { } /** - * Retrieves an XML sitemap. + * Retrieves an XML Sitemap. * * @param array $context - * An optional array of the XML sitemap's context. + * An optional array of the XML Sitemap's context. * @param array $options * Options to be forwarded to Url::fromUri(). These values will be merged * with, but always override $sitemap->uri['options']. @@ -189,7 +189,7 @@ abstract class XmlSitemapTestBase extends BrowserTestBase { $this->state->set('xmlsitemap_regenerate_needed', TRUE); $this->state->set('xmlsitemap_generated_last', 0); $this->cronRun(); - $this->assertTrue($this->state->get('xmlsitemap_generated_last') && !$this->state->get('xmlsitemap_regenerate_needed'), t('XML sitemaps regenerated and flag cleared.')); + $this->assertTrue($this->state->get('xmlsitemap_generated_last') && !$this->state->get('xmlsitemap_regenerate_needed'), t('XML Sitemaps regenerated and flag cleared.')); } /** @@ -371,7 +371,7 @@ abstract class XmlSitemapTestBase extends BrowserTestBase { protected function assertXMLSitemapProblems($problem_text = FALSE) { // @codingStandardsIgnoreEnd $this->drupalGet('admin/config/search/xmlsitemap'); - $this->assertSession()->pageTextContains('One or more problems were detected with your XML sitemap configuration'); + $this->assertSession()->pageTextContains('One or more problems were detected with your XML Sitemap configuration'); if ($problem_text) { $this->clickLink('status report'); $this->assertSession()->pageTextContains($problem_text); @@ -386,7 +386,7 @@ abstract class XmlSitemapTestBase extends BrowserTestBase { protected function assertNoXMLSitemapProblems() { // @codingStandardsIgnoreEnd $this->drupalGet('admin/config/search/xmlsitemap'); - $this->assertSession()->pageTextNotContains('One or more problems were detected with your XML sitemap configuration'); + $this->assertSession()->pageTextNotContains('One or more problems were detected with your XML Sitemap configuration'); } /** diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapUnitTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapUnitTest.php index f9f4e75a6..0cad2a184 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapUnitTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Functional/XmlSitemapUnitTest.php @@ -3,7 +3,7 @@ namespace Drupal\Tests\xmlsitemap\Functional; /** - * Unit tests for the XML sitemap module. + * Unit tests for the XML Sitemap module. * * @group xmlsitemap */ @@ -66,7 +66,7 @@ class XmlSitemapUnitTest extends XmlSitemapTestBase { foreach ($values as $i => $value) { $actual = xmlsitemap_get_changefreq($value); - $this->assertSame($expected[$i], $actual); + $this->assertEquals($expected[$i], $actual); } } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/ConfigReadOnlyTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/ConfigReadOnlyTest.php new file mode 100644 index 000000000..6936d4ec7 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/ConfigReadOnlyTest.php @@ -0,0 +1,70 @@ +setLinks(1); + $this->expectException(ConfigReadonlyStorageException::class); + $sitemap->save(); + } + + /** + * Tests that generating the sitemaps will not throw a config exception. + */ + public function testSitemapGeneration() { + // Load the default sitemap. + $sitemaps = XmlSitemap::loadMultiple(); + $sitemap = reset($sitemaps); + + $this->assertNull($sitemap->getLinks()); + $this->assertNull($sitemap->getChunks()); + $this->assertNull($sitemap->getMaxFileSize()); + $this->assertNull($sitemap->getUpdated()); + + // Run sitemap generation. + xmlsitemap_run_unprogressive_batch('xmlsitemap_regenerate_batch'); + + // Test that the state was updated correctly after generation. + $sitemap = Xmlsitemap::load($sitemap->id()); + $this->assertSame(1, $sitemap->getLinks()); + $this->assertSame(1, $sitemap->getChunks()); + $this->assertGreaterThan(0, $sitemap->getMaxFileSize()); + $this->assertGreaterThan(0, $sitemap->getUpdated()); + } + +} diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/DirectoryTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/DirectoryTest.php index 65e8eb4d1..451b7beac 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/DirectoryTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/DirectoryTest.php @@ -25,8 +25,8 @@ class DirectoryTest extends KernelTestBase { $fileSystem->prepareDirectory($directory, $fileSystem::CREATE_DIRECTORY | $fileSystem::MODIFY_PERMISSIONS); $directory = 'public://xmlsitemap/test'; $fileSystem->prepareDirectory($directory, $fileSystem::CREATE_DIRECTORY | $fileSystem::MODIFY_PERMISSIONS); - $fileSystem->saveData('File unrelated to XML sitemap', 'public://not-xmlsitemap/file.txt'); - $fileSystem->saveData('File unrelated to XML sitemap', 'public://file.txt'); + $fileSystem->saveData('File unrelated to XML Sitemap', 'public://not-xmlsitemap/file.txt'); + $fileSystem->saveData('File unrelated to XML Sitemap', 'public://file.txt'); $fileSystem->saveData('Test contents', 'public://xmlsitemap/test/index.xml'); // Test that only the xmlsitemap directory was deleted. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/KernelTestBase.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/KernelTestBase.php index b9cc07358..759390aad 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/KernelTestBase.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/KernelTestBase.php @@ -43,6 +43,7 @@ abstract class KernelTestBase extends CoreKernelTestBase { parent::setUp(); $this->installSchema('xmlsitemap', ['xmlsitemap']); + $this->installSchema('system', ['sequences']); $this->installConfig('xmlsitemap'); // Install hooks are not run with kernel tests. diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/MetatagNoIndexTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/MetatagNoIndexTest.php index 3b6ff2177..04b4802f6 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/MetatagNoIndexTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/MetatagNoIndexTest.php @@ -42,7 +42,6 @@ class MetatagNoIndexTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); $this->installConfig(['system', 'user', 'field', 'metatag']); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/XmlSitemapWriterTest.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/XmlSitemapWriterTest.php index d958ac643..ce088e519 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/XmlSitemapWriterTest.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/tests/src/Kernel/XmlSitemapWriterTest.php @@ -30,7 +30,7 @@ class XmlSitemapWriterTest extends KernelTestBase { * @covers ::__construct */ public function testInvalidPage() { - $this->expectExceptionObject(new \InvalidArgumentException("Invalid XML sitemap page invalid.")); + $this->expectExceptionObject(new \InvalidArgumentException("Invalid XML Sitemap page invalid.")); new XmlSitemapWriter($this->sitemap, 'invalid'); } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.api.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.api.php index 03d7b5299..c14f85417 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.api.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.api.php @@ -2,7 +2,7 @@ /** * @file - * Hooks provided by the XML sitemap module. + * Hooks provided by the XML Sitemap module. * * @ingroup xmlsitemap */ @@ -40,7 +40,7 @@ function hook_xmlsitemap_link_info() { 'process callback' => 'mymodule_xmlsitemap_process_links', // Callback function used in batch API for rebuilding all links. 'rebuild callback' => 'mymodule_xmlsitemap_rebuild_links', - // Callback function called from the XML sitemap settings page. + // Callback function called from the XML Sitemap settings page. 'settings callback' => 'mymodule_xmlsitemap_settings', ], ], @@ -62,10 +62,10 @@ function hook_xmlsitemap_link_alter(array &$link, array $context) { } /** - * Inform modules that an XML sitemap link has been created. + * Inform modules that an XML Sitemap link has been created. * * @param array $link - * Associative array defining an XML sitemap link as passed into + * Associative array defining an XML Sitemap link as passed into * \Drupal\xmlsitemap\XmlSitemapLinkStorageInterface::save(). * @param array $context * An optional context array containing data related to the link. @@ -83,10 +83,10 @@ function hook_xmlsitemap_link_insert(array $link, array $context) { } /** - * Inform modules that an XML sitemap link has been updated. + * Inform modules that an XML Sitemap link has been updated. * * @param array $link - * Associative array defining an XML sitemap link as passed into + * Associative array defining an XML Sitemap link as passed into * \Drupal\xmlsitemap\XmlSitemapLinkStorageInterface::save(). * @param array $context * An optional context array containing data related to the link. @@ -104,7 +104,7 @@ function hook_xmlsitemap_link_update(array $link, array $context) { } /** - * Respond to XML sitemap link clearing and rebuilding. + * Respond to XML Sitemap link clearing and rebuilding. * * @param array $entity_type_ids * An array of entity type IDs that are being rebuilt. @@ -118,14 +118,14 @@ function hook_xmlsitemap_rebuild_clear(array $entity_type_ids, $save_custom) { } /** - * Index links for the XML sitemaps. + * Index links for the XML Sitemaps. */ function hook_xmlsitemap_index_links($limit) { } /** - * Provide information about contexts available to XML sitemap. + * Provide information about contexts available to XML Sitemap. * * @see hook_xmlsitemap_context_info_alter() */ @@ -139,7 +139,7 @@ function hook_xmlsitemap_context_info() { } /** - * Alter XML sitemap context info. + * Alter XML Sitemap context info. * * @see hook_xmlsitemap_context_info() */ @@ -173,21 +173,21 @@ function hook_xmlsitemap_context_alter(&$context) { } /** - * Provide options for the url() function based on an XML sitemap context. + * Provide options for the url() function based on an XML Sitemap context. */ function hook_xmlsitemap_context_url_options(array $context) { } /** - * Alter the url() options based on an XML sitemap context. + * Alter the url() options based on an XML Sitemap context. */ function hook_xmlsitemap_context_url_options_alter(array &$options, array $context) { } /** - * Alter the content added to an XML sitemap for an individual element. + * Alter the content added to an XML Sitemap for an individual element. * * This hooks is called when the module is generating the XML content for the * sitemap and allows other modules to alter existing or add additional XML data @@ -221,7 +221,7 @@ function hook_xmlsitemap_element_alter(array &$element, array $link, \Drupal\xml } /** - * Alter the attributes used for the root element of the XML sitemap. + * Alter the attributes used for the root element of the XML Sitemap. * * For example add an xmlns:video attribute: * @@ -263,20 +263,20 @@ function hook_query_xmlsitemap_generate_alter(QueryAlterableInterface $query) { } /** - * Provide information about XML sitemap bulk operations. + * Provide information about XML Sitemap bulk operations. */ function hook_xmlsitemap_sitemap_operations() { } /** - * Respond to XML sitemap deletion. + * Respond to XML Sitemap deletion. * * This hook is invoked from xmlsitemap_sitemap_delete_multiple() after the XML * sitemap has been removed from the table in the database. * * @param \Drupal\xmlsitemap\XmlSitemapInterface $sitemap - * The XML sitemap object that was deleted. + * The XML Sitemap object that was deleted. */ function hook_xmlsitemap_sitemap_delete(\Drupal\xmlsitemap\XmlSitemapInterface $sitemap) { \Drupal::database()->query("DELETE FROM {mytable} WHERE smid = '%s'", $sitemap->smid); diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.drush.inc b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.drush.inc index f7f0cda23..b5c7edac4 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.drush.inc +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.drush.inc @@ -12,17 +12,17 @@ */ function xmlsitemap_drush_command() { $items['xmlsitemap-regenerate'] = [ - 'description' => 'Regenerate the XML sitemap files.', + 'description' => 'Regenerate the XML Sitemap files.', 'callback' => 'drush_xmlsitemap_regenerate', 'drupal dependencies' => ['xmlsitemap'], ]; $items['xmlsitemap-rebuild'] = [ - 'description' => 'Dump and re-process all possible XML sitemap data, and then regenerate the files.', + 'description' => 'Dump and re-process all possible XML Sitemap data, and then regenerate the files.', 'callback' => 'drush_xmlsitemap_rebuild', 'drupal dependencies' => ['xmlsitemap'], ]; $items['xmlsitemap-index'] = [ - 'description' => 'Process un-indexed XML sitemap links.', + 'description' => 'Process un-indexed XML Sitemap links.', 'callback' => 'drush_xmlsitemap_index', 'drupal dependencies' => ['xmlsitemap'], 'options' => [ @@ -57,7 +57,7 @@ function drush_xmlsitemap_rebuild() { } /** - * Process un-indexed XML sitemap links. + * Process un-indexed XML Sitemap links. */ function drush_xmlsitemap_index() { $limit = (int) drush_get_option('limit', \Drupal::config('xmlsitemap.settings')->get('batch_limit')); @@ -68,9 +68,9 @@ function drush_xmlsitemap_index() { $count_after = \Drupal::database()->select('xmlsitemap', 'x')->countQuery()->execute()->fetchField(); if ($count_after == $count_before) { - drush_print(dt('No new XML sitemap links to index.')); + drush_print(dt('No new XML Sitemap links to index.')); } else { - drush_print(dt('Indexed @count new XML sitemap links.', ['@count' => $count_after - $count_before])); + drush_print(dt('Indexed @count new XML Sitemap links.', ['@count' => $count_after - $count_before])); } } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.info.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.info.yml index 3300ed7d4..d7b2a2c0e 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.info.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.info.yml @@ -1,14 +1,15 @@ name: XML Sitemap type: module -description: 'Creates an XML sitemap conforming to the sitemaps.org protocol.' +description: 'Creates an XML Sitemap conforming to the sitemaps.org protocol.' package: 'XML Sitemap' -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^9 configure: xmlsitemap.admin_search test_dependencies: - metatag:metatag - robotstxt:robotstxt + - config_readonly:config_readonly -# Information added by Drupal.org packaging script on 2021-12-02 -version: '8.x-1.2' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '8.x-1.3' project: 'xmlsitemap' -datestamp: 1638486170 +datestamp: 1658327439 diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.install b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.install index fc5daf5de..242bddfa6 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.install +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.install @@ -27,10 +27,10 @@ function xmlsitemap_requirements($phase) { if (!empty($missing_extensions)) { $items = ['#theme' => 'item_list', '#items' => $missing_extensions]; $requirements['xmlsitemap_php_extensions'] = [ - 'title' => $t('XML sitemap PHP extensions'), + 'title' => $t('XML Sitemap PHP extensions'), 'value' => $t('Disabled'), 'severity' => REQUIREMENT_ERROR, - 'description' => $t("The XML sitemap module requires you to enable the PHP extensions in the following list (see the module's system requirements page for more information): @extensions", [ + 'description' => $t("The XML Sitemap module requires you to enable the PHP extensions in the following list (see the module's system requirements page for more information): @extensions", [ '@xmlsitemap_requirements' => 'https://www.drupal.org/documentation/modules/xmlsitemap/requirements', '@extensions' => \Drupal::service('renderer')->renderPlain($items), ]), @@ -42,16 +42,16 @@ function xmlsitemap_requirements($phase) { // the root directory. if (\Drupal::config('xmlsitemap.settings')->get('clean_url') && file_exists(DRUPAL_ROOT . '/sitemap.xml')) { $requirements['xmlsitemap_file'] = [ - 'title' => $t('XML sitemap'), + 'title' => $t('XML Sitemap'), 'value' => $t('Existing sitemap.xml file found.'), 'severity' => REQUIREMENT_ERROR, - 'description' => $t('The XML sitemap module cannot display its XML output if there is an existing sitemap.xml file in your website root.'), + 'description' => $t('The XML Sitemap module cannot display its XML output if there is an existing sitemap.xml file in your website root.'), ]; } // Check that the base directory and all its subdirectories are writable. $requirements['xmlsitemap_directory'] = [ - 'title' => $t('XML sitemap cache directory'), + 'title' => $t('XML Sitemap cache directory'), 'value' => $t('Writable'), ]; if (!xmlsitemap_check_directory()) { @@ -86,7 +86,7 @@ function xmlsitemap_requirements($phase) { $max_links_limit = XMLSITEMAP_MAX_SITEMAP_LINKS * XMLSITEMAP_MAX_SITEMAP_LINKS; if ($max_links > $max_links_limit) { $requirements['xmlsitemap_link_count'] = [ - 'title' => $t('XML sitemap link count'), + 'title' => $t('XML Sitemap link count'), 'value' => $max_links, 'description' => $t('You have exceeded the number of links that your sitemap can contain (@num).', ['@num' => number_format($max_links)]), 'severity' => REQUIREMENT_ERROR, @@ -96,7 +96,7 @@ function xmlsitemap_requirements($phase) { // The maximum number of chunks in a sitemap. if ($max_chunks > XMLSITEMAP_MAX_SITEMAP_LINKS) { $requirements['xmlsitemap_chunk_count'] = [ - 'title' => $t('XML sitemap page count'), + 'title' => $t('XML Sitemap page count'), 'value' => $max_chunks, 'description' => $t('You have exceeded the number of sitemap pages (@number).', ['@number' => number_format(XMLSITEMAP_MAX_SITEMAP_LINKS)]), 'severity' => REQUIREMENT_ERROR, @@ -108,7 +108,7 @@ function xmlsitemap_requirements($phase) { // Check maximum file size. $requirements['xmlsitemap_file_size'] = [ - 'title' => $t('XML sitemap maximum file size'), + 'title' => $t('XML Sitemap maximum file size'), 'value' => format_size($max_filesize), ]; if ($max_filesize > XMLSITEMAP_MAX_SITEMAP_FILESIZE) { @@ -123,7 +123,7 @@ function xmlsitemap_requirements($phase) { $generated_last = \Drupal::state()->get('xmlsitemap_generated_last', 0); $generated_ago = \Drupal::time()->getRequestTime() - $generated_last; $requirements['xmlsitemap_generated'] = [ - 'title' => $t('XML sitemap'), + 'title' => $t('XML Sitemap'), 'value' => $generated_last ? $t('Last attempted generation on @date (@interval ago).', [ '@date' => \Drupal::service('date.formatter')->format($generated_last, 'small'), '@interval' => \Drupal::service('date.formatter')->formatInterval($generated_ago), @@ -132,7 +132,7 @@ function xmlsitemap_requirements($phase) { ]; if (\Drupal::state()->get('xmlsitemap_rebuild_needed')) { $requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_ERROR; - $requirements['xmlsitemap_generated']['description'] = $t('The XML sitemap data is out of sync and needs to be completely rebuilt.', ['@link-rebuild' => Url::fromRoute('xmlsitemap.admin_rebuild')->toString()]); + $requirements['xmlsitemap_generated']['description'] = $t('The XML Sitemap data is out of sync and needs to be completely rebuilt.', ['@link-rebuild' => Url::fromRoute('xmlsitemap.admin_rebuild')->toString()]); } elseif (\Drupal::state()->get('xmlsitemap_regenerate_needed')) { $last_run = $generated_last; @@ -171,7 +171,7 @@ function xmlsitemap_requirements($phase) { if (!$anonymous_accout->hasPermission('access user profiles') && xmlsitemap_link_bundle_check_enabled('user', 'user')) { $requirements['xmlsitemap_user_anonymous_permission'] = [ - 'title' => $t('XML sitemap user'), + 'title' => $t('XML Sitemap user'), 'value' => $t('Anonymous access to user profiles'), 'description' => $t('In order to list user profile links in the sitemap, the anonymous user must have the View user profiles permission.', [ '@perm-link' => Url::fromRoute('entity.user_role.edit_permissions_form', ['user_role' => RoleInterface::ANONYMOUS_ID], ['fragment' => 'module-user'])->toString(), diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.links.menu.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.links.menu.yml index c160cb716..35972afa2 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.links.menu.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.links.menu.yml @@ -1,6 +1,6 @@ xmlsitemap.admin_search: title: 'XML Sitemap' - description: 'Configure your site''s XML sitemaps to help search engines find and index pages on your site.' + description: 'Configure your site''s XML Sitemaps to help search engines find and index pages on your site.' route_name: xmlsitemap.admin_search parent: system.admin_config_search weight: -5 diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.module b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.module index 3502c5bef..58f1d05ed 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.module +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.module @@ -2,7 +2,7 @@ /** * @file - * @defgroup xmlsitemap XML sitemap + * @defgroup xmlsitemap XML Sitemap */ /** @@ -126,7 +126,6 @@ function xmlsitemap_help($route_name, RouteMatchInterface $route_match) { $output = ''; switch ($route_name) { - case 'help.page.xmlsitemap': case 'xmlsitemap.admin_settings': case 'xmlsitemap.entities_settings': case 'entity.xmlsitemap.edit_form': @@ -139,8 +138,19 @@ function xmlsitemap_help($route_name, RouteMatchInterface $route_match) { case 'xmlsitemap.admin_search_list': break; + case 'help.page.xmlsitemap': + + $output = '

' . t('About') . '

'; + $output .= '

' . t('XML Sitemap automatically creates a sitemap that conforms to the sitemaps.org specification. This helps search engines keep their search results up to date.') . '

'; + $output .= '

' . t('Usage') . '

'; + $output .= '

' . t("You can adjust the settings for your site's sitemap at admin/config/search/xmlsitemap. Your can view your site's sitemap at http://yoursite.com/sitemap.xml.") . '

'; + $output .= '

' . t("When is necessary you can rebuild your sitemap at admin/config/search/xmlsitemap/rebuild.") . '

'; + $output .= '

' . t("You can configure all Custom Entities Settings at admin/config/search/xmlsitemap/entities/settings") . '

'; + $output .= '

' . t('It is highly recommended that you have clean URLs enabled for this project.') . '

'; + return $output; + case 'xmlsitemap.admin_rebuild': - $output .= '

' . t("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.") . '

'; + $output .= '

' . t("This action rebuilds your site's XML Sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML Sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.") . '

'; } $currentUser = \Drupal::currentUser(); @@ -290,20 +300,20 @@ function xmlsitemap_var($name, $default = NULL) { } /** - * @defgroup xmlsitemap_api XML sitemap API. + * @defgroup xmlsitemap_api XML Sitemap API. * @{ - * This is the XML sitemap API to be used by modules wishing to work with - * XML sitemap and/or link data. + * This is the XML Sitemap API to be used by modules wishing to work with + * XML Sitemap and/or link data. */ /** - * Load an XML sitemap array from the database. + * Load an XML Sitemap array from the database. * * @param mixed $smid - * An XML sitemap ID. + * An XML Sitemap ID. * * @return \Drupal\xmlsitemap\XmlSitemapInterface - * The XML sitemap object. + * The XML Sitemap object. */ function xmlsitemap_sitemap_load($smid) { $sitemap = xmlsitemap_sitemap_load_multiple([$smid]); @@ -311,15 +321,15 @@ function xmlsitemap_sitemap_load($smid) { } /** - * Load multiple XML sitemaps from the database. + * Load multiple XML Sitemaps from the database. * * @param array|bool $smids - * An array of XML sitemap IDs, or FALSE to load all XML sitemaps. + * An array of XML Sitemap IDs, or FALSE to load all XML Sitemaps. * @param array $conditions * An array of conditions in the form 'field' => $value. * * @return \Drupal\xmlsitemap\XmlSitemapInterface[] - * An array of XML sitemap objects. + * An array of XML Sitemap objects. */ function xmlsitemap_sitemap_load_multiple($smids = [], array $conditions = []) { if ($smids !== FALSE) { @@ -340,11 +350,11 @@ function xmlsitemap_sitemap_load_multiple($smids = [], array $conditions = []) { } /** - * Save changes to an XML sitemap or add a new XML sitemap. + * Save changes to an XML Sitemap or add a new XML Sitemap. * * @param Drupal\xmlsitemap\XmlSitemapInterface $sitemap - * The XML sitemap array to be saved. If $sitemap->smid is omitted, a new - * XML sitemap will be added. + * The XML Sitemap array to be saved. If $sitemap->smid is omitted, a new + * XML Sitemap will be added. * * @todo Save the sitemap's URL as a column? */ @@ -374,20 +384,20 @@ function xmlsitemap_sitemap_save(XmlSitemapInterface $sitemap) { } /** - * Delete an XML sitemap. + * Delete an XML Sitemap. * * @param string $smid - * An XML sitemap ID. + * An XML Sitemap ID. */ function xmlsitemap_sitemap_delete($smid) { xmlsitemap_sitemap_delete_multiple([$smid]); } /** - * Delete multiple XML sitemaps. + * Delete multiple XML Sitemaps. * * @param array $smids - * An array of XML sitemap IDs. + * An array of XML Sitemap IDs. */ function xmlsitemap_sitemap_delete_multiple(array $smids) { if (!empty($smids)) { @@ -418,7 +428,7 @@ function xmlsitemap_sitemap_get_file(XmlSitemapInterface $sitemap, $chunk = 'ind * Find the maximum file size of all a sitemap's XML files. * * @param \Drupal\xmlsitemap\XmlSitemapInterface $sitemap - * The XML sitemap object. + * The XML Sitemap object. * * @return int * Maximum file size in the directory. @@ -450,14 +460,14 @@ function xmlsitemap_sitemap_get_context_hash(array &$context) { } /** - * Returns the uri elements of an XML sitemap. + * Returns the uri elements of an XML Sitemap. * * @param \Drupal\xmlsitemap\XmlSitemapInterface $sitemap * The sitemap represented by and XmlSitemapInterface object. * * @return array * An array containing the 'path' and 'options' keys used to build the uri of - * the XML sitemap, and matching the signature of url(). + * the XML Sitemap, and matching the signature of url(). */ function xmlsitemap_sitemap_uri(XmlSitemapInterface $sitemap) { $uri['path'] = 'sitemap.xml'; @@ -623,7 +633,7 @@ function _xmlsitemap_delete_recursive($path, $delete_root = FALSE) { * Implements hook_entity_type_build(). */ function xmlsitemap_entity_type_build(array &$entity_types) { - // Mark some specific core entity types as not supported by XML sitemap. + // Mark some specific core entity types as not supported by XML Sitemap. // If a site wants to undo this, they may use hook_entity_type_alter(). $unsupported_types = [ // Custom blocks. @@ -648,7 +658,7 @@ function xmlsitemap_entity_type_build(array &$entity_types) { } /** - * Determines if an entity type can be listed in the XML sitemap as links. + * Determines if an entity type can be listed in the XML Sitemap as links. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type. @@ -657,7 +667,7 @@ function xmlsitemap_entity_type_build(array &$entity_types) { * TRUE if the entity type can be used, or FALSE otherwise. */ function xmlsitemap_is_entity_type_supported(EntityTypeInterface $entity_type) { - // If the XML sitemap status in the entity type annotation has been set then + // If the XML Sitemap status in the entity type annotation has been set then // return that first. This will allow modules to bypass the logic below if // needed. $status = $entity_type->get('xmlsitemap'); @@ -1034,18 +1044,18 @@ function xmlsitemap_entity_bundle_delete($entity_type_id, $bundle) { * A string representing the update frequency according to the sitemaps.org * protocol. */ -function xmlsitemap_get_changefreq($interval) { +function xmlsitemap_get_changefreq($interval, bool $translated = TRUE) { if ($interval <= 0 || !is_numeric($interval)) { return FALSE; } foreach (xmlsitemap_get_changefreq_options() as $value => $frequency) { if ($interval <= $value) { - return $frequency; + return $translated ? $frequency : $frequency->getUntranslatedString(); } } - return 'never'; + return $translated ? t('never', [], ['context' => 'At no time']) : 'never'; } /** @@ -1169,7 +1179,7 @@ function xmlsitemap_form_submit_flag_regenerate(array $form, FormStateInterface } if ($stored_value != 'not_a_variable' && $stored_value != $value) { \Drupal::state()->set('xmlsitemap_regenerate_needed', TRUE); - \Drupal::messenger()->addWarning(t('XML sitemap settings have been modified and the files should be regenerated. You can run cron manually to regenerate the cached files.', [ + \Drupal::messenger()->addWarning(t('XML Sitemap settings have been modified and the files should be regenerated. You can run cron manually to regenerate the cached files.', [ '@run-cron' => Url::fromRoute('system.run_cron', [], ['query' => \Drupal::destination()->getAsArray()])->toString(), ]), FALSE); return; @@ -1178,7 +1188,7 @@ function xmlsitemap_form_submit_flag_regenerate(array $form, FormStateInterface } /** - * Add a link's XML sitemap options to the link's form. + * Add a link's XML Sitemap options to the link's form. * * @param array $form * Form array. @@ -1213,7 +1223,7 @@ function xmlsitemap_add_form_link_options(array &$form, $entity_type, $bundle, $ $form['xmlsitemap'] = [ '#type' => 'details', '#tree' => TRUE, - '#title' => t('XML sitemap'), + '#title' => t('XML Sitemap'), '#collapsible' => TRUE, '#collapsed' => !$link['status_override'] && !$link['priority_override'], '#access' => $currentUser->hasPermission('administer xmlsitemap') || ($admin_permission && $currentUser->hasPermission($admin_permission)), @@ -1340,7 +1350,7 @@ function xmlsitemap_link_bundle_settings_form_submit($form, &$form_state) { $entity_info = $form['xmlsitemap']['#entity_info']; if (!empty($form['xmlsitemap']['#show_message'])) { - \Drupal::messenger()->addStatus(t('XML sitemap settings for the @bundle-label %bundle have been saved.', ['@bundle-label' => mb_strtolower($entity_info['bundle label']), '%bundle' => $entity_info['bundles'][$bundle]['label']])); + \Drupal::messenger()->addStatus(t('XML Sitemap settings for the @bundle-label %bundle have been saved.', ['@bundle-label' => mb_strtolower($entity_info['bundle label']), '%bundle' => $entity_info['bundles'][$bundle]['label']])); } // Unset the form values since we have already saved the bundle settings and @@ -1352,20 +1362,17 @@ function xmlsitemap_link_bundle_settings_form_submit($form, &$form_state) { /** * Gets xmlsitemap frequency options. * - * @return array + * @return \Drupal\Core\StringTranslation\TranslatableMarkup[] * Frequency options. - * - * @todo Document this function. - * @todo Make these translatable */ function xmlsitemap_get_changefreq_options() { return [ - XMLSITEMAP_FREQUENCY_ALWAYS => 'always', - XMLSITEMAP_FREQUENCY_HOURLY => 'hourly', - XMLSITEMAP_FREQUENCY_DAILY => 'daily', - XMLSITEMAP_FREQUENCY_WEEKLY => 'weekly', - XMLSITEMAP_FREQUENCY_MONTHLY => 'monthly', - XMLSITEMAP_FREQUENCY_YEARLY => 'yearly', + XMLSITEMAP_FREQUENCY_ALWAYS => t('always', [], ['context' => 'At all times']), + XMLSITEMAP_FREQUENCY_HOURLY => t('hourly'), + XMLSITEMAP_FREQUENCY_DAILY => t('daily'), + XMLSITEMAP_FREQUENCY_WEEKLY => t('weekly'), + XMLSITEMAP_FREQUENCY_MONTHLY => t('monthly'), + XMLSITEMAP_FREQUENCY_YEARLY => t('yearly'), ]; } @@ -1392,7 +1399,7 @@ function xmlsitemap_language_load($language = LanguageInterface::LANGCODE_NOT_SP } /** - * @defgroup xmlsitemap_context_api XML sitemap API for sitemap contexts. + * @defgroup xmlsitemap_context_api XML Sitemap API for sitemap contexts. * @{ */ @@ -2009,7 +2016,7 @@ function xmlsitemap_xmlsitemap_sitemap_operations() { } /** - * XML sitemap link type settings callback for frontpage link entity. + * XML Sitemap link type settings callback for frontpage link entity. * * @param array $form * Form array. @@ -2037,10 +2044,10 @@ function xmlsitemap_link_frontpage_settings(array &$form) { } /** - * XML sitemap operation callback; regenerate sitemap files using the batch API. + * XML Sitemap operation callback; regenerate sitemap files using the batch API. * * @param array $smids - * An array of XML sitemap IDs. + * An array of XML Sitemap IDs. * * @see xmlsitemap_regenerate_batch() */ @@ -2122,7 +2129,7 @@ function xmlsitemap_add_form_entity_summary(array &$form, $entity, array $entity } /** - * Add the link type XML sitemap options to the link type's form. + * Add the link type XML Sitemap options to the link type's form. * * Caller is responsible for ensuring xmlsitemap_link_bundle_settings_save() * is called during submission. @@ -2143,7 +2150,7 @@ function xmlsitemap_add_link_bundle_settings(array &$form, FormStateInterface $f $form['xmlsitemap'] = [ '#type' => 'details', - '#title' => t('XML sitemap'), + '#title' => t('XML Sitemap'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#access' => \Drupal::currentUser()->hasPermission('administer xmlsitemap'), @@ -2352,7 +2359,7 @@ function _xmlsitemap_get_blurb($check_version = TRUE) { \Drupal::linkGenerator()->generate('Coupons Dealuxe', Url::fromUri('http://couponsdealuxe.com/', ['attributes' => ['target' => 'blank']])), ]; // Don't extract the following string for translation. - $blurb = '

Thank you for helping test the XML sitemap module rewrite. Please consider helping offset developer free time by donating or if your company is interested in sponsoring the rewrite or a specific feature, please contact the developer. Thank you to the following current sponsors: ' . implode(', ', $sponsors) . ', and all the individuals that have donated. This message will not be seen in the stable versions.

'; + $blurb = '

Thank you for helping test the XML Sitemap module rewrite. Please consider helping offset developer free time by donating or if your company is interested in sponsoring the rewrite or a specific feature, please contact the developer. Thank you to the following current sponsors: ' . implode(', ', $sponsors) . ', and all the individuals that have donated. This message will not be seen in the stable versions.

'; // http://drupalmodules.com/module/xml-sitemap } } @@ -2419,7 +2426,7 @@ function xmlsitemap_check_status() { '#type' => 'item_list', '#items' => [$messages], ]; - $message = t('One or more problems were detected with your XML sitemap configuration: @messages', ['@messages' => \Drupal::service('renderer')->render($messages)]); + $message = t('One or more problems were detected with your XML Sitemap configuration: @messages', ['@messages' => \Drupal::service('renderer')->render($messages)]); \Drupal::messenger()->addWarning($message, FALSE); if (\Drupal::currentUser()->hasPermission('access site reports')) { \Drupal::messenger()->addWarning(t('Check the status report for more information.', ['@status-report' => Url::fromRoute('system.status')->toString()]), FALSE); @@ -2441,8 +2448,8 @@ function _xmlsitemap_regenerate_before() { * Batch information callback for regenerating the sitemap files. * * @param array $smids - * An optional array of XML sitemap IDs. If not provided, it will load all - * existing XML sitemaps. + * An optional array of XML Sitemap IDs. If not provided, it will load all + * existing XML Sitemaps. */ function xmlsitemap_regenerate_batch(array $smids = []) { if (empty($smids)) { diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.permissions.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.permissions.yml index 883a93587..b26b94d54 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.permissions.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.permissions.yml @@ -1,4 +1,4 @@ administer xmlsitemap: - title: 'Administer XML sitemap settings.' - description: 'Configure XML sitemap settings, select which links are included in sitemap.' + title: 'Administer XML Sitemap settings.' + description: 'Configure XML Sitemap settings, select which links are included in sitemap.' restrict access: true diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.routing.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.routing.yml index 966444f75..9e8c060f8 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.routing.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap.routing.yml @@ -2,7 +2,7 @@ xmlsitemap.admin_search: path: '/admin/config/search/xmlsitemap' defaults: _entity_list: 'xmlsitemap' - _title: 'XML sitemap' + _title: 'XML Sitemap' requirements: _permission: 'administer xmlsitemap' @@ -10,7 +10,7 @@ xmlsitemap.admin_search_list: path: '/admin/config/search/xmlsitemap/list' defaults: _entity_list: 'xmlsitemap' - _title: 'XML sitemap' + _title: 'XML Sitemap' requirements: _permission: 'administer xmlsitemap' @@ -18,7 +18,7 @@ entity.xmlsitemap.add_form: path: '/admin/config/search/xmlsitemap/add' defaults: _entity_form: 'xmlsitemap.add' - _title: 'Add new XML sitemap' + _title: 'Add new XML Sitemap' requirements: _permission: 'administer xmlsitemap' @@ -26,7 +26,7 @@ entity.xmlsitemap.edit_form: path: '/admin/config/search/xmlsitemap/{xmlsitemap}/edit' defaults: _entity_form: 'xmlsitemap.edit' - _title: 'Edit XML sitemap' + _title: 'Edit XML Sitemap' requirements: _permission: 'administer xmlsitemap' @@ -34,7 +34,7 @@ entity.xmlsitemap.delete_form: path: '/admin/config/search/xmlsitemap/{xmlsitemap}/delete' defaults: _entity_form: 'xmlsitemap.delete' - _title: 'Delete XML sitemap' + _title: 'Delete XML Sitemap' requirements: _permission: 'administer xmlsitemap' diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info.yml index 797f32dec..5800c27b6 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.info.yml @@ -7,7 +7,7 @@ configure: xmlsitemap_custom.list dependencies: - xmlsitemap:xmlsitemap -# Information added by Drupal.org packaging script on 2021-12-02 -version: '8.x-1.2' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '8.x-1.3' project: 'xmlsitemap' -datestamp: 1638486170 +datestamp: 1658327439 diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module index 45b5b54ec..f39e9018d 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.module @@ -2,7 +2,7 @@ /** * @file - * Adds user configurable links to the XML sitemap. + * Adds user configurable links to the XML Sitemap. */ /** diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.info.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.info.yml index 3b450be5d..19099a54a 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.info.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.info.yml @@ -1,9 +1,9 @@ -name: XML sitemap engines test +name: XML Sitemap engines test type: module -description: Support module for XML sitemap engines testing. +description: Support module for XML Sitemap engines testing. package: Testing -# Information added by Drupal.org packaging script on 2021-12-02 -version: '8.x-1.2' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '8.x-1.3' project: 'xmlsitemap' -datestamp: 1638486170 +datestamp: 1658327439 diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.module b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.module index 87bf7999c..7daeecedf 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.module +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.module @@ -2,7 +2,7 @@ /** * @file - * Main file for the XML sitemap engines test. + * Main file for the XML Sitemap engines test. */ use Drupal\Core\Url; diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php index 280494bdf..a1e7532ad 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.api.php @@ -2,7 +2,7 @@ /** * @file - * Hooks provided by the XML sitemap engines module. + * Hooks provided by the XML Sitemap engines module. */ /** diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info.yml b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info.yml index ebf4eebcc..30d7680ba 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info.yml +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.info.yml @@ -7,7 +7,7 @@ configure: xmlsitemap_engines.settings dependencies: - xmlsitemap:xmlsitemap -# Information added by Drupal.org packaging script on 2021-12-02 -version: '8.x-1.2' +# Information added by Drupal.org packaging script on 2022-07-20 +version: '8.x-1.3' project: 'xmlsitemap' -datestamp: 1638486170 +datestamp: 1658327439 diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module index df435fb29..a8d2d24f6 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module @@ -2,7 +2,7 @@ /** * @file - * Main file for the XML sitemap engines. + * Main file for the XML Sitemap engines. */ use Drupal\Component\Utility\UrlHelper; @@ -93,8 +93,8 @@ function xmlsitemap_engines_submit_access() { * Submit the sitemaps to all the specified search engines. * * @param array $smids - * An optional array of XML sitemap IDs. If not provided, it will load all - * existing XML sitemaps. + * An optional array of XML Sitemap IDs. If not provided, it will load all + * existing XML Sitemaps. */ function xmlsitemap_engines_submit_engines(array $smids = []) { if (empty($smids)) { @@ -204,11 +204,6 @@ function xmlsitemap_engines_xmlsitemap_engine_info() { 'url' => 'https://www.google.com/ping?sitemap=[sitemap]', 'help url' => 'https://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156184', ]; - $engines['bing'] = [ - 'name' => t('Bing'), - 'url' => 'https://www.bing.com/ping?sitemap=[sitemap]', - 'help url' => 'https://www.bing.com/webmaster/help/how-to-submit-sitemaps-82a15bd4', - ]; return $engines; } diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.post_update.php b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.post_update.php new file mode 100644 index 000000000..33c05e438 --- /dev/null +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.post_update.php @@ -0,0 +1,18 @@ +getEditable('xmlsitemap_engines.settings'); + $engines = $config->get('engines'); + if (in_array('bing', $engines, TRUE)) { + $config->set('engines', array_diff($engines, ['bing'])); + $config->save(); + } +} diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl b/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl index 7a58b5862..8613f9cb6 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl @@ -55,7 +55,7 @@ diff --git a/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js b/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js index 3997ec16f..7c890649b 100644 --- a/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js +++ b/frontend/drupal9/web/modules/contrib/xmlsitemap/xsl/xmlsitemap.xsl.js @@ -1,6 +1,6 @@ /** * @file - * JavaScript file for XML sitemap. + * JavaScript file for XML Sitemap. */ (function ($) { diff --git a/frontend/drupal9/web/sites/default/default.settings.php b/frontend/drupal9/web/sites/default/default.settings.php index 72be7750b..f3dca008f 100644 --- a/frontend/drupal9/web/sites/default/default.settings.php +++ b/frontend/drupal9/web/sites/default/default.settings.php @@ -490,6 +490,29 @@ $settings['update_free_access'] = FALSE; */ # $settings['file_public_path'] = 'sites/default/files'; +/** + * Additional public file schemes: + * + * Public schemes are URI schemes that allow download access to all users for + * all files within that scheme. + * + * The "public" scheme is always public, and the "private" scheme is always + * private, but other schemes, such as "https", "s3", "example", or others, + * can be either public or private depending on the site. By default, they're + * private, and access to individual files is controlled via + * hook_file_download(). + * + * Typically, if a scheme should be public, a module makes it public by + * implementing hook_file_download(), and granting access to all users for all + * files. This could be either the same module that provides the stream wrapper + * for the scheme, or a different module that decides to make the scheme + * public. However, in cases where a site needs to make a scheme public, but + * is unable to add code in a module to do so, the scheme may be added to this + * variable, the result of which is that system_file_download() grants public + * access to all files within that scheme. + */ +# $settings['file_additional_public_schemes'] = ['example']; + /** * Private file path: *