0.6.0
·
7 commits
to refs/heads/main
since this release
What's new since 0.5.0
β¨ Key Changes
Allow to specify snake or camel case format for local variables and function parameters.
π Configuration Examples
Default Behavior (snake_case)
<rule ref="DrevOps.NamingConventions.LocalVariableNaming"/>
<rule ref="DrevOps.NamingConventions.ParameterNaming"/>Configure for camelCase
<rule ref="DrevOps.NamingConventions.LocalVariableNaming">
<properties>
<property name="format" value="camelCase"/>
</properties>
</rule>
<rule ref="DrevOps.NamingConventions.ParameterNaming">
<properties>
<property name="format" value="camelCase"/>
</properties>
</rule>π§ Migration Guide
Update XML Configuration
- <rule ref="DrevOps.NamingConventions.LocalVariableSnakeCase"/>
+ <rule ref="DrevOps.NamingConventions.LocalVariableNaming"/>
- <rule ref="DrevOps.NamingConventions.ParameterSnakeCase"/>
+ <rule ref="DrevOps.NamingConventions.ParameterNaming"/>Update Inline Suppressions
- // phpcs:ignore DrevOps.NamingConventions.LocalVariableSnakeCase.NotSnakeCase
+ // phpcs:ignore DrevOps.NamingConventions.LocalVariableNaming.NotSnakeCase
- // phpcs:ignore DrevOps.NamingConventions.ParameterSnakeCase.NotSnakeCase
+ // phpcs:ignore DrevOps.NamingConventions.ParameterNaming.NotSnakeCaseβ Backward Compatibility
- Default behavior unchanged: snake_case remains the default format
- Existing configurations work: Rules auto-upgrade if using
DrevOpsruleset - No code changes required: Only if using custom configurations or direct class references
Changelog
- Refactored case sniffs to allow choosing snake or camel case. @AlexSkrypnyk (#12)
- Updated own reference to the standard and fixed violations. @AlexSkrypnyk (#9)
- Fixed snake_case not being updated in the docblocks. @AlexSkrypnyk (#8)
Full Changelog: 0.5.0...0.6.0