Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected linting error messages #5174

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Oct 14, 2020

The reason for the trimming of the error message and the prefix normalisation is because the PHP parser, when compiled on macos vs linux, has different error messages and also additional whitespace at the start:

 ✘ graham@Grahams-MacBook-Pro  ~  php -l test.php 

Parse error: syntax error, unexpected end of file, expecting '{' in test.php on line 4
Errors parsing test.php
 ✘ graham@Grahams-MacBook-Pro  ~  php -l test2.php

Fatal error: Multiple access type modifiers are not allowed in test2.php on line 5
 ✘ graham@Grahams-MacBook-Pro  ~  php74 -l test.php
PHP Parse error:  syntax error, unexpected end of file, expecting '{' in test.php on line 4
Errors parsing test.php
 ✘ graham@Grahams-MacBook-Pro  ~  php74 -l test2.php
PHP Fatal error:  Multiple access type modifiers are not allowed in test2.php on line 5

php is running macos php, and php74 is running in docker (linux).

@SpacePossum
Copy link
Contributor

Thank you @GrahamCampbell.

@SpacePossum SpacePossum merged commit c096713 into PHP-CS-Fixer:2.15 Oct 19, 2020
@SpacePossum SpacePossum removed the RTM Ready To Merge label Oct 19, 2020
@GrahamCampbell GrahamCampbell deleted the patch-3 branch October 19, 2020 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants