Skip to content

[ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type #30323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public function __construct(ContainerInterface $container)

/**
* {@inheritdoc}
*
* @return void
*/
public function dispatchEvent($eventName, EventArgs $eventArgs = null)
{
Expand All @@ -59,6 +61,8 @@ public function dispatchEvent($eventName, EventArgs $eventArgs = null)

/**
* {@inheritdoc}
*
* @return object[][]
*/
public function getListeners($event = null)
{
Expand All @@ -81,6 +85,8 @@ public function getListeners($event = null)

/**
* {@inheritdoc}
*
* @return bool
*/
public function hasListeners($event)
{
Expand All @@ -89,6 +95,8 @@ public function hasListeners($event)

/**
* {@inheritdoc}
*
* @return void
*/
public function addEventListener($events, $listener)
{
Expand All @@ -109,6 +117,8 @@ public function addEventListener($events, $listener)

/**
* {@inheritdoc}
*
* @return void
*/
public function removeEventListener($events, $listener)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch

/**
* {@inheritdoc}
*
* @return void
*/
public function startQuery($sql, array $params = null, array $types = null)
{
Expand All @@ -48,6 +50,8 @@ public function startQuery($sql, array $params = null, array $types = null)

/**
* {@inheritdoc}
*
* @return void
*/
public function stopQuery()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Doctrine/ManagerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ abstract class ManagerRegistry extends AbstractManagerRegistry

/**
* {@inheritdoc}
*
* @return object
*/
protected function getService($name)
{
Expand All @@ -37,6 +39,8 @@ protected function getService($name)

/**
* {@inheritdoc}
*
* @return void
*/
protected function resetService($name)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ final class TestRepositoryFactory implements RepositoryFactory

/**
* {@inheritdoc}
*
* @return ObjectRepository
*/
public function getRepository(EntityManagerInterface $entityManager, $entityName)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function convertToPHPValue($value, AbstractPlatform $platform)

/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class DoctrineFooType extends Type

/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
{
Expand All @@ -35,6 +37,8 @@ public function getName()

/**
* {@inheritdoc}
*
* @return string
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
Expand Down Expand Up @@ -76,6 +80,8 @@ public function convertToPHPValue($value, AbstractPlatform $platform)

/**
* {@inheritdoc}
*
* @return bool
*/
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ protected function sendHeader($header, $content)

/**
* Override default behavior since we check it in onKernelResponse.
*
* @return bool
*/
protected function headersAccepted()
{
Expand Down
9 changes: 9 additions & 0 deletions src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Bridge\Monolog\Handler;

use Monolog\Formatter\FormatterInterface;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Logger;
Expand Down Expand Up @@ -73,6 +74,8 @@ public function __construct(OutputInterface $output = null, bool $bubble = true,

/**
* {@inheritdoc}
*
* @return bool
*/
public function isHandling(array $record)
{
Expand All @@ -81,6 +84,8 @@ public function isHandling(array $record)

/**
* {@inheritdoc}
*
* @return bool
*/
public function handle(array $record)
{
Expand Down Expand Up @@ -142,6 +147,8 @@ public static function getSubscribedEvents()

/**
* {@inheritdoc}
*
* @return void
*/
protected function write(array $record)
{
Expand All @@ -151,6 +158,8 @@ protected function write(array $record)

/**
* {@inheritdoc}
*
* @return FormatterInterface
*/
protected function getDefaultFormatter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public function __construct(RequestStack $requestStack, array $exclusions, $acti
$this->exclusions = $exclusions;
}

/**
* @return bool
*/
public function isHandlerActivated(array $record)
{
$isActivated = parent::isHandlerActivated($record);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public function __construct(RequestStack $requestStack, array $excludedUrls, $ac
$this->blacklist = '{('.implode('|', $excludedUrls).')}i';
}

/**
* @return bool
*/
public function isHandlerActivated(array $record)
{
$isActivated = parent::isHandlerActivated($record);
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ protected function sendHeader($header, $content)

/**
* Override default behavior since we check the user agent in onKernelResponse.
*
* @return bool
*/
protected function headersAccepted()
{
Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Bridge\Monolog\Handler;

use Monolog\Formatter\FormatterInterface;
use Monolog\Handler\AbstractHandler;
use Monolog\Logger;
use Symfony\Bridge\Monolog\Formatter\VarDumperFormatter;
Expand Down Expand Up @@ -38,6 +39,8 @@ public function __construct(string $host, int $level = Logger::DEBUG, bool $bubb

/**
* {@inheritdoc}
*
* @return bool
*/
public function handle(array $record)
{
Expand Down Expand Up @@ -77,6 +80,8 @@ public function handle(array $record)

/**
* {@inheritdoc}
*
* @return FormatterInterface
*/
protected function getDefaultFormatter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public function setFluentSafe(bool $fluentSafe)

/**
* {@inheritdoc}
*
* @return void
*/
public function generate(\ReflectionClass $originalClass, ClassGenerator $classGenerator)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/AssetExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function __construct(Packages $packages)

/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/CodeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public function __construct($fileLinkFormat, string $projectDir, string $charset

/**
* {@inheritdoc}
*
* @return TwigFilter[]
*/
public function getFilters()
{
Expand Down
7 changes: 7 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/DumpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Twig\Environment;
use Twig\Extension\AbstractExtension;
use Twig\Template;
use Twig\TokenParser\TokenParserInterface;
use Twig\TwigFunction;

/**
Expand All @@ -35,13 +36,19 @@ public function __construct(ClonerInterface $cloner, HtmlDumper $dumper = null)
$this->dumper = $dumper;
}

/**
* @return TwigFunction[]
*/
public function getFunctions()
{
return [
new TwigFunction('dump', [$this, 'dump'], ['is_safe' => ['html'], 'needs_context' => true, 'needs_environment' => true]),
];
}

/**
* @return TokenParserInterface[]
*/
public function getTokenParsers()
{
return [new DumpTokenParser()];
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class ExpressionExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand Down
9 changes: 9 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/FormExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
use Symfony\Component\Form\FormView;
use Twig\Extension\AbstractExtension;
use Twig\TokenParser\TokenParserInterface;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Twig\TwigTest;
Expand All @@ -29,6 +30,8 @@ class FormExtension extends AbstractExtension
{
/**
* {@inheritdoc}
*
* @return TokenParserInterface[]
*/
public function getTokenParsers()
{
Expand All @@ -40,6 +43,8 @@ public function getTokenParsers()

/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand All @@ -60,6 +65,8 @@ public function getFunctions()

/**
* {@inheritdoc}
*
* @return TwigFilter[]
*/
public function getFilters()
{
Expand All @@ -71,6 +78,8 @@ public function getFilters()

/**
* {@inheritdoc}
*
* @return TwigTest[]
*/
public function getTests()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/HttpFoundationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public function __construct($urlHelper)

/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand Down
3 changes: 3 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
*/
class HttpKernelExtension extends AbstractExtension
{
/**
* @return TwigFunction[]
*/
public function getFunctions()
{
return [
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function __construct(LogoutUrlGenerator $generator)

/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function __construct(UrlGeneratorInterface $generator)

/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/SecurityExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public function isGranted($role, $object = null, $field = null)

/**
* {@inheritdoc}
*
* @return TwigFunction[]
*/
public function getFunctions()
{
Expand Down
Loading