diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce8a91..1ee2ab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.1.1 + +- Upgrade `spatie/async` package to `^1.4.0`. +- Deprecated `VXM\Async\Process\SynchronousProcess`. + ## 1.1.0 - Support Laravel version 6.0 diff --git a/composer.json b/composer.json index 97a0827..ee647b6 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ ], "require": { "php": "^7.1", - "illuminate/support": "^5.7 || ^6.0", - "spatie/async": "^1.1" + "illuminate/support": "^5.8 || ^6.0", + "spatie/async": "^1.4.0" }, "require-dev": { - "orchestra/testbench": "^3.7 || ^4.0", - "phpunit/phpunit": "~7.5", + "orchestra/testbench": "^3.8 || ^4.0", + "phpunit/phpunit": "~7.5 || ^8.0", "scrutinizer/ocular": "^1.5" }, "autoload": { diff --git a/src/Process/SynchronousProcess.php b/src/Process/SynchronousProcess.php index a934060..7022505 100644 --- a/src/Process/SynchronousProcess.php +++ b/src/Process/SynchronousProcess.php @@ -14,6 +14,7 @@ /** * @author Vuong Minh * @since 1.0.0 + * @deprecated https://github.com/spatie/async/pull/73 had solved. This class will be remove on version 2. */ class SynchronousProcess extends BaseSynchronousProcess { diff --git a/src/Runtime/ParentRuntime.php b/src/Runtime/ParentRuntime.php index 4b87dd5..0a14b2f 100644 --- a/src/Runtime/ParentRuntime.php +++ b/src/Runtime/ParentRuntime.php @@ -10,9 +10,9 @@ use Spatie\Async\Pool; use Spatie\Async\Process\ParallelProcess; use Spatie\Async\Process\Runnable; +use Spatie\Async\Process\SynchronousProcess; use Spatie\Async\Runtime\ParentRuntime as BaseParentRuntime; use Symfony\Component\Process\Process; -use VXM\Async\Process\SynchronousProcess; /** * ParentRuntime support invoke console environment in child runtime mode. @@ -25,7 +25,7 @@ class ParentRuntime extends BaseParentRuntime /** * {@inheritdoc} */ - public static function createProcess($task, ?int $outputLength = null): Runnable + public static function createProcess($task, ?int $outputLength = null, ?string $binary = 'php'): Runnable { if (! self::$isInitialised) { self::init(); @@ -36,7 +36,7 @@ public static function createProcess($task, ?int $outputLength = null): Runnable } $process = new Process([ - 'php', + $binary, self::$childProcessScript, self::$autoloader, self::encodeTask($task), diff --git a/tests/EventTestClass.php b/tests/EventTestClass.php index 2e46423..ee0ae44 100644 --- a/tests/EventTestClass.php +++ b/tests/EventTestClass.php @@ -18,11 +18,11 @@ class EventTestClass extends TestCase { public function success($result) { - $this->assertContains('ok!', $result); + $this->assertStringContainsString('ok!', $result); } public function catch(Exception $exception) { - $this->assertContains('ok!', $exception->getMessage()); + $this->assertStringContainsString('ok!', $exception->getMessage()); } } diff --git a/tests/JobTest.php b/tests/JobTest.php index fc964b9..9591356 100644 --- a/tests/JobTest.php +++ b/tests/JobTest.php @@ -33,7 +33,7 @@ public function testHandleSuccess() ]); foreach (Async::wait() as $result) { - $this->assertContains('ok!', $result); + $this->assertStringContainsString('ok!', $result); } }