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

Embedded attribute is not checked #7587

Closed
b-vadym opened this issue Feb 4, 2022 · 2 comments
Closed

Embedded attribute is not checked #7587

b-vadym opened this issue Feb 4, 2022 · 2 comments

Comments

@b-vadym
Copy link
Contributor

b-vadym commented Feb 4, 2022

https://psalm.dev/r/83c8548537
Actual: no error
Expected: TooFewArguments error for EmbeddedAttribute::__construct

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/83c8548537
<?php

#[Attribute]
class RootAttribute
{
    public function __construct(
        public EmbeddedAttribute $embeedAttribute
    ){
    }
}

#[Attribute]
class EmbeddedAttribute
{
    public function __construct(
    	public int $argument
    ){}
}

#[RootAttribute(
	new EmbeddedAttribute()
)]
class Foo{}
Psalm output (using commit 3a298d0):

No issues!

@AndrolGenhald
Copy link
Collaborator

This is now fixed, probably by #7692.

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

No branches or pull requests

3 participants