Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -0,0 +1,53 @@
Comments in arrays and function calls
-----
<?php
$arr = [
// Foo
$foo,
// Bar
$bar,
// Discarded
];
[
// Foo
$foo,
,
// Bar
$bar,
] = $arr;
foo(
// Foo
$foo,
// Bar
$bar
);
new Foo(
// Foo
$foo
);
-----
!!php7
$arr = [
// Foo
$foo,
// Bar
$bar,
];
[
// Foo
$foo,
,
// Bar
$bar,
] = $arr;
foo(
// Foo
$foo,
// Bar
$bar
);
new Foo(
// Foo
$foo
);

View File

@@ -0,0 +1,14 @@
Array destructuring
-----
<?php
[$a, $b] = [$c, $d];
[, $a, , , $b, ,] = $foo;
[, [[$a]], $b] = $bar;
['a' => $b, 'b' => $a] = $baz;
-----
!!php7
[$a, $b] = [$c, $d];
[, $a, , , $b, ] = $foo;
[, [[$a]], $b] = $bar;
['a' => $b, 'b' => $a] = $baz;

View File

@@ -44,11 +44,13 @@ FALSE;
'a';
'a
b';
"a";
"a\nb";
'a\'b';
'a\b';
'a\\';
// strings (double quoted)
"a";
"a\nb";
"a'b";
"a\b";
"$a";
@@ -110,7 +112,7 @@ FALSE;
0.0;
1.0;
1.0E+100;
INF;
\INF;
1.0E-100;
1.0E+84;
378282246310005.0;
@@ -119,10 +121,12 @@ INF;
'a';
'a
b';
'a\'b';
'a\\b';
'a\\';
// strings (double quoted)
"a";
"a\nb";
'a\'b';
// strings (double quoted)
"a'b";
"a\\b";
"{$a}";

View File

@@ -31,5 +31,5 @@ Number literals
-42.5;
1.0E+42;
-1.0E+42;
INF;
-INF;
\INF;
-\INF;

View File

@@ -38,6 +38,11 @@ yield from ($a and yield from $b);
print ($a and print $b);
-(-$a);
+(+$a);
-(--$a);
+(++$a);
// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment
// and incdec only work on variables.
!$a = $b;
@@ -70,6 +75,10 @@ $a ** $b ** $c;
yield from $a and yield from $b;
yield from ($a and yield from $b);
print ($a and print $b);
-(-$a);
+(+$a);
-(--$a);
+(++$a);
// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment
// and incdec only work on variables.
!($a = $b);

View File

@@ -49,4 +49,10 @@ HTML
<?php
echo 'PHP';
?>
HTML
HTML
-----
HTML<?php echo 'PHP'; ?>HTML
-----
HTML<?php
echo 'PHP';
?>HTML

View File

@@ -0,0 +1,16 @@
InlineHTML node nested inside other code
-----
<?php
function test() {
?>
Test
<?php
}
-----
function test()
{
?>
Test
<?php
}

View File

@@ -8,4 +8,12 @@ World Hallo
Hallo World
Foo Bar
Bar Foo
World Hallo
World Hallo
-----
Test
-----
Test

View File

@@ -0,0 +1,20 @@
Class constants
-----
<?php
class Foo
{
const A = 1, B = 2;
public const C = 3, D = 4;
protected const E = 5, F = 6;
private const G = 7, H = 8;
}
-----
!!php7
class Foo
{
const A = 1, B = 2;
public const C = 3, D = 4;
protected const E = 5, F = 6;
private const G = 7, H = 8;
}

View File

@@ -0,0 +1,19 @@
Multi catch
-----
<?php
try {
$x;
} catch (X|Y $e1) {
$y;
} catch (\A|B\C $e2) {
$z;
}
-----
!!php7
try {
$x;
} catch (X|Y $e1) {
$y;
} catch (\A|B\C $e2) {
$z;
}

View File

@@ -0,0 +1,11 @@
Nullable types
-----
<?php
function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz
{
}
-----
!!php7
function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz
{
}

View File

@@ -13,6 +13,7 @@ switch ($expr) {
case 4:
echo 'Third case, return instead of break';
return;
// Comment
default:
echo 'Default case';
break;
@@ -29,6 +30,7 @@ switch ($expr) {
case 4:
echo 'Third case, return instead of break';
return;
// Comment
default:
echo 'Default case';
break;