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

ENH Don't use deprecated method #1497

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
2 changes: 1 addition & 1 deletion code/Controller/AssetAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ public function getObjectFromData(File $file, $thumbnailLinks = true)
$object['url'] = $file->AbsoluteURL;
$object['canEdit'] = $file->canEdit();
$object['canDelete'] = ($file->hasMethod('canArchive'))
? Deprecation::withNoReplacement(fn() => $file->canArchive())
? Deprecation::withSuppressedNotice(fn() => $file->canArchive())
: $file->canDelete();

$owner = $file->Owner();
Expand Down
2 changes: 1 addition & 1 deletion code/Controller/AssetAdminFieldsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AssetAdminFieldsExtension extends Extension
{
public function __construct()
{
Deprecation::withNoReplacement(
Deprecation::withSuppressedNotice(
fn () => Deprecation::notice('5.3.0', 'Will be replaced with YAML configuration', Deprecation::SCOPE_CLASS)
);
parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/FileFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class FileFilter
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/Notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Notice
*/
public function __construct($message, $noticeType, $ids = [])
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
$this->message = $message;
Expand Down
4 changes: 2 additions & 2 deletions code/GraphQL/Resolvers/AssetAdminResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AssetAdminResolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down Expand Up @@ -137,7 +137,7 @@ public static function resolveDeleteFiles($object, array $args, $context, Resolv
$deletedIDs = [];
$member = UserContextProvider::get($context);
foreach ($files as $file) {
$canArchive = Deprecation::withNoReplacement(fn() => $file->canArchive($member));
$canArchive = Deprecation::withSuppressedNotice(fn() => $file->canArchive($member));
if ($canArchive) {
$file->doArchive();
$deletedIDs[] = $file->ID;
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/Resolvers/FieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FieldResolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/Resolvers/FileTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FileTypeResolver

public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/Resolvers/FolderTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FolderTypeResolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/Resolvers/PublicationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PublicationResolver

public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down
2 changes: 1 addition & 1 deletion code/GraphQL/Schema/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Builder implements SchemaUpdater
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}
Expand Down
Loading