I thought it was a bug, it it's an intended change: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1317
Explanation is in the PR: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1022 as the file without extension is passed in CLI, phpcs now scans it.
The problem is not visible when running it locally because there are differences due to short_open_tag that is enabled in nix deployment but not in docker images run in CI (it fails only in CI).
Possibilities:
- Run php with short_open_tag=On in CI to skip the issue
- Filter list of files given to phpcs to ignore files without extensions
- is brittle because it means we maintain a double list of exclusion, one in ruleset, one for CI scanning. Risk to misconfigure and conflicts.
- Add every single file without extension in phpcs ruleset ignore list
- will lead to a long list of useless entries in phpcs
- Run phpcs on the whole code base instead of trying to be smart
- will make the CI job longer and consume more resources.