-
Notifications
You must be signed in to change notification settings - Fork 3
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 #36 from spryker-middleware/dev
Release 1.0.0
- Loading branch information
Showing
252 changed files
with
13,748 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
build: | ||
dependencies: | ||
before: | ||
- composer config repositories.spryker composer https://code.spryker.com/repo/private | ||
environment: | ||
php: | ||
version: 7.1 | ||
|
||
checks: | ||
php: | ||
code_rating: true | ||
|
||
filter: | ||
excluded_paths: | ||
- config/* | ||
- tests/* | ||
- src/Generated/* | ||
- src/Pyz/* |
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,47 @@ | ||
language: php | ||
|
||
notifications: | ||
email: false | ||
|
||
sudo: required | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: "7.1" | ||
|
||
services: | ||
- postgresql | ||
- redis | ||
- rabbitmq | ||
|
||
addons: | ||
postgresql: 9.4 | ||
|
||
apt: | ||
packages: | ||
- graphviz | ||
|
||
hosts: | ||
- zed.de.spryker.test | ||
- www.de.spryker.test | ||
|
||
env: | ||
global: | ||
- APPLICATION_ENV=devtest | ||
- APPLICATION_STORE=DE | ||
- MODULE_DIR=module | ||
- SHOP_DIR=current | ||
- MODULE_NAME=process | ||
|
||
cache: | ||
directories: | ||
- $SHOP_DIR/current/vendor | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
|
||
script: | ||
- git clone -b master https://github.com/spryker-middleware/middleware-ci.git middleware-ci | ||
- ./middleware-ci/build/travis.sh |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace: SprykerMiddleware | ||
actor: Tester | ||
|
||
include: | ||
- tests/SprykerMiddlewareTest/Zed/Process | ||
|
||
paths: | ||
tests: tests | ||
log: tests/_output | ||
data: tests/_data | ||
support: tests/_support | ||
envs: tests/_envs | ||
settings: | ||
bootstrap: _bootstrap.php | ||
suite_class: \PHPUnit_Framework_TestSuite | ||
colors: true | ||
memory_limit: 1024M | ||
log: true | ||
coverage: | ||
enabled: true | ||
whitelist: { include: ['src/*'] } |
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
43 changes: 43 additions & 0 deletions
43
src/SprykerMiddleware/Service/Process/Model/StreamService.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Service\Process\Model; | ||
|
||
use SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface; | ||
use SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface; | ||
|
||
class StreamService implements StreamServiceInterface | ||
{ | ||
/** | ||
* Stream service | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface $stream | ||
* | ||
* @return mixed | ||
*/ | ||
public function read(ReadStreamInterface $stream) | ||
{ | ||
return $stream->read(); | ||
} | ||
|
||
/** | ||
* Stream service | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface $stream | ||
* @param array $data | ||
* | ||
* @return bool|int | ||
*/ | ||
public function write(WriteStreamInterface $stream, $data) | ||
{ | ||
return $stream->write($data); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/SprykerMiddleware/Service/Process/Model/StreamServiceInterface.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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Service\Process\Model; | ||
|
||
use SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface; | ||
use SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface; | ||
|
||
interface StreamServiceInterface | ||
{ | ||
/** | ||
* Stream service interface. | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface $stream | ||
* | ||
* @return mixed | ||
*/ | ||
public function read(ReadStreamInterface $stream); | ||
|
||
/** | ||
* Stream service interface. | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface $stream | ||
* @param mixed $data | ||
* | ||
* @return mixed | ||
*/ | ||
public function write(WriteStreamInterface $stream, $data); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/SprykerMiddleware/Service/Process/ProcessDependencyProvider.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Service\Process; | ||
|
||
use Spryker\Service\Kernel\AbstractBundleDependencyProvider; | ||
|
||
class ProcessDependencyProvider extends AbstractBundleDependencyProvider | ||
{ | ||
} |
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,51 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Service\Process; | ||
|
||
use Spryker\Service\Kernel\AbstractService; | ||
use SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface; | ||
use SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface; | ||
|
||
/** | ||
* @method \SprykerMiddleware\Service\Process\ProcessServiceFactory getFactory(); | ||
*/ | ||
class ProcessService extends AbstractService implements ProcessServiceInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface $stream | ||
* | ||
* @return mixed | ||
*/ | ||
public function read(ReadStreamInterface $stream) | ||
{ | ||
return $this->getFactory() | ||
->createStreamService() | ||
->read($stream); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface $stream | ||
* @param mixed $data | ||
* | ||
* @return int | ||
*/ | ||
public function write(WriteStreamInterface $stream, $data): int | ||
{ | ||
return $this->getFactory() | ||
->createStreamService() | ||
->write($stream, $data); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/SprykerMiddleware/Service/Process/ProcessServiceFactory.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Service\Process; | ||
|
||
use Spryker\Service\Kernel\AbstractServiceFactory; | ||
use SprykerMiddleware\Service\Process\Model\StreamService; | ||
use SprykerMiddleware\Service\Process\Model\StreamServiceInterface; | ||
|
||
class ProcessServiceFactory extends AbstractServiceFactory | ||
{ | ||
/** | ||
* @return \SprykerMiddleware\Service\Process\Model\StreamServiceInterface | ||
*/ | ||
public function createStreamService(): StreamServiceInterface | ||
{ | ||
return new StreamService(); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/SprykerMiddleware/Service/Process/ProcessServiceInterface.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Service\Process; | ||
|
||
use SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface; | ||
use SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface; | ||
|
||
interface ProcessServiceInterface | ||
{ | ||
/** | ||
* Specification: | ||
* - Read data from given stream. | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\ReadStreamInterface $stream | ||
* | ||
* @return mixed | ||
*/ | ||
public function read(ReadStreamInterface $stream); | ||
|
||
/** | ||
* Specification: | ||
* - Write given data to given stream. | ||
* | ||
* @api | ||
* | ||
* @param \SprykerMiddleware\Shared\Process\Stream\WriteStreamInterface $stream | ||
* @param mixed $data | ||
* | ||
* @return int | ||
*/ | ||
public function write(WriteStreamInterface $stream, $data): int; | ||
} |
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,12 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Shared\Process; | ||
|
||
interface ProcessConstants | ||
{ | ||
} |
16 changes: 16 additions & 0 deletions
16
src/SprykerMiddleware/Shared/Process/Stream/ReadStreamInterface.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerMiddleware\Shared\Process\Stream; | ||
|
||
interface ReadStreamInterface extends StreamInterface | ||
{ | ||
/** | ||
* @return mixed | ||
*/ | ||
public function read(); | ||
} |
Oops, something went wrong.