From 6edf584ac5615d2a5140b3ad88c97ec0a84edf65 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 8 Dec 2020 00:07:43 +0000 Subject: [PATCH] Remove illuminate/support dependency References #302 --- composer.json | 2 +- composer.lock | 272 ++++-------------- phpstan.neon | 2 +- .../talks/tests/src/Kernel/TalksTestBase.php | 8 +- 4 files changed, 59 insertions(+), 225 deletions(-) diff --git a/composer.json b/composer.json index ce55387..db5eb43 100644 --- a/composer.json +++ b/composer.json @@ -39,8 +39,8 @@ "drupal/speakerdeck_field": "^2.0", "drupal/stage_file_proxy": "^1.0", "drush/drush": "^10", - "illuminate/support": "^7.10", "nesbot/carbon": "^2.33", + "tightenco/collect": "^8.17", "topfloor/composer-cleanup-vcs-dirs": "^1.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 62a5e94..dcae956 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": "1490b3c2912e62740051419acb488e84", + "content-hash": "d9792e3963cd41f6645910f6a5e1fd39", "packages": [ { "name": "asm89/stack-cors", @@ -4254,112 +4254,6 @@ ], "time": "2019-07-01T23:21:34+00:00" }, - { - "name": "illuminate/contracts", - "version": "v7.15.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "42792e136e3a77312fb89df29373d6221a1f794e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/42792e136e3a77312fb89df29373d6221a1f794e", - "reference": "42792e136e3a77312fb89df29373d6221a1f794e", - "shasum": "" - }, - "require": { - "php": "^7.2.5", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.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", - "time": "2020-05-13T20:55:30+00:00" - }, - { - "name": "illuminate/support", - "version": "v7.10.3", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "cd11fa914c52a2249c48cde08d03a871597e8781" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/cd11fa914c52a2249c48cde08d03a871597e8781", - "reference": "cd11fa914c52a2249c48cde08d03a871597e8781", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^1.1", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/contracts": "^7.0", - "nesbot/carbon": "^2.17", - "php": "^7.2.5", - "voku/portable-ascii": "^1.4.8" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (^7.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "ramsey/uuid": "Required to use Str::uuid() (^3.7|^4.0).", - "symfony/process": "Required to use the composer class (^5.0).", - "symfony/var-dumper": "Required to use the dd function (^5.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^4.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.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 Support package.", - "homepage": "https://laravel.com", - "time": "2020-05-05T16:21:56+00:00" - }, { "name": "laminas/laminas-diactoros", "version": "1.8.7p2", @@ -5445,54 +5339,6 @@ ], "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" - ], - "time": "2017-10-23T01:57:42+00:00" - }, { "name": "psy/psysh", "version": "v0.10.4", @@ -7705,6 +7551,56 @@ ], "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" + ], + "time": "2020-12-04T18:20:44+00:00" + }, { "name": "topfloor/composer-cleanup-vcs-dirs", "version": "1.0.1", @@ -7857,72 +7753,6 @@ ], "time": "2019-12-10T11:53:27+00:00" }, - { - "name": "voku/portable-ascii", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/voku/portable-ascii.git", - "reference": "e7f9bd5deff09a57318f9b900ab33a05acfcf4d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/e7f9bd5deff09a57318f9b900ab33a05acfcf4d3", - "reference": "e7f9bd5deff09a57318f9b900ab33a05acfcf4d3", - "shasum": "" - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0" - }, - "suggest": { - "ext-intl": "Use Intl for transliterator_transliterate() support" - }, - "type": "library", - "autoload": { - "psr-4": { - "voku\\": "src/voku/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Lars Moelleken", - "homepage": "http://www.moelleken.org/" - } - ], - "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", - "homepage": "https://github.com/voku/portable-ascii", - "keywords": [ - "ascii", - "clean", - "php" - ], - "funding": [ - { - "url": "https://www.paypal.me/moelleken", - "type": "custom" - }, - { - "url": "https://github.com/voku", - "type": "github" - }, - { - "url": "https://www.patreon.com/voku", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", - "type": "tidelift" - } - ], - "time": "2020-05-26T06:40:44+00:00" - }, { "name": "webflo/drupal-finder", "version": "1.2.2", diff --git a/phpstan.neon b/phpstan.neon index 859344a..6583456 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,7 +11,7 @@ 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 Illuminate\\Support\\HigherOrderCollectionProxy::id()#' + - '#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/talks/tests/src/Kernel/TalksTestBase.php b/web/modules/custom/talks/tests/src/Kernel/TalksTestBase.php index c875708..e21e008 100644 --- a/web/modules/custom/talks/tests/src/Kernel/TalksTestBase.php +++ b/web/modules/custom/talks/tests/src/Kernel/TalksTestBase.php @@ -41,7 +41,9 @@ abstract class TalksTestBase extends EntityKernelTestBase { 'type' => 'event', ], $overrides)); - return tap($event)->save(); + $event->save(); + + return $event; } protected function createTalk(array $overrides = []): Talk { @@ -50,7 +52,9 @@ abstract class TalksTestBase extends EntityKernelTestBase { 'type' => 'talk', ], $overrides)); - return tap($talk)->save(); + $talk->save(); + + return $talk; } protected function setUp() {