Skip to content

0.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 12:40
· 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 DrevOps ruleset
  • 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

@AlexSkrypnyk