From 90ca318cece30d1c6404e86cc885795163a95ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Robin?= Date: Mon, 25 Nov 2024 09:10:15 +0100 Subject: [PATCH] Closes #7120: PHPStan - Discourage apply_filters in Favor of wpm_apply_filters_typed() (#7121) --- composer.json | 1 + phpstan-baseline.neon | 1476 +++++++++++++++++ phpstan.neon.dist | 5 + .../phpstan/Rules/DiscourageApplyFilters.php | 35 + 4 files changed, 1517 insertions(+) create mode 100644 phpstan-baseline.neon create mode 100644 tests/phpstan/Rules/DiscourageApplyFilters.php diff --git a/composer.json b/composer.json index 5c474f3135..717f3c93a7 100644 --- a/composer.json +++ b/composer.json @@ -234,6 +234,7 @@ "@test-integration-pressidium" ], "run-stan": "vendor/bin/phpstan analyze --memory-limit=2G --no-progress", + "run-stan-reset-baseline": "vendor/bin/phpstan analyze --memory-limit=2G --no-progress --generate-baseline", "install-codestandards": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run", "phpcs": "phpcs --basepath=.", "phpcs-changed": "./bin/phpcs-changed.sh", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000000..eaf8957317 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1476 @@ +parameters: + ignoreErrors: + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Addon/Cloudflare/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Addon/Sucuri/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Addon/Varnish/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 6 + path: inc/Addon/Varnish/Varnish.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Addon/WebP/AbstractWebp.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Addon/WebP/AdminSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 6 + path: inc/Addon/WebP/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Admin/Deactivation/DeactivationIntent.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Admin/Metaboxes/PostEditOptionsSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 12 + path: inc/Engine/Admin/Settings/Page.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Admin/Settings/Render.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Admin/Settings/Settings.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Admin/Settings/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 6 + path: inc/Engine/CDN/CDN.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/CDN/RocketCDN/AdminPageSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/CDN/RocketCDN/DataManagerSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/CDN/RocketCDN/NoticesSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/CDN/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Cache/AdvancedCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 4 + path: inc/Engine/Cache/Purge.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Cache/PurgeActionsSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Cache/PurgeExpired/PurgeExpiredCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 6 + path: inc/Engine/Cache/WPCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Common/Cache/FilesystemCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Common/Clock/WPRClock.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Common/ExtractCSS/ServiceProvider.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Common/JobManager/APIHandler/APIClient.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Common/Queue/Cleaner.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 4 + path: inc/Engine/Common/Queue/RUCSSQueueRunner.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/CriticalPath/APIClient.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/CriticalPath/Admin/Admin.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: inc/Engine/CriticalPath/CriticalCSS.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/CriticalPath/CriticalCSSSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: inc/Engine/CriticalPath/DataManager.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Deactivation/Deactivation.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Heartbeat/HeartbeatSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Media/AboveTheFold/AJAX/Controller.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Media/AboveTheFold/Frontend/Controller.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: inc/Engine/Media/ImageDimensions/ImageDimensions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Media/Lazyload/CSS/Context/LazyloadCSSContext.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: inc/Engine/Media/Lazyload/CSS/Front/ContentFetcher.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Media/Lazyload/CSS/Front/Extractor.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Media/Lazyload/CSS/ServiceProvider.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Media/Lazyload/CSS/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 9 + path: inc/Engine/Media/Lazyload/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Optimization/AbstractOptimization.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/Buffer/Optimization.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 9 + path: inc/Engine/Optimization/CacheDynamicResource.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Optimization/DeferJS/DeferJS.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/DelayJS/Admin/SiteList.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/DelayJS/HTML.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/GoogleFonts/Admin/Settings.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/LazyRenderContent/AJAX/Controller.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/LazyRenderContent/Database/Queries/LazyRenderContent.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Optimization/Minify/AbstractMinifySubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Optimization/Minify/CSS/AbstractCSSOptimization.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 6 + path: inc/Engine/Optimization/Minify/CSS/Minify.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/Engine/Optimization/Minify/JS/AbstractJSOptimization.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Optimization/Minify/JS/Combine.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/Minify/JS/Minify.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Optimization/Minify/JS/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Optimization/RUCSS/Controller/Filesystem.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 13 + path: inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 7 + path: inc/Engine/Optimization/RUCSS/Jobs/Manager.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/Engine/Plugin/UpdaterSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Preload/Controller/ClearCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Preload/Controller/CrawlHomepage.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: inc/Engine/Preload/Controller/LoadInitialSitemap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 8 + path: inc/Engine/Preload/Controller/PreloadUrl.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: inc/Engine/Preload/Cron/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 4 + path: inc/Engine/Preload/Database/Queries/Cache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Preload/Fonts.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Preload/Frontend/FetchSitemap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/Engine/Preload/Subscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/ThirdParty/Plugins/ContactForm7.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 3 + path: inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/ThirdParty/Plugins/ModPagespeed.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: inc/ThirdParty/Plugins/SEO/AllInOneSEOPack.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/ThirdParty/Plugins/Security/WordFenceCompatibility.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 6 + path: inc/ThirdParty/Plugins/SimpleCustomCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/ThirdParty/Plugins/WPGeotargeting.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: inc/ThirdParty/Themes/Divi.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 18 + path: tests/Integration/AjaxTestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 18 + path: tests/Integration/ApiTestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 18 + path: tests/Integration/FilesystemTestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 18 + path: tests/Integration/RESTVfsTestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 18 + path: tests/Integration/TestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/bootstrap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/getSettings.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/setDevMode.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/setMinify.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishPurgeRequestHost.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Addon/WebP/Subscriber/convertToWebp.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addDataAttribute.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 4 + path: tests/Integration/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Admin/Settings/Subscriber/asyncWistiaScript.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/preserveAuthorizationToken.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/rocketcdnField.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CDN/Subscriber/getCdnHosts.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 4 + path: tests/Integration/inc/Engine/CDN/Subscriber/rewriteCssProperties.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CDN/Subscriber/rewriteSrcset.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/AdminSubscriber/addWpCacheStatusTest.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/AdminSubscriber/maybeSetWpCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeAdvancedCachePermissions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeWpConfigPermissions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/WPCache/findWpconfigPath.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Cache/WPCache/setWpCacheConstant.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/addInterval.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronRemoveFailedJobs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/PerformanceHints/Admin/Controller/truncateFromAdmin.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/PerformanceHints/Cron/Subscriber/cleanup.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/maybe_apply_optimizations.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addAsyncCssMobileOption.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addHiddenAsyncCssMobile.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/stopCpcssProcess.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/CriticalPath/ProcessorService/processGenerate.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/API/UserClient/getUserData.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/License/Subscriber/addExpiredBubble.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/License/Subscriber/addLicenseExpireWarning.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/License/Subscriber/addLocalizeScriptData.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/License/Subscriber/addNotificationBubble.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/dismissNotificationBubble.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/displayPromoBanner.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/displayRenewalExpiredBanner.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/displayRenewalSoonBanner.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/displayUpgradePopin.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/displayUpgradeSection.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/License/Subscriber/maybeDisableOcd.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/License/Subscriber/setDashboardSeenTransient.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/ImageDimensions/AdminSubscriber/addOption.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/ImageDimensions/Subscriber/specifyImageDimensions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/sanitizeExcludeLazyload.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyload.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/CacheDynamicResource/cacheDynamicResource.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/addDeferJsOption.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferInlineJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/excludeJqueryCombine.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/addOptions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/maybeDisableCombineJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/sanitizeOptions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/addDelayJsScript.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/delayJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCacheIgnoredParameters.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCombineJsExcludedInline.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addIncompatiblePluginsToDeactivate.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addJsExcludeFiles.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMinifyExcludedExternalJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMoveAfterCombineJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addPreloadExclusions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addStagingExclusions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/updateLists.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/TestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber/add_hashes_when_allowed.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/addOptionsFirstTime.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/sanitizeOptions.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/displayNoTableNotice.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/maybeDisablePreloadFonts.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/treeshake.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Preload/Cron/Subscriber/processPendingUrls.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Preload/Fonts/preloadFonts.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addOption.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishIP.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Godaddy/varnishField.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addConflict.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addExplanations.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScripts.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsPremium.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsSecure.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/RevolutionSlider/excludeDeferJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/SEO/RankMathSEO/addSitemap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/Smush/SmushSubscriberTestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/TheEventsCalendar/excludeFromPreloadCalendars.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Avada/TestCase.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Avada/cleanDomain.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Avada/excludeDeferJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Avada/excludeDelayJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Bridge/maybeClearCache.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 1 + path: tests/Integration/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Flatsome/preservePatterns.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Jevelin/preservePatterns.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Uncode/excludeJs.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 2 + path: tests/Integration/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php + + - + message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#" + count: 5 + path: tests/Unit/inc/Engine/Optimization/CSSTraitApplyFontDisplaySwap.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 02e47b7399..a8770e29ed 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,8 +1,10 @@ includes: - phar://phpstan.phar/conf/bleedingEdge.neon + - phpstan-baseline.neon parameters: level: 4 inferPrivatePropertyTypeFromConstructor: true + reportUnmatchedIgnoredErrors: false paths: # Test only the new architecture for now. - %currentWorkingDirectory%/inc/Engine/ @@ -10,6 +12,7 @@ parameters: - %currentWorkingDirectory%/inc/ThirdParty/ - %currentWorkingDirectory%/tests/Integration/ - %currentWorkingDirectory%/tests/Unit/ + - %currentWorkingDirectory%/tests/phpstan/Rules/ bootstrapFiles: # Must be first - %currentWorkingDirectory%/inc/functions/options.php @@ -51,3 +54,5 @@ parameters: # These need plugin stubs! - %currentWorkingDirectory%/inc/classes/subscriber/third-party/ - %currentWorkingDirectory%/inc/3rd-party/ +rules: + - WP_Rocket\Tests\phpstan\Rules\DiscourageApplyFilters diff --git a/tests/phpstan/Rules/DiscourageApplyFilters.php b/tests/phpstan/Rules/DiscourageApplyFilters.php new file mode 100644 index 0000000000..6d8d3d8a79 --- /dev/null +++ b/tests/phpstan/Rules/DiscourageApplyFilters.php @@ -0,0 +1,35 @@ +name instanceof Node\Name && $node->name->toString() === 'apply_filters' ) { + return [ + RuleErrorBuilder::message( 'Usage of apply_filters() is discouraged. Use wpm_apply_filters_typed() instead.' ) + ->identifier( 'custom.rules.discourageApplyFilters' ) + ->addTip( 'We\'ve created a wpm_apply_filters library to help you type hint your filters. You can use it to type hint your filters and make your code more predictable. More info: https://github.com/wp-media/apply-filters-typed' ) + ->build(), + ]; + } + + return []; + } +}