Skip to content

Commit

Permalink
Merge branch 'php-8.0/pear-validdefaultvalue-add-support-constr-prop-…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Mar 17, 2021
2 parents 1b4ce1a + 43feac1 commit ef0273a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,20 @@ $closure = function(array $arg2=array(), array $arg1) {}

$fn = fn($a = [], $b) => $a[] = $b;

class OnlyConstructorPropertyPromotion {
public function __construct(
public string $name = '',
protected $bar
) {}
}

class ConstructorPropertyPromotionMixedWithNormalParams {
public function __construct(
public string $name = '',
?int $optionalParam = 0,
mixed $requiredParam,
) {}
}

// Intentional syntax error. Must be last thing in the file.
function
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public function getErrorList()
91 => 1,
99 => 1,
101 => 1,
106 => 1,
114 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit ef0273a

Please sign in to comment.