Skip to content

Conversation

swiffer
Copy link
Contributor

@swiffer swiffer commented Apr 8, 2023

v5 is not allowing slevomat/coding-standard v6 and it's giving deprecation errors in newer versions of php.

Deprecated: Creation of dynamic property SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff::$newlinesCountAfterDeclare is deprecated

ref: squizlabs/PHP_CodeSniffer#3629 (comment)

the propertytypehint sniff has no enableStaticTypeHint option:

https://github.com/slevomat/coding-standard/blob/master/SlevomatCodingStandard/Sniffs/TypeHints/PropertyTypeHintSniff.php#L68

swiffer added 2 commits April 8, 2023 20:44
v5 is not allowing slevomat/coding-standard v6 and it's giving deprecation errors in newer versions of php. Deprecated: Creation of dynamic property SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff::$newlinesCountAfterDeclare is deprecated
@ADmad
Copy link
Member

ADmad commented Apr 9, 2023

v5 is not allowing slevomat/coding-standard v6

This 5.x branch uses slevomat/coding-standard v8 https://github.com/cakephp/cakephp-codesniffer/blob/5.x/composer.json#L23

I haven't encountered any errors using cakephp-codesniffer v5 on PHP 8.2. It's v4 that needs to be updated.

@ADmad
Copy link
Member

ADmad commented Apr 9, 2023

Sorry I misunderstood, thank you for the report. I have removed the defunct props for 5.x in 4728b69.

@ADmad ADmad closed this Apr 9, 2023
@swiffer
Copy link
Contributor Author

swiffer commented Apr 9, 2023

Yes but the ruleset makes use of Settings Not available in V8. These lead to deprecarion warnings (If enabled) in PHP8.2.

@ADmad
Copy link
Member

ADmad commented Apr 9, 2023

Yes but the ruleset makes use of Settings Not available in V8

They have been removed now 4728b69

@swiffer
Copy link
Contributor Author

swiffer commented Apr 9, 2023

There is one more (See my second commit)

@ADmad ADmad reopened this Apr 9, 2023
@ADmad ADmad merged commit 2374ead into cakephp:5.x Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants