Comments (3)
I have almost the same use case: vendor/foo.class.php for the class Foo_Service.
Psr0Fixer is more checker than a fixer IMHO. We could rename the file with the logic of the classname. The problem is to broke include instruction in others files...
from php-cs-fixer.
PSR0 demands the class name to be the same as the file name. It is also the default level or rule included when running without levels or rules by hand. If you need a warning you would first run the command with --dry-run, it is definitely the fix to rename the class according to the filename or viceversa. So it is not the fault of the tool, if you want a warning that is done in --dry-run again.
cc/ @fabpot
Please if you feel satisfied close the issue.
from php-cs-fixer.
No discussion for 2 years and actually everything that can be say was said. Closing.
from php-cs-fixer.
Related Issues (20)
- Mark DTO classes as readonly
- Linting Exception in non-grouped list of const/function imports
- no_superfluous_phpdoc_tags.allow_future_params
- braces_position only supports two options to configure HOT 1
- Same class name should be replaced with `self` in phpdoc
- binary_operator_spaces wrongly add whitespace inside short function
- Fixer breaks PhpDoc before return HOT 4
- idea: drop Flex
- Support intersection and DNF types in phpDoc to native types conversion
- Allow setting default path mode in config HOT 1
- `ClassAttributesSeparationFixer` bugged when there are parenthases in property type
- Index invalid or out of range in BraceTransformer HOT 2
- `explicit_indirect_variable` should transform `Cl::$$v` HOT 3
- [PHP8.3] Fix whitespace inside dynamic const fetch, e.g. `Foo::{ $bar }`
- [PHP8.3] Fix whitespace between const type and const name
- Rule to add `null` as default value to properties that don't have a type HOT 3
- statement_indentation on comment before esle HOT 7
- `FullyQualifiedStrictTypesFixer` removes leading backslash without properly imported symbol HOT 2
- Support for FQCN-based calls to imported functions in `fully_qualified_strict_types` HOT 2
- Modernise and standardise fixers' and options' naming convention HOT 2
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-cs-fixer.