Skip to content

PHP 8.4 Object Interfaces not supported? #870

Description

@gremo

Sorry if this has been already addressed.

Seems that Object Interfaces are not supported. The extensions show no errors, you get a fatal error:

interface I
{
    // An implementing class MUST have a publicly-readable property,
    // but whether or not it's publicly settable is unrestricted.
    public string $readable { get; }

    // An implementing class MUST have a publicly-writeable property,
    // but whether or not it's publicly readable is unrestricted.
    public string $writeable { set; }

    // An implementing class MUST have a property that is both publicly
    // readable and publicly writeable.
    public string $both { get; set; }
}

// This class fails in implementing the interface
class C1 implements I
{
}

Activity

  1. jakubmisek commented on Jun 19, 2025

    @jakubmisek
    Member

    Good point @gremo ,

    We support object interfaces of course, but we don't check that the interface property is implemented by its class (so there is no warning in problems window).

    Will be implemented!

  2. self-assigned this
    on Jun 19, 2025
  3. gremo commented on Jun 19, 2025

    @gremo
    Author

    @jakubmisek Yes, of course — I meant that no error is reported. Thanks, and as always, great job and thanks for the speed with which you handle issues!

  4. jakubmisek commented on Jun 22, 2025

    @jakubmisek
    Member

    @gremo thank you, we'll try to add property checks on interfaces in future update!

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions