Skip to content

Update canbepassedbyvalue.xml#5563

Merged
jordikroon merged 2 commits into
php:masterfrom
uuf6429:patch-1
May 17, 2026
Merged

Update canbepassedbyvalue.xml#5563
jordikroon merged 2 commits into
php:masterfrom
uuf6429:patch-1

Conversation

@uuf6429
Copy link
Copy Markdown
Contributor

@uuf6429 uuf6429 commented May 16, 2026

Fix inaccurate return type description as per:
https://github.com/php/php-src/blob/master/ext/reflection/php_reflection.c#L2872 (master)

It seems it might have returned null in the past:
https://github.com/php/php-src/blob/PHP-7.3.19/ext/reflection/php_reflection.c#L2690 (PHP 7.3).

How do we best handle this?

@jordikroon
Copy link
Copy Markdown
Member

Removing this line would be correct, as this method never officially returned null. And for the reasons it would have returned null, it would also have returned a warning.

While you're at it, could you also convert this <para> to a <simpara> and remove the same line from ReflectionClass::getTraits()?

Before PHP 8, passing an argument when the signature did not allow one resulted in a warning and a null return value. Since PHP 8, an ArgumentCountError is thrown instead.

@jordikroon
Copy link
Copy Markdown
Member

Thank you!

@jordikroon jordikroon merged commit 93906cd into php:master May 17, 2026
2 checks passed
@uuf6429 uuf6429 deleted the patch-1 branch May 17, 2026 20:57
@uuf6429
Copy link
Copy Markdown
Contributor Author

uuf6429 commented May 17, 2026

@jordikroon quick question - are other languages handled in a similar manner, with a PR in their respective repo? (or is there some quicker way to mass-updated them?)

@jordikroon
Copy link
Copy Markdown
Member

You could create a PR for the other languages if you are willing to do so. Those are more than welcome.

Generally speaking the translations follow the upstream (en) and are managed specialised contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants