Skip to content
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

Update ExtendableTrait.php get_parent_class function to remove deprec… #626

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

theshado40
Copy link
Contributor

Php 8.3 introduced an deprecation error on the get_parent_class function.

…ation error php 8.3

Php 8.3 introduced an deprecation error on the get_parent_class function.
@daftspunk daftspunk merged commit 069775f into octobercms:3.x Apr 11, 2024
@daftspunk
Copy link
Member

Thanks!

@daftspunk
Copy link
Member

This change looked safe as houses, but since $this referred to static::class when PHP internally used self::class. This produced an error since the static class had a parent, but the class implementing the trait had none.

PHP should add this to their upgrade guide or something:

  • get_parent_class() is equivalent to get_parent_class(self::class)

@daftspunk
Copy link
Member

Retry fix here: a9566ca

Tests fine over here, need another PHP 8.3 user to confirm .

@Eoler
Copy link

Eoler commented Apr 11, 2024

Retry fix here: a9566ca
Tests fine over here, need another PHP 8.3 user to confirm .

Yes, that one works for me in PHPv8.2+

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

Successfully merging this pull request may close these issues.

3 participants