Skip to content

feat/separate compat interfaces from V3#21

Open
ralflang wants to merge 5 commits intoFRAMEWORK_6_0from
feat/separate-compat-interfaces-from-V3
Open

feat/separate compat interfaces from V3#21
ralflang wants to merge 5 commits intoFRAMEWORK_6_0from
feat/separate-compat-interfaces-from-V3

Conversation

@ralflang
Copy link
Member

@ralflang ralflang commented Mar 8, 2026

Most importantly:

  • fix: Restore deprecation warning for legacy getInfo() signature

Hope this also helps:

  • docs: complete missing PHPDoc blocks in V3 codebase
  • docs(api): add @api and @internal tags to V3 methods, add missing phpdoc
  • feat(api): create distinct migration and V3-native interfaces

@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.

ralflang added 4 commits March 8, 2026 10:17
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
Add comprehensive PHPDoc blocks for methods missing documentation:

All methods now have complete @param, @return tags and clear descriptions
of what they do.
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants