Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Stop using deprecated API #457

Merged
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
2 changes: 1 addition & 1 deletion src/DataObjects/QueuedJobDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ protected function getJobDir()
// make sure our temp dir is in place. This is what will be inotify watched
$jobDir = Config::inst()->get(QueuedJobService::class, 'cache_dir');
if ($jobDir[0] !== '/') {
$jobDir = TEMP_FOLDER . '/' . $jobDir;
$jobDir = TEMP_PATH . '/' . $jobDir;
}

if (!is_dir($jobDir ?? '')) {
Expand Down
1 change: 0 additions & 1 deletion src/Jobs/DoormanQueuedJobTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Symbiote\QueuedJobs\Jobs;

use SilverStripe\Dev\Deprecation;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not used

use AsyncPHP\Doorman\Cancellable;
use AsyncPHP\Doorman\Expires;
use AsyncPHP\Doorman\Process;
Expand Down
9 changes: 2 additions & 7 deletions src/Services/JobErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,9 @@ public function clear()
public function handleError($errno, $errstr, $errfile, $errline)
{
if (error_reporting()) {
// Don't throw E_DEPRECATED in PHP 5.3+
if (defined('E_DEPRECATED')) {
if ($errno == E_DEPRECATED || $errno == E_USER_DEPRECATED) {
return;
}
}

switch ($errno) {
case E_DEPRECATED:
case E_USER_DEPRECATED:
Comment on lines -28 to +30
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really related but noticed it and seemed sensible to update this while I'm here, since E_DEPRECATED will always be defined in supported PHP versions now.

case E_NOTICE:
case E_USER_NOTICE:
case E_STRICT:
Expand Down
Loading