Skip to content

PHP 7.3: using continue within switch - warning for something not deprecated ? #686

@jrfnl

Description

@jrfnl

As of PHP 7.3, a warning will be thrown when continue is used within a switch without a numeric argument.
Ref: php/php-src@04e3523

The feature to use continue within a switch is not deprecated nor slated for removal.
Also see: https://wiki.php.net/rfc/continue_on_switch_deprecation

So code using continue in a switch is still compatible with PHP 7.3, they will just get a warning thrown.

Should a sniff be written for this ?

Asking because, again, this could be considered a grey area.

Note: I'm in favour of sniffing this as I've already seen Travis builds running PHPUnit break on this (as PHPUnit exits with an error code because of the warning).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions