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

Allow attribute between docblock and function. #327

Merged
merged 2 commits into from
Jun 12, 2021
Merged

Conversation

ADmad
Copy link
Member

@ADmad ADmad commented Jun 11, 2021

This will prevent errors for code like:

/**
 * docblock
 */
#[ReturnTypeWillChange]
public function foo()

@othercorey
Copy link
Member

We want to fully copy this instead of pushing the change to phpcs?

@ADmad
Copy link
Member Author

ADmad commented Jun 11, 2021

We want to fully copy this instead of pushing the change to phpcs?

The sniff now overrides every method of the parent so I just removed the extension. I have no interest in getting the change done in phpcs itself. My change probably doesn't cover all scenarios and I don't want to spend more time on this.

@othercorey
Copy link
Member

Yup, I prefer we don't extend it either then.

@ADmad
Copy link
Member Author

ADmad commented Jun 11, 2021

I had to bump phpcs to latest minor for attributes support. So we'll need a new minor release after merging this.

@othercorey othercorey merged commit b1bd09a into master Jun 12, 2021
@othercorey othercorey deleted the function-attribute branch June 12, 2021 16:26
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

Successfully merging this pull request may close these issues.

2 participants