Comments (7)
I'm closing this. We're receiving bugfixes release sfrom upstream PHPCS so we should get the fix if they do it. If the fix will be done in a major/minor, we will get that when we'll update... I think we need to keep PHPCS updated anyway.
from php-coding-standards.
This only happens when there already was an encoding declaration on the same line as the opening PHP tag. See c10f795
(#10).
from php-coding-standards.
Looks like it's one of PSR12.Files.OpenTag.NotAlone
or PSR12.Files.FileHeader.SpacingAfterBlock
that's doing this.
from php-coding-standards.
It was PSR12.Files.OpenTag.NotAlone
. Excluding this sniff results in the tag being alone, and a blank line between it and the comment.
from php-coding-standards.
This looks like a bug in the upstream PSR12 rule.
We could exclude the rule in our standard, but the rule itself is fine. The problem is the "fix" part that is problematic. Maybe we should send a PR to PHPCS...
from php-coding-standards.
Yep, looks like a problem in PSR12. Sounds good!
from php-coding-standards.
This is still present, FYI.
from php-coding-standards.
Related Issues (20)
- [Feature Request]: Add check for Emacs UTF-8 file header HOT 1
- [Question] When using phpcbf there is a bug for the rule that leaves the first line with opening php tag HOT 3
- Review Squiz.Scope.MethodScope.Missing rule in interfaces and PhpAnnotator conflict HOT 1
- [Feature Request]: Add check for whitespace after type casting HOT 3
- [Feature Request]: Bump squizlabs/php_codesniffer HOT 1
- [Feature Request]: Add a rule against unused imports HOT 2
- [Feature Request]: Add rules for arrow functions
- [Feature Request]: Add more tests for array spread operator
- [Feature Request]: Add a sniff for unused services HOT 2
- [Feature Request]: Update dependencies to be compatible with PHP 8
- [Feature Request]: Get rid of Neutron PHP Standard
- [Feature Request]: Configure Dependabot HOT 2
- [Feature Request]: Evaluate which "Slevomat" coding standard sniffs to use HOT 2
- [Feature Request]: Embrace PHPCSUtils
- [Upgrade]: Modernize existing sniffs
- [Feature Request]: Add a sniff to enforce property type HOT 2
- [Feature Request]: Replace cyclomatic complexity with Cognitive Complexity
- Having trouble finding a working composer.json configuration HOT 1
- [Feature Request]: Enforce no spaces in array brackets
- [Feature Request]: Enforce no space after negation operator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-coding-standards.