forked from kriswallsmith/spork
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changed - 4cc83f1: Replace child process shutdown function and improve typings. - d6ecf04: Rebrand library to `phpfork`.
- Loading branch information
Showing
44 changed files
with
278 additions
and
232 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
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
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,6 +1,6 @@ | ||
{ | ||
"name": "thelevti/spork", | ||
"description": "PHP on a fork.", | ||
"name": "thelevti/phpfork", | ||
"description": "PHP process forking library.", | ||
"type": "library", | ||
"keywords": [ | ||
"php", | ||
|
@@ -9,7 +9,7 @@ | |
"async", | ||
"shmop" | ||
], | ||
"homepage": "https://github.com/TheLevti/spork", | ||
"homepage": "https://github.com/TheLevti/phpfork", | ||
"readme": "README.md", | ||
"license": "MIT", | ||
"authors": [ | ||
|
@@ -28,11 +28,11 @@ | |
], | ||
"support": { | ||
"email": "[email protected]", | ||
"issues": "https://github.com/TheLevti/spork/issues", | ||
"wiki": "https://github.com/TheLevti/spork/wiki", | ||
"source": "https://github.com/TheLevti/spork", | ||
"docs": "https://github.com/TheLevti/spork/blob/master/README.md", | ||
"rss": "https://github.com/TheLevti/spork/commits/master.atom" | ||
"issues": "https://github.com/TheLevti/phpfork/issues", | ||
"wiki": "https://github.com/TheLevti/phpfork/wiki", | ||
"source": "https://github.com/TheLevti/phpfork", | ||
"docs": "https://github.com/TheLevti/phpfork/blob/master/README.md", | ||
"rss": "https://github.com/TheLevti/phpfork/commits/master.atom" | ||
}, | ||
"require": { | ||
"php": "^7.2.0", | ||
|
@@ -51,18 +51,18 @@ | |
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Spork\\": "src/Spork/" | ||
"Phpfork\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Spork\\": "tests/Spork/" | ||
"Phpfork\\": "tests/" | ||
} | ||
}, | ||
"suggest": { | ||
"ext-pnctl": "To allow this library forking processes.", | ||
"ext-posix": "To allow this library getting process information.", | ||
"ext-shmop": "To allow this library doing interprocess communication." | ||
"ext-shmop": "To allow this library doing inter-process communication." | ||
}, | ||
"archive": { | ||
"exclude": [ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch; | ||
declare(strict_types=1); | ||
|
||
use Spork\Batch\Strategy\ChunkStrategy; | ||
use Spork\Batch\Strategy\StrategyInterface; | ||
use Spork\Exception\UnexpectedTypeException; | ||
use Spork\ProcessManager; | ||
namespace Phpfork\Batch; | ||
|
||
use Phpfork\Batch\Strategy\ChunkStrategy; | ||
use Phpfork\Batch\Strategy\StrategyInterface; | ||
use Phpfork\Exception\UnexpectedTypeException; | ||
use Phpfork\ProcessManager; | ||
|
||
class BatchJob | ||
{ | ||
|
12 changes: 7 additions & 5 deletions
12
src/Spork/Batch/BatchRunner.php → src/Batch/BatchRunner.php
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,18 +1,20 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch; | ||
declare(strict_types=1); | ||
|
||
use Spork\Exception\UnexpectedTypeException; | ||
use Spork\SharedMemory; | ||
namespace Phpfork\Batch; | ||
|
||
use Phpfork\Exception\UnexpectedTypeException; | ||
use Phpfork\SharedMemory; | ||
|
||
class BatchRunner | ||
{ | ||
|
10 changes: 6 additions & 4 deletions
10
...Spork/Batch/Strategy/AbstractStrategy.php → src/Batch/Strategy/AbstractStrategy.php
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,17 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch\Strategy; | ||
declare(strict_types=1); | ||
|
||
use Spork\Batch\BatchRunner; | ||
namespace Phpfork\Batch\Strategy; | ||
|
||
use Phpfork\Batch\BatchRunner; | ||
|
||
abstract class AbstractStrategy implements StrategyInterface | ||
{ | ||
|
10 changes: 6 additions & 4 deletions
10
...Spork/Batch/Strategy/CallbackStrategy.php → src/Batch/Strategy/CallbackStrategy.php
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,17 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch\Strategy; | ||
declare(strict_types=1); | ||
|
||
use Spork\Exception\UnexpectedTypeException; | ||
namespace Phpfork\Batch\Strategy; | ||
|
||
use Phpfork\Exception\UnexpectedTypeException; | ||
|
||
class CallbackStrategy extends AbstractStrategy | ||
{ | ||
|
10 changes: 6 additions & 4 deletions
10
src/Spork/Batch/Strategy/ChunkStrategy.php → src/Batch/Strategy/ChunkStrategy.php
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,17 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch\Strategy; | ||
declare(strict_types=1); | ||
|
||
use Spork\Exception\UnexpectedTypeException; | ||
namespace Phpfork\Batch\Strategy; | ||
|
||
use Phpfork\Exception\UnexpectedTypeException; | ||
|
||
/** | ||
* Creates the batch iterator using array_chunk(). | ||
|
8 changes: 5 additions & 3 deletions
8
...pork/Batch/Strategy/StrategyInterface.php → src/Batch/Strategy/StrategyInterface.php
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,15 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch\Strategy; | ||
declare(strict_types=1); | ||
|
||
namespace Phpfork\Batch\Strategy; | ||
|
||
/** | ||
* @see BatchJob::__invoke() | ||
|
10 changes: 6 additions & 4 deletions
10
...Spork/Batch/Strategy/ThrottleStrategy.php → src/Batch/Strategy/ThrottleStrategy.php
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,17 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Batch\Strategy; | ||
declare(strict_types=1); | ||
|
||
use Spork\Util\ThrottleIterator; | ||
namespace Phpfork\Batch\Strategy; | ||
|
||
use Phpfork\Util\ThrottleIterator; | ||
|
||
class ThrottleStrategy implements StrategyInterface | ||
{ | ||
|
10 changes: 6 additions & 4 deletions
10
src/Spork/Deferred/Deferred.php → src/Deferred/Deferred.php
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,17 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Spork, an OpenSky project. | ||
* This file is part of the thelevti/phpfork package. | ||
* | ||
* (c) OpenSky Project Inc | ||
* (c) Petr Levtonov <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Spork\Deferred; | ||
declare(strict_types=1); | ||
|
||
use Spork\Exception\UnexpectedTypeException; | ||
namespace Phpfork\Deferred; | ||
|
||
use Phpfork\Exception\UnexpectedTypeException; | ||
|
||
class Deferred implements DeferredInterface | ||
{ | ||
|
Oops, something went wrong.