Commit 58ce7d4e authored by catch's avatar catch
Browse files

Issue #3383548 by Spokje, mondrake: Deprecate...

Issue #3383548 by Spokje, mondrake: Deprecate Psr7RequestValueResolver::supports and RouteMatchValueResolver::supports
parent 12dabf05
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -32,8 +32,14 @@ public function __construct(HttpMessageFactoryInterface $http_message_factory) {

  /**
   * {@inheritdoc}
   *
   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
   *    There is no replacement.
   *
   * @see https://www.drupal.org/node/3383585
   */
  public function supports(Request $request, ArgumentMetadata $argument): bool {
    @trigger_error(__METHOD__ . ' is deprecated in drupal:10.2.0 and will be removed in drupal:11.0.0, there is no replacement. See https://www.drupal.org/node/3383585', E_USER_DEPRECATED);
    return $argument->getType() == ServerRequestInterface::class;
  }

+6 −0
Original line number Diff line number Diff line
@@ -15,8 +15,14 @@ final class RouteMatchValueResolver implements ValueResolverInterface {

  /**
   * {@inheritdoc}
   *
   * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.
   *    There is no replacement.
   *
   * @see https://www.drupal.org/node/3383585
   */
  public function supports(Request $request, ArgumentMetadata $argument): bool {
    @trigger_error(__METHOD__ . ' is deprecated in drupal:10.2.0 and will be removed in drupal:11.0.0, there is no replacement. See https://www.drupal.org/node/3383585', E_USER_DEPRECATED);
    return $argument->getType() == RouteMatchInterface::class || is_subclass_of($argument->getType(), RouteMatchInterface::class);
  }