-
Notifications
You must be signed in to change notification settings - Fork 50
Fixed E_WARNING "($context) must be passed by reference, value given". #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed E_WARNING "($context) must be passed by reference, value given". #39
Conversation
The warning is nothing to do with The warning comes when the SQLite3 Since none of the callbacks actually makes use of that first parameter, except for |
Right, but that class might be extended, and we can't control that. Also, we need to cater to Line 21 in a13d8b1
|
I think the first step is to raise the project dependency to 7.2 (which gives us most useful typing structures). |
Do we actually know if anyone has created any extensions to this project? Did anyone ever try to override these methods? What would happen if they did so? Does the pass by reference do anything ever? |
I'd suggest putting a note in the README that this project has no API stability guarantees whatsoever and go wild :) I don't think we (the PHP project) benefit from anything else. |
Can we remove the package from PEAR and packagist? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declaring these methods as taking the $context
parameter by reference is a bug, as evidenced by the E_WARNING
s. If (and it's a big if !) anyone extends these methods in their own code (we don't in phd
), their code has a bug and should be corrected.
TL;DR - IMO, don't sweat it, fix the signatures.
The following addresses the question of "can we remove", and not "should we remove" (though my answer to the latter would be "sure").
The PEAR package is in the doc.php.net channel (rather than the usual pear.php.net channel), which is managed via the php/web-doc Git repo.
I don't see a way to remove the php/phd package from Packagist, but have marked it as "abandoned". @Seldaek is there a self-service way to remove that package, or would someone from your side need to remove it? |
I removed the package from packagist. |
Thanks for the assistance, Jordi. 👍 |
When I use PhD with PHP 8.0.x, I get the following warning flood.
I can't find why this warning occurs, but
$this
pseudo value is NOT a reference!! ( php/doc-en#380 )This PR works on PHP 7.4.x, 8.0.x.