Comments (2)
You can already do that using stub files: #7962
See also https://pd.shipmonk.com/hacking-generics-into-backedenum-in-php-8-1/ and https://github.com/shipmonk-rnd/phpstan-rules#backedenumgenerics-
from phpstan.
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.
Related Issues (20)
- array_key_exists narrows $key too much
- Phpstan should support defining type of define()d constant without repeating the name
- dynamicConstantNames should support wildcards HOT 1
- [ERROR] No errors were found during the analysis. Baseline could not be generated. HOT 4
- Redis incorrect case false positive HOT 2
- True, False bottom types coerced to Bool when inferred from return of generic callable HOT 1
- array_filter with assert-if-true callable marks all keys optional HOT 2
- False positive "Unreachable statement" when using goto HOT 1
- Type::isSmallerThanOrEqual does not care about the PHP Version HOT 2
- more precise type-narrowing with `isset()` when values are `null`
- Files included via a relative path are flagged as non-existing in some cases HOT 2
- Checking if a variable is declared using `get_defined_vars()` does not work HOT 1
- StaticMethodParameterClosureTypeExtension not being used for a static call on a variable HOT 1
- False positive with preg_match(): Strict comparison using === between '' and non-falsy-string will always evaluate to false. HOT 4
- string[] treated differently to array<string> HOT 2
- A few unparsed regex usecases HOT 2
- FalsePositive varTag.variableNotFound HOT 1
- False "Negated boolean expression is always false." warning to a function call HOT 1
- Implementing Throwable interface should be error
- Proposal for PHPStan: Adding a `json-string` Type
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.