From 9c05b347ab9ceedc7885aba06569fbc23c40e985 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Wed, 11 Dec 2024 13:39:02 +0300 Subject: [PATCH 1/6] CC-34963: Updated license. --- .license | 4 -- CONTRIBUTING.md | 69 +++++++++++++++++++ LICENSE | 48 +++++++------ composer.json | 2 +- .../Business/Builder/PromptBuilder.php | 4 +- .../Builder/PromptBuilderInterface.php | 4 +- .../Generator/ImageAltTextGenerator.php | 6 +- .../ImageAltTextGeneratorInterface.php | 4 +- .../ProductManagementAiBusinessFactory.php | 4 +- .../Business/ProductManagementAiFacade.php | 4 +- .../ProductManagementAiFacadeInterface.php | 4 +- .../Business/Proposer/CategoryProposer.php | 6 +- .../Proposer/CategoryProposerInterface.php | 4 +- .../Business/Reader/CategoryReader.php | 6 +- .../Reader/CategoryReaderInterface.php | 4 +- .../Business/Translator/Translator.php | 8 +-- .../Translator/TranslatorInterface.php | 4 +- .../CategorySuggestionController.php | 4 +- .../Controller/ImageAltTextController.php | 4 +- .../Controller/TranslateController.php | 4 +- .../CategoryIdsProductFormExpander.php | 4 +- ...ategoryIdsProductFormExpanderInterface.php | 4 +- .../ImageAltTextProductFormExpander.php | 4 +- ...ageAltTextProductFormExpanderInterface.php | 4 +- ...roductCategoryAbstractFormDataProvider.php | 6 +- ...egoryAbstractFormDataProviderInterface.php | 4 +- .../Handler/ProductCategoryHandler.php | 6 +- .../ProductCategoryHandlerInterface.php | 4 +- ...tegoryProductAbstractAfterUpdatePlugin.php | 4 +- ...ategoryProductAbstractPostCreatePlugin.php | 4 +- ...tTextProductAbstractFormExpanderPlugin.php | 4 +- ...tProductConcreteEditFormExpanderPlugin.php | 4 +- ...tTextProductConcreteFormExpanderPlugin.php | 4 +- ...ductCategoryAbstractFormExpanderPlugin.php | 4 +- ...roductManagementAiCommunicationFactory.php | 4 +- ...roductManagementAiToOpenAiClientBridge.php | 4 +- ...uctManagementAiToOpenAiClientInterface.php | 4 +- ...ductManagementAiToCategoryFacadeBridge.php | 4 +- ...tManagementAiToCategoryFacadeInterface.php | 4 +- ...roductManagementAiToLocaleFacadeBridge.php | 4 +- ...uctManagementAiToLocaleFacadeInterface.php | 4 +- ...agementAiToProductCategoryFacadeBridge.php | 6 +- ...mentAiToProductCategoryFacadeInterface.php | 6 +- ...anagementAiToUtilEncodingServiceBridge.php | 4 +- ...gementAiToUtilEncodingServiceInterface.php | 4 +- .../ProductManagementAiConfig.php | 4 +- .../ProductManagementAiDependencyProvider.php | 4 +- 47 files changed, 192 insertions(+), 121 deletions(-) delete mode 100644 .license create mode 100644 CONTRIBUTING.md diff --git a/.license b/.license deleted file mode 100644 index 591bbb5..0000000 --- a/.license +++ /dev/null @@ -1,4 +0,0 @@ -/** - * MIT License - * For full license information, please view the LICENSE file that was distributed with this source code. - */ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6a2d4c0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,69 @@ +SPRYKER - CONTRIBUTION AGREEMENT FOR PLATFORM CONTRIBUTIONS + +Spryker Systems GmbH, Heidestraße 9-10, 10557 Berlin, Germany (“Spryker”), and its affiliates invite you to contribute +to Spryker’s Software, including but not limited to with bug fixes, enhancements, additions or features +(each a “Platform Contribution”). For the purposes of this Agreement, the “Software” includes any software, +which is owned and made available by Spryker. Contributions can consist of source code, documentation and/or other +code-related elements. + +BY DISPLAYING, PUBLISHING, UPLOADING, PROMOTING OR OTHERWISE PROVIDING A PLATFORM CONTRIBUTION TO SPRYKER +(COLLECTIVELY, “SUBMITTING”), YOU AGREE TO THIS CONTRIBUTION AGREEMENT FOR PLATFORM CONTRIBUTIONS (THE “AGREEMENT”). + +Spryker grants you the right to use the Software for the purpose of developing and submitting Platform Contributions +to the Software and/or Spryker’s documentation subject to your compliance with this Agreement. +Under the license granted in this Agreement, you must not (i) use the Software to set up a production live system; +(ii) copy any part of the Software except to develop and provide a Platform Contribution or make one copy for back-up +purposes; (iii) distribute, disclose, market, rent, lease, or transfer the Software or act as a service bureau with +respect to the Software; (iv) export the Software or install it in multiple locations; (v) disclose any confidential +information provided by Spryker; (vi) modify or make derivative works of the Software beyond what you will submit to +Spryker as Platform Contribution; or (vii) allow others to make or obtain copies of the Software. + +You grant Spryker and its affiliates an irrevocable, perpetual, worldwide, royalty-free, non-exclusive, +unrestricted license and right to use, including to reproduce and store, disseminate and otherwise exploit, modify, +delete from, add to, create derivative works of, publicly perform, publicly display, reproduce, exchange parts +of a Platform Contribution or combine them with other code, use in data networks and distribute with or without +consideration and without limitations as to the number of items via all distribution channels (and to sublicense +the foregoing rights through multiple tiers of licensees) such Platform Contribution and any other copyright +protected material for any reason and in connection with advertising and promoting our software and/or Spryker’s +products in any media formats and through any channels now existing or developed in the future. +The granting of these rights covers any usage and exploitation rights for any unknown types of use as well as +with regard to any known types of use the right to unrestrictedly make publicly available and publish, +irrespective of the medium including any editions and versions and grant simple or exclusive usage, +exploitation or adaptation rights to third parties. + +Spryker may reject, refuse to post or delete any Platform Contribution for any or no reason, including, +without limitation. Spryker may or may not mention your name when publishing the Platform Contribution. +From time to time, Spryker may remove the Platform Contribution permanently or temporarily, provided that even +if Spryker does remove such Platform Contribution, Spryker shall have no obligation to cease its other uses of +the Platform Contribution as permitted above. +Spryker respects the intellectual property of others, and requires that you do the same. Your Platform Contributions +must not infringe any copyright, patent, trademark, trade secret or other proprietary rights or other rights of any +person or entity and you may not upload, embed, post, email, transmit or otherwise make available a Platform Contribution +or any other material that infringes such rights. +If you are submitting a Platform Contribution that includes licensed rights, you will inform Spryker of the name of +such third-party licensor, the third-party license as such and any restrictions you are aware of. +If you are submitting a Platform Contribution that was developed by you in the course of your work for your employer +or as a contractor, vendor or agent for another principal, you are responsible for obtaining permission from your +employer or such other principal. +You will not include a Platform Contribution containing code governed by a license with copyleft effect. You agree +to be fully responsible for and to pay any and all royalties, fees, and any other monies owed to any person or +entity for any rights in a Platform Contribution submitted by you. +YOU REPRESENT AND WARRANT THAT: (I) YOU OWN THE PLATFORM CONTRIBUTION POSTED BY YOU OR OTHERWISE ARE ENTITLED TO +GRANT THE LICENSES AND RIGHTS SET FORTH ABOVE, INCLUDING WHERE NECESSARY HAVE OBTAINED YOUR EMPLOYER’S OR OTHER +PRINCIPAL’S PERMISSION, AND (II) THE SUBMISSION OF YOUR PLATFORM CONTRIBUTION DOES NOT VIOLATE THE PRIVACY RIGHTS, +PUBLICITY RIGHTS, CONTRACT RIGHTS, INTELLECTUAL PROPERTY OR ANY OTHER RIGHTS OF ANY PERSON OR ENTITY OR ANY +APPLICABLE LAW. + +YOU AGREE TO INDEMNIFY AND HOLD SPRYKER AND ITS AFFILIATES, AND THEIR RESPECTIVE OFFICERS, AGENTS, PARTNERS AND EMPLOYEES, +HARMLESS FROM ANY LOSS, LIABILITY, COST, EXPENSE, CLAIM, OR DEMAND, INCLUDING WITHOUT LIMITATION, REASONABLE ATTORNEYS’ FEES, +DUE OR RELATING TO OR ARISING OUT OF THE USE OF THE YOUR PLATFORM CONTRIBUTION IN VIOLATION OF THIS AGREEMENT AND/OR +ARISING FROM A BREACH OF ANY TERMS OF THIS AGREEMENT AND/OR ANY BREACH OF YOUR REPRESENTATIONS AND WARRANTIES SET +FORTH IN THIS AGREEMENT AND/OR ARISING OUT OF OR RELATING TO ANY PLATFORM CONTRIBUTION THAT YOU SUBMIT. + +This Agreement is governed by the laws of Germany to the exclusion of its conflict of laws provisions and +the United Nations Convention on Contracts for the International Sale of Goods (CISG). The parties consent to the +jurisdiction of the courts in Berlin (Germany). + +This Agreement constitutes the entire agreement between the parties concerning the Platform Contributions submitted +by you. This Agreement supersedes any prior verbal understanding between the parties on the matter. This Agreement +may be amended only in a writing signed by an authorized officer of Spryker. diff --git a/LICENSE b/LICENSE index 73dcc7b..10894cc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,27 @@ -The MIT License (MIT) - -Copyright (c) 2016-present Spryker Systems 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. +SPRYKER - LICENSE AGREEMENT FOR EVALUATION OF AND EARLY ACCESS TO SOFTWARE + +SPRYKER SYSTEMS GMBH, HEIDESTRASSE 9-10, 10557 BERLIN, GERMANY (“WE” OR ”SPRYKER”) GRANTS YOU (“LICENSEE”) THE RIGHT TO USE THE SOFTWARE (AS DEFINED BELOW) UNDER THE PROVISIONS OF THIS LICENSE AGREEMENT FOR EVALUATION AND EARLY ACCESS (THE “AGREEMENT”). + +For the purposes of this Agreement, the “Software” includes any software, which is owned and made available by Spryker (i) for evaluation purposes or (ii) as part of Spryker’s early access program under this Agreement. In case Licensee has a dedicated paid license agreement with Spryker on a part of the Software only, this Agreement still applies to all other parts of the Software not paid for and/or covered by such license agreement. + +Spryker grants to Licensee, (i) during the 45-calendar-day period (the “Evaluation Period”) following the first download of the Software or (ii) during the period it makes available a feature, module or functionality as part of its early access program (the “Early Access Period”), the non-transferable, non-exclusive limited, free of charge license (for (i) the “Evaluation License” or for (ii) the “Early Access License”, as applicable, both a “License”) to permit Licensee and/or Licensee’s employees to internally use the Software to test and evaluate the Software. In case of the Evaluation License, Licensee will not be granted the license under this Agreement for one particular piece of the Software more than once. + +Under the License granted in this Agreement, Licensee shall not (i) use the Software to set up a production live system, for development purposes or any other purposes apart from evaluating and testing the Software; (ii) copy any part of the Software except to make one copy for back-up purposes; (iii) distribute, disclose, market, rent, lease, or transfer the Software or act as a service bureau with respect to the Software; (iv) export the Software or install it in multiple locations; (v) disclose any confidential information provided by Spryker; (vi) modify or make derivative works of the Software; or (vii) allow others to make or obtain copies of the Software. + +The use of the Software in a production environment, to the extent permitted at all, requires prior conclusion of a separate agreement between Spryker and Licensee. Spryker will not support any versions of the Software being provided for evaluation purposes or as part of Spryker’s early access program. The provision of the Software as part of Spryker’s early access program does not necessarily mean it will be released as part of Spryker’s products in the future. + +The Software may contain elements of open source components, to which different license terms apply respectively. Licensee may need to install these open source components separately. + +THE SOFTWARE IS PROVIDED “AS-IS” AND WITHOUT WARRANTY OF ANY KIND. SPRYKER DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, TITLE, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. SPRYKER WILL NOT BE LIABLE FOR ANY DAMAGES ASSOCIATED WITH THE SOFTWARE, INCLUDING WITHOUT LIMITATION ORDINARY, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN IF SPRYKER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +Licensee can provide input, suggestions, suggest or recommend changes or enhancements of the Software (“Feedback”). Any Feedback provided by Licensee is not considered confidential information and is received and treated by Spryker on a non-confidential and unrestricted basis. Licensee grants Spryker a sub-licenseable right to use, distribute, disclose and/or incorporate it into the Software or other products of Spryker, free of charge and without restriction as to time and place. + +Licensee's License to use the Software under this Agreement shall terminate on the earlier of (i) the expiration of the Evaluation Period or the Early Access Period (as applicable), or (ii) the date both parties enter into a definitive agreement for the provision by Spryker to Licensee of a full non-evaluation license to Spryker’s software. + +Upon termination of the License as provided under this Agreement, Licensee shall promptly destroy the Software and any back-up copy of the Software made during the Evaluation Period or Early Access Period if Spryker and Licensee have not agreed a non-evaluation license to Spryker’s software. + +This Agreement shall be governed by the laws of Germany to the exclusion of IPR (International Law) and the United Nations Convention on Contracts for the International Sale of Goods (CISG). The parties consent to the jurisdiction of the courts in Berlin (Germany). + +This Agreement and/or the License is not assignable or transferable by Licensee and any attempt to do so is null and void. + +This Agreement constitutes the entire agreement between the parties concerning Licensee’s use of the Software. This Agreement supersedes any prior verbal understanding between the parties. This Agreement may be amended only in a writing signed by an authorized officer of Spryker. diff --git a/composer.json b/composer.json index 86f11b6..b33594a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "spryker-eco/product-management-ai", "type": "library", "description": "ProductManagementAi module", - "license": "MIT", + "license": "proprietary", "require": { "php": ">=8.1", "spryker-eco/open-ai": "^0.1.0", diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Builder/PromptBuilder.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Builder/PromptBuilder.php index 7a23900..65e72c3 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Builder/PromptBuilder.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Builder/PromptBuilder.php @@ -1,8 +1,8 @@ openAiClient = $openAiClient; $this->promptBuilder = $promptBuilder; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGeneratorInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGeneratorInterface.php index c0cb935..4a226f7 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGeneratorInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGeneratorInterface.php @@ -1,8 +1,8 @@ openAiClient = $openAiClient; $this->utilEncodingService = $utilEncodingService; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposerInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposerInterface.php index c956226..799390f 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposerInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposerInterface.php @@ -1,8 +1,8 @@ categoryFacade = $categoryFacade; $this->localeFacade = $localeFacade; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReaderInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReaderInterface.php index 8897d62..d556ee6 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReaderInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReaderInterface.php @@ -1,8 +1,8 @@ openAiClient = $openAiClient; $this->productManagementAiConfig = $productManagementAiConfig; @@ -97,7 +97,7 @@ protected function buildTranslationRequestPrompt(AiTranslatorRequestTransfer $ai */ protected function createTranslatorResponse( AiTranslatorRequestTransfer $aiTranslatorRequestTransfer, - OpenAiChatResponseTransfer $openAiChatResponseTransfer + OpenAiChatResponseTransfer $openAiChatResponseTransfer, ): AiTranslatorResponseTransfer { $aiTranslatorResponseTransfer = (new AiTranslatorResponseTransfer()) ->setOriginalText($aiTranslatorRequestTransfer->getTextOrFail()) diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/TranslatorInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/TranslatorInterface.php index ab4ec7f..d9d55cf 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/TranslatorInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/TranslatorInterface.php @@ -1,8 +1,8 @@ categoryFacade = $categoryFacade; $this->localeFacade = $localeFacade; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProviderInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProviderInterface.php index 9378d00..1a647fe 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProviderInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProviderInterface.php @@ -1,8 +1,8 @@ productCategoryFacade = $productCategoryFacade; $this->localeFacade = $localeFacade; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandlerInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandlerInterface.php index 776920c..fc49576 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandlerInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandlerInterface.php @@ -1,8 +1,8 @@ productCategoryFacade->getCategoryTransferCollectionByIdProductAbstract($idProductAbstract, $localeTransfer); } diff --git a/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php index 48fd64b..c71f8bc 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php @@ -1,8 +1,8 @@ Date: Wed, 11 Dec 2024 13:47:51 +0300 Subject: [PATCH 2/6] CC-34963: Updated min php version. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b33594a..ac83a23 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "ProductManagementAi module", "license": "proprietary", "require": { - "php": ">=8.1", + "php": ">=8.2", "spryker-eco/open-ai": "^0.1.0", "spryker/category": "^5.0.0", "spryker/gui": "^3.45.0", From 5b6153907c8537c77f886740c28990947a2cd583 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Wed, 11 Dec 2024 13:49:47 +0300 Subject: [PATCH 3/6] CC-34963: Adjusted README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a5f2b66..ba6eaa8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/spryker-eco/product-management-ai/workflows/CI/badge.svg?branch=master)](https://github.com/spryker-eco/product-management-ai/actions?query=workflow%3ACI+branch%3Amaster) [![Latest Stable Version](https://poser.pugx.org/spryker-eco/product-management-ai/v/stable.svg)](https://packagist.org/packages/spryker-eco/product-management-ai) [![License](https://img.shields.io/github/license/spryker-eco/product-management-ai.svg?b=master)](https://github.com/spryker-eco/product-management-ai) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/) +[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.2-8892BF.svg)](https://php.net/) ProductManagementAi module provides the functionality to manage products with AI. From e5b432c934327c03f9011e74b1de037ff42e99d6 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Wed, 11 Dec 2024 14:07:43 +0300 Subject: [PATCH 4/6] CC-34963: Reverted sniffer changes. --- .github/workflows/ci.yml | 4 ++-- .../Business/Generator/ImageAltTextGenerator.php | 2 +- .../Business/Proposer/CategoryProposer.php | 2 +- .../ProductManagementAi/Business/Reader/CategoryReader.php | 2 +- .../ProductManagementAi/Business/Translator/Translator.php | 4 ++-- .../DataProvider/ProductCategoryAbstractFormDataProvider.php | 2 +- .../Communication/Handler/ProductCategoryHandler.php | 2 +- .../ProductManagementAiToProductCategoryFacadeBridge.php | 2 +- .../ProductManagementAiToProductCategoryFacadeInterface.php | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89cf091..d38d610 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' extensions: mbstring, intl, bcmath coverage: none @@ -47,7 +47,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' extensions: mbstring, intl, bcmath coverage: none diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGenerator.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGenerator.php index e3c9cda..15a746c 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGenerator.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Generator/ImageAltTextGenerator.php @@ -38,7 +38,7 @@ class ImageAltTextGenerator implements ImageAltTextGeneratorInterface public function __construct( ProductManagementAiToOpenAiClientInterface $openAiClient, PromptBuilderInterface $promptBuilder, - ProductManagementAiConfig $productManagementAiConfig, + ProductManagementAiConfig $productManagementAiConfig ) { $this->openAiClient = $openAiClient; $this->promptBuilder = $promptBuilder; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposer.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposer.php index 00d5acf..77553a7 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposer.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Proposer/CategoryProposer.php @@ -45,7 +45,7 @@ public function __construct( ProductManagementAiToOpenAiClientInterface $openAiClient, ProductManagementAiToUtilEncodingServiceInterface $utilEncodingService, CategoryReaderInterface $categoryReader, - ProductManagementAiConfig $productManagementAiConfig, + ProductManagementAiConfig $productManagementAiConfig ) { $this->openAiClient = $openAiClient; $this->utilEncodingService = $utilEncodingService; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReader.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReader.php index 8f551c8..74f9c7b 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReader.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Reader/CategoryReader.php @@ -28,7 +28,7 @@ class CategoryReader implements CategoryReaderInterface */ public function __construct( ProductManagementAiToCategoryFacadeInterface $categoryFacade, - ProductManagementAiToLocaleFacadeInterface $localeFacade, + ProductManagementAiToLocaleFacadeInterface $localeFacade ) { $this->categoryFacade = $categoryFacade; $this->localeFacade = $localeFacade; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/Translator.php b/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/Translator.php index 741fbf3..4f786cf 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/Translator.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Business/Translator/Translator.php @@ -37,7 +37,7 @@ class Translator implements TranslatorInterface */ public function __construct( ProductManagementAiToOpenAiClientInterface $openAiClient, - ProductManagementAiConfig $productManagementAiConfig, + ProductManagementAiConfig $productManagementAiConfig ) { $this->openAiClient = $openAiClient; $this->productManagementAiConfig = $productManagementAiConfig; @@ -97,7 +97,7 @@ protected function buildTranslationRequestPrompt(AiTranslatorRequestTransfer $ai */ protected function createTranslatorResponse( AiTranslatorRequestTransfer $aiTranslatorRequestTransfer, - OpenAiChatResponseTransfer $openAiChatResponseTransfer, + OpenAiChatResponseTransfer $openAiChatResponseTransfer ): AiTranslatorResponseTransfer { $aiTranslatorResponseTransfer = (new AiTranslatorResponseTransfer()) ->setOriginalText($aiTranslatorRequestTransfer->getTextOrFail()) diff --git a/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProvider.php b/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProvider.php index 5a8c872..56b29c3 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProvider.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Communication/Form/DataProvider/ProductCategoryAbstractFormDataProvider.php @@ -36,7 +36,7 @@ class ProductCategoryAbstractFormDataProvider implements ProductCategoryAbstract public function __construct( ProductManagementAiToCategoryFacadeInterface $categoryFacade, ProductManagementAiToLocaleFacadeInterface $localeFacade, - ProductManagementAiToProductCategoryFacadeInterface $productCategoryFacade, + ProductManagementAiToProductCategoryFacadeInterface $productCategoryFacade ) { $this->categoryFacade = $categoryFacade; $this->localeFacade = $localeFacade; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandler.php b/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandler.php index b8c020b..ddaee6c 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandler.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Communication/Handler/ProductCategoryHandler.php @@ -29,7 +29,7 @@ class ProductCategoryHandler implements ProductCategoryHandlerInterface */ public function __construct( ProductManagementAiToProductCategoryFacadeInterface $productCategoryFacade, - ProductManagementAiToLocaleFacadeInterface $localeFacade, + ProductManagementAiToLocaleFacadeInterface $localeFacade ) { $this->productCategoryFacade = $productCategoryFacade; $this->localeFacade = $localeFacade; diff --git a/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeBridge.php b/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeBridge.php index 2956f14..306b0a2 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeBridge.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeBridge.php @@ -55,7 +55,7 @@ public function removeProductCategoryMappings(int $idCategory, array $productIds */ public function getCategoryTransferCollectionByIdProductAbstract( int $idProductAbstract, - LocaleTransfer $localeTransfer, + LocaleTransfer $localeTransfer ): CategoryCollectionTransfer { return $this->productCategoryFacade->getCategoryTransferCollectionByIdProductAbstract($idProductAbstract, $localeTransfer); } diff --git a/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php b/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php index c71f8bc..bc761df 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Dependency/Facade/ProductManagementAiToProductCategoryFacadeInterface.php @@ -36,6 +36,6 @@ public function removeProductCategoryMappings(int $idCategory, array $productIds */ public function getCategoryTransferCollectionByIdProductAbstract( int $idProductAbstract, - LocaleTransfer $localeTransfer, + LocaleTransfer $localeTransfer ): CategoryCollectionTransfer; } From bc7769551fe36f1b43a71e27ab477058cc4de437 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Wed, 11 Dec 2024 14:10:15 +0300 Subject: [PATCH 5/6] CC-34963: Fixed ci. --- .../Communication/Expander/CategoryIdsProductFormExpander.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/SprykerEco/Zed/ProductManagementAi/Communication/Expander/CategoryIdsProductFormExpander.php b/src/SprykerEco/Zed/ProductManagementAi/Communication/Expander/CategoryIdsProductFormExpander.php index 945392e..5c2a15e 100644 --- a/src/SprykerEco/Zed/ProductManagementAi/Communication/Expander/CategoryIdsProductFormExpander.php +++ b/src/SprykerEco/Zed/ProductManagementAi/Communication/Expander/CategoryIdsProductFormExpander.php @@ -37,8 +37,6 @@ public function __construct(ProductCategoryAbstractFormDataProviderInterface $pr } /** - * @SuppressWarnings(PHPMD.UnusedLocalVariable) - * * @param \Symfony\Component\Form\FormBuilderInterface $builder * @param array $options * From 065cf14d96e5b81f291a61bc5ce2b9388ea5c45a Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Wed, 11 Dec 2024 14:16:51 +0300 Subject: [PATCH 6/6] CC-34963: Updated constraints. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ac83a23..86a301f 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "proprietary", "require": { "php": ">=8.2", - "spryker-eco/open-ai": "^0.1.0", + "spryker-eco/open-ai": "^0.2.0", "spryker/category": "^5.0.0", "spryker/gui": "^3.45.0", "spryker/kernel": "^3.33.0",