Skip to content

Commit

Permalink
Fail over if calling deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
tractorcow committed Nov 12, 2020
1 parent 405a1f7 commit 2753516
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ORM/DatabaseAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,17 +406,18 @@ public function doBuild($quiet = false, $populate = true, $testMode = false)
* @param string $fieldName The field name to look in for obsolete class names
* @param string $oldClassName The old class name
* @param string $newClassName The new class name
* @deprecated This method performs inefficiently so it's been disabled
* @deprecated 5.0 use updateLegacyClassNameField instead
*/
protected function updateLegacyClassNames($dataClass, $fieldName, $oldClassName, $newClassName)
{
// no-op
Deprecation::notice('5.0');
Deprecation::notice('5.0', 'use updateLegacyClassNameField instead');
$this->updateLegacyClassNameField($dataClass, $fieldName, [$oldClassName => $newClassName]);
}

/**
* Given a base data class, a field name and an old and new class name (value), look for obsolete ($oldClassName)
* values in the $dataClass's $fieldName column and replace it with $newClassName.
* Given a base data class, a field name and a mapping of class replacements, look for obsolete
* values in the $dataClass's $fieldName column and replace it with $mapping
*
* @param string $dataClass The data class to look up
* @param string $fieldName The field name to look in for obsolete class names
Expand Down

0 comments on commit 2753516

Please sign in to comment.