mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
2079da0158
I added the function/method name to some compile-time deprecation messages which are related to parameters/return values. Consistently with the other similar error messages, I included the function/method name at the start of the message.
24 lines
696 B
PHP
24 lines
696 B
PHP
--TEST--
|
|
GH-11488: "Optional parameter before required" warning for union nullable type
|
|
--FILE--
|
|
<?php
|
|
function a(
|
|
string|null $a = null,
|
|
$b,
|
|
) {}
|
|
function b(
|
|
Foo&Bar $c = null,
|
|
$d,
|
|
) {}
|
|
function c(
|
|
(Foo&Bar)|null $e = null,
|
|
$f,
|
|
) {}
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: a(): Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in %s on line %d
|
|
|
|
Deprecated: b(): Implicitly marking parameter $c as nullable is deprecated, the explicit nullable type must be used instead in %s on line %d
|
|
|
|
Deprecated: c(): Optional parameter $e declared before required parameter $f is implicitly treated as a required parameter in %s on line %d
|