Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Update deprecations #46

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions code/AuditHook.php
Original file line number Diff line number Diff line change
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');
});
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
// no-op
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
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