Commit Graph

3 Commits

Author SHA1 Message Date
Hamish Friedlander
80d4af6b6e
API Apply Framework\ORM Namespace to model 2016-06-29 10:02:32 +12:00
Sam Minnee
aeccb8b8e0 API: Move DBField subclasses into SilverStripe\Model\FieldType namespace
API: Deprecate SS_Datetime.

The DBField subclasses are have all been renamed to start with “DB” and
be in the SilverStripe\Model\FieldType namespace. To keep DataObject
definitions concise, the original short variations of their names are
preserved as service definitions. Most of the field generation code
doesn’t need to change, but where field classes are referenced directly,
changes will be needed.

SS_Datetime, which is commonly referenced outside the model system
itself, has been preserved as a subclass of DBDatetime. This has been
marked as deprecated and can be removed in SilverStripe 5.

A few places that referred to $db and $casting values weren’t using
the Injector to instantiate the relevant classes. This meant that the
remapping we have created as part of moving classes into a namespace
didn’t work.
2016-03-22 18:09:30 +13:00
Sam Minnee
083799ec03 FIX: Minimal data-model changes to support PHP7.
The tidiest fix for this will be to update the namespace/naming of all
field types to follow this pattern. I’ve broken out the minimum
necessary to support PHP7 as its own commit, in case anyone needs to
backport that (e.g. if someone wanted to patch a SS 3 system to get
PHP7 support).

Rather than introduce a new API for fieldtype namespace simplification,
I’ve just used Injector. We may come up with a new configuration tool
that is better, but this has the advantage of existing now, and as such
I think is a good first step.
2016-03-22 17:39:08 +13:00