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
I'm not sure if this is doable yet, but assuming we start adding PHP 7 type hints etc to our existing API for SilverStripe 5, it'd be nice to be able to have the upgrader automatically rewrite methods for people's child classes. For example:
# SilverStripe 4: SiteTreepublicfunction getCMSFields()
# SilverStripe 5: SiteTree
public function getCMSFields(): FieldList
It'd also need to import namespaces that may not exist yet, although I assume that getCMSFields(): \SilverStripe\Forms\FieldList would parse correctly when the parent's signature says getCMSFields(): FieldList with an imported namespace, so maybe that's a nice to have.
This will be important to discuss before we start implementing PHP7 changes in SilverStripe 5 for existing APIs.
The text was updated successfully, but these errors were encountered:
I'm not sure if this is doable yet, but assuming we start adding PHP 7 type hints etc to our existing API for SilverStripe 5, it'd be nice to be able to have the upgrader automatically rewrite methods for people's child classes. For example:
Possible upgrader rule:
It'd also need to import namespaces that may not exist yet, although I assume that
getCMSFields(): \SilverStripe\Forms\FieldList
would parse correctly when the parent's signature saysgetCMSFields(): FieldList
with an imported namespace, so maybe that's a nice to have.This will be important to discuss before we start implementing PHP7 changes in SilverStripe 5 for existing APIs.
The text was updated successfully, but these errors were encountered: