-
Notifications
You must be signed in to change notification settings - Fork 195
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
Fix/remove PHP 8.2 depreciation messages #397
base: master
Are you sure you want to change the base?
Fix/remove PHP 8.2 depreciation messages #397
Conversation
Fixed doc-block typo and corrected some doc-block property types Added method return types Added int type cast
Added empty array default values
Updated doc-blocks General code tidy
Type hints are breaking changes, not? |
As failing tests are suggesting, these are breaking changes, not really backward compatible. Therefore I'm against this PR to be merged. |
Changed the default delimiters to null. Hopefully fixed phpunit errors. |
# Conflicts: # library/Zend/Controller/Action.php # library/Zend/Session/SaveHandler/DbTable.php
@@ -253,7 +253,7 @@ public function setLifetime($lifetime, $overrideLifetime = null) | |||
/** | |||
* Retrieve session lifetime | |||
* | |||
* @return int | |||
* @return bool|int |
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.
* @return bool|int | |
* @return int|false |
for consistency with the property.
Added return to render method Updated method return types
Well, we still have tons of hints, forcing some type. Like: Why exactly we are trying to be more typed here pls? Wgat are those deprecation messages about? |
My guess is this is about PHP adding "tentative return types" to built-in classes, and giving (non-error) messages like this:
As the message says, the backward-compatible way of acknowledging but silencing the notice is to add a See this Stack Overflow reference question for a deeper explanation. |
I was getting deprecation notices after updating a project to PHP 8.2.
Have added type hints and property defaults along with a general code tidy on the worked files.