update to laravel 5.7 and try getting autologin saved

This commit is contained in:
Kode
2018-10-14 20:50:32 +01:00
parent c3da17befc
commit 6501aacb1b
2402 changed files with 79064 additions and 28971 deletions

View File

@@ -29,10 +29,6 @@ class DateCasterTest extends TestCase
*/
public function testDumpDateTime($time, $timezone, $xDate, $xTimestamp)
{
if ((defined('HHVM_VERSION_ID') || PHP_VERSION_ID <= 50509) && preg_match('/[-+]\d{2}:\d{2}/', $timezone)) {
$this->markTestSkipped('DateTimeZone GMT offsets are supported since 5.5.10. See https://github.com/facebook/hhvm/issues/5875 for HHVM.');
}
$date = new \DateTime($time, new \DateTimeZone($timezone));
$xDump = <<<EODUMP
@@ -49,10 +45,6 @@ EODUMP;
*/
public function testCastDateTime($time, $timezone, $xDate, $xTimestamp, $xInfos)
{
if ((defined('HHVM_VERSION_ID') || PHP_VERSION_ID <= 50509) && preg_match('/[-+]\d{2}:\d{2}/', $timezone)) {
$this->markTestSkipped('DateTimeZone GMT offsets are supported since 5.5.10. See https://github.com/facebook/hhvm/issues/5875 for HHVM.');
}
$stub = new Stub();
$date = new \DateTime($time, new \DateTimeZone($timezone));
$cast = DateCaster::castDateTime($date, array('foo' => 'bar'), $stub, false, 0);
@@ -102,7 +94,7 @@ EODUMP;
*/
public function testDumpInterval($intervalSpec, $ms, $invert, $expected)
{
if ($ms && PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) {
if ($ms && \PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) {
$this->markTestSkipped('Skipped on 7.2 before rc4 because of php bug #75354.');
}
@@ -122,7 +114,7 @@ EODUMP;
*/
public function testDumpIntervalExcludingVerbosity($intervalSpec, $ms, $invert, $expected)
{
if ($ms && PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) {
if ($ms && \PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) {
$this->markTestSkipped('Skipped on 7.2 before rc4 because of php bug #75354.');
}
@@ -142,7 +134,7 @@ EODUMP;
*/
public function testCastInterval($intervalSpec, $ms, $invert, $xInterval, $xSeconds)
{
if ($ms && PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) {
if ($ms && \PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) {
$this->markTestSkipped('Skipped on 7.2 before rc4 because of php bug #75354.');
}
@@ -181,35 +173,32 @@ EODUMP;
public function provideIntervals()
{
$i = new \DateInterval('PT0S');
$ms = ($withMs = \PHP_VERSION_ID >= 70100 && isset($i->f)) ? '.0' : '';
return array(
array('PT0S', 0, 0, '0s', '0s'),
array('PT0S', 0.1, 0, $withMs ? '+ 00:00:00.100' : '0s', '%is'),
array('PT1S', 0, 0, '+ 00:00:01'.$ms, '%is'),
array('PT2M', 0, 0, '+ 00:02:00'.$ms, '%is'),
array('PT3H', 0, 0, '+ 03:00:00'.$ms, '%ss'),
array('PT0S', 0.1, 0, '+ 00:00:00.100', '%is'),
array('PT1S', 0, 0, '+ 00:00:01.0', '%is'),
array('PT2M', 0, 0, '+ 00:02:00.0', '%is'),
array('PT3H', 0, 0, '+ 03:00:00.0', '%ss'),
array('P4D', 0, 0, '+ 4d', '%ss'),
array('P5M', 0, 0, '+ 5m', null),
array('P6Y', 0, 0, '+ 6y', null),
array('P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06'.$ms, null),
array('PT1M60S', 0, 0, '+ 00:02:00'.$ms, null),
array('PT1H60M', 0, 0, '+ 02:00:00'.$ms, null),
array('P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06.0', null),
array('PT1M60S', 0, 0, '+ 00:02:00.0', null),
array('PT1H60M', 0, 0, '+ 02:00:00.0', null),
array('P1DT24H', 0, 0, '+ 2d', null),
array('P1M32D', 0, 0, '+ 1m 32d', null),
array('PT0S', 0, 1, '0s', '0s'),
array('PT0S', 0.1, 1, $withMs ? '- 00:00:00.100' : '0s', '%is'),
array('PT1S', 0, 1, '- 00:00:01'.$ms, '%is'),
array('PT2M', 0, 1, '- 00:02:00'.$ms, '%is'),
array('PT3H', 0, 1, '- 03:00:00'.$ms, '%ss'),
array('PT0S', 0.1, 1, '- 00:00:00.100', '%is'),
array('PT1S', 0, 1, '- 00:00:01.0', '%is'),
array('PT2M', 0, 1, '- 00:02:00.0', '%is'),
array('PT3H', 0, 1, '- 03:00:00.0', '%ss'),
array('P4D', 0, 1, '- 4d', '%ss'),
array('P5M', 0, 1, '- 5m', null),
array('P6Y', 0, 1, '- 6y', null),
array('P1Y2M3DT4H5M6S', 0, 1, '- 1y 2m 3d 04:05:06'.$ms, null),
array('PT1M60S', 0, 1, '- 00:02:00'.$ms, null),
array('PT1H60M', 0, 1, '- 02:00:00'.$ms, null),
array('P1Y2M3DT4H5M6S', 0, 1, '- 1y 2m 3d 04:05:06.0', null),
array('PT1M60S', 0, 1, '- 00:02:00.0', null),
array('PT1H60M', 0, 1, '- 02:00:00.0', null),
array('P1DT24H', 0, 1, '- 2d', null),
array('P1M32D', 0, 1, '- 1m 32d', null),
);
@@ -220,10 +209,6 @@ EODUMP;
*/
public function testDumpTimeZone($timezone, $expected)
{
if ((defined('HHVM_VERSION_ID') || PHP_VERSION_ID <= 50509) && !preg_match('/\w+\/\w+/', $timezone)) {
$this->markTestSkipped('DateTimeZone GMT offsets are supported since 5.5.10. See https://github.com/facebook/hhvm/issues/5875 for HHVM.');
}
$timezone = new \DateTimeZone($timezone);
$xDump = <<<EODUMP
@@ -240,10 +225,6 @@ EODUMP;
*/
public function testDumpTimeZoneExcludingVerbosity($timezone, $expected)
{
if ((defined('HHVM_VERSION_ID') || PHP_VERSION_ID <= 50509) && !preg_match('/\w+\/\w+/', $timezone)) {
$this->markTestSkipped('DateTimeZone GMT offsets are supported since 5.5.10. See https://github.com/facebook/hhvm/issues/5875 for HHVM.');
}
$timezone = new \DateTimeZone($timezone);
$xDump = <<<EODUMP
@@ -260,10 +241,6 @@ EODUMP;
*/
public function testCastTimeZone($timezone, $xTimezone, $xRegion)
{
if ((defined('HHVM_VERSION_ID') || PHP_VERSION_ID <= 50509) && !preg_match('/\w+\/\w+/', $timezone)) {
$this->markTestSkipped('DateTimeZone GMT offsets are supported since 5.5.10. See https://github.com/facebook/hhvm/issues/5875 for HHVM.');
}
$timezone = new \DateTimeZone($timezone);
$stub = new Stub();
@@ -295,7 +272,7 @@ EODUMP;
public function provideTimeZones()
{
$xRegion = extension_loaded('intl') ? '%s' : '';
$xRegion = \extension_loaded('intl') ? '%s' : '';
return array(
// type 1 (UTC offset)
@@ -325,11 +302,7 @@ EODUMP;
*/
public function testDumpPeriod($start, $interval, $end, $options, $expected)
{
if (defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) {
$this->markTestSkipped();
}
$p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), is_int($end) ? $end : new \DateTime($end), $options);
$p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), \is_int($end) ? $end : new \DateTime($end), $options);
$xDump = <<<EODUMP
DatePeriod {
@@ -345,11 +318,7 @@ EODUMP;
*/
public function testCastPeriod($start, $interval, $end, $options, $xPeriod, $xDates)
{
if (defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) {
$this->markTestSkipped();
}
$p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), is_int($end) ? $end : new \DateTime($end), $options);
$p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), \is_int($end) ? $end : new \DateTime($end), $options);
$stub = new Stub();
$cast = DateCaster::castPeriod($p, array(), $stub, false, 0);
@@ -380,9 +349,6 @@ EODUMP;
public function providePeriods()
{
$i = new \DateInterval('PT0S');
$ms = \PHP_VERSION_ID >= 70100 && isset($i->f) ? '.0' : '';
$periods = array(
array('2017-01-01', 'P1D', '2017-01-03', 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0', '1) 2017-01-01%a2) 2017-01-02'),
array('2017-01-01', 'P1D', 1, 0, 'every + 1d, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01%a2) 2017-01-02'),
@@ -399,8 +365,8 @@ EODUMP;
array('2017-01-01 01:00:00', 'P1D', '2017-01-03 01:00:00', 0, 'every + 1d, from 2017-01-01 01:00:00.0 (included) to 2017-01-03 01:00:00.0', '1) 2017-01-01 01:00:00.0%a2) 2017-01-02 01:00:00.0'),
array('2017-01-01 01:00:00', 'P1D', 1, 0, 'every + 1d, from 2017-01-01 01:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01 01:00:00.0%a2) 2017-01-02 01:00:00.0'),
array('2017-01-01', 'P1DT1H', '2017-01-03', 0, "every + 1d 01:00:00$ms, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0", '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'),
array('2017-01-01', 'P1DT1H', 1, 0, "every + 1d 01:00:00$ms, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s", '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'),
array('2017-01-01', 'P1DT1H', '2017-01-03', 0, 'every + 1d 01:00:00.0, from 2017-01-01 00:00:00.0 (included) to 2017-01-03 00:00:00.0', '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'),
array('2017-01-01', 'P1DT1H', 1, 0, 'every + 1d 01:00:00.0, from 2017-01-01 00:00:00.0 (included) recurring 2 time/s', '1) 2017-01-01 00:00:00.0%a2) 2017-01-02 01:00:00.0'),
array('2017-01-01', 'P1D', '2017-01-04', \DatePeriod::EXCLUDE_START_DATE, 'every + 1d, from 2017-01-01 00:00:00.0 (excluded) to 2017-01-04 00:00:00.0', '1) 2017-01-02%a2) 2017-01-03'),
array('2017-01-01', 'P1D', 2, \DatePeriod::EXCLUDE_START_DATE, 'every + 1d, from 2017-01-01 00:00:00.0 (excluded) recurring 2 time/s', '1) 2017-01-02%a2) 2017-01-03'),
@@ -416,9 +382,7 @@ EODUMP;
private function createInterval($intervalSpec, $ms, $invert)
{
$interval = new \DateInterval($intervalSpec);
if (\PHP_VERSION_ID >= 70100 && isset($interval->f)) {
$interval->f = $ms;
}
$interval->f = $ms;
$interval->invert = $invert;
return $interval;