Not adding Sonata\AdminBundle\Filter\Model\FilterData
as type declaration of argument 4 of the callable passed to
Sonata\DoctrineORMAdminBundle\Filter\CallbackFilter
is deprecated. In version 4.0 this argument will be an instance
of Sonata\AdminBundle\Filter\Model\FilterData
.
The option "case_sensitive" is deprecated in favor of "force_case_insensitivity".
You must pass true
in this option when you need to force the matching criteria
to avoid honoring the case sensitivity in the filter values. Any other values than
true
will cause the database to use its default behavior.
The option "case_sensitive" will be respected only if "force_case_insensitivity"
is not set.
Use ModelManager::reverseTransform()
instead.
The EmptyFilter is deprecated, use NullFilter instead.
Deprecate modelTransform()
, getDefaultPerPageOptions()
, getDefaultSortValues()
and getDataSourceIterator()
with no replacement.
Deprecate passing an instance of Sonata\AdminBundle\Datagrid\ProxyQueryInterface
which is not an instance of Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery
as
argument 1 to the Sonata\DoctrineORMAdminBundle\Filter\Filter::filter()
method.
Previously passing an object which is in state new or removed as argument 1 for getNormalizedIdentifier()
was deprecated and would throw an exception in 4.0. Since throwing an exception is not allowed (and returning null
is still allowed), the deprecation is removed.
Added full support for \DateTimeImmutable
in filters extending Sonata\DoctrineORMAdminBundle\Filter\AbstractDateFilter
Sonata\DoctrineORMAdminBundle\Filter\DateFilter
Sonata\DoctrineORMAdminBundle\Filter\DateRangeFilter
Sonata\DoctrineORMAdminBundle\Filter\DateTimeFilter
Sonata\DoctrineORMAdminBundle\Filter\DateTimeRangeFilter
Sonata\DoctrineORMAdminBundle\Filter\TimeFilter
Previous to this change, only the instances of \DateTime
were manipulated in these
filters to set the time under determined circumstances. If you are using them with instances
of \DateTimeImmutable
, be aware of this change in order to confirm if you must update
your implementation.
Deprecate the usage of a callback which does not return a boolean value.
Previously, this was valid:
function callback(ProxyQueryInterface $queryBuilder, string $alias, string $field, array $value)
{
if (!$value['value']) {
return;
}
// ...
return true;
}
To remove the deprecation, please update the code this way:
function callback(ProxyQueryInterface $queryBuilder, string $alias, string $field, array $value): bool
{
if (!$value['value']) {
return false;
}
// ...
return true;
}
- Deprecated
ModelManager::getModelCollectionInstance()
. - Deprecated
ModelManager::collectionClear()
. - Deprecated
ModelManager::collectionHasElement()
. - Deprecated
ModelManager::collectionAddElement()
. - Deprecated
ModelManager::collectionRemoveElement()
. - Deprecated
ModelManager::getPaginationParameters()
. - Deprecated
ModelManager::getSortParameters()
.
We added compatibility with SonataBlockBundle 4.0, make sure you are explicitly declaring your dependency
with sonata-project/block-bundle
in your composer.json in order to avoid unwanted upgrades.
There is a minimal BC Break on AuditBlockService
. If you are extending this class (keep in mind that it will become final on 4.0) you should add return type hints to execute()
and configureSettings()
.
Deprecated camelize()
method with no replacement.
Deprecated format
option with no replacement.
Deprecated getTargetEntity()
, use getTargetModel()
instead.
Deprecated passing null
as argument 2 for find()
.
Deprecated passing null
or an object which is in state new or removed as argument 1 for getNormalizedIdentifier()
.
Deprecated passing null
as argument 1 for getUrlSafeIdentifier()
.
All files under the Tests
directory are now correctly handled as internal test classes.
You can't extend them anymore, because they are only loaded when running internal tests.
More information can be found in the composer docs.