Various class methods have typehints with deprecated classes

Created on 8 June 2020, almost 5 years ago
Updated 16 January 2025, 3 months ago

Problem/Motivation

drupal-check reported the following errors when running against a codebase using Drupal core 9.0.0 and the latest 8.x-1.x version of the CAS module:

------ -----------------------------------------------------------------------
 Line   modules/contrib/cas/src/Subscriber/CasSubscriber.php
------ -----------------------------------------------------------------------
 153    Parameter $event of method
        Drupal\cas\Subscriber\CasSubscriber::handle() has typehint with
        deprecated class Symfony\Component\HttpKernel\Event\GetResponseEvent:
        since Symfony 4.3, use RequestEvent instead

------ -----------------------------------------------------------------------
 Line   modules/contrib/cas/src/Subscriber/CasSubscriber.php
------ -----------------------------------------------------------------------
 371    Parameter $event of method
        Drupal\cas\Subscriber\CasSubscriber::on403() has typehint with
        deprecated class
        Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent:
        since Symfony 4.3, use ExceptionEvent instead

------ ---------------------------------------------------------------------
 Line   modules/contrib/cas/tests/src/Unit/Service/CasValidatorTest.php
------ ---------------------------------------------------------------------
 62     Parameter $event of method
        Drupal\Tests\cas\Unit\Service\CasValidatorTest::dispatchEvent() has
        typehint with deprecated class
        Symfony\Component\EventDispatcher\Event:
        since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event"
        instead

Proposed resolution

Replace deprecated typehints with replacement classes.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

CAS

Created by

πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024