diff --git a/composer.json b/composer.json index 96c8dc3..8625631 100644 --- a/composer.json +++ b/composer.json @@ -43,10 +43,10 @@ "drupal/speakerdeck_field": "^2.0", "drupal/stage_file_proxy": "^1.0", "drush/drush": "^10", + "illuminate/collections": "^8.38", "nesbot/carbon": "^2.33", "platformsh/config-reader": "^2.4", - "symfony/config": "^3.4", - "tightenco/collect": "^8.17" + "symfony/config": "^3.4" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7", diff --git a/composer.lock b/composer.lock index 8a4ebf0..315bedf 100644 --- a/composer.lock +++ b/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": "3f1c47b7210ec0730beb773d98c06c19", + "content-hash": "d014d5811272bef8c06e71bd1083fe58", "packages": [ { "name": "asm89/stack-cors", @@ -4611,6 +4611,154 @@ }, "time": "2019-07-01T23:21:34+00:00" }, + { + "name": "illuminate/collections", + "version": "v8.38.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "21690cd5591f2d42d792e5e4a687f9beba829f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/21690cd5591f2d42d792e5e4a687f9beba829f1d", + "reference": "21690cd5591f2d42d792e5e4a687f9beba829f1d", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.1.4)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-04-14T11:48:08+00:00" + }, + { + "name": "illuminate/contracts", + "version": "v8.38.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "5764f703ea8f74ced163125d810951cd5ef2b7e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/5764f703ea8f74ced163125d810951cd5ef2b7e1", + "reference": "5764f703ea8f74ced163125d810951cd5ef2b7e1", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0", + "psr/container": "^1.0", + "psr/simple-cache": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-04-01T13:09:31+00:00" + }, + { + "name": "illuminate/macroable", + "version": "v8.38.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-10-27T15:20:30+00:00" + }, { "name": "laminas/laminas-diactoros", "version": "1.8.7p2", @@ -5840,6 +5988,57 @@ }, "time": "2020-03-23T09:12:05+00:00" }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, + "time": "2017-10-23T01:57:42+00:00" + }, { "name": "psy/psysh", "version": "v0.10.6", @@ -8202,60 +8401,6 @@ ], "time": "2020-05-11T07:51:54+00:00" }, - { - "name": "tightenco/collect", - "version": "v8.17.0", - "source": { - "type": "git", - "url": "https://github.com/tighten/collect.git", - "reference": "1ca0266eac4b245375d81e05f4d81bd00cb8197f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tighten/collect/zipball/1ca0266eac4b245375d81e05f4d81bd00cb8197f", - "reference": "1ca0266eac4b245375d81e05f4d81bd00cb8197f", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "nesbot/carbon": "^2.23.0", - "phpunit/phpunit": "^8.3" - }, - "type": "library", - "autoload": { - "files": [ - "src/Collect/Support/helpers.php", - "src/Collect/Support/alias.php" - ], - "psr-4": { - "Tightenco\\Collect\\": "src/Collect" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "Collect - Illuminate Collections as a separate package.", - "keywords": [ - "collection", - "laravel" - ], - "support": { - "issues": "https://github.com/tighten/collect/issues", - "source": "https://github.com/tighten/collect/tree/v8.17.0" - }, - "time": "2020-12-04T18:20:44+00:00" - }, { "name": "twig/twig", "version": "v1.42.5", diff --git a/phpstan.neon b/phpstan.neon index 6583456..ba94528 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,7 +11,6 @@ parameters: - '#Call to an undefined method Drupal\\Core\\Field\\FieldItemListInterface::referencedEntities()#' - '#Call to an undefined method Drupal\\views\\Plugin\\views\\query\\QueryPluginBase::addOrderBy().#' - '#Call to an undefined method GuzzleHttp\\ClientInterface::post().#' - - '#Call to an undefined method Tightenco\\Collect\\Support\\HigherOrderCollectionProxy::id()#' includes: - vendor/mglaman/phpstan-drupal/extension.neon - vendor/phpstan/phpstan-deprecation-rules/rules.neon diff --git a/web/modules/custom/blog/src/Entity/Node/Post.php b/web/modules/custom/blog/src/Entity/Node/Post.php index 4250363..3ea094c 100644 --- a/web/modules/custom/blog/src/Entity/Node/Post.php +++ b/web/modules/custom/blog/src/Entity/Node/Post.php @@ -7,7 +7,7 @@ namespace Drupal\opdavies_blog\Entity\Node; use Drupal\discoverable_entity_bundle_classes\ContentEntityBundleInterface; use Drupal\node\Entity\Node; use Drupal\taxonomy\Entity\Term; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * Defines an blog post node class. diff --git a/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php b/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php index 69ccdb1..0ab9150 100644 --- a/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php +++ b/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php @@ -10,7 +10,7 @@ use Drupal\Core\Routing\CurrentRouteMatch; use Drupal\opdavies_blog\Entity\Node\Post; use Drupal\opdavies_blog\Repository\RelatedPostsRepository; use Symfony\Component\DependencyInjection\ContainerInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * @Block( diff --git a/web/modules/custom/blog/src/Repository/PostRepository.php b/web/modules/custom/blog/src/Repository/PostRepository.php index 1b24f90..a76f480 100644 --- a/web/modules/custom/blog/src/Repository/PostRepository.php +++ b/web/modules/custom/blog/src/Repository/PostRepository.php @@ -6,7 +6,7 @@ namespace Drupal\opdavies_blog\Repository; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; final class PostRepository { diff --git a/web/modules/custom/blog/src/Repository/RelatedPostsRepository.php b/web/modules/custom/blog/src/Repository/RelatedPostsRepository.php index ccdb203..3e722b4 100644 --- a/web/modules/custom/blog/src/Repository/RelatedPostsRepository.php +++ b/web/modules/custom/blog/src/Repository/RelatedPostsRepository.php @@ -10,7 +10,7 @@ use Drupal\Core\Entity\Query\QueryInterface; use Drupal\node\NodeInterface; use Drupal\opdavies_blog\Entity\Node\Post; use Drupal\taxonomy\TermInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; final class RelatedPostsRepository { diff --git a/web/modules/custom/blog/tests/modules/blog_test/src/Factory/PostFactory.php b/web/modules/custom/blog/tests/modules/blog_test/src/Factory/PostFactory.php index c9549e8..d6a83d5 100644 --- a/web/modules/custom/blog/tests/modules/blog_test/src/Factory/PostFactory.php +++ b/web/modules/custom/blog/tests/modules/blog_test/src/Factory/PostFactory.php @@ -12,7 +12,7 @@ use Drupal\node\Entity\Node; use Drupal\opdavies_blog\Entity\Node\Post; use Drupal\taxonomy\Entity\Term; use Drupal\taxonomy\TermInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; final class PostFactory { diff --git a/web/modules/custom/talks/src/Collection/TalkCollection.php b/web/modules/custom/talks/src/Collection/TalkCollection.php index f0644e4..2391ba1 100644 --- a/web/modules/custom/talks/src/Collection/TalkCollection.php +++ b/web/modules/custom/talks/src/Collection/TalkCollection.php @@ -6,7 +6,7 @@ namespace Drupal\opdavies_talks\Collection; use Drupal\opdavies_talks\Entity\Node\Talk; use Drupal\paragraphs\ParagraphInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; final class TalkCollection extends Collection { diff --git a/web/modules/custom/talks/src/Entity/Node/Talk.php b/web/modules/custom/talks/src/Entity/Node/Talk.php index 7332d61..195cc4a 100644 --- a/web/modules/custom/talks/src/Entity/Node/Talk.php +++ b/web/modules/custom/talks/src/Entity/Node/Talk.php @@ -5,7 +5,7 @@ namespace Drupal\opdavies_talks\Entity\Node; use Drupal\discoverable_entity_bundle_classes\ContentEntityBundleInterface; use Drupal\node\Entity\Node; use Drupal\paragraphs\ParagraphInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * Defines an talk node class. diff --git a/web/modules/custom/talks/src/EventSubscriber/UpdateTalkNodeBeforeSave.php b/web/modules/custom/talks/src/EventSubscriber/UpdateTalkNodeBeforeSave.php index 428418e..5cd4b25 100644 --- a/web/modules/custom/talks/src/EventSubscriber/UpdateTalkNodeBeforeSave.php +++ b/web/modules/custom/talks/src/EventSubscriber/UpdateTalkNodeBeforeSave.php @@ -10,7 +10,7 @@ use Drupal\hook_event_dispatcher\HookEventDispatcherInterface; use Drupal\opdavies_talks\Entity\Node\Talk; use Drupal\paragraphs\ParagraphInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * Update a talk node before it's saved. @@ -44,6 +44,7 @@ final class UpdateTalkNodeBeforeSave implements EventSubscriberInterface { // If the original event IDs don't match the sorted event IDs, update the // event field to use the sorted ones. + // @phpstan-ignore-next-line if ($events->map->id() != $eventsByDate->map->id()) { $talk->setEvents($eventsByDate->toArray()); } diff --git a/web/modules/custom/talks/tests/src/Kernel/TalksPageSortTest.php b/web/modules/custom/talks/tests/src/Kernel/TalksPageSortTest.php index 2dff6f9..43d3dd4 100644 --- a/web/modules/custom/talks/tests/src/Kernel/TalksPageSortTest.php +++ b/web/modules/custom/talks/tests/src/Kernel/TalksPageSortTest.php @@ -6,7 +6,7 @@ namespace Drupal\Tests\opdavies_talks\Kernel; use Carbon\Carbon; use Drupal\views\ResultRow; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; final class TalksPageSortTest extends TalksTestBase {