Skip to content

Commit 288c496

Browse files
authored
Remove v13 deprecations (#1007)
1 parent 717d307 commit 288c496

File tree

5 files changed

+3
-60
lines changed

5 files changed

+3
-60
lines changed

src/Auditable.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,14 +361,6 @@ protected function resolveUser()
361361

362362
$userResolver = Config::get('audit.user.resolver');
363363

364-
if (is_null($userResolver) && Config::has('audit.resolver') && ! Config::has('audit.user.resolver')) {
365-
trigger_error(
366-
'The config file audit.php is not updated to the new version 13.0. Please see https://laravel-auditing.com/guide/upgrading.html',
367-
E_USER_DEPRECATED
368-
);
369-
$userResolver = Config::get('audit.resolver.user');
370-
}
371-
372364
if (is_subclass_of($userResolver, \OwenIt\Auditing\Contracts\UserResolver::class)) {
373365
return call_user_func([$userResolver, 'resolve'], $this);
374366
}
@@ -381,11 +373,9 @@ protected function runResolvers(): array
381373
$resolved = [];
382374
$resolvers = Config::get('audit.resolvers', []);
383375
if (empty($resolvers) && Config::has('audit.resolver')) {
384-
trigger_error(
385-
'The config file audit.php is not updated to the new version 13.0. Please see https://laravel-auditing.com/guide/upgrading.html',
386-
E_USER_DEPRECATED
376+
throw new AuditingException(
377+
'The config file audit.php is not updated. Please see https://laravel-auditing.com/guide/upgrading.html'
387378
);
388-
$resolvers = Config::get('audit.resolver', []);
389379
}
390380

391381
foreach ($resolvers as $name => $implementation) {

src/Contracts/IpAddressResolver.php

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Contracts/Resolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
interface Resolver
66
{
7-
/** @return string */
7+
/** @return mixed */
88
public static function resolve(Auditable $auditable);
99
}

src/Contracts/UrlResolver.php

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Contracts/UserAgentResolver.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)