Skip to content
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
1 change: 1 addition & 0 deletions src/Core/Cache/ApcuCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ApcuCacheFactory implements CacheFactory
{
/**
* @var string
* @deprecated 5.4.0 Will be replaced with a key in the $params argument
*/
protected $version;

Expand Down
3 changes: 3 additions & 0 deletions src/Core/Cache/DefaultCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Psr\SimpleCache\CacheInterface;
use SilverStripe\Control\Director;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\Deprecation;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\ChainAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
Expand Down Expand Up @@ -100,9 +101,11 @@ public function create($service, array $args = [])
* Determine if apcu is supported
*
* @return bool
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it.
*/
protected function isAPCUSupported()
{
Deprecation::noticeWithNoReplacment('5.4.0');
static $apcuSupported = null;
if (null === $apcuSupported) {
// Need to check for CLI because Symfony won't: https://github.com/symfony/symfony/pull/25080
Expand Down
1 change: 1 addition & 0 deletions src/Core/Cache/MemcachedCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class MemcachedCacheFactory implements CacheFactory

/**
* @var Memcached
* @deprecated 5.4.0 Will be replaced with setting the `SS_MEMCACHED_DSN` environment variable
*/
protected $memcachedClient;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Manifest/VersionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function getModuleVersionFromComposer($modules = [])
/**
* Load composer.lock's contents and return it
*
* @deprecated 5.1 Has been replaced by composer-runtime-api
* @deprecated 5.1.0 Has been replaced by composer-runtime-api
* @param bool $cache
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Dev/BuildTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct()
/**
* @var bool $enabled If set to FALSE, keep it from showing in the list
* and from being executable through URL or CLI.
* @deprecated - remove in CMS 6 and rely on $is_enabled instead
* @deprecated 5.1.0 Use the is_enabled configuration property instead.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
protected $enabled = true;

Expand Down
3 changes: 3 additions & 0 deletions src/Dev/Constraint/SSListContains.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class SSListContains extends Constraint implements TestOnly
*/
protected $matches = [];

/**
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
protected SSListExporter $exporter;

/**
Expand Down
3 changes: 3 additions & 0 deletions src/Dev/Constraint/SSListContainsOnlyMatchingItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class SSListContainsOnlyMatchingItems extends Constraint implements TestOnly
*/
private $match;

/**
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
protected SSListExporter $exporter;

/**
Expand Down
4 changes: 4 additions & 0 deletions src/Dev/Constraint/ViewableDataContains.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

use PHPUnit\Framework\Constraint\Constraint;
use PHPUnit\Framework\ExpectationFailedException;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\View\ViewableData;
use SilverStripe\Dev\SapphireTest;

/**
* Constraint for checking if a ViewableData (e.g. ArrayData or any DataObject) contains fields matching the given
* key-value pairs.
*
* @deprecated 5.4.0 Will be renamed to ModelDataContains
*/
class ViewableDataContains extends Constraint implements TestOnly
{
Expand All @@ -24,6 +27,7 @@ class ViewableDataContains extends Constraint implements TestOnly
*/
public function __construct(array $match)
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to ModelDataContains', Deprecation::SCOPE_CLASS);
if (!is_array($match)) {
throw SapphireTest::createInvalidArgumentException(
1,
Expand Down
4 changes: 4 additions & 0 deletions src/Dev/DevelopmentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ public function index()
}
}

/**
* @deprecated 5.4.0 Will be replaced with runRegisteredAction()
*/
public function runRegisteredController(HTTPRequest $request)
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be replaced with runRegisteredAction()');
$controllerClass = null;

$baseUrlPart = $request->param('Action');
Expand Down
3 changes: 3 additions & 0 deletions src/Dev/Tasks/CleanupTestDatabasesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public function run($request)
TempDatabase::create()->deleteAll();
}

/**
* @deprecated 5.4.0 Will be replaced with canRunInBrowser()
*/
public function canView(): bool
{
Deprecation::withSuppressedNotice(function () {
Expand Down
7 changes: 7 additions & 0 deletions src/Dev/Validation/DatabaseAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@

use ReflectionException;
use SilverStripe\Core\Extension;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\DatabaseAdmin;

/**
* Hook up static validation to the deb/build process
*
* @extends Extension<DatabaseAdmin>
* @deprecated 5.4.0 Will be renamed to DbBuildExtension
*/
class DatabaseAdminExtension extends Extension
{
public function __construct()
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to DbBuildExtension');
}

/**
* Extension point in @see DatabaseAdmin::doBuild()
*
Expand Down
3 changes: 3 additions & 0 deletions src/Forms/SearchableDropdownTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use SilverStripe\ORM\UnsavedRelationList;
use SilverStripe\Core\Injector\Injector;
use Psr\Log\LoggerInterface;
use SilverStripe\Dev\Deprecation;

trait SearchableDropdownTrait
{
Expand Down Expand Up @@ -418,9 +419,11 @@ public function saveInto(DataObjectInterface $record): void

/**
* @param Validator $validator
* @deprecated 5.4.0 Will be removed in favour of the `FormField::validate()` method.
*/
public function validate($validator): bool
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be removed in favour of the `FormField::validate()` method.');
return $this->extendValidationResult(true, $validator);
}

Expand Down
1 change: 1 addition & 0 deletions src/ORM/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class DB

/**
* Internal flag to keep track of when db connection was attempted.
* @deprecated 5.4.0 Will be removed without equivalent functionality.
*/
private static $connection_attempted = false;

Expand Down
3 changes: 1 addition & 2 deletions src/ORM/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4155,8 +4155,7 @@ public function isInDB()
return is_numeric($this->ID) && $this->ID > 0;
}

/*
* @ignore
/**
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the missing * this @ignore wasn't actually detectable through static analysis or reflection APIs - so it effectively wasn't there. Better to just remove it than risk it causing some weird unexpected new interaction if someone's looking for @ignore to drive some behaviour somewhere.

* @deprecated 5.2.0 Will be removed without equivalent functionality
*/
private static $subclass_access = true;
Expand Down
1 change: 1 addition & 0 deletions src/ORM/FieldType/DBDecimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class DBDecimal extends DBField
* Default value
*
* @var string
* @deprecated 5.4.0 Will be replaced with getDefaultValue() and setDefaultValue()
*/
protected $defaultValue = 0;

Expand Down
6 changes: 6 additions & 0 deletions src/ORM/Hierarchy/Hierarchy.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use Exception;
use SilverStripe\Dev\Deprecation;
use SilverStripe\View\ViewableData;

/**
Expand Down Expand Up @@ -115,9 +116,11 @@ public static function get_extra_config($class, $extension, $args)
* Validate the owner object - check for existence of infinite loops.
*
* @param ValidationResult $validationResult
* @deprecated 5.4.0 Will be renamed to updateValidate()
*/
public function validate(ValidationResult $validationResult)
{
Deprecation::notice('5.4.0', 'Will be renamed to updateValidate()');
// The object is new, won't be looping.
$owner = $this->owner;
if (!$owner->ID) {
Expand Down Expand Up @@ -571,9 +574,12 @@ public function getBreadcrumbs($separator = ' &raquo; ')
* Flush all Hierarchy caches:
* - Children (instance)
* - NumChildren (instance)
*
* @deprecated 5.4.0 Will be renamed to onFlushCache()
*/
public function flushCache()
{
Deprecation::notice('5.4.0', 'Will be renamed to onFlushCache()');
$this->owner->_cache_children = null;
Hierarchy::$cache_numChildren = [];
}
Expand Down
3 changes: 3 additions & 0 deletions src/Security/InheritedPermissionFlusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use SilverStripe\ORM\DataExtension;
use SilverStripe\ORM\DataObject;
use SilverStripe\Core\Cache\MemberCacheFlusher;
use SilverStripe\Dev\Deprecation;

/**
* @extends DataExtension<Member|Group>
Expand Down Expand Up @@ -76,9 +77,11 @@ public function getServices()

/**
* Flushes all registered MemberCacheFlusher services
* @deprecated 5.4.0 Will be renamed to onFlushCache()
*/
public function flushCache()
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to onFlushCache()');
$ids = $this->getMemberIDList();
foreach ($this->getServices() as $service) {
$service->flushMemberCache($ids);
Expand Down