summaryrefslogtreecommitdiff
path: root/vendor/symfony/debug/Tests
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-12-01 17:57:53 +0000
committerGreg Roach <fisharebest@webtrees.net>2018-12-01 18:56:03 +0000
commite70f282ef978b175c5529f439f3b572c5b8531a2 (patch)
treecc022e973d89a5507dcbb35561ef93852c551dff /vendor/symfony/debug/Tests
parentc16be598f1a8d42127bd64c4878bd92297e18f3b (diff)
downloadwebtrees-e70f282ef978b175c5529f439f3b572c5b8531a2.tar.gz
webtrees-e70f282ef978b175c5529f439f3b572c5b8531a2.tar.bz2
webtrees-e70f282ef978b175c5529f439f3b572c5b8531a2.zip
Update minimum version of PHP to 7.1
Diffstat (limited to 'vendor/symfony/debug/Tests')
-rw-r--r--vendor/symfony/debug/Tests/DebugClassLoaderTest.php118
-rw-r--r--vendor/symfony/debug/Tests/ErrorHandlerTest.php82
-rw-r--r--vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php91
-rw-r--r--vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php2
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php2
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/ClassWithAnnotatedParameters.php34
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/FinalClass.php2
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/FinalMethod.php2
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/InterfaceWithAnnotatedParameters.php14
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/InternalClass.php2
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php2
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/SubClassWithAnnotatedParameters.php24
-rw-r--r--vendor/symfony/debug/Tests/Fixtures/TraitWithAnnotatedParameters.php13
-rw-r--r--vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt2
14 files changed, 185 insertions, 205 deletions
diff --git a/vendor/symfony/debug/Tests/DebugClassLoaderTest.php b/vendor/symfony/debug/Tests/DebugClassLoaderTest.php
index e9ce535ee7..c7e03fbef8 100644
--- a/vendor/symfony/debug/Tests/DebugClassLoaderTest.php
+++ b/vendor/symfony/debug/Tests/DebugClassLoaderTest.php
@@ -13,7 +13,6 @@ namespace Symfony\Component\Debug\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Debug\DebugClassLoader;
-use Symfony\Component\Debug\ErrorHandler;
class DebugClassLoaderTest extends TestCase
{
@@ -76,72 +75,8 @@ class DebugClassLoaderTest extends TestCase
class_exists(__NAMESPACE__.'\Fixtures\Throwing');
}
- public function testUnsilencing()
- {
- if (\PHP_VERSION_ID >= 70000) {
- $this->markTestSkipped('PHP7 throws exceptions, unsilencing is not required anymore.');
- }
- if (defined('HHVM_VERSION')) {
- $this->markTestSkipped('HHVM is not handled in this test case.');
- }
-
- ob_start();
-
- $this->iniSet('log_errors', 0);
- $this->iniSet('display_errors', 1);
-
- // See below: this will fail with parse error
- // but this should not be @-silenced.
- @class_exists(__NAMESPACE__.'\TestingUnsilencing', true);
-
- $output = ob_get_clean();
-
- $this->assertStringMatchesFormat('%aParse error%a', $output);
- }
-
- public function testStacking()
- {
- // the ContextErrorException must not be loaded to test the workaround
- // for https://bugs.php.net/65322.
- if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) {
- $this->markTestSkipped('The ContextErrorException class is already loaded.');
- }
- if (defined('HHVM_VERSION')) {
- $this->markTestSkipped('HHVM is not handled in this test case.');
- }
-
- ErrorHandler::register();
-
- try {
- // Trigger autoloading + E_STRICT at compile time
- // which in turn triggers $errorHandler->handle()
- // that again triggers autoloading for ContextErrorException.
- // Error stacking works around the bug above and everything is fine.
-
- eval('
- namespace '.__NAMESPACE__.';
- class ChildTestingStacking extends TestingStacking { function foo($bar) {} }
- ');
- $this->fail('ContextErrorException expected');
- } catch (\ErrorException $exception) {
- // if an exception is thrown, the test passed
- $this->assertStringStartsWith(__FILE__, $exception->getFile());
- if (\PHP_VERSION_ID < 70000) {
- $this->assertRegExp('/^Runtime Notice: Declaration/', $exception->getMessage());
- $this->assertEquals(E_STRICT, $exception->getSeverity());
- } else {
- $this->assertRegExp('/^Warning: Declaration/', $exception->getMessage());
- $this->assertEquals(E_WARNING, $exception->getSeverity());
- }
- } finally {
- restore_error_handler();
- restore_exception_handler();
- }
- }
-
/**
* @expectedException \RuntimeException
- * @expectedExceptionMessage Case mismatch between loaded and declared class names
*/
public function testNameCaseMismatch()
{
@@ -163,7 +98,6 @@ class DebugClassLoaderTest extends TestCase
/**
* @expectedException \RuntimeException
- * @expectedExceptionMessage Case mismatch between loaded and declared class names
*/
public function testPsr4CaseMismatch()
{
@@ -262,32 +196,6 @@ class DebugClassLoaderTest extends TestCase
$this->assertSame($xError, $lastError);
}
- public function testReservedForPhp7()
- {
- if (\PHP_VERSION_ID >= 70000) {
- $this->markTestSkipped('PHP7 already prevents using reserved names.');
- }
-
- set_error_handler(function () { return false; });
- $e = error_reporting(0);
- trigger_error('', E_USER_NOTICE);
-
- class_exists('Test\\'.__NAMESPACE__.'\\Float', true);
-
- error_reporting($e);
- restore_error_handler();
-
- $lastError = error_get_last();
- unset($lastError['file'], $lastError['line']);
-
- $xError = array(
- 'type' => E_USER_DEPRECATED,
- 'message' => 'The "Test\Symfony\Component\Debug\Tests\Float" class uses the reserved name "Float", it will break on PHP 7 and higher',
- );
-
- $this->assertSame($xError, $lastError);
- }
-
public function testExtendedFinalClass()
{
set_error_handler(function () { return false; });
@@ -304,7 +212,7 @@ class DebugClassLoaderTest extends TestCase
$xError = array(
'type' => E_USER_DEPRECATED,
- 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".',
+ 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".',
);
$this->assertSame($xError, $lastError);
@@ -322,7 +230,7 @@ class DebugClassLoaderTest extends TestCase
restore_error_handler();
$xError = array(
- 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".',
+ 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".',
'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod2()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".',
);
@@ -359,12 +267,30 @@ class DebugClassLoaderTest extends TestCase
$this->assertSame($deprecations, array(
'The "Symfony\Component\Debug\Tests\Fixtures\InternalInterface" interface is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
- 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal since version 3.4. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
+ 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".',
'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait" trait is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".',
- 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass::internalMethod()" method is considered internal since version 3.4. It may change without further notice. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".',
+ 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass::internalMethod()" method is considered internal. It may change without further notice. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".',
));
}
+ public function testExtendedMethodDefinesNewParameters()
+ {
+ $deprecations = array();
+ set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
+ $e = error_reporting(E_USER_DEPRECATED);
+
+ class_exists(__NAMESPACE__.'\\Fixtures\SubClassWithAnnotatedParameters', true);
+
+ error_reporting($e);
+ restore_error_handler();
+
+ $this->assertSame(array(
+ 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::quzMethod()" method will require a new "Quz $quz" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\ClassWithAnnotatedParameters", not defining it is deprecated.',
+ 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::whereAmI()" method will require a new "bool $matrix" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.',
+ 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::isSymfony()" method will require a new "true $yes" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\ClassWithAnnotatedParameters", not defining it is deprecated.',
+ ), $deprecations);
+ }
+
public function testUseTraitWithInternalMethod()
{
$deprecations = array();
diff --git a/vendor/symfony/debug/Tests/ErrorHandlerTest.php b/vendor/symfony/debug/Tests/ErrorHandlerTest.php
index a8d40e849b..15e476381a 100644
--- a/vendor/symfony/debug/Tests/ErrorHandlerTest.php
+++ b/vendor/symfony/debug/Tests/ErrorHandlerTest.php
@@ -323,9 +323,6 @@ class ErrorHandlerTest extends TestCase
@$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, array());
}
- /**
- * @group no-hhvm
- */
public function testHandleException()
{
try {
@@ -367,38 +364,6 @@ class ErrorHandlerTest extends TestCase
}
}
- /**
- * @group legacy
- */
- public function testErrorStacking()
- {
- try {
- $handler = ErrorHandler::register();
- $handler->screamAt(E_USER_WARNING);
-
- $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
-
- $logger
- ->expects($this->exactly(2))
- ->method('log')
- ->withConsecutive(
- array($this->equalTo(LogLevel::WARNING), $this->equalTo('Dummy log')),
- array($this->equalTo(LogLevel::DEBUG), $this->equalTo('User Warning: Silenced warning'))
- )
- ;
-
- $handler->setDefaultLogger($logger, array(E_USER_WARNING => LogLevel::WARNING));
-
- ErrorHandler::stackErrors();
- @trigger_error('Silenced warning', E_USER_WARNING);
- $logger->log(LogLevel::WARNING, 'Dummy log');
- ErrorHandler::unstackErrors();
- } finally {
- restore_error_handler();
- restore_exception_handler();
- }
- }
-
public function testBootstrappingLogger()
{
$bootLogger = new BufferingLogger();
@@ -450,9 +415,6 @@ class ErrorHandlerTest extends TestCase
$handler->setLoggers(array(E_DEPRECATED => array($mockLogger, LogLevel::WARNING)));
}
- /**
- * @group no-hhvm
- */
public function testSettingLoggerWhenExceptionIsBuffered()
{
$bootLogger = new BufferingLogger();
@@ -472,9 +434,6 @@ class ErrorHandlerTest extends TestCase
$handler->handleException($exception);
}
- /**
- * @group no-hhvm
- */
public function testHandleFatalError()
{
try {
@@ -515,9 +474,6 @@ class ErrorHandlerTest extends TestCase
}
}
- /**
- * @requires PHP 7
- */
public function testHandleErrorException()
{
$exception = new \Error("Class 'Foo' not found");
@@ -534,45 +490,7 @@ class ErrorHandlerTest extends TestCase
}
/**
- * @group no-hhvm
- */
- public function testHandleFatalErrorOnHHVM()
- {
- try {
- $handler = ErrorHandler::register();
-
- $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
- $logger
- ->expects($this->once())
- ->method('log')
- ->with(
- $this->equalTo(LogLevel::CRITICAL),
- $this->equalTo('Fatal Error: foo')
- )
- ;
-
- $handler->setDefaultLogger($logger, E_ERROR);
-
- $error = array(
- 'type' => E_ERROR + 0x1000000, // This error level is used by HHVM for fatal errors
- 'message' => 'foo',
- 'file' => 'bar',
- 'line' => 123,
- 'context' => array(123),
- 'backtrace' => array(456),
- );
-
- \call_user_func_array(array($handler, 'handleError'), $error);
- $handler->handleFatalError($error);
- } finally {
- restore_error_handler();
- restore_exception_handler();
- }
- }
-
- /**
* @expectedException \Exception
- * @group no-hhvm
*/
public function testCustomExceptionHandler()
{
diff --git a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php
index ce9f355530..5b77b999a7 100644
--- a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php
+++ b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php
@@ -12,6 +12,7 @@
namespace Symfony\Component\Debug\Tests\Exception;
use PHPUnit\Framework\TestCase;
+use Symfony\Component\Debug\Exception\FatalThrowableError;
use Symfony\Component\Debug\Exception\FlattenException;
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -39,6 +40,12 @@ class FlattenExceptionTest extends TestCase
$flattened = FlattenException::create(new \RuntimeException());
$this->assertEquals('500', $flattened->getStatusCode());
+ $flattened = FlattenException::createFromThrowable(new \DivisionByZeroError(), 403);
+ $this->assertEquals('403', $flattened->getStatusCode());
+
+ $flattened = FlattenException::createFromThrowable(new \DivisionByZeroError());
+ $this->assertEquals('500', $flattened->getStatusCode());
+
$flattened = FlattenException::create(new NotFoundHttpException());
$this->assertEquals('404', $flattened->getStatusCode());
@@ -111,10 +118,10 @@ class FlattenExceptionTest extends TestCase
/**
* @dataProvider flattenDataProvider
*/
- public function testFlattenHttpException(\Exception $exception)
+ public function testFlattenHttpException(\Throwable $exception)
{
- $flattened = FlattenException::create($exception);
- $flattened2 = FlattenException::create($exception);
+ $flattened = FlattenException::createFromThrowable($exception);
+ $flattened2 = FlattenException::createFromThrowable($exception);
$flattened->setPrevious($flattened2);
@@ -123,13 +130,33 @@ class FlattenExceptionTest extends TestCase
$this->assertInstanceOf($flattened->getClass(), $exception, 'The class is set to the class of the original exception');
}
+ public function testWrappedThrowable()
+ {
+ $exception = new FatalThrowableError(new \DivisionByZeroError('Ouch', 42));
+ $flattened = FlattenException::create($exception);
+
+ $this->assertSame('Ouch', $flattened->getMessage(), 'The message is copied from the original error.');
+ $this->assertSame(42, $flattened->getCode(), 'The code is copied from the original error.');
+ $this->assertSame('DivisionByZeroError', $flattened->getClass(), 'The class is set to the class of the original error');
+ }
+
+ public function testThrowable()
+ {
+ $error = new \DivisionByZeroError('Ouch', 42);
+ $flattened = FlattenException::createFromThrowable($error);
+
+ $this->assertSame('Ouch', $flattened->getMessage(), 'The message is copied from the original error.');
+ $this->assertSame(42, $flattened->getCode(), 'The code is copied from the original error.');
+ $this->assertSame('DivisionByZeroError', $flattened->getClass(), 'The class is set to the class of the original error');
+ }
+
/**
* @dataProvider flattenDataProvider
*/
- public function testPrevious(\Exception $exception)
+ public function testPrevious(\Throwable $exception)
{
- $flattened = FlattenException::create($exception);
- $flattened2 = FlattenException::create($exception);
+ $flattened = FlattenException::createFromThrowable($exception);
+ $flattened2 = FlattenException::createFromThrowable($exception);
$flattened->setPrevious($flattened2);
@@ -138,50 +165,47 @@ class FlattenExceptionTest extends TestCase
$this->assertSame(array($flattened2), $flattened->getAllPrevious());
}
- /**
- * @requires PHP 7.0
- */
public function testPreviousError()
{
$exception = new \Exception('test', 123, new \ParseError('Oh noes!', 42));
$flattened = FlattenException::create($exception)->getPrevious();
- $this->assertEquals($flattened->getMessage(), 'Parse error: Oh noes!', 'The message is copied from the original exception.');
+ $this->assertEquals($flattened->getMessage(), 'Oh noes!', 'The message is copied from the original exception.');
$this->assertEquals($flattened->getCode(), 42, 'The code is copied from the original exception.');
- $this->assertEquals($flattened->getClass(), 'Symfony\Component\Debug\Exception\FatalThrowableError', 'The class is set to the class of the original exception');
+ $this->assertEquals($flattened->getClass(), 'ParseError', 'The class is set to the class of the original exception');
}
/**
* @dataProvider flattenDataProvider
*/
- public function testLine(\Exception $exception)
+ public function testLine(\Throwable $exception)
{
- $flattened = FlattenException::create($exception);
+ $flattened = FlattenException::createFromThrowable($exception);
$this->assertSame($exception->getLine(), $flattened->getLine());
}
/**
* @dataProvider flattenDataProvider
*/
- public function testFile(\Exception $exception)
+ public function testFile(\Throwable $exception)
{
- $flattened = FlattenException::create($exception);
+ $flattened = FlattenException::createFromThrowable($exception);
$this->assertSame($exception->getFile(), $flattened->getFile());
}
/**
* @dataProvider flattenDataProvider
*/
- public function testToArray(\Exception $exception)
+ public function testToArray(\Throwable $exception, string $expectedClass)
{
- $flattened = FlattenException::create($exception);
+ $flattened = FlattenException::createFromThrowable($exception);
$flattened->setTrace(array(), 'foo.php', 123);
$this->assertEquals(array(
array(
'message' => 'test',
- 'class' => 'Exception',
+ 'class' => $expectedClass,
'trace' => array(array(
'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123,
'args' => array(),
@@ -190,10 +214,24 @@ class FlattenExceptionTest extends TestCase
), $flattened->toArray());
}
+ public function testCreate()
+ {
+ $exception = new NotFoundHttpException(
+ 'test',
+ new \RuntimeException('previous', 123)
+ );
+
+ $this->assertSame(
+ FlattenException::createFromThrowable($exception)->toArray(),
+ FlattenException::create($exception)->toArray()
+ );
+ }
+
public function flattenDataProvider()
{
return array(
- array(new \Exception('test', 123)),
+ array(new \Exception('test', 123), 'Exception'),
+ array(new \Error('test', 123), 'Error'),
);
}
@@ -236,7 +274,7 @@ class FlattenExceptionTest extends TestCase
$this->assertSame(array('object', 'stdClass'), $array[$i++]);
$this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]);
$this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]);
- $this->assertSame(array('resource', \defined('HHVM_VERSION') ? 'Directory' : 'stream'), $array[$i++]);
+ $this->assertSame(array('resource', 'stream'), $array[$i++]);
$this->assertSame(array('resource', 'stream'), $array[$i++]);
$args = $array[$i++];
@@ -295,6 +333,19 @@ class FlattenExceptionTest extends TestCase
$this->assertNotContains('*value1*', $serializeTrace);
}
+ public function testAnonymousClass()
+ {
+ $flattened = FlattenException::create(new class() extends \RuntimeException {
+ });
+
+ $this->assertSame('RuntimeException@anonymous', $flattened->getClass());
+
+ $flattened = FlattenException::create(new \Exception(sprintf('Class "%s" blah.', \get_class(new class() extends \RuntimeException {
+ }))));
+
+ $this->assertSame('Class "RuntimeException@anonymous" blah.', $flattened->getMessage());
+ }
+
private function createException($foo)
{
return new \Exception();
diff --git a/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php
index 1dc2120045..60153fc5ec 100644
--- a/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php
+++ b/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php
@@ -26,7 +26,7 @@ class UndefinedFunctionFatalErrorHandlerTest extends TestCase
$exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line']));
$this->assertInstanceOf('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception);
- // class names are case insensitive and PHP/HHVM do not return the same
+ // class names are case insensitive and PHP do not return the same
$this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage()));
$this->assertSame($error['type'], $exception->getSeverity());
$this->assertSame($error['file'], $exception->getFile());
diff --git a/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php b/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php
index dff9517d0a..4eecb6d3f1 100644
--- a/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php
+++ b/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php
@@ -5,7 +5,7 @@ namespace Symfony\Component\Debug\Tests\Fixtures;
class AnnotatedClass
{
/**
- * @deprecated since version 3.4.
+ * @deprecated
*/
public function deprecatedMethod()
{
diff --git a/vendor/symfony/debug/Tests/Fixtures/ClassWithAnnotatedParameters.php b/vendor/symfony/debug/Tests/Fixtures/ClassWithAnnotatedParameters.php
new file mode 100644
index 0000000000..d6eec9aa69
--- /dev/null
+++ b/vendor/symfony/debug/Tests/Fixtures/ClassWithAnnotatedParameters.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Symfony\Component\Debug\Tests\Fixtures;
+
+class ClassWithAnnotatedParameters
+{
+ /**
+ * @param string $foo this is a foo parameter
+ */
+ public function fooMethod(string $foo)
+ {
+ }
+
+ /**
+ * @param string $bar parameter not implemented yet
+ */
+ public function barMethod(/* string $bar = null */)
+ {
+ }
+
+ /**
+ * @param Quz $quz parameter not implemented yet
+ */
+ public function quzMethod(/* Quz $quz = null */)
+ {
+ }
+
+ /**
+ * @param true $yes
+ */
+ public function isSymfony()
+ {
+ }
+}
diff --git a/vendor/symfony/debug/Tests/Fixtures/FinalClass.php b/vendor/symfony/debug/Tests/Fixtures/FinalClass.php
index 2cf26b19e4..f4c69b8532 100644
--- a/vendor/symfony/debug/Tests/Fixtures/FinalClass.php
+++ b/vendor/symfony/debug/Tests/Fixtures/FinalClass.php
@@ -3,7 +3,7 @@
namespace Symfony\Component\Debug\Tests\Fixtures;
/**
- * @final since version 3.3.
+ * @final
*/
class FinalClass
{
diff --git a/vendor/symfony/debug/Tests/Fixtures/FinalMethod.php b/vendor/symfony/debug/Tests/Fixtures/FinalMethod.php
index 98a47524c4..03e47e8a7a 100644
--- a/vendor/symfony/debug/Tests/Fixtures/FinalMethod.php
+++ b/vendor/symfony/debug/Tests/Fixtures/FinalMethod.php
@@ -5,7 +5,7 @@ namespace Symfony\Component\Debug\Tests\Fixtures;
class FinalMethod
{
/**
- * @final since version 3.3.
+ * @final
*/
public function finalMethod()
{
diff --git a/vendor/symfony/debug/Tests/Fixtures/InterfaceWithAnnotatedParameters.php b/vendor/symfony/debug/Tests/Fixtures/InterfaceWithAnnotatedParameters.php
new file mode 100644
index 0000000000..54abd68efa
--- /dev/null
+++ b/vendor/symfony/debug/Tests/Fixtures/InterfaceWithAnnotatedParameters.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Symfony\Component\Debug\Tests\Fixtures;
+
+/**
+ * Ensures a deprecation is triggered when a new parameter is not declared in child classes.
+ */
+interface InterfaceWithAnnotatedParameters
+{
+ /**
+ * @param bool $matrix
+ */
+ public function whereAmI();
+}
diff --git a/vendor/symfony/debug/Tests/Fixtures/InternalClass.php b/vendor/symfony/debug/Tests/Fixtures/InternalClass.php
index 119842c260..30efe79b33 100644
--- a/vendor/symfony/debug/Tests/Fixtures/InternalClass.php
+++ b/vendor/symfony/debug/Tests/Fixtures/InternalClass.php
@@ -3,7 +3,7 @@
namespace Symfony\Component\Debug\Tests\Fixtures;
/**
- * @internal since version 3.4.
+ * @internal
*/
class InternalClass
{
diff --git a/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php b/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php
index 05f18e83e4..e4cbe12aec 100644
--- a/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php
+++ b/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php
@@ -8,7 +8,7 @@ namespace Symfony\Component\Debug\Tests\Fixtures;
trait InternalTrait2
{
/**
- * @internal since version 3.4
+ * @internal
*/
public function internalMethod()
{
diff --git a/vendor/symfony/debug/Tests/Fixtures/SubClassWithAnnotatedParameters.php b/vendor/symfony/debug/Tests/Fixtures/SubClassWithAnnotatedParameters.php
new file mode 100644
index 0000000000..20358e96de
--- /dev/null
+++ b/vendor/symfony/debug/Tests/Fixtures/SubClassWithAnnotatedParameters.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Symfony\Component\Debug\Tests\Fixtures;
+
+class SubClassWithAnnotatedParameters extends ClassWithAnnotatedParameters implements InterfaceWithAnnotatedParameters
+{
+ use TraitWithAnnotatedParameters;
+
+ public function fooMethod(string $foo)
+ {
+ }
+
+ public function barMethod($bar = null)
+ {
+ }
+
+ public function quzMethod()
+ {
+ }
+
+ public function whereAmI()
+ {
+ }
+}
diff --git a/vendor/symfony/debug/Tests/Fixtures/TraitWithAnnotatedParameters.php b/vendor/symfony/debug/Tests/Fixtures/TraitWithAnnotatedParameters.php
new file mode 100644
index 0000000000..5eb5fbf84b
--- /dev/null
+++ b/vendor/symfony/debug/Tests/Fixtures/TraitWithAnnotatedParameters.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Symfony\Component\Debug\Tests\Fixtures;
+
+trait TraitWithAnnotatedParameters
+{
+ /**
+ * `@param` annotations in traits are not parsed.
+ */
+ public function isSymfony()
+ {
+ }
+}
diff --git a/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt b/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt
index 26b3abf4d7..53839c4899 100644
--- a/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt
+++ b/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt
@@ -23,5 +23,5 @@ class_exists(ExtendedFinalMethod::class);
?>
--EXPECTF--
-The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".
+The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".
The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod2()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".