akalongman / sublimetext-codeformatter

Code Formatter plugin for ST2/ST3
MIT License
772 stars 130 forks source link

erro on php formating #388

Open Druid33 opened 5 years ago

Druid33 commented 5 years ago

Hi, thanks for great plugin. I used it for few months without problem, but now i see this error whne i try fromat php code:


CodeFormatter

Format error:
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 6692
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 6692
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7613
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7613
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7730
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7730
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7770
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7770
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7778
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7778
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7790
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7790
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7795
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7795
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 8530
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 8530
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9923
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9923
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9926
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 9926
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 11153
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 11153
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12425
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12425
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12445
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12445
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12469
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12469
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12987
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///home/user/.config/sublime-text-3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12987
hugocano commented 5 years ago

I have the same problem, some solution has been found.

kalwinskidawid commented 5 years ago

I have the same problem on Sublime 3

mchawande commented 5 years ago

This issue occur on PHP 7.3. PHP 7.3 version give warning about "continue" statement and suggest to use "continue 2" in "switch" block. CodeFormatter work fine on earlier versions of PHP. Hope, @akalongman change "continue" with "continue 2" to provide persistent support.