chore(deps): upgrade to laravel/framework 5.8 (#2553)

This commit is contained in:
Alexis Saettler
2019-03-31 00:17:20 +01:00
committed by GitHub
parent a5939d52cf
commit afcafa679b
23 changed files with 475 additions and 367 deletions
+1
View File
@@ -20,3 +20,4 @@ php-extensions-*.tar.bz2
monicadump.sql monicadump.sql
.scannerwork/ .scannerwork/
.sentry-release .sentry-release
.phpunit.result.cache
@@ -174,7 +174,7 @@ class MultiFAController extends Controller
$key->save(); $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()->forget('u2f.registerData');
session([config('u2f.sessionU2fName') => true]); session([config('u2f.sessionU2fName') => true]);
@@ -14,10 +14,10 @@ class EnsureEmailIsVerified extends EnsureEmailIsVerifiedBase
* @param \Closure $next * @param \Closure $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse * @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')) { if (config('monica.signup_double_optin')) {
return parent::handle($request, $next); return parent::handle($request, $next, $redirectToRoute);
} }
return $next($request); return $next($request);
+1 -1
View File
@@ -34,7 +34,7 @@ class IdHasher
if (starts_with($hash, $this->prefix)) { if (starts_with($hash, $this->prefix)) {
$result = Hashids::decode(str_after($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 return $result[0]; // result is always an array due to quirk in Hashids libary
} }
} }
+5 -4
View File
@@ -20,7 +20,8 @@
"jenssegers/date": "^3.3", "jenssegers/date": "^3.3",
"lahaxearnaud/laravel-u2f": "^1.3", "lahaxearnaud/laravel-u2f": "^1.3",
"laravel/cashier": "~8.0", "laravel/cashier": "~8.0",
"laravel/framework": "5.7.*", "laravel/framework": "5.8.*",
"laravel/helpers": "^1.0",
"laravel/passport": "^7.0", "laravel/passport": "^7.0",
"laravel/socialite": "^4.0", "laravel/socialite": "^4.0",
"laravel/tinker": "^1.0", "laravel/tinker": "^1.0",
@@ -44,7 +45,7 @@
"stevebauman/location": "^3.0", "stevebauman/location": "^3.0",
"symfony/translation": "^4.0", "symfony/translation": "^4.0",
"vectorface/whip": "^0.3.2", "vectorface/whip": "^0.3.2",
"vinkla/hashids": "^5.0", "vinkla/hashids": "^5.2",
"vluzrmos/language-detector": "^1.0" "vluzrmos/language-detector": "^1.0"
}, },
"require-dev": { "require-dev": {
@@ -57,8 +58,8 @@
"matthiasnoback/live-code-coverage": "^1.0", "matthiasnoback/live-code-coverage": "^1.0",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nunomaduro/larastan": "^0.3.15", "nunomaduro/larastan": "^0.3.15",
"phpunit/phpcov": "^5.0", "phpunit/phpcov": "^6.0",
"phpunit/phpunit": "^7.0", "phpunit/phpunit": "^8.0",
"psalm/plugin-laravel": "^0.2", "psalm/plugin-laravel": "^0.2",
"roave/security-advisories": "dev-master", "roave/security-advisories": "dev-master",
"symfony/css-selector": "~4.0", "symfony/css-selector": "~4.0",
Generated
+413 -308
View File
File diff suppressed because it is too large Load Diff
+10 -9
View File
@@ -28,14 +28,15 @@
</whitelist> </whitelist>
</filter> </filter>
<php> <php>
<env name="APP_ENV" value="testing"/> <server name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="base64:NTrXToqFZJlv48dgPc+kNpc3SBt333TfDnF1mDShsBg="/> <server name="APP_KEY" value="base64:NTrXToqFZJlv48dgPc+kNpc3SBt333TfDnF1mDShsBg="/>
<env name="DB_CONNECTION" value="testing"/> <server name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/> <server name="DB_CONNECTION" value="testing"/>
<env name="SESSION_DRIVER" value="array"/> <server name="CACHE_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/> <server name="SESSION_DRIVER" value="array"/>
<env name="APP_DEFAULT_LOCALE" value="en"/> <server name="QUEUE_DRIVER" value="sync"/>
<env name="LOG_CHANNEL" value="testing"/> <server name="APP_DEFAULT_LOCALE" value="en"/>
<env name="DAV_ENABLED" value="true"/> <server name="LOG_CHANNEL" value="testing"/>
<server name="DAV_ENABLED" value="true"/>
</php> </php>
</phpunit> </phpunit>
+1 -1
View File
@@ -8,7 +8,7 @@ use Laravel\Passport\ClientRepository;
class AuthControllerTest extends ApiTestCase class AuthControllerTest extends ApiTestCase
{ {
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
@@ -180,8 +180,8 @@ class MultiFAControllerTest extends DuskTestCase
$this->assertTrue($this->hasNotification($browser)); $this->assertTrue($this->hasNotification($browser));
$notification = $this->getNotification($browser); $notification = $this->getNotification($browser);
$this->assertContains('error', $notification->getAttribute('class')); $this->assertStringContainsString('error', $notification->getAttribute('class'));
$this->assertContains('Two Factor Authentication', $notification->getText()); $this->assertStringContainsString('Two Factor Authentication', $notification->getText());
}); });
} }
@@ -224,8 +224,8 @@ class MultiFAControllerTest extends DuskTestCase
$this->assertTrue($this->hasNotification($browser)); $this->assertTrue($this->hasNotification($browser));
$notification = $this->getNotification($browser); $notification = $this->getNotification($browser);
$this->assertContains('success', $notification->getAttribute('class')); $this->assertStringContainsString('success', $notification->getAttribute('class'));
$this->assertContains('Two Factor Authentication', $notification->getText()); $this->assertStringContainsString('Two Factor Authentication', $notification->getText());
// TODO: test if user has 2fa enabled actually // TODO: test if user has 2fa enabled actually
// TODO: test if session token auth is right // TODO: test if session token auth is right
@@ -267,8 +267,8 @@ class MultiFAControllerTest extends DuskTestCase
$this->assertTrue($this->hasDivAlert($browser)); $this->assertTrue($this->hasDivAlert($browser));
$notification = $this->getDivAlert($browser); $notification = $this->getDivAlert($browser);
$this->assertContains('alert-danger', $notification->getAttribute('class')); $this->assertStringContainsString('alert-danger', $notification->getAttribute('class'));
$this->assertContains('The two factor authentication has failed.', $notification->getText()); $this->assertStringContainsString('The two factor authentication has failed.', $notification->getText());
}); });
} }
@@ -344,8 +344,8 @@ class MultiFAControllerTest extends DuskTestCase
$this->assertTrue($this->hasNotification($browser)); $this->assertTrue($this->hasNotification($browser));
$notification = $this->getNotification($browser); $notification = $this->getNotification($browser);
$this->assertContains('success', $notification->getAttribute('class')); $this->assertStringContainsString('success', $notification->getAttribute('class'));
$this->assertContains('Two Factor Authentication', $notification->getText()); $this->assertStringContainsString('Two Factor Authentication', $notification->getText());
}); });
} }
@@ -385,8 +385,8 @@ class MultiFAControllerTest extends DuskTestCase
$res = $browser->elements('.notification'); $res = $browser->elements('.notification');
$notification = $res[1]; $notification = $res[1];
$this->assertContains('error', $notification->getAttribute('class')); $this->assertStringContainsString('error', $notification->getAttribute('class'));
$this->assertContains('Two Factor Authentication', $notification->getText()); $this->assertStringContainsString('Two Factor Authentication', $notification->getText());
}); });
} }
} }
+2 -2
View File
@@ -45,7 +45,7 @@ class UpdateCommandTest extends TestCase
private function assertCommandContains($array, $message, $command) private function assertCommandContains($array, $message, $command)
{ {
$this->assertContains($message, $array['message']); $this->assertStringContainsString($message, $array['message']);
$this->assertContains($command, $array['command']); $this->assertStringContainsString($command, $array['command']);
} }
} }
@@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Feature; namespace Tests\Unit\Jobs\Reminder;
use Carbon\Carbon; use Carbon\Carbon;
use Tests\TestCase; use Tests\TestCase;
@@ -58,7 +58,7 @@ class NotifyUserAboutReminderTest extends TestCase
$mailData = $notification->toMail($user)->toArray(); $mailData = $notification->toMail($user)->toArray();
$this->assertEquals("Reminder for {$contact->name}", $mailData['subject']); $this->assertEquals("Reminder for {$contact->name}", $mailData['subject']);
$this->assertEquals("Hi {$user->first_name}", $mailData['greeting']); $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; return $notification->reminder->id === $reminder->id;
} }
@@ -103,7 +103,7 @@ class NotifyUserAboutReminderTest extends TestCase
$mailData = $notification->toMail($user)->toArray(); $mailData = $notification->toMail($user)->toArray();
$this->assertEquals("Reminder for {$contact->name}", $mailData['subject']); $this->assertEquals("Reminder for {$contact->name}", $mailData['subject']);
$this->assertEquals("Hi {$user->first_name}", $mailData['greeting']); $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; return $notification->reminder->id === $reminder->id;
} }
+6 -6
View File
@@ -637,8 +637,8 @@ class ContactTest extends FeatureTestCase
$url = $contact->getAvatarURL(); $url = $contact->getAvatarURL();
$this->assertNotNull($url); $this->assertNotNull($url);
$this->assertContains('s=250&d=mm&r=g', $url); $this->assertStringContainsString('s=250&d=mm&r=g', $url);
$this->assertContains('https://www.gravatar.com', $url); $this->assertStringContainsString('https://www.gravatar.com', $url);
} }
public function test_gravatar_set_emailreal_multiple() public function test_gravatar_set_emailreal_multiple()
@@ -663,8 +663,8 @@ class ContactTest extends FeatureTestCase
$url = $contact->getAvatarURL(); $url = $contact->getAvatarURL();
$this->assertNotNull($url); $this->assertNotNull($url);
$this->assertContains('s=250&d=mm&r=g', $url); $this->assertStringContainsString('s=250&d=mm&r=g', $url);
$this->assertContains('https://www.gravatar.com', $url); $this->assertStringContainsString('https://www.gravatar.com', $url);
} }
public function test_gravatar_set_emailreal_secure() public function test_gravatar_set_emailreal_secure()
@@ -685,8 +685,8 @@ class ContactTest extends FeatureTestCase
$url = $contact->getAvatarURL(); $url = $contact->getAvatarURL();
$this->assertNotNull($url); $this->assertNotNull($url);
$this->assertContains('s=250&d=mm&r=g', $url); $this->assertStringContainsString('s=250&d=mm&r=g', $url);
$this->assertContains('https://secure.gravatar.com', $url); $this->assertStringContainsString('https://secure.gravatar.com', $url);
} }
public function test_get_avatar_returns_external_url() public function test_get_avatar_returns_external_url()
+20 -20
View File
@@ -39,8 +39,8 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 2, self::defaultPropsCount + 2,
$vCard->children() $vCard->children()
); );
$this->assertContains('FN:John Doe', $vCard->serialize()); $this->assertStringContainsString('FN:John Doe', $vCard->serialize());
$this->assertContains('N:Doe;John;;;', $vCard->serialize()); $this->assertStringContainsString('N:Doe;John;;;', $vCard->serialize());
} }
public function test_vcard_add_nickname() public function test_vcard_add_nickname()
@@ -59,9 +59,9 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 3, self::defaultPropsCount + 3,
$vCard->children() $vCard->children()
); );
$this->assertContains('FN:John Doe', $vCard->serialize()); $this->assertStringContainsString('FN:John Doe', $vCard->serialize());
$this->assertContains('N:Doe;John;;;', $vCard->serialize()); $this->assertStringContainsString('N:Doe;John;;;', $vCard->serialize());
$this->assertContains('NICKNAME:the nickname', $vCard->serialize()); $this->assertStringContainsString('NICKNAME:the nickname', $vCard->serialize());
} }
public function test_vcard_add_gender() public function test_vcard_add_gender()
@@ -79,7 +79,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('GENDER:M', $vCard->serialize()); $this->assertStringContainsString('GENDER:M', $vCard->serialize());
} }
public function test_vcard_add_gender_female() public function test_vcard_add_gender_female()
@@ -103,7 +103,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('GENDER:F', $vCard->serialize()); $this->assertStringContainsString('GENDER:F', $vCard->serialize());
} }
public function test_vcard_add_gender_unknown() public function test_vcard_add_gender_unknown()
@@ -126,7 +126,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('GENDER:U', $vCard->serialize()); $this->assertStringContainsString('GENDER:U', $vCard->serialize());
} }
public function test_vcard_add_gender_type_null() public function test_vcard_add_gender_type_null()
@@ -150,7 +150,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('GENDER:O', $vCard->serialize()); $this->assertStringContainsString('GENDER:O', $vCard->serialize());
} }
public function test_vcard_add_gender_type_null_male() public function test_vcard_add_gender_type_null_male()
@@ -174,7 +174,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('GENDER:O', $vCard->serialize()); $this->assertStringContainsString('GENDER:O', $vCard->serialize());
} }
public function test_vcard_add_gender_type_null_female() public function test_vcard_add_gender_type_null_female()
@@ -198,7 +198,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('GENDER:F', $vCard->serialize()); $this->assertStringContainsString('GENDER:F', $vCard->serialize());
} }
public function test_vcard_add_photo() public function test_vcard_add_photo()
@@ -217,7 +217,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $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() public function test_vcard_add_work_org()
@@ -236,7 +236,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('ORG:the company', $vCard->serialize()); $this->assertStringContainsString('ORG:the company', $vCard->serialize());
} }
public function test_vcard_add_work_title() public function test_vcard_add_work_title()
@@ -255,7 +255,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('TITLE:job position', $vCard->serialize()); $this->assertStringContainsString('TITLE:job position', $vCard->serialize());
} }
public function test_vcard_add_work_information() public function test_vcard_add_work_information()
@@ -275,8 +275,8 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 2, self::defaultPropsCount + 2,
$vCard->children() $vCard->children()
); );
$this->assertContains('ORG:the company', $vCard->serialize()); $this->assertStringContainsString('ORG:the company', $vCard->serialize());
$this->assertContains('TITLE:job position', $vCard->serialize()); $this->assertStringContainsString('TITLE:job position', $vCard->serialize());
} }
public function test_vcard_add_birthday() public function test_vcard_add_birthday()
@@ -293,7 +293,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $vCard->children()
); );
$this->assertContains('BDAY:20001005', $vCard->serialize()); $this->assertStringContainsString('BDAY:20001005', $vCard->serialize());
} }
public function test_vcard_add_contact_fields_empty() public function test_vcard_add_contact_fields_empty()
@@ -331,7 +331,7 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 1, self::defaultPropsCount + 1,
$vCard->children() $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() public function test_vcard_add_addresses_empty()
@@ -374,8 +374,8 @@ class ExportVCardTest extends TestCase
self::defaultPropsCount + 2, self::defaultPropsCount + 2,
$vCard->children() $vCard->children()
); );
$this->assertContains('ADR:;;12;beverly hills;;90210;US', $vCard->serialize()); $this->assertStringContainsString('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());
} }
public function test_vcard_prepares_an_almost_empty_vcard() public function test_vcard_prepares_an_almost_empty_vcard()