-
Notifications
You must be signed in to change notification settings - Fork 988
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 issue #19550: Calling get_class() without arguments is deprecated PHP8.3 #3839
base: master
Are you sure you want to change the base?
Fixed issue #19550: Calling get_class() without arguments is deprecated PHP8.3 #3839
Conversation
note: there is still relevant get_class() without arguments in vendor/pear/pear-core-minimal |
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.
Code looks OK.
Still a few remarks:
- Should the PR go to DEV or master?
- @olleharstedt I added you as reviewer as there are changes to the automatic tests.
I wouldn't merge it until getting another revision |
@@ -14,7 +14,7 @@ protected static function initialize() | |||
if (static::$initialized) return; | |||
static::$initialized = true; | |||
static::$parentPath = __FILE__; | |||
for ($i=substr_count(get_class(), (string) static::$nsChar);$i>=0;$i--) { | |||
for ($i=substr_count(get_class(new static), (string) static::$nsChar);$i>=0;$i--) { |
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.
Arg !
RobThree/TwoFactorAuth@225216a
:)
Send it in testing ? We need PHP8.3 in some month. Some forum post already send with PHP8.3 issues |
LimeSurvey manual says v6 php requirement is LS 6.x from PHP 7.4.x to 8.x
LS master should not use mehods deprecated by the latest php 8 (8.3) also the tests should run the 8.3 instead of 8.2.
This fix replaces all get_class() without arguments that will throw an error in php 8.3 with get_class() WITH relevant argument $this or
new static
in static context to avoid errors in php 8.3also I changed the php 8.2=>8.3 in ci tests matrix that without this fix would be red, but are green with this fix.