Giter Site home page Giter Site logo

Comments (13)

ServerExe avatar ServerExe commented on May 9, 2024 1

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.

ondrejmirtes avatar ondrejmirtes commented on May 9, 2024

from phpstan-strict-rules.

RikudouSage avatar RikudouSage commented on May 9, 2024

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.

ondrejmirtes avatar ondrejmirtes commented on May 9, 2024

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.

RikudouSage avatar RikudouSage commented on May 9, 2024

phpstan/phpstan - 0.11.12
phpstan/phpstan-strict-rules - 0.11.1
phpstan/phpstan-symfony - 0.11.6

from phpstan-strict-rules.

ondrejmirtes avatar ondrejmirtes commented on May 9, 2024

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.

digitalstraw avatar digitalstraw commented on May 9, 2024

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.

ondrejmirtes avatar ondrejmirtes commented on May 9, 2024

Thanks!

from phpstan-strict-rules.

ServerExe avatar ServerExe commented on May 9, 2024

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.

ondrejmirtes avatar ondrejmirtes commented on May 9, 2024

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.

ServerExe avatar ServerExe commented on May 9, 2024

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.

ondrejmirtes avatar ondrejmirtes commented on May 9, 2024

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.

github-actions avatar github-actions commented on May 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.