-
-
Notifications
You must be signed in to change notification settings - Fork 470
Do not configure deprecated proxy options when native lazy ghost objects are enabled #1898
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
Conversation
f4344bc
to
c50ce02
Compare
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.
Looks good. Is the plan to hard deprecate it in 2.17.x?
what about 2.15.x branch? |
That one is for bug fixes only |
php 8.4 orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
report_fields_where_declared: true
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
identity_generation_preferences:
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
auto_mapping: true
enable_native_lazy_objects: true
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
controller_resolver:
auto_mapping: false composer update --with-all-dependencies
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In ProxyCacheWarmer.php line 49:
!!
!! Unable to create the Doctrine Proxy directory "".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd |
Hm maybe we should unset these settings only if enable_lazy_ghost_objects = false? |
I'm heading out of town so can't help more right now, but lazy ghosts probably shouldn't be enabled alongside native ghosts. But that's also a little weird because the settings in this PR and that lazy ghost option are in the "don't configure this for each EM" list, but native ghosts can be configured on each EM separately. |
The cache warmer issue looks to be a bug in Fixing some of this would be easier if the |
is it too late to chang that option to make it global? it would be a bc-break but i don't think many people have used it yet...As you say it would make it easier to also fix the other deprecation notice |
Partially addresses #1895
This will stop calling the ORM Configuration class' deprecated
setAutoGenerateProxyClasses()
,setProxyDir()
, andsetProxyNamespace()
methods when the native lazy objects feature is enabled and soft-deprecates the relevant config options by noting they'll be ignored in this case. This purposely only stops calling those methods with ORM 3.5 since 3.4 doesn't have the deprecation notices and issues like doctrine/orm#11997 meant with 3.4.0 specifically there were a couple of cases where not configuring them led to errors.