Open madmatt opened 5 years ago
Examples of old code to be upgraded:
class Account extends DataObject { private static $has_one = [ 'Owner' => 'Member', 'Parent' => 'Member', ]; } class MemberExtension extends DataExtension { private static $has_many = [ 'ParentAccounts' => 'Account.Parent', 'OwnedAccounts' => 'Account.Owner', ]; }
Expected corrected code for SS4:
class Account extends DataObject { private static $has_one = [ 'Owner' => Member::class, 'Parent' => Member::class, ]; } class MemberExtension extends DataExtension { private static $has_many = [ 'ParentAccounts' => Account::class . '.Parent', 'OwnedAccounts' => Account::class . '.Owner', ]; }
What actually happens: Changes to Account are made correctly, but MemberExtension does not change, presumably because the upgrader is only searching for exact class names in strings
Account
MemberExtension
Examples of old code to be upgraded:
Expected corrected code for SS4:
What actually happens: Changes to
Account
are made correctly, butMemberExtension
does not change, presumably because the upgrader is only searching for exact class names in strings