-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨add erp order expenses and item prices (#446)
- Loading branch information
1 parent
65daa56
commit acd13d4
Showing
10 changed files
with
190 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,35 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
continous-integration: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: [ "8.0", "8.1", "8.2" ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, dom, fileinfo, pgsql, json | ||
coverage: xdebug #optional | ||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
# Use composer.json for key, if composer.lock is not committed. | ||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
- name: Install dependencies and run ci tasks | ||
run: make install ci |
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,30 @@ | ||
.PHONY: install | ||
install: | ||
composer install | ||
|
||
.PHONY: phpcs | ||
phpcs: | ||
./vendor/bin/phpcs --standard=./vendor/spryker/code-sniffer/Spryker/ruleset.xml ./src/FondOfOryx/* ./tests/* | ||
|
||
.PHONY: phpcbf | ||
phpcbf: | ||
./vendor/bin/phpcbf --standard=./vendor/spryker/code-sniffer/Spryker/ruleset.xml ./src/FondOfOryx/* ./tests/* | ||
|
||
.PHONY: phpstan | ||
phpstan: | ||
./vendor/bin/phpstan --memory-limit=-1 analyse ./src/FondOfOryx ./tests | ||
|
||
.PHONY: codeception | ||
codeception: | ||
./vendor/bin/codecept run --env standalone | ||
|
||
.PHONY: ci | ||
ci: phpcs codeception phpstan | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -Rf composer.lock | ||
rm -Rf ./vendor | ||
find ./tests/_output/ -not -name .gitignore -not -name .gitkeep -delete | ||
rm -Rf src/Generated/* | ||
rm -Rf src/Orm/* |
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,7 @@ | ||
parameters: | ||
level: 5 | ||
reportUnmatchedIgnoredErrors: false | ||
scanDirectories: | ||
- src/Orm/Zed | ||
ignoreErrors: | ||
- '#.* on an unknown class Generated\\(Client|Glue|Service|Yves|Zed)\\.*#' |
11 changes: 11 additions & 0 deletions
11
src/FondOfOryx/Shared/ErpOrderExtension/Transfer/erp_order_extension.transfer.xml
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,11 @@ | ||
<?xml version="1.0"?> | ||
<transfers xmlns="spryker:transfer-01" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="spryker:transfer-01 https://static.spryker.com/transfer-01.xsd"> | ||
<transfer name="ErpOrderAddress" /> | ||
<transfer name="ErpOrderAmount" /> | ||
<transfer name="ErpOrder" /> | ||
<transfer name="ErpOrderExpense" /> | ||
<transfer name="ErpOrderItem" /> | ||
<transfer name="ErpOrderTotals" /> | ||
</transfers> |
25 changes: 25 additions & 0 deletions
25
...dOfOryx/Zed/ErpOrderExtension/Dependency/Plugin/ErpOrderAmountPostSavePluginInterface.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,25 @@ | ||
<?php | ||
|
||
namespace FondOfOryx\Zed\ErpOrderExtension\Dependency\Plugin; | ||
|
||
use Generated\Shared\Transfer\ErpOrderAmountTransfer; | ||
use Generated\Shared\Transfer\ErpOrderTransfer; | ||
|
||
interface ErpOrderAmountPostSavePluginInterface | ||
{ | ||
/** | ||
* Specification: | ||
* - Plugin is triggered after erp invoice total object was saved. | ||
* | ||
* @api | ||
* | ||
* @param \Generated\Shared\Transfer\ErpOrderAmountTransfer $erpOrderAmountTransfer | ||
* @param \Generated\Shared\Transfer\ErpOrderTransfer|null $existingErpOrderTransfer | ||
* | ||
* @return \Generated\Shared\Transfer\ErpOrderAmountTransfer | ||
*/ | ||
public function postSave( | ||
ErpOrderAmountTransfer $erpOrderAmountTransfer, | ||
?ErpOrderTransfer $existingErpOrderTransfer = null | ||
): ErpOrderAmountTransfer; | ||
} |
25 changes: 25 additions & 0 deletions
25
...ndOfOryx/Zed/ErpOrderExtension/Dependency/Plugin/ErpOrderAmountPreSavePluginInterface.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,25 @@ | ||
<?php | ||
|
||
namespace FondOfOryx\Zed\ErpOrderExtension\Dependency\Plugin; | ||
|
||
use Generated\Shared\Transfer\ErpOrderAmountTransfer; | ||
use Generated\Shared\Transfer\ErpOrderTransfer; | ||
|
||
interface ErpOrderAmountPreSavePluginInterface | ||
{ | ||
/** | ||
* Specification: | ||
* - Plugin is triggered before erp invoice amount object is saved. | ||
* | ||
* @api | ||
* | ||
* @param \Generated\Shared\Transfer\ErpOrderAmountTransfer $erpOrderAmountTransfer | ||
* @param \Generated\Shared\Transfer\ErpOrderTransfer|null $existingErpOrderTransfer | ||
* | ||
* @return \Generated\Shared\Transfer\ErpOrderAmountTransfer | ||
*/ | ||
public function preSave( | ||
ErpOrderAmountTransfer $erpOrderAmountTransfer, | ||
?ErpOrderTransfer $existingErpOrderTransfer = null | ||
): ErpOrderAmountTransfer; | ||
} |
25 changes: 25 additions & 0 deletions
25
...OfOryx/Zed/ErpOrderExtension/Dependency/Plugin/ErpOrderExpensePostSavePluginInterface.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,25 @@ | ||
<?php | ||
|
||
namespace FondOfOryx\Zed\ErpOrderExtension\Dependency\Plugin; | ||
|
||
use Generated\Shared\Transfer\ErpOrderExpenseTransfer; | ||
use Generated\Shared\Transfer\ErpOrderTransfer; | ||
|
||
interface ErpOrderExpensePostSavePluginInterface | ||
{ | ||
/** | ||
* Specification: | ||
* - Plugin is triggered after erp invoice expense object was saved. | ||
* | ||
* @api | ||
* | ||
* @param \Generated\Shared\Transfer\ErpOrderExpenseTransfer $erpOrderExpenseTransfer | ||
* @param \Generated\Shared\Transfer\ErpOrderTransfer|null $existingErpOrderTransfer | ||
* | ||
* @return \Generated\Shared\Transfer\ErpOrderExpenseTransfer | ||
*/ | ||
public function postSave( | ||
ErpOrderExpenseTransfer $erpOrderExpenseTransfer, | ||
?ErpOrderTransfer $existingErpOrderTransfer = null | ||
): ErpOrderExpenseTransfer; | ||
} |
25 changes: 25 additions & 0 deletions
25
...dOfOryx/Zed/ErpOrderExtension/Dependency/Plugin/ErpOrderExpensePreSavePluginInterface.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,25 @@ | ||
<?php | ||
|
||
namespace FondOfOryx\Zed\ErpOrderExtension\Dependency\Plugin; | ||
|
||
use Generated\Shared\Transfer\ErpOrderExpenseTransfer; | ||
use Generated\Shared\Transfer\ErpOrderTransfer; | ||
|
||
interface ErpOrderExpensePreSavePluginInterface | ||
{ | ||
/** | ||
* Specification: | ||
* - Plugin is triggered before erp invoice expense object is saved. | ||
* | ||
* @api | ||
* | ||
* @param \Generated\Shared\Transfer\ErpOrderExpenseTransfer $erpOrderExpenseTransfer | ||
* @param \Generated\Shared\Transfer\ErpOrderTransfer|null $existingErpOrderTransfer | ||
* | ||
* @return \Generated\Shared\Transfer\ErpOrderExpenseTransfer | ||
*/ | ||
public function preSave( | ||
ErpOrderExpenseTransfer $erpOrderExpenseTransfer, | ||
?ErpOrderTransfer $existingErpOrderTransfer = null | ||
): ErpOrderExpenseTransfer; | ||
} |
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