Explain please, maybe I don't undestand, but next code doesn't work?! Project develop on PHP 8.2 and Symfony 6
#[Type]
class SomeEntity
{
public function getSome(): string
{
return 'some text';
}
}
#[ExtendType(class: SomeEntity::class)] //tried #[Type(class: SomeEntity::class)] - no result
class SomeType
{
#[Field]
public function getSome(SomeEntity $source): string
{
return $source->getSome() . ' text';
}
}
class SomeController
{
#[Query(name: 'someTestQuery')]
/**
* @return SomeType[]|SomeEntity[] // tried single return type with both variants, no results
*/
public function someAction(): array
{
return [new SomeEntity()];
}
}
Explain please, maybe I don't undestand, but next code doesn't work?! Project develop on PHP 8.2 and Symfony 6