Skip to content

PHP 8 | ControlStructureSpacing: bug fix - $data should be an array#1935

Merged
GaryJones merged 1 commit into
developfrom
feature/controlstructurespacing-fix-data-param
Jul 21, 2020
Merged

PHP 8 | ControlStructureSpacing: bug fix - $data should be an array#1935
GaryJones merged 1 commit into
developfrom
feature/controlstructurespacing-fix-data-param

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Jul 21, 2020

The $data parameter of the $phpcsFile->add[Fixable]Error|Warning() methods is expected to be an array, not a string.

Without this fix, PHP 8 will throw an (uncaught) TypeError: vsprintf(): Argument #2 ($args) must be of type array, string given.

The `$data` parameter of the `$phpcsFile->add[Fixable]Error|Warning()` methods is expected to be an array, not a string.

Without this fix, PHP 8 will throw and (uncaught) `TypeError: vsprintf(): Argument #2 ($args) must be of type array, string given`.
@GaryJones GaryJones merged commit a45757a into develop Jul 21, 2020
@GaryJones GaryJones deleted the feature/controlstructurespacing-fix-data-param branch July 21, 2020 21:39
@jrfnl jrfnl mentioned this pull request Dec 18, 2020
1 task
@stingray21
Copy link
Copy Markdown

I'm trying to set phpcs and keep getting this error. When will this be merged into master? It was fixed quite a while ago.

@jrfnl
Copy link
Copy Markdown
Member Author

jrfnl commented Mar 26, 2021

@stingray21 When we're ready to release version 3.0.0.

@kraftbj
Copy link
Copy Markdown

kraftbj commented Dec 14, 2021

Howdy! Is there anything we can do to help get this shipped out?

@jrfnl
Copy link
Copy Markdown
Member Author

jrfnl commented Dec 14, 2021

@kraftbj If you can get PHP Core to slow down with the deprecations, so I can focus back on CS work instead of spending all my time on PHP 8.1 fixes, that would be lovely!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.