From afcafa679b4dfd433aa5343ef92269e0894f3621 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sun, 31 Mar 2019 00:17:20 +0100 Subject: [PATCH] chore(deps): upgrade to laravel/framework 5.8 (#2553) --- .gitignore | 1 + .../Settings/MultiFAController.php | 2 +- app/Http/Middleware/EnsureEmailIsVerified.php | 4 +- app/Services/Instance/IdHasher.php | 2 +- composer.json | 9 +- composer.lock | 721 ++++++++++-------- phpunit.xml | 19 +- .../mail/{markdown => text}/button.blade.php | 0 .../mail/{markdown => text}/footer.blade.php | 0 .../mail/{markdown => text}/header.blade.php | 0 .../mail/{markdown => text}/layout.blade.php | 0 .../mail/{markdown => text}/message.blade.php | 0 .../mail/{markdown => text}/panel.blade.php | 0 .../{markdown => text}/promotion.blade.php | 0 .../promotion/button.blade.php | 0 .../mail/{markdown => text}/subcopy.blade.php | 0 .../mail/{markdown => text}/table.blade.php | 0 tests/Browser/Auth/AuthControllerTest.php | 2 +- .../Settings/MultiFAControllerTest.php | 20 +- tests/Commands/UpdateCommandTest.php | 4 +- .../Reminder/NotifyUserAboutReminderTest.php | 6 +- tests/Unit/Models/ContactTest.php | 12 +- tests/Unit/Services/VCard/ExportVCardTest.php | 40 +- 23 files changed, 475 insertions(+), 367 deletions(-) rename resources/views/vendor/mail/{markdown => text}/button.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/footer.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/header.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/layout.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/message.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/panel.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/promotion.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/promotion/button.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/subcopy.blade.php (100%) rename resources/views/vendor/mail/{markdown => text}/table.blade.php (100%) diff --git a/.gitignore b/.gitignore index fd4dd77a0..d1b2325f2 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ php-extensions-*.tar.bz2 monicadump.sql .scannerwork/ .sentry-release +.phpunit.result.cache diff --git a/app/Http/Controllers/Settings/MultiFAController.php b/app/Http/Controllers/Settings/MultiFAController.php index faefd82f1..6a21c3c1d 100644 --- a/app/Http/Controllers/Settings/MultiFAController.php +++ b/app/Http/Controllers/Settings/MultiFAController.php @@ -174,7 +174,7 @@ class MultiFAController extends Controller $key->save(); } - Event::fire('u2f.register', ['u2fKey' => $key, 'user' => Auth::user()]); + Event::dispatch('u2f.register', ['u2fKey' => $key, 'user' => Auth::user()]); session()->forget('u2f.registerData'); session([config('u2f.sessionU2fName') => true]); diff --git a/app/Http/Middleware/EnsureEmailIsVerified.php b/app/Http/Middleware/EnsureEmailIsVerified.php index 8466c8f23..e983e0628 100644 --- a/app/Http/Middleware/EnsureEmailIsVerified.php +++ b/app/Http/Middleware/EnsureEmailIsVerified.php @@ -14,10 +14,10 @@ class EnsureEmailIsVerified extends EnsureEmailIsVerifiedBase * @param \Closure $next * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ - public function handle($request, Closure $next) + public function handle($request, Closure $next, $redirectToRoute = null) { if (config('monica.signup_double_optin')) { - return parent::handle($request, $next); + return parent::handle($request, $next, $redirectToRoute); } return $next($request); diff --git a/app/Services/Instance/IdHasher.php b/app/Services/Instance/IdHasher.php index e719288ba..124fdd1b4 100644 --- a/app/Services/Instance/IdHasher.php +++ b/app/Services/Instance/IdHasher.php @@ -34,7 +34,7 @@ class IdHasher if (starts_with($hash, $this->prefix)) { $result = Hashids::decode(str_after($hash, $this->prefix)); - if (! is_null($result) && count($result) > 0) { + if (count($result) > 0) { return $result[0]; // result is always an array due to quirk in Hashids libary } } diff --git a/composer.json b/composer.json index 15685e73e..8e09b37d1 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "jenssegers/date": "^3.3", "lahaxearnaud/laravel-u2f": "^1.3", "laravel/cashier": "~8.0", - "laravel/framework": "5.7.*", + "laravel/framework": "5.8.*", + "laravel/helpers": "^1.0", "laravel/passport": "^7.0", "laravel/socialite": "^4.0", "laravel/tinker": "^1.0", @@ -44,7 +45,7 @@ "stevebauman/location": "^3.0", "symfony/translation": "^4.0", "vectorface/whip": "^0.3.2", - "vinkla/hashids": "^5.0", + "vinkla/hashids": "^5.2", "vluzrmos/language-detector": "^1.0" }, "require-dev": { @@ -57,8 +58,8 @@ "matthiasnoback/live-code-coverage": "^1.0", "mockery/mockery": "^1.0", "nunomaduro/larastan": "^0.3.15", - "phpunit/phpcov": "^5.0", - "phpunit/phpunit": "^7.0", + "phpunit/phpcov": "^6.0", + "phpunit/phpunit": "^8.0", "psalm/plugin-laravel": "^0.2", "roave/security-advisories": "dev-master", "symfony/css-selector": "~4.0", diff --git a/composer.lock b/composer.lock index 3750a1795..2386548d7 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": "7a1b3ffa27197d4b8cf9c4919b215e97", + "content-hash": "e68441ae596095cc07e57c934f26d844", "packages": [ { "name": "aws/aws-sdk-php", @@ -1991,45 +1991,45 @@ }, { "name": "laravel/framework", - "version": "v5.7.28", + "version": "v5.8.8", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192" + "reference": "3f0a5744a866ae3ae0ca84f47080501714af01ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/8e69728f1c80a024588adbd24c65c4fcf9aa9192", - "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192", + "url": "https://api.github.com/repos/laravel/framework/zipball/3f0a5744a866ae3ae0ca84f47080501714af01ba", + "reference": "3f0a5744a866ae3ae0ca84f47080501714af01ba", "shasum": "" }, "require": { "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", + "egulias/email-validator": "^2.0", "erusev/parsedown": "^1.7", + "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "laravel/nexmo-notification-channel": "^1.0", - "laravel/slack-notification-channel": "^1.0", "league/flysystem": "^1.0.8", "monolog/monolog": "^1.12", - "nesbot/carbon": "^1.26.3", + "nesbot/carbon": "^1.26.3 || ^2.0", "opis/closure": "^3.1", "php": "^7.1.3", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.1", - "symfony/debug": "^4.1", - "symfony/finder": "^4.1", - "symfony/http-foundation": "^4.1", - "symfony/http-kernel": "^4.1", - "symfony/process": "^4.1", - "symfony/routing": "^4.1", - "symfony/var-dumper": "^4.1", + "symfony/console": "^4.2", + "symfony/debug": "^4.2", + "symfony/finder": "^4.2", + "symfony/http-foundation": "^4.2", + "symfony/http-kernel": "^4.2", + "symfony/process": "^4.2", + "symfony/routing": "^4.2", + "symfony/var-dumper": "^4.2", "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^2.2" + "vlucas/phpdotenv": "^3.3" }, "conflict": { "tightenco/collect": "<5.5.33" @@ -2072,12 +2072,12 @@ "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.0", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.7.*", - "pda/pheanstalk": "^3.0|^4.0", - "phpunit/phpunit": "^7.5", + "orchestra/testbench-core": "3.8.*", + "pda/pheanstalk": "^4.0", + "phpunit/phpunit": "^7.5|^8.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "^4.1", - "symfony/dom-crawler": "^4.1", + "symfony/css-selector": "^4.2", + "symfony/dom-crawler": "^4.2", "true/punycode": "^2.1" }, "suggest": { @@ -2095,17 +2095,18 @@ "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nexmo/client": "Required to use the Nexmo transport (^1.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0|^4.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.1).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)." + "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).", + "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7-dev" + "dev-master": "5.8-dev" } }, "autoload": { @@ -2133,46 +2134,39 @@ "framework", "laravel" ], - "time": "2019-02-26T15:41:34+00:00" + "time": "2019-03-26T17:19:10+00:00" }, { - "name": "laravel/nexmo-notification-channel", - "version": "v1.0.1", + "name": "laravel/helpers", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/laravel/nexmo-notification-channel.git", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" + "url": "https://github.com/laravel/helpers.git", + "reference": "a189c8ea170be2ee61207c9f9271ac40ac535b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", + "url": "https://api.github.com/repos/laravel/helpers/zipball/a189c8ea170be2ee61207c9f9271ac40ac535b5b", + "reference": "a189c8ea170be2ee61207c9f9271ac40ac535b5b", "shasum": "" }, "require": { - "nexmo/client": "^1.0", - "php": "^7.1.3" + "illuminate/support": "~5.8.0", + "php": ">=7.1.3" }, "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\NexmoChannelServiceProvider" - ] } }, "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } + "files": [ + "src/helpers.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2182,15 +2176,18 @@ { "name": "Taylor Otwell", "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries.vints@gmail.com" } ], - "description": "Nexmo Notification Channel for laravel.", + "description": "Provides backwards compatibility for helpers in the latest Laravel release.", "keywords": [ - "laravel", - "nexmo", - "notifications" + "helpers", + "laravel" ], - "time": "2018-12-04T12:57:08+00:00" + "time": "2019-02-15T15:31:21+00:00" }, { "name": "laravel/passport", @@ -2262,63 +2259,6 @@ ], "time": "2019-02-14T16:29:26+00:00" }, - { - "name": "laravel/slack-notification-channel", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/laravel/slack-notification-channel.git", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\SlackChannelServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Slack Notification Channel for laravel.", - "keywords": [ - "laravel", - "notifications", - "slack" - ], - "time": "2018-12-12T13:12:06+00:00" - }, { "name": "laravel/socialite", "version": "v4.1.2", @@ -3703,54 +3643,6 @@ ], "time": "2018-09-18T10:22:16+00:00" }, - { - "name": "nexmo/client", - "version": "1.6.3", - "source": { - "type": "git", - "url": "https://github.com/Nexmo/nexmo-php.git", - "reference": "29f6856b4d918f3565bf56c26bc01dd664988b24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/29f6856b4d918f3565bf56c26bc01dd664988b24", - "reference": "29f6856b4d918f3565bf56c26bc01dd664988b24", - "shasum": "" - }, - "require": { - "lcobucci/jwt": "^3.2", - "php": ">=5.6", - "php-http/client-implementation": "^1.0", - "php-http/guzzle6-adapter": "^1.0", - "zendframework/zend-diactoros": "^1.3" - }, - "require-dev": { - "estahn/phpunit-json-assertions": "^1.0.0", - "php-http/mock-client": "^0.3.0", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Nexmo\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tim Lytle", - "email": "tim@nexmo.com", - "homepage": "http://twitter.com/tjlytle", - "role": "Developer" - } - ], - "description": "PHP Client for using Nexmo's API.", - "time": "2019-03-15T11:47:11+00:00" - }, { "name": "nikic/php-parser", "version": "v4.2.1", @@ -4323,66 +4215,6 @@ ], "time": "2019-02-23T07:42:53+00:00" }, - { - "name": "php-http/guzzle6-adapter", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "php-http/httplug": "^1.0" - }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" - } - ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", - "keywords": [ - "Guzzle", - "http" - ], - "time": "2016-05-10T06:13:32+00:00" - }, { "name": "php-http/httplug", "version": "v1.1.0", @@ -4611,6 +4443,56 @@ ], "time": "2016-01-26T13:27:02+00:00" }, + { + "name": "phpoption/phpoption", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpOption\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "time": "2015-07-25T16:39:46+00:00" + }, { "name": "phpseclib/phpseclib", "version": "2.0.15", @@ -7259,16 +7141,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.10.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "82ebae02209c21113908c229e9883c419720738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", "shasum": "" }, "require": { @@ -7280,7 +7162,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -7302,7 +7184,7 @@ }, { "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "email": "backendtea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", @@ -7313,7 +7195,7 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-iconv", @@ -8149,35 +8031,35 @@ }, { "name": "vinkla/hashids", - "version": "5.1.0", + "version": "5.2.0", "source": { "type": "git", "url": "https://github.com/vinkla/laravel-hashids.git", - "reference": "a453f7872986bb3e1d7373f1544df1ad66405bdc" + "reference": "dbe5c3ac62e7b383c3db4ef3a6d55be6554de1ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vinkla/laravel-hashids/zipball/a453f7872986bb3e1d7373f1544df1ad66405bdc", - "reference": "a453f7872986bb3e1d7373f1544df1ad66405bdc", + "url": "https://api.github.com/repos/vinkla/laravel-hashids/zipball/dbe5c3ac62e7b383c3db4ef3a6d55be6554de1ee", + "reference": "dbe5c3ac62e7b383c3db4ef3a6d55be6554de1ee", "shasum": "" }, "require": { - "graham-campbell/manager": "^4.0", + "graham-campbell/manager": "^4.2", "hashids/hashids": "^3.0", - "illuminate/contracts": "5.7.*", - "illuminate/support": "5.7.*", + "illuminate/contracts": "5.8.*", + "illuminate/support": "5.8.*", "php": "^7.1.3" }, "require-dev": { - "graham-campbell/analyzer": "^2.0", - "graham-campbell/testbench": "^5.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" + "graham-campbell/analyzer": "^2.1", + "graham-campbell/testbench": "^5.2", + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^7.5 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "5.2-dev" }, "laravel": { "providers": [ @@ -8217,33 +8099,34 @@ "obfuscate", "youtube" ], - "time": "2018-08-23T11:16:23+00:00" + "time": "2019-02-27T15:32:38+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v2.6.1", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5" + "reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2a7dcf7e3e02dc5e701004e51a6f304b713107d5", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/dbcc609971dd9b55f48b8008b553d79fd372ddde", + "reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": "^5.4 || ^7.0", + "phpoption/phpoption": "^1.5", "symfony/polyfill-ctype": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0" + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -8268,7 +8151,7 @@ "env", "environment" ], - "time": "2019-01-29T11:11:52+00:00" + "time": "2019-03-06T09:39:45+00:00" }, { "name": "vluzrmos/language-detector", @@ -9577,6 +9460,120 @@ ], "time": "2019-03-12T15:52:39+00:00" }, + { + "name": "laravel/nexmo-notification-channel", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/nexmo-notification-channel.git", + "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", + "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", + "shasum": "" + }, + "require": { + "nexmo/client": "^1.0", + "php": "^7.1.3" + }, + "require-dev": { + "illuminate/notifications": "~5.7", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Illuminate\\Notifications\\NexmoChannelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Nexmo Notification Channel for laravel.", + "keywords": [ + "laravel", + "nexmo", + "notifications" + ], + "time": "2018-12-04T12:57:08+00:00" + }, + { + "name": "laravel/slack-notification-channel", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/slack-notification-channel.git", + "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", + "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": "^7.1.3" + }, + "require-dev": { + "illuminate/notifications": "~5.7", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Illuminate\\Notifications\\SlackChannelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Slack Notification Channel for laravel.", + "keywords": [ + "laravel", + "notifications", + "slack" + ], + "time": "2018-12-12T13:12:06+00:00" + }, { "name": "matthiasnoback/live-code-coverage", "version": "v1.1.0", @@ -10220,6 +10217,54 @@ ], "time": "2019-03-01T20:23:02+00:00" }, + { + "name": "nexmo/client", + "version": "1.6.3", + "source": { + "type": "git", + "url": "https://github.com/Nexmo/nexmo-php.git", + "reference": "29f6856b4d918f3565bf56c26bc01dd664988b24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/29f6856b4d918f3565bf56c26bc01dd664988b24", + "reference": "29f6856b4d918f3565bf56c26bc01dd664988b24", + "shasum": "" + }, + "require": { + "lcobucci/jwt": "^3.2", + "php": ">=5.6", + "php-http/client-implementation": "^1.0", + "php-http/guzzle6-adapter": "^1.0", + "zendframework/zend-diactoros": "^1.3" + }, + "require-dev": { + "estahn/phpunit-json-assertions": "^1.0.0", + "php-http/mock-client": "^0.3.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Nexmo\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tim Lytle", + "email": "tim@nexmo.com", + "homepage": "http://twitter.com/tjlytle", + "role": "Developer" + } + ], + "description": "PHP Client for using Nexmo's API.", + "time": "2019-03-15T11:47:11+00:00" + }, { "name": "nunomaduro/larastan", "version": "v0.3.15", @@ -10338,29 +10383,29 @@ }, { "name": "orchestra/testbench", - "version": "v3.7.7", + "version": "v3.8.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "0715465a6f921e1da61f28cb5b310cbbaa3c92bf" + "reference": "2a79dc414c27457e2c7500c763eba2594b51f14c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/0715465a6f921e1da61f28cb5b310cbbaa3c92bf", - "reference": "0715465a6f921e1da61f28cb5b310cbbaa3c92bf", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/2a79dc414c27457e2c7500c763eba2594b51f14c", + "reference": "2a79dc414c27457e2c7500c763eba2594b51f14c", "shasum": "" }, "require": { - "laravel/framework": "~5.7.28", + "laravel/framework": "~5.8.2", "mockery/mockery": "^1.0", - "orchestra/testbench-core": "~3.7.8", + "orchestra/testbench-core": "~3.8.1", "php": ">=7.1", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^7.5 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7-dev" + "dev-master": "3.8-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -10384,20 +10429,20 @@ "orchestral", "testing" ], - "time": "2019-03-16T07:03:42+00:00" + "time": "2019-02-28T01:19:16+00:00" }, { "name": "orchestra/testbench-core", - "version": "v3.7.8", + "version": "v3.8.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "11b9043c243ee95018bc24d70ea555c087d1559c" + "reference": "51192972746beb3766327bb84838998d3a59e99c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/11b9043c243ee95018bc24d70ea555c087d1559c", - "reference": "11b9043c243ee95018bc24d70ea555c087d1559c", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/51192972746beb3766327bb84838998d3a59e99c", + "reference": "51192972746beb3766327bb84838998d3a59e99c", "shasum": "" }, "require": { @@ -10405,22 +10450,21 @@ "php": ">=7.1" }, "require-dev": { - "laravel/framework": "~5.7.28", - "laravel/laravel": "5.7.x-dev", + "laravel/framework": "~5.8.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^7.5 || ^8.0" }, "suggest": { - "laravel/framework": "Required for testing (~5.7.28).", + "laravel/framework": "Required for testing (~5.8.0).", "mockery/mockery": "Allow to use Mockery for testing (^1.0).", - "orchestra/testbench-browser-kit": "Allow to use legacy Laravel BrowserKit for testing (~3.7).", - "orchestra/testbench-dusk": "Allow to use Laravel Dusk for testing (~3.7).", - "phpunit/phpunit": "Allow to use PHPUnit for testing (^7.0)." + "orchestra/testbench-browser-kit": "Allow to use legacy Laravel BrowserKit for testing (^3.8).", + "orchestra/testbench-dusk": "Allow to use Laravel Dusk for testing (^3.8).", + "phpunit/phpunit": "Allow to use PHPUnit for testing (^7.5 || ^8.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7-dev" + "dev-master": "3.8-dev" } }, "autoload": { @@ -10449,7 +10493,7 @@ "orchestral", "testing" ], - "time": "2019-03-16T06:55:15+00:00" + "time": "2019-02-28T00:40:46+00:00" }, { "name": "phar-io/manifest", @@ -10604,6 +10648,66 @@ ], "time": "2018-02-15T16:58:55+00:00" }, + { + "name": "php-http/guzzle6-adapter", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/guzzle6-adapter.git", + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5.0", + "php-http/httplug": "^1.0" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "php-http/adapter-integration-tests": "^0.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Adapter\\Guzzle6\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "David de Boer", + "email": "david@ddeboer.nl" + } + ], + "description": "Guzzle 6 HTTP Adapter", + "homepage": "http://httplug.io", + "keywords": [ + "Guzzle", + "http" + ], + "time": "2016-05-10T06:13:32+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -10940,40 +11044,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "0317a769a81845c390e19684d9ba25d7f6aa4707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0317a769a81845c390e19684d9ba25d7f6aa4707", + "reference": "0317a769a81845c390e19684d9ba25d7f6aa4707", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.0.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.0" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -10999,7 +11103,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-02-26T07:38:26+00:00" }, { "name": "phpunit/php-file-iterator", @@ -11192,22 +11296,22 @@ }, { "name": "phpunit/phpcov", - "version": "5.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpcov.git", - "reference": "72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8" + "reference": "20c0628afab1e042892d371a7159f68bce4b411b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8", - "reference": "72fb974e6fe9b39d7e0b0d44061d2ba4c49ee0b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/20c0628afab1e042892d371a7159f68bce4b411b", + "reference": "20c0628afab1e042892d371a7159f68bce4b411b", "shasum": "" }, "require": { - "php": "^7.1", - "phpunit/php-code-coverage": "^6.0", - "phpunit/phpunit": "^7.0", + "php": "^7.2", + "phpunit/php-code-coverage": "^7.0", + "phpunit/phpunit": "^8.0", "sebastian/diff": "^3.0", "sebastian/finder-facade": "^1.1", "sebastian/version": "^2.0", @@ -11219,7 +11323,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -11240,20 +11344,20 @@ ], "description": "CLI frontend for php-code-coverage", "homepage": "https://github.com/sebastianbergmann/phpcov", - "time": "2018-02-04T10:18:50+00:00" + "time": "2019-02-20T07:20:38+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.7", + "version": "8.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "eb343b86753d26de07ecba7868fa983104361948" + "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/eb343b86753d26de07ecba7868fa983104361948", - "reference": "eb343b86753d26de07ecba7868fa983104361948", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/925109f8bbe6dae28fbc7bb07446a53abd3b1c25", + "reference": "925109f8bbe6dae28fbc7bb07446a53abd3b1c25", "shasum": "" }, "require": { @@ -11263,27 +11367,25 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", + "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.7", "phar-io/manifest": "^1.0.2", "phar-io/version": "^2.0", - "php": "^7.1", + "php": "^7.2", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-code-coverage": "^7.0", "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", + "sebastian/environment": "^4.1", "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "sebastian/global-state": "^3.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, @@ -11298,7 +11400,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.0-dev" } }, "autoload": { @@ -11324,7 +11426,7 @@ "testing", "xunit" ], - "time": "2019-03-16T07:31:17+00:00" + "time": "2019-03-26T14:00:24+00:00" }, { "name": "psalm/plugin-laravel", @@ -11902,23 +12004,26 @@ }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -11926,7 +12031,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -11949,7 +12054,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", diff --git a/phpunit.xml b/phpunit.xml index 1568bea1c..37188fc0e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -28,14 +28,15 @@ - - - - - - - - - + + + + + + + + + + diff --git a/resources/views/vendor/mail/markdown/button.blade.php b/resources/views/vendor/mail/text/button.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/button.blade.php rename to resources/views/vendor/mail/text/button.blade.php diff --git a/resources/views/vendor/mail/markdown/footer.blade.php b/resources/views/vendor/mail/text/footer.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/footer.blade.php rename to resources/views/vendor/mail/text/footer.blade.php diff --git a/resources/views/vendor/mail/markdown/header.blade.php b/resources/views/vendor/mail/text/header.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/header.blade.php rename to resources/views/vendor/mail/text/header.blade.php diff --git a/resources/views/vendor/mail/markdown/layout.blade.php b/resources/views/vendor/mail/text/layout.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/layout.blade.php rename to resources/views/vendor/mail/text/layout.blade.php diff --git a/resources/views/vendor/mail/markdown/message.blade.php b/resources/views/vendor/mail/text/message.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/message.blade.php rename to resources/views/vendor/mail/text/message.blade.php diff --git a/resources/views/vendor/mail/markdown/panel.blade.php b/resources/views/vendor/mail/text/panel.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/panel.blade.php rename to resources/views/vendor/mail/text/panel.blade.php diff --git a/resources/views/vendor/mail/markdown/promotion.blade.php b/resources/views/vendor/mail/text/promotion.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/promotion.blade.php rename to resources/views/vendor/mail/text/promotion.blade.php diff --git a/resources/views/vendor/mail/markdown/promotion/button.blade.php b/resources/views/vendor/mail/text/promotion/button.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/promotion/button.blade.php rename to resources/views/vendor/mail/text/promotion/button.blade.php diff --git a/resources/views/vendor/mail/markdown/subcopy.blade.php b/resources/views/vendor/mail/text/subcopy.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/subcopy.blade.php rename to resources/views/vendor/mail/text/subcopy.blade.php diff --git a/resources/views/vendor/mail/markdown/table.blade.php b/resources/views/vendor/mail/text/table.blade.php similarity index 100% rename from resources/views/vendor/mail/markdown/table.blade.php rename to resources/views/vendor/mail/text/table.blade.php diff --git a/tests/Browser/Auth/AuthControllerTest.php b/tests/Browser/Auth/AuthControllerTest.php index f92bd668c..8793c7768 100644 --- a/tests/Browser/Auth/AuthControllerTest.php +++ b/tests/Browser/Auth/AuthControllerTest.php @@ -8,7 +8,7 @@ use Laravel\Passport\ClientRepository; class AuthControllerTest extends ApiTestCase { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Browser/Settings/MultiFAControllerTest.php b/tests/Browser/Settings/MultiFAControllerTest.php index 510484243..ea056ff99 100644 --- a/tests/Browser/Settings/MultiFAControllerTest.php +++ b/tests/Browser/Settings/MultiFAControllerTest.php @@ -180,8 +180,8 @@ class MultiFAControllerTest extends DuskTestCase $this->assertTrue($this->hasNotification($browser)); $notification = $this->getNotification($browser); - $this->assertContains('error', $notification->getAttribute('class')); - $this->assertContains('Two Factor Authentication', $notification->getText()); + $this->assertStringContainsString('error', $notification->getAttribute('class')); + $this->assertStringContainsString('Two Factor Authentication', $notification->getText()); }); } @@ -224,8 +224,8 @@ class MultiFAControllerTest extends DuskTestCase $this->assertTrue($this->hasNotification($browser)); $notification = $this->getNotification($browser); - $this->assertContains('success', $notification->getAttribute('class')); - $this->assertContains('Two Factor Authentication', $notification->getText()); + $this->assertStringContainsString('success', $notification->getAttribute('class')); + $this->assertStringContainsString('Two Factor Authentication', $notification->getText()); // TODO: test if user has 2fa enabled actually // TODO: test if session token auth is right @@ -267,8 +267,8 @@ class MultiFAControllerTest extends DuskTestCase $this->assertTrue($this->hasDivAlert($browser)); $notification = $this->getDivAlert($browser); - $this->assertContains('alert-danger', $notification->getAttribute('class')); - $this->assertContains('The two factor authentication has failed.', $notification->getText()); + $this->assertStringContainsString('alert-danger', $notification->getAttribute('class')); + $this->assertStringContainsString('The two factor authentication has failed.', $notification->getText()); }); } @@ -344,8 +344,8 @@ class MultiFAControllerTest extends DuskTestCase $this->assertTrue($this->hasNotification($browser)); $notification = $this->getNotification($browser); - $this->assertContains('success', $notification->getAttribute('class')); - $this->assertContains('Two Factor Authentication', $notification->getText()); + $this->assertStringContainsString('success', $notification->getAttribute('class')); + $this->assertStringContainsString('Two Factor Authentication', $notification->getText()); }); } @@ -385,8 +385,8 @@ class MultiFAControllerTest extends DuskTestCase $res = $browser->elements('.notification'); $notification = $res[1]; - $this->assertContains('error', $notification->getAttribute('class')); - $this->assertContains('Two Factor Authentication', $notification->getText()); + $this->assertStringContainsString('error', $notification->getAttribute('class')); + $this->assertStringContainsString('Two Factor Authentication', $notification->getText()); }); } } diff --git a/tests/Commands/UpdateCommandTest.php b/tests/Commands/UpdateCommandTest.php index d81ebc070..e70f84a10 100644 --- a/tests/Commands/UpdateCommandTest.php +++ b/tests/Commands/UpdateCommandTest.php @@ -45,7 +45,7 @@ class UpdateCommandTest extends TestCase private function assertCommandContains($array, $message, $command) { - $this->assertContains($message, $array['message']); - $this->assertContains($command, $array['command']); + $this->assertStringContainsString($message, $array['message']); + $this->assertStringContainsString($command, $array['command']); } } diff --git a/tests/Unit/Jobs/Reminder/NotifyUserAboutReminderTest.php b/tests/Unit/Jobs/Reminder/NotifyUserAboutReminderTest.php index ddd8431c2..c99f82b78 100644 --- a/tests/Unit/Jobs/Reminder/NotifyUserAboutReminderTest.php +++ b/tests/Unit/Jobs/Reminder/NotifyUserAboutReminderTest.php @@ -1,6 +1,6 @@ toMail($user)->toArray(); $this->assertEquals("Reminder for {$contact->name}", $mailData['subject']); $this->assertEquals("Hi {$user->first_name}", $mailData['greeting']); - $this->assertContains("You wanted to be reminded of {$reminderOutbox->reminder->title}", $mailData['introLines']); + $this->assertStringContainsString("You wanted to be reminded of {$reminderOutbox->reminder->title}", $mailData['introLines'][0]); return $notification->reminder->id === $reminder->id; } @@ -103,7 +103,7 @@ class NotifyUserAboutReminderTest extends TestCase $mailData = $notification->toMail($user)->toArray(); $this->assertEquals("Reminder for {$contact->name}", $mailData['subject']); $this->assertEquals("Hi {$user->first_name}", $mailData['greeting']); - $this->assertContains('In days (on Jan 01, 2018), the following event will happen:', $mailData['introLines']); + $this->assertStringContainsString('In days (on Jan 01, 2018), the following event will happen:', $mailData['introLines'][0]); return $notification->reminder->id === $reminder->id; } diff --git a/tests/Unit/Models/ContactTest.php b/tests/Unit/Models/ContactTest.php index 3e639b72e..d24c39399 100644 --- a/tests/Unit/Models/ContactTest.php +++ b/tests/Unit/Models/ContactTest.php @@ -637,8 +637,8 @@ class ContactTest extends FeatureTestCase $url = $contact->getAvatarURL(); $this->assertNotNull($url); - $this->assertContains('s=250&d=mm&r=g', $url); - $this->assertContains('https://www.gravatar.com', $url); + $this->assertStringContainsString('s=250&d=mm&r=g', $url); + $this->assertStringContainsString('https://www.gravatar.com', $url); } public function test_gravatar_set_emailreal_multiple() @@ -663,8 +663,8 @@ class ContactTest extends FeatureTestCase $url = $contact->getAvatarURL(); $this->assertNotNull($url); - $this->assertContains('s=250&d=mm&r=g', $url); - $this->assertContains('https://www.gravatar.com', $url); + $this->assertStringContainsString('s=250&d=mm&r=g', $url); + $this->assertStringContainsString('https://www.gravatar.com', $url); } public function test_gravatar_set_emailreal_secure() @@ -685,8 +685,8 @@ class ContactTest extends FeatureTestCase $url = $contact->getAvatarURL(); $this->assertNotNull($url); - $this->assertContains('s=250&d=mm&r=g', $url); - $this->assertContains('https://secure.gravatar.com', $url); + $this->assertStringContainsString('s=250&d=mm&r=g', $url); + $this->assertStringContainsString('https://secure.gravatar.com', $url); } public function test_get_avatar_returns_external_url() diff --git a/tests/Unit/Services/VCard/ExportVCardTest.php b/tests/Unit/Services/VCard/ExportVCardTest.php index 09d543dd6..6377b0325 100644 --- a/tests/Unit/Services/VCard/ExportVCardTest.php +++ b/tests/Unit/Services/VCard/ExportVCardTest.php @@ -39,8 +39,8 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 2, $vCard->children() ); - $this->assertContains('FN:John Doe', $vCard->serialize()); - $this->assertContains('N:Doe;John;;;', $vCard->serialize()); + $this->assertStringContainsString('FN:John Doe', $vCard->serialize()); + $this->assertStringContainsString('N:Doe;John;;;', $vCard->serialize()); } public function test_vcard_add_nickname() @@ -59,9 +59,9 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 3, $vCard->children() ); - $this->assertContains('FN:John Doe', $vCard->serialize()); - $this->assertContains('N:Doe;John;;;', $vCard->serialize()); - $this->assertContains('NICKNAME:the nickname', $vCard->serialize()); + $this->assertStringContainsString('FN:John Doe', $vCard->serialize()); + $this->assertStringContainsString('N:Doe;John;;;', $vCard->serialize()); + $this->assertStringContainsString('NICKNAME:the nickname', $vCard->serialize()); } public function test_vcard_add_gender() @@ -79,7 +79,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('GENDER:M', $vCard->serialize()); + $this->assertStringContainsString('GENDER:M', $vCard->serialize()); } public function test_vcard_add_gender_female() @@ -103,7 +103,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('GENDER:F', $vCard->serialize()); + $this->assertStringContainsString('GENDER:F', $vCard->serialize()); } public function test_vcard_add_gender_unknown() @@ -126,7 +126,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('GENDER:U', $vCard->serialize()); + $this->assertStringContainsString('GENDER:U', $vCard->serialize()); } public function test_vcard_add_gender_type_null() @@ -150,7 +150,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('GENDER:O', $vCard->serialize()); + $this->assertStringContainsString('GENDER:O', $vCard->serialize()); } public function test_vcard_add_gender_type_null_male() @@ -174,7 +174,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('GENDER:O', $vCard->serialize()); + $this->assertStringContainsString('GENDER:O', $vCard->serialize()); } public function test_vcard_add_gender_type_null_female() @@ -198,7 +198,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('GENDER:F', $vCard->serialize()); + $this->assertStringContainsString('GENDER:F', $vCard->serialize()); } public function test_vcard_add_photo() @@ -217,7 +217,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('PHOTO;VALUE=URI:gravatar', $vCard->serialize()); + $this->assertStringContainsString('PHOTO;VALUE=URI:gravatar', $vCard->serialize()); } public function test_vcard_add_work_org() @@ -236,7 +236,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('ORG:the company', $vCard->serialize()); + $this->assertStringContainsString('ORG:the company', $vCard->serialize()); } public function test_vcard_add_work_title() @@ -255,7 +255,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('TITLE:job position', $vCard->serialize()); + $this->assertStringContainsString('TITLE:job position', $vCard->serialize()); } public function test_vcard_add_work_information() @@ -275,8 +275,8 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 2, $vCard->children() ); - $this->assertContains('ORG:the company', $vCard->serialize()); - $this->assertContains('TITLE:job position', $vCard->serialize()); + $this->assertStringContainsString('ORG:the company', $vCard->serialize()); + $this->assertStringContainsString('TITLE:job position', $vCard->serialize()); } public function test_vcard_add_birthday() @@ -293,7 +293,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('BDAY:20001005', $vCard->serialize()); + $this->assertStringContainsString('BDAY:20001005', $vCard->serialize()); } public function test_vcard_add_contact_fields_empty() @@ -331,7 +331,7 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 1, $vCard->children() ); - $this->assertContains('EMAIL:john@doe.com', $vCard->serialize()); + $this->assertStringContainsString('EMAIL:john@doe.com', $vCard->serialize()); } public function test_vcard_add_addresses_empty() @@ -374,8 +374,8 @@ class ExportVCardTest extends TestCase self::defaultPropsCount + 2, $vCard->children() ); - $this->assertContains('ADR:;;12;beverly hills;;90210;US', $vCard->serialize()); - $this->assertContains('ADR:;;12;beverly hills;;90210;US', $vCard->serialize()); + $this->assertStringContainsString('ADR:;;12;beverly hills;;90210;US', $vCard->serialize()); + $this->assertStringContainsString('ADR:;;12;beverly hills;;90210;US', $vCard->serialize()); } public function test_vcard_prepares_an_almost_empty_vcard()