Skip to content

Remove underscore prefix from property names in test files - #19332

Closed
dereuromark wants to merge 1 commit into
6.xfrom
fix/remove-underscore-prefix-properties
Closed

Remove underscore prefix from property names in test files#19332
dereuromark wants to merge 1 commit into
6.xfrom
fix/remove-underscore-prefix-properties

Conversation

@dereuromark

@dereuromark dereuromark commented Mar 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Removes underscore prefix from property names in test files to comply with CakePHP coding standards
  • The underscore prefix should not be used to indicate visibility in PHP

Aims to be green in CI for cakephp/cakephp-codesniffer#424 then

Properties renamed:

  • $_sessionBackup -> $sessionBackup in CacheSessionTest
  • $_table -> $table in test app table files
  • $_hidden -> $hidden in ProtectedUser entity
  • $_virtual -> $virtual in VirtualUser entity

Note: The $_toStringFormat properties in I18n classes (Date, DateTime, Time) cannot be renamed as they intentionally use the underscore prefix to avoid type conflicts with parent Chronos classes.
=> cakephp/chronos#497
Will be release with Chronos major in the future.

This removes the underscore prefix from property names in test files
to comply with CakePHP coding standards. The underscore prefix should
not be used to indicate visibility in PHP.

Properties renamed:
- $_sessionBackup -> $sessionBackup
- $_table -> $table (in test app tables)
- $_hidden -> $hidden
- $_virtual -> $virtual
@dereuromark dereuromark added this to the 6.0 milestone Mar 14, 2026
@dereuromark
dereuromark deleted the fix/remove-underscore-prefix-properties branch July 21, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant