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

Deprecate ensureProductionSettings() #9074

Merged

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Oct 3, 2021

Doctrine does not provide its own cache implementation anymore and relies on the PSR-6 standard instead. As a consequence, we cannot determine anymore whether a given cache adapter is suitable for a production environment.

The corresponding functionality has always been error-prone. For instance if cache adapters are decorated, the orm:ensure-production-settings command would not complain anymore. By adopting PSR-6, this gets even harder because we would need to have internal knowledge of any PSR-6 compatible library a user might potentially use.

Moreover, I really don't think that we should offer this kind of inspection and therefore propose to remove it.

@derrabus derrabus added this to the 2.11.0 milestone Oct 3, 2021
Signed-off-by: Alexander M. Turek <me@derrabus.de>
@derrabus derrabus force-pushed the deprecate/ensure-production-settings branch from 338dbc4 to 03fe069 Compare October 3, 2021 22:25
@derrabus derrabus merged commit 3984f74 into doctrine:2.11.x Oct 4, 2021
@derrabus derrabus deleted the deprecate/ensure-production-settings branch October 4, 2021 08:00
@norkunas
Copy link
Contributor

norkunas commented Oct 4, 2021

This also was checking for:

if ($this->getAutoGenerateProxyClasses()) {
    throw ProxyClassesAlwaysRegenerating::create();
}

and not only the cache :)

@derrabus
Copy link
Member Author

derrabus commented Oct 4, 2021

I see. Is this enough to keep that method, if we removed all cache checks? Do you use that method or the command?

@norkunas
Copy link
Contributor

norkunas commented Oct 4, 2021

Was in backlog sometime ago to use it 🙈 not sure if it's needed because doctrine-bundle has a recipe which configures this for me :) Just wanted to point it out :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants