diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index fcfafed..5195f3d 100755 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,45 +1,23 @@ name: Lint PHP files -on: [push, pull_request] +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: + php-74: runs-on: ubuntu-latest steps: - - uses: StephaneBour/actions-php-lint@7.3 - with: - dir: './' + - uses: prestashop/github-action-php-lint/7.4@v2.2 - php-74: + php-81: runs-on: ubuntu-latest steps: - - uses: StephaneBour/actions-php-lint@7.4 - with: - dir: './' + - uses: prestashop/github-action-php-lint/8.1@v2.2 - php-80: + php-82: runs-on: ubuntu-latest steps: - - uses: StephaneBour/actions-php-lint@8.0 - with: - dir: './' + - uses: prestashop/github-action-php-lint/8.2@v2.2 - php-81: + php-83: runs-on: ubuntu-latest steps: - - uses: StephaneBour/actions-php-lint@8.1 - with: - dir: './' + - uses: prestashop/github-action-php-lint/8.3@v2.2 \ No newline at end of file diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 5394d97..28aea8c 100755 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -1,12 +1,14 @@ name: phpstan -on: pull_request +on: [ pull_request ] jobs: build: strategy: matrix: - PHP_VERSION: [php74-fpm] - MAGENTO_VERSION: [2.4.2] + include: + - PHP_VERSION: php83-fpm + MAGENTO_VERSION: 2.4.7 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -14,11 +16,17 @@ jobs: - 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: Install the extensions in Magento - run: docker exec magento-project-community-edition composer require magmodules/magento2-messagebird:@dev fooman/phpstan-magento2-magic-methods:^0.7 + run: docker exec magento-project-community-edition composer require magmodules/magento2-messagebird:@dev --no-plugins + + - name: Activate the extension + run: docker exec magento-project-community-edition ./retry "php bin/magento module:enable Magmodules_MessageBird && php bin/magento setup:upgrade && php bin/magento setup:di:compile" - name: Run PHPStan - run: docker exec magento-project-community-edition /bin/bash -c "./vendor/bin/phpstan analyse -c /data/extensions/*/phpstan.neon /data/extensions" \ No newline at end of file + run: docker exec magento-project-community-edition /bin/bash -c "./vendor/bin/phpstan analyse --no-progress -c /data/extensions/*/phpstan.neon /data/extensions" \ No newline at end of file diff --git a/.github/workflows/setup-di-compile.yml b/.github/workflows/setup-di-compile.yml index 8956a29..59e0e02 100755 --- a/.github/workflows/setup-di-compile.yml +++ b/.github/workflows/setup-di-compile.yml @@ -1,17 +1,19 @@ -name: setup:di:compile -on: pull_request +name: Run setup:upgrade and setup:di:compile +on: [pull_request] jobs: build: strategy: matrix: include: - - PHP_VERSION: php71-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 + MAGENTO_VERSION: 2.4.0 + - PHP_VERSION: php81-fpm + MAGENTO_VERSION: 2.4.4 + - PHP_VERSION: php82-fpm + MAGENTO_VERSION: 2.4.6 + - PHP_VERSION: php83-fpm + MAGENTO_VERSION: 2.4.7 runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -19,11 +21,14 @@ jobs: - 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: Upload our code into the docker container + - 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 the 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 magmodules/magento2-messagebird:@dev + run: docker exec magento-project-community-edition composer require magmodules/magento2-messagebird:@dev --no-plugins - name: Run setup:di:compile - run: docker exec magento-project-community-edition php bin/magento setup:di:compile \ No newline at end of file + run: docker exec magento-project-community-edition ./retry "php bin/magento setup:di:compile" \ No newline at end of file diff --git a/composer.json b/composer.json index 6394b51..32db6f5 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magmodules/magento2-messagebird", "description": "MessageBird integration for Magento 2", "type": "magento2-module", - "version": "1.1.0", + "version": "1.1.1", "require": { "magento/framework": ">=100.1.0", "messagebird/php-rest-api": ">=1.20", diff --git a/etc/config.xml b/etc/config.xml index a2e5c28..197e59e 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -8,7 +8,7 @@ - v1.1.0 + v1.1.1 We successfully received your order with ID #{{order_id}} and awaiting your payment. diff --git a/etc/db_schema_whitelist.json b/etc/db_schema_whitelist.json new file mode 100644 index 0000000..637f8fc --- /dev/null +++ b/etc/db_schema_whitelist.json @@ -0,0 +1,17 @@ +{ + "messagebird_log": { + "column": { + "entity_id": true, + "increment_id": true, + "firstname": true, + "lastname": true, + "email": true, + "status": true, + "type": true, + "created_at": true + }, + "constraint": { + "PRIMARY": true + } + } +} \ No newline at end of file diff --git a/etc/module.xml b/etc/module.xml index 3c6f581..ecf8cc0 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -5,7 +5,16 @@ * See COPYING.txt for license details. */ --> - - + + + + + + + + + + + + diff --git a/view/adminhtml/layout/default.xml b/view/adminhtml/layout/default.xml deleted file mode 100755 index 5bcf56d..0000000 --- a/view/adminhtml/layout/default.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -