You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
No response
What happened?
I recently upgraded my CI4 to version 4.5.4 from 4.2.5 and noticed that that static::static::getSharedInstance() function had its doc comment updated to return 'object' instead of 'mixed'.
Places where this function is used in my codebase now show a warning on the getSharedInstance line in the IDE as follows. This is also the case for CI4's code using this function under the 'System' directory.
PHP Version
8.1
CodeIgniter4 Version
4.5.4
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
No response
What happened?
I recently upgraded my CI4 to version 4.5.4 from 4.2.5 and noticed that that static::static::getSharedInstance() function had its doc comment updated to return 'object' instead of 'mixed'.
Places where this function is used in my codebase now show a warning on the getSharedInstance line in the IDE as follows. This is also the case for CI4's code using this function under the 'System' directory.
Warning: Return value is expected to be 'MyClass', 'object' returned.
Any plans to make adjustments for this?
Steps to Reproduce
1- Use the static::getSharedInstance() function to return in a class that has a class as the defined return type
Expected Output
Removal of type mismatch warnings
Anything else?
The text was updated successfully, but these errors were encountered: