Skip to content

Allow EntityNotFinalRule to be turned off when on Doctrine ORM 3.4 + PHP 8.4 #667

Open
@ruudk

Description

@ruudk

With Doctrine ORM 3.4.0 now supporting native Lazy Objects introduced in PHP 8.4 there is no need for the EntityNotFinalRule anymore (introduced in #202)

The new functionality needs to be manually enabled on the Doctrine ORM Configuration using isNativeLazyObjectsEnabled:
https://github.com/doctrine/orm/blob/3272e1c0af1fe1db037191848e556bc1d4b7cdbb/src/Configuration.php#L598

When using Symfony, one needs to enable enable_native_lazy_objects on the Doctrine ORM configuration.

Would it be an idea to introduce a parameter that has a default value set to true, to toggle this rule?

That way, people can disable the rule.

Maybe when the feature is enabled by default in a next version of Doctrine, the rule can be removed completely. Or disabled by default, in a next major of this extension.

/cc @LeoVie @ondrejmirtes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions