Skip to content

Commit

Permalink
Merge pull request #29 from creative-commoners/pulls/1/stop-using-depr
Browse files Browse the repository at this point in the history
API Stop using deprecated API
  • Loading branch information
sabina-talipova authored Dec 5, 2022
2 parents 69fa81a + 118058c commit 9b11121
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Extensions/PdfExportControllerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace CWP\PDFExport\Extensions;

use JetBrains\PhpStorm\Deprecated;
use SilverStripe\Assets\Filesystem;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
Expand Down Expand Up @@ -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.');
Expand Down

0 comments on commit 9b11121

Please sign in to comment.