-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 4.3.3
Description
On PHP 7.3 fatal error occurs on using Symfony\Contracts\Service\ServiceSubscriberTrait in controller class that extends Symfony\Bundle\FrameworkBundle\Controller\AbstractController:
PHP Fatal error: Symfony\Bundle\FrameworkBundle\Controller\AbstractController and Symfony\Contracts\Service\ServiceSubscriberTrait define the same property ($container) in the composition of App\Controller\Api\v1\Project\DvrChannelController. However, the definition differs and is considered incompatible.
How to reproduce
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Contracts\Service\ServiceSubscriberTrait;
class TestController extends AbstractController
{
use ServiceSubscriberTrait;
}
Then run cache:clear command.
Possible Solution
Make $container property protected.