sonata-project / SonataBlockBundle

Symfony SonataBlockBundle
https://docs.sonata-project.org/projects/SonataBlockBundle
MIT License
413 stars 141 forks source link

more caching related deprecations #1042

Closed dmaicher closed 2 years ago

dmaicher commented 2 years ago

Subject

Some more deprecations needed on 4.x. See https://github.com/sonata-project/SonataBlockBundle/pull/1041#pullrequestreview-948850433

Changelog

### Changed
- marked `BlockHelper::__construct` as `@internal`
### Deprecated
- deprecated passing an instance of `BlockServiceManagerInterface` as first argument for `BlockHelper::__construct`
- deprecated `BaseBlock::$ttl`
dmaicher commented 2 years ago

I haven't check if there are more usages, but if BlockHelper is only used as Twig Runtime, we could maybe mark the constructor as @internal since the user is not supposed to instantiate it directly.

I had a look and seems its only used for Twig extension and Symfony profiler. At least when using it with SonataAdminBundle. Not sure if other bundles use it as well?

Shall we additionally mark it @internal on 4.x then? Or 5.x?

@VincentLanglet wdyt?

VincentLanglet commented 2 years ago

I'm ok with internal