feat/separate compat interfaces from V3#21
Open
ralflang wants to merge 5 commits intoFRAMEWORK_6_0from
Open
Conversation
Add back warning when the getInfo() compat method is called with the old lib/ signature that passes $info by reference. This helps identify legacy code that needs migration to V3 pattern. We will probably port this to a PSR-3 logger warning later. Ref: bd4905c
- Migration interface methods (existed in lib/ with similar signatures) - V3-native public methods (getProperty, setProperty, init, onSubmit, etc.) Add @internal tags to 2 protected methods: - getInfoV3() - Internal extraction method, subclasses override. We may want to change that name to something more descriptive going forward. - isValid() - Internal validation method, subclasses override All public API methods and all Form Variable Type classes are now marked with @api for clear interface documentation. Internal implementation details marked with @internal.
Split existing interfaces into separate migration and V3-native interfaces to clearly distinguish lib/ compatibility methods from V3-specific additions. - Clear documentation of which methods existed in lib/ vs new in V3 - Easier migration path - developers can see exactly what's supposed to be compatible and what isn't - No changes to implementing classes (BaseVariable, BaseForm, BaseAction) - Interfaces use extends, so existing code using Variable/Form/Action continues to work - Foundation for development of V3 without disturbing migration support No breaking changes to public API.
Fix 2 PHP warnings in lib/ tests Result: 6 tests that were triggering 2 PHP warnings now pass without warnings. Avoided test dependency on horde/injector through a bit more mocking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most importantly:
Hope this also helps:
@amulet1 You were right. This compat interface SHOULD warn when called in an unsupported way.
Let's draw the line more clearly between the parts of V3 which need to stay fixed for migration support and the parts which can currently develop freely.