Skip to content

Commit

Permalink
API Update deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 21, 2022
1 parent 9040ec6 commit a8645fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions code/AuditHook.php
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\Auditor;

use SilverStripe\Dev\Deprecation;
use SilverStripe\Control\Email\Email;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\ORM\Connect\Database;
Expand Down Expand Up @@ -35,10 +36,11 @@ protected function getAuditLogger()
* and capture it. It creates a new PHP file in the temp folder, then
* loads it and sets it as the active DB class.
*
* @deprecated 2.1...3.0 Please use ProxyDBExtension with the tractorcow/silverstripe-proxy-db module instead
* @deprecated 2.1.0 Use ProxyDBExtension with the tractorcow/silverstripe-proxy-db module instead
*/
public static function bind_manipulation_capture()
{
Deprecation::notice('2.1.0', 'Use ProxyDBExtension with the tractorcow/silverstripe-proxy-db module instead');
$current = DB::get_conn();
if (!$current || !$current->getConnector()->getSelectedDatabase() || @$current->isManipulationLoggingCapture) {
return;
Expand Down Expand Up @@ -393,10 +395,13 @@ public function authenticationFailed($data)
}

/**
* @deprecated 2.1...3.0 Use tractorcow/silverstripe-proxy-db instead
* @deprecated 2.1.0 Use tractorcow/silverstripe-proxy-db instead
*/
public function onBeforeInit()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('2.1.0', 'Use tractorcow/silverstripe-proxy-db instead');
});
// no-op
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -9,7 +9,7 @@
"license": "BSD-3-Clause",
"require": {
"php": "^7.4 || ^8.0",
"silverstripe/framework": "^4.10",
"silverstripe/framework": "^4.12",
"monolog/monolog": "~1.11",
"psr/log": "~1.0",
"tractorcow/silverstripe-proxy-db": "^1"
Expand Down

0 comments on commit a8645fe

Please sign in to comment.