You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's no doubt that static analysis comes in handy in a variety of use cases nowadays.
Both ReflectionBasedAbstractFactory & AutowireFactory are quite well-demanded, even though its overall configuration is quite error prone, especially if one doesn't favour the AoT.
Problem
There are a few runtime defects possible now:
Circular dependency
Cyclic alias
Missing factory
Factory autoload failure
Unresolvable service/scalar
Scalar type/name mismatch
Many other scenarios of misconfiguration
Solution
Hereby I'm offering a new package, which is capable of addressing all the issues specified above statically.
Basically it's just a tool that uses $config['dependencies'] to tell us whether it's all good or not (with certain degree of confidence). It will also scan AST for all ContainerInterface::get() calls, to see whether all of them can be satisfied.
It would benefit current end-users of laminas-servicemanager, no matter if used with laminas-di/AoT or not.
Suitable for both laminas/mezzio-based applications.
As @Xerkus and @tux-rampage suggested it can be used by servicemanager as a dev dependency.
Maintaining
I'll be able to maintain the package once it's approved.
The text was updated successfully, but these errors were encountered:
@Xerkus suggested to write a psalm plugin, and it's actually a better way to go.
We'll lose some flexibility as well as dependency-tree rendering (that we can easily sacrifice), for the sake of better maintainability.
We're back to a separate laminas/cli based command.
zakirullin
changed the title
[PROPOSAL] New servicemanager-inspector package
[PROPOSAL] New laminas-psalm package
Jan 5, 2021
zakirullin
changed the title
[PROPOSAL] New laminas-psalm package
[PROPOSAL] New laminas-psalm-plugin package
Jan 5, 2021
zakirullin
changed the title
[PROPOSAL] New laminas-psalm-plugin package
[PROPOSAL] New laminas-servicemanager-inspector package
Jan 10, 2021
Preface
It's no doubt that static analysis comes in handy in a variety of use cases nowadays.
Both
ReflectionBasedAbstractFactory
&AutowireFactory
are quite well-demanded, even though its overall configuration is quite error prone, especially if one doesn't favour theAoT
.Problem
There are a few runtime defects possible now:
Solution
Hereby I'm offering a new package, which is capable of addressing all the issues specified above statically.
Basically it's just a tool that uses
$config['dependencies']
to tell us whether it's all good or not (with certain degree of confidence). It will also scanAST
for allContainerInterface::get()
calls, to see whether all of them can be satisfied.WIP
Scope of use
It would benefit current end-users of
laminas-servicemanager
, no matter if used withlaminas-di
/AoT
or not.Suitable for both
laminas
/mezzio
-based applications.As @Xerkus and @tux-rampage suggested it can be used by
servicemanager
as a dev dependency.Maintaining
I'll be able to maintain the package once it's approved.
The text was updated successfully, but these errors were encountered: