-
-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Description
Hello,
Looks like a45d437 broke default values using other other references in method parameters:
A class such as
// App\AnotherNamespace\DataType class
<?php
namespace App\AnotherNamespace;
class DataType {
const DAY = 'day';
}
// App\Entity\MyEntity class
<?php
namespace App\Entity;
use App\AnotherNamespace\DataType;
class MyEntity {
public function doSomething(string $dataType = DataType::DAY) {
// Do something
}
With 3.3.1:
// App\Entity\MyEntity class
<?php
class MyEntity extends \App\Entity\MyEntity implements \Doctrine\ORM\Proxy\Proxy
public function doSomething(string $dataType = 'day'): void {
}
With 3.4.0:
// App\Entity\MyEntity class
<?php
class MyEntity extends \App\Entity\MyEntity implements \Doctrine\ORM\Proxy\Proxy
public function doSomething(string $dataType = App\AnotherNamespace\DataType::DAY): void {
}
Which leads to a Class "App\AnotherNamespace\DataType" does not exist
error, as namespace imports aren't used, or neither global namespace is used.
SebLevDev