Closed
Description
Symfony version(s) affected: 3.4.30 / 4.3.3
Description
On PHP 7.4, I have the error from the title with the following stack trace:
Unbinding $this of closure is deprecated
Stack trace:
#0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, 'Unbinding $this...', '/home/eddie/lay...', 48, Array)
#1 vendor/symfony/cache/Adapter/ArrayAdapter.php(48): Closure::bind(Object(Closure), NULL, 'Symfony\\Compone...')
#2 vendor/symfony/expression-language/ExpressionLanguage.php(37): Symfony\Component\Cache\Adapter\ArrayAdapter->__construct()
#3 lib/View/TemplateResolver.php(94): Symfony\Component\ExpressionLanguage\ExpressionLanguage->__construct()
#4 [internal function]: Netgen\Layouts\View\TemplateResolver->evaluateParameters(Object(Netgen\Layouts\Tests\View\Stubs\View), Array)
#5 lib/View/TemplateResolver.php(58): iterator_to_array(Object(Generator))
#6 tests/lib/View/TemplateResolverTest.php(93): Netgen\Layouts\View\TemplateResolver->resolveTemplate(Object(Netgen\Layouts\Tests\View\Stubs\View))
#7 vendor/phpunit/phpunit/src/Framework/TestCase.php(1328): Netgen\Layouts\Tests\View\TemplateResolverTest->testResolveTemplate()
#8 vendor/phpunit/phpunit/src/Framework/TestCase.php(948): PHPUnit\Framework\TestCase->runTest()
#9 vendor/phpunit/phpunit/src/Framework/TestResult.php(680): PHPUnit\Framework\TestCase->runBare()
#10 vendor/phpunit/phpunit/src/Framework/TestCase.php(677): PHPUnit\Framework\TestResult->run(Object(Netgen\Layouts\Tests\View\TemplateResolverTest))
#11 vendor/phpunit/phpunit/src/Framework/TestSuite.php(568): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#12 vendor/phpunit/phpunit/src/Framework/TestSuite.php(568): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#13 vendor/phpunit/phpunit/src/Framework/TestSuite.php(568): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#14 vendor/phpunit/phpunit/src/TextUI/TestRunner.php(619): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#15 vendor/bin/.phpunit/phpunit-7.4/src/TextUI/Command.php(206): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#16 vendor/bin/.phpunit/phpunit-7.4/src/TextUI/Command.php(162): PHPUnit\TextUI\Command->run(Array, true)
#17 vendor/bin/.phpunit/phpunit-7.4/phpunit(17): PHPUnit\TextUI\Command::main()
#18 vendor/symfony/phpunit-bridge/bin/simple-phpunit.php(259): include('/home/eddie/lay...')
#19 vendor/symfony/phpunit-bridge/bin/simple-phpunit(13): require('/home/eddie/lay...')
How to reproduce
<?php
use Symfony\Component\Cache\Adapter\ArrayAdapter;
require __DIR__ . '/vendor/autoload.php';
error_reporting(E_ALL);
new ArrayAdapter();
Metadata
Metadata
Assignees
Labels
No labels