Comments (13)
We know, we know :) I really appreciate your help, thanks for that. We are taking your advice to heart and are trying to update to the latest version now.
from phpstan-strict-rules.
from phpstan-strict-rules.
Both the latest, it's a new project, did fresh install via require
today. I can send the exact versions when I get home if you need the numeric versions.
from phpstan-strict-rules.
Yeah, those versions would be great just for sanity check. For example if you were on PHP 7.0, a really ancient version of PHPStan would be installed by Composer.
from phpstan-strict-rules.
phpstan/phpstan
- 0.11.12
phpstan/phpstan-strict-rules
- 0.11.1
phpstan/phpstan-symfony
- 0.11.6
from phpstan-strict-rules.
When I try to reproduce this locally, I only get this error:
------ -------------------------------------------------------------------------------
Line EntityCreatedModified.php (in context of class App\Traits\AbstractBaseEntity)
------ -------------------------------------------------------------------------------
61 Only booleans are allowed in a negated boolean, DateTimeInterface|null given.
------ -------------------------------------------------------------------------------
Please make sure this isn't a cache problem.
from phpstan-strict-rules.
I can confirm that this seemed error in my case with all packages updated.
Helped to delete the cache and all is fine. (On Windows c:\Users\[username]\AppData\Local\Temp\phpstan\
).
Hence, I can recommend to close this issue.
from phpstan-strict-rules.
Thanks!
from phpstan-strict-rules.
Hm this could not be the proper solution, because even the playground tells me, that there is a missing typehint:
https://phpstan.org/r/ff8bab55-e6da-4544-a8fe-7280c23e8533
from phpstan-strict-rules.
The playground is currently wrong about things that have something to do with traits. I recommend you to try out locally the latest version and you'll see. Remember to analyse both the class that uses the trait and trait itself in the same run.
from phpstan-strict-rules.
Ah okay. Thanks for your fast reply, but currently we (our company) are not able to update to the latest version (currently 0.11.9). Updating to the latest dependencies ...
- jangregor/phpstan-prophecy
- phpstan/phpstan
- phpstan/phpstan-phpunit
- phpstan/phpstan-strict-rules
leads to a massive amount of errors because of generics. Of course i could turn off the generics check, but this is not desired, because otherwise all the new code would be ignored.
I guess we have to invest more time to migrate to the major version. And I think there is no doubt, that this is working fine in the latest version :-)
Thank you for your help
from phpstan-strict-rules.
Can you give me some examples of errors related to generics that you're experiencing?
Anyway, you should definitely find a way to upgrade. You can ignore select errors using regexes. You'll definitely find being able to use the latest version beneficial as it's more capable and has a lot of new features and bugfixes. See these articles to get the idea:
*ย https://phpstan.org/blog/phpstan-0-12-released
from phpstan-strict-rules.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from phpstan-strict-rules.
Related Issues (20)
- Disable all rules does not work HOT 3
- Force `@return` to match return type HOT 2
- [1.5.0] Error after added `$bleedingEdge` constructor parameter HOT 5
- display the name of the rule in the log HOT 2
- Disallow offset access on string
- Missing `#[Override]` HOT 2
- Add `uselessTrim` rule for useless `trim()`
- Relaxed booleansInConditions to allow 0, 1? HOT 5
- Add support to requireParentConstructorCall for indirect calls
- `class-string` should not be settable using string literal HOT 2
- Disallow casting potential nulls to int/string/array HOT 1
- Disallow foreach by-reference
- checkDynamicProperties, setting variable in while loop condition gets reported as might not be defined HOT 2
- Using named arguments with in_array causes a function.strict error HOT 2
- disallowedLooseComparison - allow only DateTime/DateTimeImmutable HOT 4
- Check if override method does not rename parameters
- Overriding a vendor class member with imperfect type declaration: No way to not get errors HOT 3
- Upgrade to PHP-Parser 5 HOT 5
- False positive "Variable might not be defined" after `for` loop HOT 2
- Variable property access on SimpleXMLElement
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 phpstan-strict-rules.