-
-
Notifications
You must be signed in to change notification settings - Fork 24
[RFC]: Plans for a possible new major release 4.0 #95
Description
RFC
| Q | A |
|---|---|
| Proposed Version(s) | 4.0.0 |
| BC Break? | Yes |
Goal
The goal is to address open issues as well as to improve the maintainability of this library.
Background
Currently this component uses array's for configuration throughout the entire library which makes typesafety and static analysis harder to maintain. Also it still has code necessary for PHP 7 which is EOL for quite a while now.
Considerations
All features should ideally be introduced into the current stable version 3.x in a backwards compatible way.
This will provide users a clear transition path that can already be done when running version 3.x.
Proposal(s)
-
Old functionality and future breaking points must be marked accordingly:
- Deprecations with
@deprecated - Portected methods and properties that should become private with
@privateor@internal - Classes that will become final with
@final
All annotated changes in
3.xwill then be applied in4.0.0 - Deprecations with
-
Doc-type type hints will be replaced or extended with native type hints. No method or property should be untyped (
mixedwill be used when necessary to explicitly state the intent of any type or psalm templates). -
Array-Configuration will only be used as input. Within the library all Configuration should be kept in strongly typed and well defined Value-Objects.
-
The AoT Compiler should be moved from this code base into a separate package/repository to allow adding it as a dev-dependency, since it is not required for runtime purposes.
-
Version
4.0.0should drop support for all PHP versions prior8.2(not8.3as previously suggested)
Appendix
As for the process I'd start PRs against the 3.x branch (3.15.x at the time of writing this). When the current 3.x reached a state for the transition, I'd create a 4.0.x branch, a 4.0.0 milestone and start pull requests for the Deprecation removals, type changes and php version bumps.