Skip to content

Commit

Permalink
Merge pull request #75 from creative-commoners/pulls/4/hook
Browse files Browse the repository at this point in the history
ENH Use extension hook instead of proxy-db
  • Loading branch information
sabina-talipova authored Apr 29, 2024
2 parents 047d9ad + 6913409 commit b115bc7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 37 deletions.
4 changes: 4 additions & 0 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SilverStripe\Security\Member:
extensions:
- SilverStripe\Auditor\AuditHook

SilverStripe\ORM\Connect\Database:
extensions:
- SilverStripe\Auditor\Extensions\DatabaseExtension

---
Name: auditorcms
Only:
Expand Down
6 changes: 0 additions & 6 deletions _config/dbproxy.yml

This file was deleted.

14 changes: 14 additions & 0 deletions code/Extensions/DatabaseExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace SilverStripe\Auditor\Extensions;

use SilverStripe\Core\Extension;
use SilverStripe\Auditor\AuditHook;

class DatabaseExtension extends Extension
{
public function onBeforeManipulate(array &$manipulation)
{
AuditHook::handle_manipulation($manipulation);
}
}
29 changes: 0 additions & 29 deletions code/Extensions/ProxyDBExtension.php

This file was deleted.

3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"php": "^8.1",
"silverstripe/framework": "^6",
"monolog/monolog": "^3.2",
"psr/log": "^3",
"silverstripe/silverstripe-proxy-db": "^3"
"psr/log": "^3"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
Expand Down

0 comments on commit b115bc7

Please sign in to comment.