Compare commits

..

No commits in common. "615402d788bfea341bd2ae016056d70ced7c8867" and "8e08b1cf794c9fe3b255cf426e26ea51d37c66d4" have entirely different histories.

4 changed files with 4 additions and 12 deletions

View File

@ -511,7 +511,7 @@ trait Extensible
// Setup all extension instances for this instance
$this->extension_instances = [];
foreach (ClassInfo::ancestry(static::class) as $class) {
if (in_array($class, self::class::$unextendable_classes)) {
if (in_array($class, self::$unextendable_classes)) {
continue;
}
$extensions = Config::inst()->get($class, 'extensions', Config::UNINHERITED | Config::EXCLUDE_EXTRA_SOURCES);

View File

@ -391,7 +391,7 @@ class Deprecation
}
// Getting a backtrace is slow, so we only do it if we need it
$backtrace = [];
$backtrace = null;
// Get the calling scope
if ($scope == Deprecation::SCOPE_METHOD) {

View File

@ -111,8 +111,8 @@ class DeprecationTest extends SapphireTest
'Will be removed without equivalent functionality to replace it.',
'Called from SilverStripe\Dev\Tests\DeprecationTest->testNoticeNoReplacement.'
]);
$this->expectException(DeprecationTestException::class);
$this->expectExceptionMessage($message);
$this->expectDeprecation();
$this->expectDeprecationMessage($message);
$this->enableDeprecationNotices(true);
$ret = $this->myDeprecatedMethodNoReplacement();
$this->assertSame('abc', $ret);

View File

@ -32,14 +32,6 @@ class VersionedMemberAuthenticatorTest extends SapphireTest
// Remove password validation
Member::set_password_validator(null);
// Explicity add the Versioned extension to Member, even though it's already in $required_extensions.
// This is done to call `unset(self::class::$extra_methods[strtolower($subclass)]);` in
// Extensible::add_extension() so when CustomMethods::getExtraMethodConfig() updates the $extra_methods
// it will include methods of Versioned such as publishSingle()
// This issue will only occur when running subsequent unit test classes in the same process, rather than this
// this unit test class in isolation
Member::add_extension(Versioned::class);
}
protected function tearDown(): void