Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocBlockTypeResolver throws InvalidArgumentException with mixed and union type annotation #1302

Closed
gam6itko opened this issue Mar 22, 2021 · 2 comments

Comments

@gam6itko
Copy link
Contributor

gam6itko commented Mar 22, 2021

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

As I said in #1295, I have json type field $value. It marked as mixed type in annotation.

class MegaClass 
{
    /**
     * @var mixed
     */
    private $value;
}

With 3.12.1 executing of cache:warmup throws Can't use incorrect type mixed for collection in MegaClass:value

If I change the annotation to union type it will throws another exception Can't use union type array|int|bool|null for collection in MegaClass:value

class MegaClass 
{
    /**
     * @var array|int|bool|null
     */
    private $value;
}

I believe @dgafka can fix it

@goetas
Copy link
Collaborator

goetas commented May 11, 2022

done in #1330

@goetas goetas closed this as completed May 11, 2022
@fvozar
Copy link

fvozar commented Jun 14, 2022

Hi @goetas, is there any date planned for the bug fix release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants