Skip to content

Commit

Permalink
Merge pull request #29 from Datatrics/release/1.6.0
Browse files Browse the repository at this point in the history
Release/1.6.0
  • Loading branch information
Marvin-Magmodules authored Mar 14, 2022
2 parents 7fe49c2 + 6c3dfbc commit 4a513d6
Show file tree
Hide file tree
Showing 80 changed files with 503 additions and 359 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/codesniffer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Codesniffer with the Magento Coding standard
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Run codesniffer
run: docker run --rm --volume $(pwd)/:/app/data michielgerritsen/magento-coding-standard:latest
- name: Run codesniffer
run:
docker run
--volume $(pwd)/:/app/workdir
michielgerritsen/magento-coding-standard:latest
--severity=6
45 changes: 45 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Lint PHP files
on: [push, pull_request]

jobs:
php-71:
runs-on: ubuntu-latest
steps:
- uses: StephaneBour/actions-php-lint@7.1
with:
dir: './'

php-72:
runs-on: ubuntu-latest
steps:
- uses: StephaneBour/actions-php-lint@7.2
with:
dir: './'

php-73:
runs-on: ubuntu-latest
steps:
- uses: StephaneBour/actions-php-lint@7.3
with:
dir: './'

php-74:
runs-on: ubuntu-latest
steps:
- uses: StephaneBour/actions-php-lint@7.4
with:
dir: './'

php-80:
runs-on: ubuntu-latest
steps:
- uses: StephaneBour/actions-php-lint@8.0
with:
dir: './'

php-81:
runs-on: ubuntu-latest
steps:
- uses: StephaneBour/actions-php-lint@8.1
with:
dir: './'
50 changes: 25 additions & 25 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: phpstan

on: pull_request
on: [pull_request]

jobs:
build:
strategy:
matrix:
PHP_VERSION: [php72-fpm, php73-fpm, php74-fpm]
MAGENTO_VERSION: [2.3.5-p1, 2.4.0]
exclude:
- PHP_VERSION: php73-fpm
MAGENTO_VERSION: 2.3.5-p1
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.3.5-p1
- PHP_VERSION: php72-fpm
MAGENTO_VERSION: 2.4.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
build:
strategy:
matrix:
include:
- PHP_VERSION: php72-fpm
MAGENTO_VERSION: 2.3.3
- PHP_VERSION: php73-fpm
MAGENTO_VERSION: 2.3.6-p1
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Start Docker
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}

- name: Start Docker
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}
- name: Create branch for Composer and remove version from composer.json
run: git checkout -b continuous-integration-test-branch && sed -i '/version/d' ./composer.json

- name: Upload our code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/
- name: Upload our code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/

- name: Install the extensions in Magento
run: docker exec magento-project-community-edition composer require datatrics/magento2-integration:@dev fooman/phpstan-magento2-magic-methods:^0.7
- name: Install the extensions in Magento
run: docker exec magento-project-community-edition composer require datatrics/magento2-integration:dev-continuous-integration-test-branch fooman/phpstan-magento2-magic-methods:^0.7 phpstan/phpstan:0.*

- name: Run PHPStan
run: docker exec magento-project-community-edition /bin/bash -c "./vendor/bin/phpstan analyse -c /data/extensions/*/phpstan.neon /data/extensions"
- name: Run PHPStan
run: docker exec magento-project-community-edition /bin/bash -c "./vendor/bin/phpstan analyse -c /data/extensions/*/phpstan.neon /data/extensions"
50 changes: 25 additions & 25 deletions .github/workflows/setup-di-compile.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: setup:di:compile

on: pull_request
on: [pull_request]

jobs:
build:
strategy:
matrix:
PHP_VERSION: [php72-fpm, php73-fpm, php74-fpm]
MAGENTO_VERSION: [2.3.5-p1, 2.4.0]
exclude:
- PHP_VERSION: php73-fpm
MAGENTO_VERSION: 2.3.5-p1
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.3.5-p1
- PHP_VERSION: php72-fpm
MAGENTO_VERSION: 2.4.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
build:
strategy:
matrix:
include:
- PHP_VERSION: php72-fpm
MAGENTO_VERSION: 2.3.3
- PHP_VERSION: php73-fpm
MAGENTO_VERSION: 2.3.6-p1
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Start Docker
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}

- name: Start Docker
run: docker run --detach --name magento-project-community-edition michielgerritsen/magento-project-community-edition:${{ matrix.PHP_VERSION }}-magento${{ matrix.MAGENTO_VERSION }}
- name: Create branch for Composer and remove version from composer.json
run: git checkout -b continuous-integration-test-branch && sed -i '/version/d' ./composer.json

- name: Upload our code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/
- name: Upload our code into the docker container
run: docker cp $(pwd) magento-project-community-edition:/data/extensions/

- name: Install the extension in Magento
run: docker exec magento-project-community-edition composer require datatrics/magento2-integration:@dev
- name: Install the extension in Magento
run: docker exec magento-project-community-edition composer require datatrics/magento2-integration:dev-continuous-integration-test-branch

- name: Run setup:di:compile
run: docker exec magento-project-community-edition php bin/magento setup:di:compile
- name: Run setup:di:compile
run: docker exec magento-project-community-edition php bin/magento setup:di:compile
2 changes: 1 addition & 1 deletion Api/API/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface AdapterInterface extends ContentInterface
/**
* General API URL
*/
const GENERAL_URL = 'https://api.datatrics.com/2.0/project/%s/%s';
public const GENERAL_URL = 'https://api.datatrics.com/2.0/project/%s/%s';

/**
* @param array $method
Expand Down
14 changes: 7 additions & 7 deletions Api/API/ContentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const GET_CONTENT = [
public const GET_CONTENT = [
'key' => 'content',
'method' => 'GET',
'require' => []
Expand All @@ -25,7 +25,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const GET_CONTENTS = [
public const GET_CONTENTS = [
'key' => 'content/%s',
'method' => 'GET',
'require' => ['id']
Expand All @@ -34,7 +34,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const CREATE_CONTENT = [
public const CREATE_CONTENT = [
'key' => 'content?type=item',
'method' => 'POST',
'require' => ['data']
Expand All @@ -43,7 +43,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const BULK_CREATE_CONTENT = [
public const BULK_CREATE_CONTENT = [
'key' => 'content/bulk?type=items',
'method' => 'POST',
'require' => ['data']
Expand All @@ -52,7 +52,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const BULK_CREATE_CATEGORIES = [
public const BULK_CREATE_CATEGORIES = [
'key' => 'content/bulk?type=categories',
'method' => 'POST',
'require' => ['data']
Expand All @@ -61,7 +61,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const UPDATE_CONTENT = [
public const UPDATE_CONTENT = [
'key' => 'content/%s',
'method' => 'PUT',
'require' => ['id', 'data']
Expand All @@ -70,7 +70,7 @@ interface ContentInterface extends ConversionInterface
/**
* Method data
*/
const DELETE_CONTENT = [
public const DELETE_CONTENT = [
'key' => 'content/%s?type=item',
'method' => 'DELETE',
'require' => ['id']
Expand Down
8 changes: 4 additions & 4 deletions Api/API/ConversionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ConversionInterface extends InteractionInterface
/**
* Method data
*/
const GET_CONVERSIONS = [
public const GET_CONVERSIONS = [
'key' => 'sale',
'method' => 'GET',
'require' => []
Expand All @@ -25,7 +25,7 @@ interface ConversionInterface extends InteractionInterface
/**
* Method data
*/
const GET_CONVERSION = [
public const GET_CONVERSION = [
'key' => 'sale/%s',
'method' => 'GET',
'require' => ['id']
Expand All @@ -34,7 +34,7 @@ interface ConversionInterface extends InteractionInterface
/**
* Method data
*/
const CREATE_CONVERSION = [
public const CREATE_CONVERSION = [
'key' => 'sale',
'method' => 'POST',
'require' => ['data']
Expand All @@ -43,7 +43,7 @@ interface ConversionInterface extends InteractionInterface
/**
* Method data
*/
const BULK_CREATE_CONVERSION = [
public const BULK_CREATE_CONVERSION = [
'key' => 'sale/bulk',
'method' => 'POST',
'require' => ['data']
Expand Down
4 changes: 2 additions & 2 deletions Api/API/IntegrationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ interface IntegrationInterface
/**
* Integration API URL
*/
const TOKEN_URL = 'https://api-v3.datatrics.com/project/%s/%s/magmodules/connect';
public const TOKEN_URL = 'https://api-v3.datatrics.com/project/%s/%s/magmodules/connect';

/**
* Method data
*/
const CREATE_INTEGRATION = [
public const CREATE_INTEGRATION = [
'key' => 'integrations',
'method' => 'POST',
'require' => ['data']
Expand Down
8 changes: 4 additions & 4 deletions Api/API/InteractionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface InteractionInterface extends ProfileInterface
/**
* Method data
*/
const GET_INTERACTIONS = [
public const GET_INTERACTIONS = [
'key' => 'interaction',
'method' => 'GET',
'require' => []
Expand All @@ -25,7 +25,7 @@ interface InteractionInterface extends ProfileInterface
/**
* Method data
*/
const GET_INTERACTION = [
public const GET_INTERACTION = [
'key' => 'interaction/%s',
'method' => 'GET',
'require' => ['id']
Expand All @@ -34,7 +34,7 @@ interface InteractionInterface extends ProfileInterface
/**
* Method data
*/
const CREATE_INTERACTION = [
public const CREATE_INTERACTION = [
'key' => 'interaction',
'method' => 'POST',
'require' => ['data']
Expand All @@ -43,7 +43,7 @@ interface InteractionInterface extends ProfileInterface
/**
* Method data
*/
const BULK_CREATE_INTERACTION = [
public const BULK_CREATE_INTERACTION = [
'key' => 'interaction/bulk',
'method' => 'POST',
'require' => ['data']
Expand Down
10 changes: 5 additions & 5 deletions Api/API/ProfileInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ProfileInterface extends IntegrationInterface
/**
* Method data
*/
const GET_PROFILES = [
public const GET_PROFILES = [
'key' => 'profile',
'method' => 'GET',
'require' => []
Expand All @@ -25,7 +25,7 @@ interface ProfileInterface extends IntegrationInterface
/**
* Method data
*/
const GET_PROFILE = [
public const GET_PROFILE = [
'key' => 'profile/%s',
'method' => 'GET',
'require' => ['id']
Expand All @@ -34,7 +34,7 @@ interface ProfileInterface extends IntegrationInterface
/**
* Method data
*/
const CREATE_PROFILE = [
public const CREATE_PROFILE = [
'key' => 'profile',
'method' => 'POST',
'require' => ['data']
Expand All @@ -43,7 +43,7 @@ interface ProfileInterface extends IntegrationInterface
/**
* Method data
*/
const BULK_CREATE_PROFILE = [
public const BULK_CREATE_PROFILE = [
'key' => 'profile/bulk',
'method' => 'POST',
'require' => ['data']
Expand All @@ -52,7 +52,7 @@ interface ProfileInterface extends IntegrationInterface
/**
* Method data
*/
const UPDATE_PROFILE = [
public const UPDATE_PROFILE = [
'key' => 'profile/%s',
'method' => 'PUT',
'require' => ['id', 'data']
Expand Down
Loading

0 comments on commit 4a513d6

Please sign in to comment.