[PR #7325] Make code php 7.3 lint-compatible #10426

Open
opened 2026-01-22 16:07:30 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/7325

State: closed
Merged: Yes


Current v2.6.2 raised a warning when ran on php 7.3 :

$ php7.3 -v ; find . -name '*.php' -exec php7.3 -l {} \;| grep -v '^No syntax errors'
PHP 7.3.0alpha4 (cli) (built: Jul 23 2018 11:02:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.0alpha4, Copyright (c) 1999-2018, by Zend Technologies
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ./lib/Doctrine/ORM/UnitOfWork.php on line 2718
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ./lib/Doctrine/ORM/UnitOfWork.php on line 2747

I changed the continue into break (meaning of continue; inside a switch), although continue 2 seems to be equivalent as there is no code after the switch statement.

**Original Pull Request:** https://github.com/doctrine/orm/pull/7325 **State:** closed **Merged:** Yes --- Current v2.6.2 raised a warning when ran on php 7.3 : ``` $ php7.3 -v ; find . -name '*.php' -exec php7.3 -l {} \;| grep -v '^No syntax errors' PHP 7.3.0alpha4 (cli) (built: Jul 23 2018 11:02:37) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.0alpha4, Copyright (c) 1999-2018, by Zend Technologies PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ./lib/Doctrine/ORM/UnitOfWork.php on line 2718 PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ./lib/Doctrine/ORM/UnitOfWork.php on line 2747 ``` I changed the `continue` into `break` ([meaning of `continue;` inside a switch](https://secure.php.net/continue)), although `continue 2` seems to be equivalent as there is no code after the `switch` statement.
admin added the pull-request label 2026-01-22 16:07:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10426