Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Return type deprecations for library tests #33235

Closed
@derrabus

Description

@derrabus

Symfony version(s) affected: 4.4-dev

One of my open source projects starts to produce failing travis builds because of the deprecation notices triggered by DebugClassLoader since #30323. In order to make DebugClassLoader helpful for libraries, I think we need to fine tune it a bit:

  • Almost all of the notices triggered here affect vendor code (here: Pimple and Silex). Four deprecation notices are flagged as "direct deprecation notices" by PHPUnit Bridge, but only two of the notices are actually triggered by my own classes.
  • I'm pretty sure that Silex and Pimple won't be patched, so I need a way to silence deprecation triggered by vendor code.
  • The branch that is tested here maintains php 5 compatibility. Because of that, I'd probably want to deactivate return type checks completely?

For reference, the errors from my travis log:

Remaining direct deprecation notices (4)

  1x: Method "Symfony\Component\HttpKernel\HttpKernelInterface::handle()" will return "Response" as of its next major version. Doing the same in child class "Silex\Application" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Psr\Container\ContainerInterface::has()" will return "bool" as of its next major version. Doing the same in child class "Pimple\Psr11\Container" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface::supports()" will return "bool" as of its next major version. Doing the same in child class "Rabus\Psr11ServiceProvider\ArgumentResolver" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface::resolve()" will return "iterable" as of its next major version. Doing the same in child class "Rabus\Psr11ServiceProvider\ArgumentResolver" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

Remaining indirect deprecation notices (8)

  1x: Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" will return "array" as of its next major version. Doing the same in child class "Silex\EventListener\MiddlewareListener" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" will return "array" as of its next major version. Doing the same in child class "Silex\EventListener\ConverterListener" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" will return "array" as of its next major version. Doing the same in child class "Silex\EventListener\StringToResponseListener" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\Routing\Matcher\RequestMatcherInterface::matchRequest()" will return "array" as of its next major version. Doing the same in child class "Silex\Provider\Routing\LazyRequestMatcher" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" will return "array" as of its next major version. Doing the same in child class "Silex\ExceptionHandler" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface::supports()" will return "bool" as of its next major version. Doing the same in child class "Silex\AppArgumentValueResolver" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface::resolve()" will return "iterable" as of its next major version. Doing the same in child class "Silex\AppArgumentValueResolver" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testServiceRegistration from Rabus\Psr11ServiceProvider

  1x: Method "Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface::redirect()" will return "array" as of its next major version. Doing the same in child class "Silex\Provider\Routing\RedirectableUrlMatcher" will be required when upgrading.

    1x in Psr11ServiceProviderTest::testControllerArgument from Rabus\Psr11ServiceProvider

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions