Skip to content

Commit

Permalink
Merge pull request #887 from creative-commoners/pulls/7/cms5-for-sake…
Browse files Browse the repository at this point in the history
…symfony

API Deprecate API that will be removed
  • Loading branch information
emteknetnz authored Sep 13, 2024
2 parents 29f5634 + 3dbdb25 commit b1b6b29
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/Task/ConvertTranslatableTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use SilverStripe\Core\Convert;
use SilverStripe\Dev\BuildTask;
use SilverStripe\Dev\Debug;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\Queries\SQLSelect;
Expand All @@ -31,6 +32,8 @@
* 3. Log into the CMS and set up the locales you want to use
* 4. Back up your DB again
* 5. Log into the CMS and check everything
*
* @deprecated 7.3.0 Will be removed without equivalent functionality to replace it
*/
class ConvertTranslatableTask extends BuildTask
{
Expand All @@ -40,6 +43,18 @@ class ConvertTranslatableTask extends BuildTask

private static $segment = 'ConvertTranslatableTask';

public function __construct()
{
parent::__construct();
Deprecation::withNoReplacement(function () {
Deprecation::notice(
'7.3.0',
'Will be removed without equivalent functionality to replace it',
Deprecation::SCOPE_CLASS
);
});
}

/**
* Checks that fluent is configured correctly
*
Expand Down
17 changes: 16 additions & 1 deletion src/Task/ConvertTranslatableTask/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@

namespace TractorCow\Fluent\Task\ConvertTranslatableTask;

use SilverStripe\Dev\Deprecation;

/**
* @deprecated 7.3.0 Will be removed without equivalent functionality to replace it
*/
class Exception extends \Exception
{

public function __construct()
{
parent::__construct();
Deprecation::withNoReplacement(function () {
Deprecation::notice(
'7.3.0',
'Will be removed without equivalent functionality to replace it',
Deprecation::SCOPE_CLASS
);
});
}
}

0 comments on commit b1b6b29

Please sign in to comment.