Skip to content

Commit

Permalink
API Stop using deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 8, 2022
1 parent 00d1701 commit 228d227
Show file tree
Hide file tree
Showing 81 changed files with 824 additions and 487 deletions.
4 changes: 0 additions & 4 deletions _config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use SilverStripe\Dev\Deprecation;
use SilverStripe\View\Shortcodes\EmbedShortcodeProvider;
use SilverStripe\View\Parsers\ShortcodeParser;

Expand All @@ -14,6 +13,3 @@

ShortcodeParser::get('default')
->register('embed', [EmbedShortcodeProvider::class, 'handle_shortcode']);

// Set to 5.0.0 to show APIs marked for removal at that version
Deprecation::notification_version('4.0.0');
4 changes: 2 additions & 2 deletions _config/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
Name: basei18n
Before: '#defaulti18n'
---
SilverStripe\i18n\Data\Sources:
SilverStripe\Core\Manifest\ModuleManifest:
module_priority:
- silverstripe\admin
- silverstripe\framework
---
Name: defaulti18n
---
SilverStripe\i18n\Data\Sources:
SilverStripe\Core\Manifest\ModuleManifest:
module_priority:
- other_modules
---
Expand Down
3 changes: 0 additions & 3 deletions src/Control/CookieJar.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,9 @@ private function cookieIsSecure(string $sameSite, bool $secure): bool

/**
* Get the correct samesite value - Session cookies use a different configuration variable.
*
* @deprecated 4.12.0 The relevant methods will include a `$sameSite` parameter instead.
*/
private function getSameSite(string $name): string
{
Deprecation::notice('4.12.0', 'The relevant methods will include a `$sameSite` parameter instead.');
if ($name === session_name()) {
return Session::config()->get('cookie_samesite');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Control/Director.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static function mockRequest(
? $cookies
: Injector::inst()->createWithArgs(Cookie_Backend::class, [$cookies ?: []]);
$newVars['_COOKIE'] = $cookieJar->getAll(false);
Cookie::config()->update('report_errors', false);
Cookie::config()->set('report_errors', false);
Injector::inst()->registerService($cookieJar, Cookie_Backend::class);

// Backup requirements
Expand Down
Loading

0 comments on commit 228d227

Please sign in to comment.