Skip to content
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

[Cache] PHP 7.4 Unbinding $this of closure is deprecated #32795

Closed
emodric opened this issue Jul 29, 2019 · 3 comments
Closed

[Cache] PHP 7.4 Unbinding $this of closure is deprecated #32795

emodric opened this issue Jul 29, 2019 · 3 comments

Comments

@emodric
Copy link
Contributor

emodric commented Jul 29, 2019

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();
@nicolas-grekas
Copy link
Member

Hi Edi, please send a PR.
No need to report issues with 7.4, it's not stable yet and support in Symfony is WIP.
See #32289

@nicolas-grekas
Copy link
Member

Coincidently, @jpauli created #32796 on the topic :)

@emodric
Copy link
Contributor Author

emodric commented Jul 29, 2019

Thanks for the link @nicolas-grekas, I wasn't aware that unreleased PHP versions do not need an issue!

Next time I'll send a PR directly, since @jpauli beat me to it now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants