You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error:
Cannot assign by reference to overloaded object
at vendor/symfony/var-exporter/Internal/Hydrator.php:165
at Packeton\Util\A1Class->Symfony\Component\VarExporter\Internal\{closure}()
(vendor/symfony/var-exporter/Hydrator.php:72)
at Symfony\Component\VarExporter\Hydrator::hydrate()
(vendor/symfony/var-exporter/Internal/LazyObjectState.php:94)
at Symfony\Component\VarExporter\Internal\LazyObjectState->initialize()
(vendor/symfony/var-exporter/LazyGhostTrait.php:176)
at ContainerWf1jvVR\B1ClassGhostD578c3f->__get()
(src/Util/B1Class.php:11)
at Packeton\Util\B1Class->getProp2()
(src/Util/B1Class.php:41)
at Packeton\Util\B1Class->test()
(src/Controller/UserController.php:70)
at Packeton\Controller\UserController->showAction()
(vendor/symfony/http-kernel/HttpKernel.php:166)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:197)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/var/www/packeton5/vendor/autoload_runtime.php')
(public/index.php:5)
The text was updated successfully, but these errors were encountered:
…essors (vtsykun)
This PR was submitted for the 6.3 branch but it was merged into the 6.2 branch instead.
Discussion
----------
[VarExporter] Fix calling scope detection inside magic accessors
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | -
| Tickets | Fix#51048
| License | MIT
| Doc PR | -
This PR provides fixes related to detection of class scope for which the magic method was called.
this fixes are related to the issue described in this RFC https://wiki.php.net/rfc/access_scope_from_magic_accessors
more accurate STR for the bug:
```php
class A1Class {
private $prop1;
public function __construct($prop1)
{
$this->prop1 = $prop1;
}
public function getProp1()
{
return $this->prop1;
}
}
class B1Class extends A1Class
{
protected $prop1;
protected $prop2;
public function __construct($prop1)
{
parent::__construct($prop1);
$this->prop1 = $prop1;
}
public function test()
{
return $this->prop1;
}
public function test2()
{
return $this->prop2;
}
public function setProp2($prop2)
{
$this->prop2 = $prop2;
}
}
```
```yml
App\B1Class:
arguments: [ 'test1' ]
calls:
- [ setProp2, [ 'test2' ] ]
lazy: true
```
Call `$this->b1Class->test2();`
Actual result:

Commits
-------
41e3615 [VarDumper] Fix calling scope detection inside magic accessors
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.3.1
Description
This error occurs if the proxy is initialized from trait. See STR below

How to reproduce
Create classes
And call service
B1Class->test()
Possible Solution
No response
Additional Context
The text was updated successfully, but these errors were encountered: