Skip to content

Commit

Permalink
Merge pull request #25 from spryker-eco/bugfix/cc-32047-fix-locale-mo…
Browse files Browse the repository at this point in the history
…dule-dependency

CC-32047 Fix Middleware connector
  • Loading branch information
spryker-release-bot authored Dec 8, 2023
2 parents 200cb43 + 1c605eb commit 33c8130
Show file tree
Hide file tree
Showing 16 changed files with 1,452 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*.mo binary
*.pdf binary
*.xsd binary
*.ts binary
*.exe binary

# Remove files for archives generated using `git archive`
codeception.yml export-ignore
architecture-baseline.json export-ignore
dependency.json export-ignore
phpstan.json export-ignore
phpstan.neon export-ignore
psalm-report.json export-ignore linguist-generated=true
tooling.yml export-ignore
.coveralls.yml export-ignore
.travis.yml export-ignore
Expand Down
126 changes: 126 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: CI

env:
APPLICATION_ENV: 'development'
APPLICATION_STORE: 'DE'
PROJECT: 'Akeneo PIM Middleware Connector'
DATABASE_VERSION: 10.2
DATABASE_HOST: 127.0.0.1
DATABASE_PORT: 3306
DATABASE_NAME: eu-docker
DATABASE_USERNAME: root
DATABASE_PASSWORD: secret
DATABASE_ROOT_PASSWORD: secret
DATABASE_ALLOW_EMPTY_PASSWORD: false
DATABASE_CHARACTER_SET: utf8
DATABASE_COLLATE: utf8_general_ci

on:
pull_request:
push:
branches:
- 'master'
workflow_dispatch:

jobs:
setup:
name: Setup Database MariaDB
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: getong/[email protected]
with:
host port: ${{ env.DATABASE_PORT }}
container port: ${{ env.DATABASE_PORT }}
character set server: ${{ env.DATABASE_CHARACTER_SET }}
collation server: ${{ env.DATABASE_COLLATE }}
mariadb version: ${{ env.DATABASE_VERSION }}
mysql database: ${{ env.DATABASE_NAME }}
mysql root password: ${{ env.DATABASE_ROOT_PASSWORD }}
mysql user: ${{ env.DATABASE_USERNAME }}
mysql password: ${{ env.DATABASE_PASSWORD }}

ci:
name: Akeneo PIM Middleware Connector (PHP ${{ matrix.php-versions }})
needs: setup
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
php-versions:
- '7.2'
- '8.2'

services:
mariadb:
image: mariadb:10.2
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: eu-docker
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout@v2
uses: actions/checkout@v2

- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, bcmath, pdo_mysql

- name: Get composer cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php-versions }}-composer-

- name: Composer validate
run: composer validate

- name: Composer version
run: composer --version

- name: Composer install
run: composer install --prefer-dist --no-interaction --optimize-autoloader

- name: PHP syntax validation
run: find ./src -path src -prune -o -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )

lowest:
name: Akeneo PIM Middleware Connector Prefer Lowest (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
extensions: mbstring, intl, bcmath, pdo_mysql

- name: Composer Install
run: composer install --prefer-dist --no-interaction --profile

- name: Composer Update
run: composer update --prefer-lowest --prefer-dist --no-interaction --profile -vvv

- name: Prefer lowest installation
run: composer require --dev dereuromark/composer-prefer-lowest;

- name: PHP syntax validation
run: find ./src -path src -prune -o -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )

- name: Prefer lowest validation
run: vendor/bin/validate-prefer-lowest -m
4 changes: 4 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ build:
override:
- true # disable test execution on scrutinizer

dependencies:
override:
- composer self-update

nodes:
analysis:
tests:
Expand Down
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# AkeneoPimMiddlewareConnector Module

