silverstripe-framework/docs/en/changelogs/3.2.0.md
Sean Harvey 6fc9db6f0e API DataObject::validate() visibility changed to public (issue #1659)
DataObject::validate() is currently set to protected, but this means
you can't call validate() from outside the context of itself unless
you overload the method to use a public visibility and then call
parent::validate()

As it would turn out, most classes that overload this method already
set the visibility to public, so it would make sense the parent matches
that as well.
2013-12-19 16:36:39 +13:00

525 B

3.2.0 (unreleased)

Overview

  • Minimum PHP version raised to 5.3.3
  • DataObject::validate() method visibility changed to public

Changelog

DataObject::validate() method visibility changed to public

The visibility of DataObject::validate() has been changed from protected to public.

Any existing classes that currently set this as protected should be changed like in this example:

::php
class MyDataClass extends DataObject {
	...
	public function validate() {
		...
	}
	...
}

Bugfixes