phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Proxy generation issue

Open meiyasan opened this issue 3 years ago • 1 comments

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

meiyasan avatar Sep 11 '22 06:09 meiyasan

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.

ostrolucky avatar Sep 11 '22 09:09 ostrolucky

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.

dmaicher avatar Oct 11 '22 07:10 dmaicher