diff --git a/src/Datagrid/Pager.php b/src/Datagrid/Pager.php index 492c89d6..343d7b22 100644 --- a/src/Datagrid/Pager.php +++ b/src/Datagrid/Pager.php @@ -45,7 +45,7 @@ public function countResults(): int @trigger_error(sprintf( 'Relying on the protected property "%s::$nbResults" and its getter/setter is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will fail 4.0. Use "countResults()" and "setResultsCount()" instead.', - self::class, + self::class ), \E_USER_DEPRECATED); return $deprecatedCount; @@ -63,7 +63,7 @@ public function getNbResults() if ('sonata_deprecation_mute' !== (\func_get_args()[0] ?? null)) { @trigger_error(sprintf( 'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will be removed in 4.0. Use "countResults()" instead.', - __METHOD__, + __METHOD__ ), \E_USER_DEPRECATED); } @@ -82,7 +82,7 @@ public function computeNbResult() if ('sonata_deprecation_mute' !== (\func_get_args()[0] ?? null)) { @trigger_error(sprintf( 'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will be removed in 4.0.', - __METHOD__, + __METHOD__ ), \E_USER_DEPRECATED); } @@ -104,7 +104,7 @@ public function getResults() @trigger_error(sprintf( 'Method "%s()" is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will' .' be removed in 4.0. Use "getCurrentPageResults()" instead.', - __METHOD__, + __METHOD__ ), \E_USER_DEPRECATED); return $this->getCurrentPageResults(); @@ -154,7 +154,7 @@ protected function setNbResults($nb) if ('sonata_deprecation_mute' !== (\func_get_args()[1] ?? null)) { @trigger_error(sprintf( 'The %s() method is deprecated since sonata-project/doctrine-mongodb-admin-bundle 3.7 and will be removed in 4.0. Use "setResultsCount()" instead.', - __METHOD__, + __METHOD__ ), \E_USER_DEPRECATED); } diff --git a/src/Filter/AbstractDateFilter.php b/src/Filter/AbstractDateFilter.php index cd03ef40..64382c6d 100644 --- a/src/Filter/AbstractDateFilter.php +++ b/src/Filter/AbstractDateFilter.php @@ -52,7 +52,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } //check data sanity @@ -164,7 +164,7 @@ protected function applyType(BaseProxyQueryInterface $query, $operation, $field, \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } $query->getQueryBuilder()->field($field)->$operation($datetime); diff --git a/src/Filter/BooleanFilter.php b/src/Filter/BooleanFilter.php index 1bdfe380..a690559a 100644 --- a/src/Filter/BooleanFilter.php +++ b/src/Filter/BooleanFilter.php @@ -39,7 +39,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } if (!$data || !\is_array($data) || !\array_key_exists('type', $data) || !\array_key_exists('value', $data)) { diff --git a/src/Filter/CallbackFilter.php b/src/Filter/CallbackFilter.php index a821478b..ca631d53 100644 --- a/src/Filter/CallbackFilter.php +++ b/src/Filter/CallbackFilter.php @@ -39,7 +39,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } if (!\is_callable($this->getOption('callback'))) { diff --git a/src/Filter/ChoiceFilter.php b/src/Filter/ChoiceFilter.php index 605c76cf..8622989e 100644 --- a/src/Filter/ChoiceFilter.php +++ b/src/Filter/ChoiceFilter.php @@ -39,7 +39,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } if (!$data || !\is_array($data) || !\array_key_exists('type', $data) || !\array_key_exists('value', $data)) { diff --git a/src/Filter/DateFilter.php b/src/Filter/DateFilter.php index 4530eb9c..8c5740b6 100644 --- a/src/Filter/DateFilter.php +++ b/src/Filter/DateFilter.php @@ -67,7 +67,7 @@ protected function applyTypeIsEqual(BaseProxyQueryInterface $query, $field, $dat \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } $end = clone $data['value']; diff --git a/src/Filter/DateTimeFilter.php b/src/Filter/DateTimeFilter.php index 136b0bd8..1a2403ec 100644 --- a/src/Filter/DateTimeFilter.php +++ b/src/Filter/DateTimeFilter.php @@ -74,7 +74,7 @@ protected function applyTypeIsEqual(BaseProxyQueryInterface $query, $field, $dat \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } /** @var \DateTime $end */ diff --git a/src/Filter/Filter.php b/src/Filter/Filter.php index f3bfb7ca..3963eb44 100644 --- a/src/Filter/Filter.php +++ b/src/Filter/Filter.php @@ -38,7 +38,7 @@ public function apply($query, $filterData) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); // throw new \TypeError(sprintf('The query MUST implement "%s".', ProxyQueryInterface::class)); } diff --git a/src/Filter/ModelFilter.php b/src/Filter/ModelFilter.php index 5aaca64a..97b08011 100644 --- a/src/Filter/ModelFilter.php +++ b/src/Filter/ModelFilter.php @@ -43,7 +43,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } if (!$data || !\is_array($data) || !\array_key_exists('value', $data)) { diff --git a/src/Filter/NumberFilter.php b/src/Filter/NumberFilter.php index 4521e0d6..67209693 100644 --- a/src/Filter/NumberFilter.php +++ b/src/Filter/NumberFilter.php @@ -46,7 +46,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } if (!$data || !\is_array($data) || !\array_key_exists('value', $data) || !is_numeric($data['value'])) { diff --git a/src/Filter/StringFilter.php b/src/Filter/StringFilter.php index 902d58f2..8dcd851e 100644 --- a/src/Filter/StringFilter.php +++ b/src/Filter/StringFilter.php @@ -39,7 +39,7 @@ public function filter(BaseProxyQueryInterface $query, $alias, $field, $data) \get_class($query), __METHOD__, ProxyQueryInterface::class - )); + ), \E_USER_DEPRECATED); } if (!$data || !\is_array($data) || !\array_key_exists('value', $data) || null === $data['value']) {