From 118058cb0c28c1021f5a9a40a4e7c93bd33e2eb4 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 28 Nov 2022 17:32:27 +1300 Subject: [PATCH] API Stop using deprecated API --- src/Extensions/PdfExportControllerExtension.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Extensions/PdfExportControllerExtension.php b/src/Extensions/PdfExportControllerExtension.php index 342013b..4e7057a 100644 --- a/src/Extensions/PdfExportControllerExtension.php +++ b/src/Extensions/PdfExportControllerExtension.php @@ -2,6 +2,7 @@ namespace CWP\PDFExport\Extensions; +use JetBrains\PhpStorm\Deprecated; use SilverStripe\Assets\Filesystem; use SilverStripe\Control\Director; use SilverStripe\Control\HTTPRequest; @@ -90,7 +91,9 @@ public function generatePDF() return false; } - $binaryPath = $this->owner->data()->config()->get('wkhtmltopdf_binary'); + $binaryPath = Deprecation::withNoReplacement(function () { + return $this->owner->data()->config()->get('wkhtmltopdf_binary'); + }); if ($binaryPath) { Deprecation::notice('3.0', 'wkhtmltopdf_binary config is deprecated. '. 'Use WKHTMLTOPDF_BINARY env var instead.');