-
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.
♻️ migrate allowed product quantity bundles (#190)
* ♻️ migrate from fond-of-spryker/allowed-product-quantity * ♻️ migrate from fond-of-spryker/allowed-product-quantity-cart-connector * ♻️ migrate from fond-of-spryker/allowed-product-quantity-checkout-connector * ♻️ migrate from fond-of-spryker/allowed-product-quantity-gui * ♻️ migrate from fond-of-spryker/allowed-product-quantity-search * ♻️ migrate from fond-of-spryker/product-management
- Loading branch information
0 parents
commit e31785a
Showing
38 changed files
with
1,377 additions
and
0 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@v3 | ||
- 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@v3 | ||
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,8 @@ | ||
.idea | ||
|
||
.DS_Store | ||
|
||
vendor | ||
composer.lock | ||
src/Generated | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2023-present FOND OF GmbH | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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/FondOfImpala/* ./tests/* | ||
|
||
.PHONY: phpcbf | ||
phpcbf: | ||
./vendor/bin/phpcbf --standard=./vendor/spryker/code-sniffer/Spryker/ruleset.xml ./src/FondOfImpala/* ./tests/* | ||
|
||
.PHONY: phpstan | ||
phpstan: | ||
./vendor/bin/phpstan --memory-limit=-1 analyse ./src/FondOfImpala | ||
|
||
.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 -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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Allowed Product Quantity Gui Module | ||
[![CI](https://github.com/fond-of-impala/allowed-product-quantity-gui/actions/workflows/main.yml/badge.svg)](https://github.com/fond-of-impala/allowed-product-quantity-gui/actions/workflows/main.yml) | ||
[![license](https://img.shields.io/github/license/fond-of-impala/allowed-product-quantity-gui.svg)](https://packagist.org/packages/fond-of-impala/allowed-product-quantity-gui) | ||
|
||
Module was migrated from `fond-of-spryker/allowed-product-quantity-gui`. | ||
|
||
## Installation | ||
|
||
``` | ||
composer require fond-of-impala/allowed-product-quantity-gui | ||
``` |
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 @@ | ||
namespace: fond-of-impala/allowed-product-quantity-gui | ||
|
||
suites: | ||
unit: | ||
path: . | ||
|
||
settings: | ||
shuffle: true | ||
lint: true | ||
|
||
bootstrap: _bootstrap.php | ||
|
||
paths: | ||
tests: tests | ||
output: tests/_output | ||
support: tests/_support | ||
data: tests/_data | ||
|
||
coverage: | ||
enabled: true | ||
include: | ||
- src/*.php | ||
|
||
modules: | ||
enabled: | ||
- \FondOfCodeception\Module\Spryker | ||
config: | ||
\FondOfCodeception\Module\Spryker: | ||
generate_transfer: false | ||
generate_map_classes: false | ||
generate_propel_classes: false | ||
generate_ide_auto_completion: false | ||
|
||
env: | ||
standalone: | ||
modules: | ||
config: | ||
\FondOfCodeception\Module\Spryker: | ||
generate_transfer: true | ||
generate_map_classes: true | ||
generate_propel_classes: true | ||
generate_ide_auto_completion: true | ||
monorepo: |
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,40 @@ | ||
{ | ||
"name": "fond-of-impala/allowed-product-quantity-gui", | ||
"description": "Allowed product quantity gui module", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Daniel Rose", | ||
"email": "daniel-rose@gmx.de" | ||
} | ||
], | ||
"require": { | ||
"php": ">=8.0", | ||
"fond-of-impala/product-management": "^1.0.0", | ||
"fond-of-impala/allowed-product-quantity": "^1.0.0" | ||
}, | ||
"require-dev": { | ||
"fond-of-codeception/spryker": "*", | ||
"spryker/code-sniffer": "*", | ||
"spryker-sdk/phpstan-spryker": "*" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"autoload": { | ||
"psr-4": { | ||
"FondOfImpala\\": "src/FondOfImpala/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"FondOfImpala\\": "tests/FondOfImpala/", | ||
"Generated\\": "src/Generated/", | ||
"Orm\\": "src/Orm/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
} | ||
} |
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,8 @@ | ||
parameters: | ||
level: 4 | ||
reportUnmatchedIgnoredErrors: false | ||
scanDirectories: | ||
- src/Orm/Zed | ||
- src/Generated | ||
ignoreErrors: | ||
- '#.* on an unknown class Generated\\(Client|Glue|Service|Yves|Zed)\\Ide\\AutoCompletion.*#' |
28 changes: 28 additions & 0 deletions
28
...mpala/Shared/AllowedProductQuantityGui/Transfer/allowed_product_quantity_gui.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,28 @@ | ||
<?xml version="1.0"?> | ||
<transfers xmlns="spryker:transfer-01" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="spryker:transfer-01 http://static.spryker.com/transfer-01.xsd"> | ||
|
||
<transfer name="ProductAbstract"> | ||
<property name="idProductAbstract" type="int" /> | ||
<property name="sku" type="string" /> | ||
<property name="attributes" type="array" singular="attribute" /> | ||
<property name="localizedAttributes" type="LocalizedAttributes[]" /> | ||
<property name="isActive" type="bool" /> | ||
<property name="storeRelation" type="StoreRelation"/> | ||
<property name="allowedQuantity" type="AllowedProductQuantity"/> | ||
</transfer> | ||
|
||
<transfer name="AllowedProductQuantityResponse"> | ||
<property name="allowedProductQuantityTransfer" type="AllowedProductQuantity"/> | ||
<property name="isSuccessful" type="bool"/> | ||
</transfer> | ||
|
||
<transfer name="AllowedProductQuantity"> | ||
<property name="idAllowedProductQuantity" type="int" /> | ||
<property name="idProductAbstract" type="int" /> | ||
<property name="quantityMin" type="int" /> | ||
<property name="quantityMax" type="int" /> | ||
<property name="quantityInterval" type="int" /> | ||
</transfer> | ||
</transfers> |
41 changes: 41 additions & 0 deletions
41
...ondOfImpala/Zed/AllowedProductQuantityGui/AllowedProductQuantityGuiDependencyProvider.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,41 @@ | ||
<?php | ||
|
||
namespace FondOfImpala\Zed\AllowedProductQuantityGui; | ||
|
||
use FondOfImpala\Zed\AllowedProductQuantityGui\Dependency\Facade\AllowedProductQuantityGuiToAllowedProductQuantityFacadeBridge; | ||
use Spryker\Zed\Kernel\AbstractBundleDependencyProvider; | ||
use Spryker\Zed\Kernel\Container; | ||
|
||
class AllowedProductQuantityGuiDependencyProvider extends AbstractBundleDependencyProvider | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public const FACADE_ALLOWED_PRODUCT_QUANTITY = 'FACADE_ALLOWED_PRODUCT_QUANTITY'; | ||
|
||
/** | ||
* @param \Spryker\Zed\Kernel\Container $container | ||
* | ||
* @return \Spryker\Zed\Kernel\Container | ||
*/ | ||
public function provideCommunicationLayerDependencies(Container $container): Container | ||
{ | ||
$container = parent::provideCommunicationLayerDependencies($container); | ||
|
||
return $this->addAllowedProductQuantityFacade($container); | ||
} | ||
|
||
/** | ||
* @param \Spryker\Zed\Kernel\Container $container | ||
* | ||
* @return \Spryker\Zed\Kernel\Container | ||
*/ | ||
protected function addAllowedProductQuantityFacade(Container $container): Container | ||
{ | ||
$container[static::FACADE_ALLOWED_PRODUCT_QUANTITY] = static fn (Container $container): AllowedProductQuantityGuiToAllowedProductQuantityFacadeBridge => new AllowedProductQuantityGuiToAllowedProductQuantityFacadeBridge( | ||
$container->getLocator()->allowedProductQuantity()->facade(), | ||
); | ||
|
||
return $container; | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
...AllowedProductQuantityGui/Communication/AllowedProductQuantityGuiCommunicationFactory.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,69 @@ | ||
<?php | ||
|
||
namespace FondOfImpala\Zed\AllowedProductQuantityGui\Communication; | ||
|
||
use FondOfImpala\Zed\AllowedProductQuantityGui\AllowedProductQuantityGuiDependencyProvider; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\Form\AllowedQuantityForm; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\Form\DataProvider\AllowedQuantityFormDataProvider; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\FormExpander\ProductAbstractFormExpander; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\FormExpander\ProductAbstractFormExpanderInterface; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\TabExpander\ProductAbstractTabExpander; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\TabExpander\ProductAbstractTabExpanderInterface; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\ViewExpander\ProductAbstractViewExpander; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Communication\ViewExpander\ProductAbstractViewExpanderInterface; | ||
use FondOfImpala\Zed\AllowedProductQuantityGui\Dependency\Facade\AllowedProductQuantityGuiToAllowedProductQuantityFacadeInterface; | ||
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory; | ||
|
||
class AllowedProductQuantityGuiCommunicationFactory extends AbstractCommunicationFactory | ||
{ | ||
/** | ||
* @return \FondOfImpala\Zed\AllowedProductQuantityGui\Communication\TabExpander\ProductAbstractTabExpanderInterface | ||
*/ | ||
public function createProductAbstractTabExpander(): ProductAbstractTabExpanderInterface | ||
{ | ||
return new ProductAbstractTabExpander(); | ||
} | ||
|
||
/** | ||
* @return \FondOfImpala\Zed\AllowedProductQuantityGui\Communication\ViewExpander\ProductAbstractViewExpanderInterface | ||
*/ | ||
public function createProductAbstractViewExpander(): ProductAbstractViewExpanderInterface | ||
{ | ||
return new ProductAbstractViewExpander(); | ||
} | ||
|
||
/** | ||
* @return \FondOfImpala\Zed\AllowedProductQuantityGui\Communication\FormExpander\ProductAbstractFormExpanderInterface | ||
*/ | ||
public function createProductAbstractFormExpander(): ProductAbstractFormExpanderInterface | ||
{ | ||
return new ProductAbstractFormExpander( | ||
$this->createAllowedQuantityForm(), | ||
$this->createAllowedQuantityFormDataProvider(), | ||
); | ||
} | ||
|
||
/** | ||
* @return \FondOfImpala\Zed\AllowedProductQuantityGui\Communication\Form\AllowedQuantityForm | ||
*/ | ||
protected function createAllowedQuantityForm(): AllowedQuantityForm | ||
{ | ||
return new AllowedQuantityForm(); | ||
} | ||
|
||
/** | ||
* @return \FondOfImpala\Zed\AllowedProductQuantityGui\Communication\Form\DataProvider\AllowedQuantityFormDataProvider | ||
*/ | ||
protected function createAllowedQuantityFormDataProvider(): AllowedQuantityFormDataProvider | ||
{ | ||
return new AllowedQuantityFormDataProvider($this->getAllowedProductQuantityFacade()); | ||
} | ||
|
||
/** | ||
* @return \FondOfImpala\Zed\AllowedProductQuantityGui\Dependency\Facade\AllowedProductQuantityGuiToAllowedProductQuantityFacadeInterface | ||
*/ | ||
protected function getAllowedProductQuantityFacade(): AllowedProductQuantityGuiToAllowedProductQuantityFacadeInterface | ||
{ | ||
return $this->getProvidedDependency(AllowedProductQuantityGuiDependencyProvider::FACADE_ALLOWED_PRODUCT_QUANTITY); | ||
} | ||
} |
Oops, something went wrong.