-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from spatie/symfony-process
Symfony process
- Loading branch information
Showing
22 changed files
with
595 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
build | ||
composer.lock | ||
docs | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
language: php | ||
|
||
php: | ||
- 7.0 | ||
- 7.1 | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Spatie\Async\Output; | ||
|
||
use Throwable; | ||
|
||
class SerializableException | ||
{ | ||
/** @var string */ | ||
protected $class; | ||
|
||
/** @var string */ | ||
protected $message; | ||
|
||
/** @var string */ | ||
protected $trace; | ||
|
||
public function __construct(Throwable $exception) | ||
{ | ||
$this->class = get_class($exception); | ||
$this->message = $exception->getMessage(); | ||
$this->trace = $exception->getTraceAsString(); | ||
} | ||
|
||
public function asThrowable(): Throwable | ||
{ | ||
/** @var Throwable $throwable */ | ||
$throwable = new $this->class($this->message); | ||
|
||
return $throwable; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Spatie\Async; | ||
|
||
use Exception; | ||
|
||
class ParallelError extends Exception | ||
{ | ||
public static function fromException($exception): self | ||
{ | ||
return new self($exception); | ||
} | ||
} |
Oops, something went wrong.