Skip to content

[PropertyAccess] PropertyAccess is not compatible with PHP 8.4 property hooks #59183

@vudaltsov

Description

@vudaltsov

Symfony version(s) affected

7.2.0

Description

In PHP 8.4 we have virtual properties and asymmetric visibility.

PropertyAccess considers the following properties writable, although they are not:

final class Foo
{
    public private(set) bool $public_private_set;
    public protected(set) bool $public_protected_set;
    public bool $virtual_no_set_hook { get => true; }
}

The issue has already been fixed for the PropertyInfo component in #58556 via 520e31b. However, PropertyAccess is still not working correctly, see my reproducer (I've updated it to 7.2.x).

How to reproduce

https://github.com/vudaltsov/symfony-property-access-php84

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy