MNT Remove old deprecation warnings

This commit is contained in:
Steve Boyd 2023-03-03 10:34:10 +13:00
parent f6d8d27c89
commit 5dd6e3f8f1

View File

@ -6,15 +6,12 @@ use SilverStripe\Control\Middleware\HTTPMiddlewareAware;
use SilverStripe\Core\Application;
use SilverStripe\Core\Environment;
use SilverStripe\Core\Kernel;
use SilverStripe\Core\Manifest\Module;
use SilverStripe\Core\Startup\FlushDiscoverer;
use SilverStripe\Core\Startup\CompositeFlushDiscoverer;
use SilverStripe\Core\Startup\CallbackFlushDiscoverer;
use SilverStripe\Core\Startup\RequestFlushDiscoverer;
use SilverStripe\Core\Startup\ScheduledFlushDiscoverer;
use SilverStripe\Core\Startup\DeployFlushDiscoverer;
use SilverStripe\Dev\Deprecation;
use SilverStripe\GraphQL\TypeCreator;
class HTTPApplication implements Application
{
@ -152,41 +149,22 @@ class HTTPApplication implements Application
*
* Don't remove this method even if it's just a no-op - we'll reuse this mechanism
* in the future as needed.
*
* Example of use going from CMS 4 to CMS 5:
*
* // TypeCreator is a class unique to GraphQL v3 - we use it in other areas to detect
* // which version is being used.
* if (class_exists(TypeCreator::class)) {
* Deprecation::notice(
* '4.13.0',
* 'silverstripe/graphql 3.x is deprecated. Upgrade to 4.x instead.'
* . ' See https://docs.silverstripe.org/en/4/upgrading/upgrading_to_graphql_4/',
* Deprecation::SCOPE_GLOBAL
* );
* }
*/
private function warnAboutDeprecatedSetups()
{
// TypeCreator is a class unique to GraphQL v3 - we use it in other areas to detect
// which version is being used.
if (class_exists(TypeCreator::class)) {
Deprecation::notice(
'4.13.0',
'silverstripe/graphql 3.x is deprecated. Upgrade to 4.x instead.'
. ' See https://docs.silverstripe.org/en/4/upgrading/upgrading_to_graphql_4/',
Deprecation::SCOPE_GLOBAL
);
}
// The alternate_public_dir config property is deprecated, but because it's
// always fetched it'll throw a deprecation warning whether you've set it or not.
// There are also multiple mechanisms which can result in this bad configuration.
if (PUBLIC_DIR !== 'public' || Director::publicDir() !== PUBLIC_DIR) {
Deprecation::notice(
'4.13.0',
'Use of a public webroot other than "public" is deprecated.'
. ' See https://docs.silverstripe.org/en/4/changelogs/4.1.0#public-folder/',
Deprecation::SCOPE_GLOBAL
);
}
// This change of defaults has no other deprecation notice being emitted currently.
$project = new Module(BASE_PATH, BASE_PATH);
if ($project->getResourcesDir() === '') {
Deprecation::notice(
'4.13.0',
'The RESOURCES_DIR constant will change to "_resources" by default.'
. ' See https://docs.silverstripe.org/en/5/changelogs/5.0.0/#api-general',
Deprecation::SCOPE_GLOBAL
);
}
// noop
}
}