-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop PHP 7.4 and PHP 8.0 support #154
Commits on Nov 18, 2022
-
Drop PHP 7 support to improve type inference
Because we operate with reflection symbols for attributes, we want to be on at least PHP 8.0, in order to have Psalm and PHPUnit access all the relevant types related to attributes. Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 984b5a6 - Browse repository at this point
Copy the full SHA 984b5a6View commit details -
Deprecating
ParameterReflection#detectType()
and its callersThis API is old, bad, and not really useful, as it produces a string representation of functions/methods that doesn't bring much to the table: in fact, it is easier to inspect the AST of a symbol, than to look at its string or array prototype. These methods will be dropped in the next major release, as they are prone to crashes due to union/intersection types on PHP 8.1 and newer, and it is not worth investing the time to fix them. Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b310381 - Browse repository at this point
Copy the full SHA b310381View commit details -
Further restricting supported PHP version to
~8.1.0
This is because we really do a lot of stuff with ENUMs, and it is a massive pain to run all checks on an older inferred PHP version. By doing this, we can refine the types of various ENUM structures in our core logic in subsequent commits. Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9f5036b - Browse repository at this point
Copy the full SHA 9f5036bView commit details -
Removed execution branches that are no longer reachable as per PHP 8.1
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c1194ac - Browse repository at this point
Copy the full SHA c1194acView commit details -
Refactored
EnumGenerator
internals to leverage PHP 8.1 semanticsSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d6b1e4d - Browse repository at this point
Copy the full SHA d6b1e4dView commit details -
Corrected inference imprecisions in `ClassGenerator::fromReflection()…
…` around constants This is because we were still using the array-style logic for creating constants inside `ClassGenerator::fromReflection()`: switching to the programmatic API makes things much more readable Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8032b87 - Browse repository at this point
Copy the full SHA 8032b87View commit details -
Adjusted sorting of docblock deprecations
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7b43090 - Browse repository at this point
Copy the full SHA 7b43090View commit details -
Note: because psalm has imprecise stubs around ENUM reflection symbols, some issues cannot currently be prevented. Ref: vimeo/psalm#8720 Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3c509cd - Browse repository at this point
Copy the full SHA 3c509cdView commit details -
Cleaning up
ParameterReflection
internals to get rid of low-hanging…… static analysis issues Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8935aa3 - Browse repository at this point
Copy the full SHA 8935aa3View commit details -
Cleaning up
MethodReflection
internals to get rid of low-hanging st……atic analysis issues Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fb722e0 - Browse repository at this point
Copy the full SHA fb722e0View commit details -
Deprecate
FunctionReflection#getReturn()
, which was initially abuse……d by `laminas/laminas-server` This method attempted to discover the return type of a function, but in a world where return types didn't exist yet (before PHP 7.0). This method has outlived its usefulness, and is now targeted for removal. Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6419d21 - Browse repository at this point
Copy the full SHA 6419d21View commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f3de55 - Browse repository at this point
Copy the full SHA 8f3de55View commit details -
Rewrote
FunctionReflection#getParameters()
to match parent typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ab1312b - Browse repository at this point
Copy the full SHA ab1312bView commit details -
Adjusted parameter name to match parent class parameter name
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c7dcbb8 - Browse repository at this point
Copy the full SHA c7dcbb8View commit details -
Adjusted parameter name to match parent class parameter name
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4b761e - Browse repository at this point
Copy the full SHA d4b761eView commit details -
More precise definition of
ThrowsTag#$description
stateSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 373c3ea - Browse repository at this point
Copy the full SHA 373c3eaView commit details -
Better type definitions around
ReturnTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 59b3947 - Browse repository at this point
Copy the full SHA 59b3947View commit details -
Better type definitions around
PropertyTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 25c294b - Browse repository at this point
Copy the full SHA 25c294bView commit details -
Better type definitions around
ParamTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8266966 - Browse repository at this point
Copy the full SHA 8266966View commit details -
Better type definitions around
MethodTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d5f1ec1 - Browse repository at this point
Copy the full SHA d5f1ec1View commit details -
Better type definitions around
LicenseTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4eafd0d - Browse repository at this point
Copy the full SHA 4eafd0dView commit details -
Better type definitions around
GenericTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2abd393 - Browse repository at this point
Copy the full SHA 2abd393View commit details -
Better type definitions around
AuthorTag
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c99a924 - Browse repository at this point
Copy the full SHA c99a924View commit details -
Aligning
ClassReflection
types to PHP'sReflectionClass
parent si……gnature Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fc3d146 - Browse repository at this point
Copy the full SHA fc3d146View commit details -
Improved
PrototypeClassFactory
internal typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f66517e - Browse repository at this point
Copy the full SHA f66517eView commit details -
Improved
ValueGenerator
internal typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 40d9e7e - Browse repository at this point
Copy the full SHA 40d9e7eView commit details -
Deprecating
ValueGenerator#initEnvironmentConstants()
This API is not suitable for maintenance: the `ValueGenerator` attempts to load defined constants into its scope, and then uses them to generate constant expressions (rather than values). This is risky business, and should be avoided: it will be removed in the next major release. Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a994a53 - Browse repository at this point
Copy the full SHA a994a53View commit details -
Refining
TraitUsageInterface
typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 638cfda - Browse repository at this point
Copy the full SHA 638cfdaView commit details -
Refining
PropertyGenerator
typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 667463f - Browse repository at this point
Copy the full SHA 667463fView commit details -
Refining
ParameterGenerator
typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 993bb94 - Browse repository at this point
Copy the full SHA 993bb94View commit details -
Refining
InterfaceGenerator
andMethodGenerator
typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6c1b254 - Browse repository at this point
Copy the full SHA 6c1b254View commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d5f3886 - Browse repository at this point
Copy the full SHA d5f3886View commit details -
Refining
AbstractTypeableTag
typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a18791d - Browse repository at this point
Copy the full SHA a18791dView commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3d86e90 - Browse repository at this point
Copy the full SHA 3d86e90View commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ffa2dda - Browse repository at this point
Copy the full SHA ffa2ddaView commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9ba9cec - Browse repository at this point
Copy the full SHA 9ba9cecView commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9ff6ac1 - Browse repository at this point
Copy the full SHA 9ff6ac1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d367b1 - Browse repository at this point
Copy the full SHA 9d367b1View commit details
Commits on Nov 19, 2022
-
Refining
ClassGenerator
andTraitUsage*
typesSigned-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d73a64a - Browse repository at this point
Copy the full SHA d73a64aView commit details -
Replacing
is_object($v) ? get_class($v) : gettype($v)
ternaries wit……h `get_debug_type()` Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fec8485 - Browse repository at this point
Copy the full SHA fec8485View commit details -
Regenerated psalm baseline with the now in place type improvements co…
…ming with PHP 8.1 Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 78d7f80 - Browse repository at this point
Copy the full SHA 78d7f80View commit details -
Rewrote
ParameterReflection#getClass()
to match previous behaviorTypo caused all tests to start failing. Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2145694 - Browse repository at this point
Copy the full SHA 2145694View commit details -
Since we now use
get_debug_type()
for some errors, adjusting associ……ated test expectations Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6e5e3e2 - Browse repository at this point
Copy the full SHA 6e5e3e2View commit details -
Using CI setup that we use in all other repositories
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52f2c24 - Browse repository at this point
Copy the full SHA 52f2c24View commit details -
Added default Laminas CI setup
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 172ce58 - Browse repository at this point
Copy the full SHA 172ce58View commit details -
Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a362091 - Browse repository at this point
Copy the full SHA a362091View commit details -
Moved complex array shape docblock to the class definition, to avoid …
…PHPCS crashing on it Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 487c2e2 - Browse repository at this point
Copy the full SHA 487c2e2View commit details -
Corrected inheritDoc syntax as per code review suggestions
Co-authored-by: Gary Lockett <[email protected]> Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 07b00d1 - Browse repository at this point
Copy the full SHA 07b00d1View commit details -
Corrected inheritDoc syntax as per code review suggestions
Co-authored-by: Gary Lockett <[email protected]> Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2e5b315 - Browse repository at this point
Copy the full SHA 2e5b315View commit details -
Added a default execution branch that returns
null
in `MethodReflec……tion#isEndingBrace()` Ref: #154 (comment) Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a9d601d - Browse repository at this point
Copy the full SHA a9d601dView commit details -
Applied De Morgan's law to a complex boolean expression to improve re…
…adability Ref: #154 (comment) Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66064ca - Browse repository at this point
Copy the full SHA 66064caView commit details -
Replaced
{@inheritdoc}
with@inheritDoc
where the whole parent do……cblock is to be imported Ref: #154 (comment) Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dd68158 - Browse repository at this point
Copy the full SHA dd68158View commit details -
Simplified
EnumGenerator
to have more explicit codegen logic around…… `BackedCases` Ref: #154 (comment) Signed-off-by: Marco Pivetta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6373921 - Browse repository at this point
Copy the full SHA 6373921View commit details