[![Build Status](https://travis-ci.org/spryker-eco/akeneo-pim-middleware-connector.svg?branch=master)](https://travis-ci.org/spryker-eco/akeneo-pim-middleware-connector)
[![CI](https://github.com/spryker-eco/akeneo-pim-middleware-connector/actions/workflows/ci.yml/badge.svg)](https://github.com/spryker-eco/akeneo-pim-middleware-connector/actions/workflows/ci.yml)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spryker-eco/akeneo-pim-middleware-connector/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spryker-eco/akeneo-pim-middleware-connector/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/spryker-eco/akeneo-pim-middleware-connector/badges/build.png?b=master)](https://scrutinizer-ci.com/g/spryker-eco/akeneo-pim-middleware-connector/build-status/master)
[![Latest Stable Version](https://poser.pugx.org/spryker-eco/akeneo-pim-middleware-connector/v/stable.svg)](https://packagist.org/packages/spryker-eco/akeneo-pim-middleware-connector)
[![License](https://img.shields.io/github/license/spryker-eco/akeneo-pim-middleware-connector.svg?b=master)](https://github.com/spryker-eco/akeneo-pim-middleware-connector)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg)](https://php.net/)

## Installation

Expand All @@ -12,4 +15,4 @@ composer require spryker-eco/akeneo-pim-middleware-connector

## Documentation

[Module Documentation](https://documentation.spryker.com/industry_partners/performance/akeneo/akeneo.htm)
[Spryker Documentation](https://docs.spryker.com)
65 changes: 65 additions & 0 deletions architecture-baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Facade/AkeneoPimMiddlewareConnectorToProductFacadeBridge.php",
"description": "Bridges: Method `findProductAbstractIdBySku()` must have `public function get<DomainEntity>Collection(<DomainEntity>CriteriaTransfer): <DomainEntity>CollectionTransfer` signature.",
"rule": "BridgeFacadeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `pageSize` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllProducts()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `pageSize` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllCategories()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `pageSize` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllAttributes()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `pageSize` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllFamilies()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `attributeCode` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllAttributeOptions()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `pageSize` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllAttributeOptions()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge.php",
"description": "Bridges: Type should be defined for param `pageSize` in method `SprykerEco\\Zed\\AkeneoPimMiddlewareConnector\\Dependency\\Service\\AkeneoPimMiddlewareConnectorToAkeneoPimServiceBridge::getAllProductModels()`.",
"rule": "BridgeMethodsRule",
"ruleset": "Spryker",
"priority": "2"
},
{
"fileName": "src/SprykerEco/Zed/AkeneoPimMiddlewareConnector/Dependency/Service/AkeneoPimMiddlewareConnectorToAkeneoPimServiceInterface.php",
"description": "Bridges: The bridge interface has incorrect method signature for `getFamilyVariants()`. Method does not exist in parent. That violates the rule \"All bridge interface methods must have exactly the same or more strict signature as their parent\"",
"rule": "BridgeMethodsInterfaceRule",
"ruleset": "Spryker",
"priority": "2"
}
]
10 changes: 5 additions & 5 deletions codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ include:
- tests/SprykerEcoTest/Zed/AkeneoPimMiddlewareConnector

paths:
tests: tests
tests: tests/
output: tests/_output/
data: tests/_data/
support: .
log: tests/_output
data: tests/_data
envs: tests/_envs
envs: tests/_envs/

settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
suite_class: \PHPUnit\Framework\TestSuite
colors: true
memory_limit: 1024M
log: true
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "proprietary",
"require": {
"php": ">=7.2",
"spryker/kernel": "^3.0.0",
"spryker/locale": "^3.0.0",
"spryker/kernel": "^3.30.0",
"spryker/locale": "^3.0.0 || ^4.0.0",
"spryker/tax": "^5.0.0",
"spryker-eco/akeneo-pim": "^2.0.0",
"spryker-middleware/process": "^1.0.0",
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
parameters:
level: 7
checkMissingIterableValueType: false
Loading

0 comments on commit 33c8130

Please sign in to comment.