phoenix
phoenix copied to clipboard
Proxy generation issue
Symfony version(s) affected
6.1.4
Description
I have an entity named Product and Sample with 'public const' parameters used as arguments in both classes.
The issue appear when dealing with Proxies.
How to reproduce
<?php
namespace App\Entity;
class Product
{
public const MYCONST = 512;
public function foo($myparam = Product:: MYCONST): { /*...*/}
}
namespace App\Entity\Extra;
use App\Entity\Product;
class Sample
{
public function foo($myparam = Product:: MYCONST): { /*...*/}
}
It results into this error message from Sample class:
Class "App\Entity\Extra\App\Entity\Product" does not exist
Possible Solution
Looking at the proxy file.. it seems that Product class is extended but a backslash is missing !
Additional Context
No response
We need more info. What code triggers that error? How does your doctrine.yaml file look like? Which packages do you have installed? Best would be if you could create example project with this issue we could download.
Closing due to lack of feedback. @xKZL please let us know if you have more details and we can have another look at the issue.