From b4f1beab2cde7b337164ad804023af247c2c46bf Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Tue, 2 Jul 2024 19:10:04 +0200 Subject: [PATCH 1/5] Update plugin to be compatible with Sylius 1.13 --- .github/workflows/recipe.yaml | 157 ++++++++++++++++---------------- .github/workflows/security.yaml | 72 +++++++-------- .github/workflows/tests.yaml | 101 ++++++++++---------- .php-cs-fixer.dist.php | 12 ++- .php-version.dist | 2 +- Makefile | 46 +++------- README.md | 19 +++- composer.json | 65 ++++--------- phpstan.neon | 6 +- 9 files changed, 230 insertions(+), 250 deletions(-) diff --git a/.github/workflows/recipe.yaml b/.github/workflows/recipe.yaml index b50aede..7f07e73 100644 --- a/.github/workflows/recipe.yaml +++ b/.github/workflows/recipe.yaml @@ -1,82 +1,87 @@ name: Flex Recipe on: - push: - branches: [ master ] - pull_request: + push: + branches: [ master ] + pull_request: jobs: - recipe: - - name: Flex recipe (PHP ${{ matrix.php }}, Sylius ${{ matrix.sylius }}) - - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php: ['8.1'] - sylius: ["~1.12.0"] - - steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: gd, intl, json - ini-values: date.timezone=UTC - tools: symfony-cli - - - name: Set project php-version - run: | - echo ${{ matrix.php }} > .php-version - - - uses: actions/checkout@v3 - with: - path: plugin - - - name: Determine composer cache directory - id: composer-cache-directory - working-directory: plugin - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - id: cache-composer - with: - path: ${{ steps.composer-cache-directory.outputs.directory }} - key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }} - restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}- - - - name: Ensure that composer cache directory exists - run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} - - - name: Composer Github Auth - run: composer config -g github-oauth.github.com ${{ github.token }} - - - name: Create Sylius-Standard project without install - run: | - composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}" - - # Because the sylius-standard has a soft constraint - - name: Make sure to install the required version of Sylius - working-directory: ./sylius - run: | - composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}" - - - name: Setup some requirements - working-directory: ./sylius - run: | - composer config --no-plugins allow-plugins true - composer config --no-plugins extra.symfony.allow-contrib true - composer config --no-plugins secure-http false - composer config --no-plugins --unset platform.php - composer config --no-plugins extra.symfony.docker false - composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]' - composer config repositories.plugin '{"type": "path", "url": "../plugin/"}' - - - name: Require plugin & install all dependencies - working-directory: ./sylius - run: | - composer require monsieurbiz/sylius-plus-adapter-plugin="*@dev" + recipe: + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php: ['8.0', '8.1', '8.2'] + sylius: ["~1.11.0", "~1.12.0", "~1.13.0"] + exclude: + - php: '8.2' + sylius: '~1.11.0' + - php: '8.0' + sylius: '~1.12.0' + - php: '8.0' + sylius: '~1.13.0' + + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: gd, intl, json + ini-values: date.timezone=UTC + tools: symfony-cli + + - name: Set project php-version + run: | + echo ${{ matrix.php }} > .php-version + + - uses: actions/checkout@v3 + with: + path: plugin + + - name: Determine composer cache directory + id: composer-cache-directory + working-directory: plugin + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies installed with composer + uses: actions/cache@v3 + id: cache-composer + with: + path: ${{ steps.composer-cache-directory.outputs.directory }} + key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }} + restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}- + + - name: Ensure that composer cache directory exists + run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} + + - name: Composer Github Auth + run: composer config -g github-oauth.github.com ${{ github.token }} + + - name: Create Sylius-Standard project without install + run: | + composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}" + + # Because the sylius-standard has a soft constraint + - name: Make sure to install the required version of Sylius + working-directory: ./sylius + run: | + composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}" + + - name: Setup some requirements + working-directory: ./sylius + run: | + composer config --no-plugins allow-plugins true + composer config --no-plugins extra.symfony.allow-contrib true + composer config --no-plugins secure-http false + composer config --no-plugins --unset platform.php + composer config --no-plugins extra.symfony.docker false + composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]' + composer config repositories.plugin '{"type": "path", "url": "../plugin/"}' + + - name: Require plugin & install all dependencies + working-directory: ./sylius + run: | + composer require monsieurbiz/sylius-plus-adapter-plugin="*@dev" diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 0311b09..c100cfa 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -1,55 +1,53 @@ name: Security on: - push: - pull_request: + push: + pull_request: jobs: - security: + security: - name: Security check (PHP ${{ matrix.php }}) + runs-on: ubuntu-latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['8.1', '8.2'] - strategy: - fail-fast: false - matrix: - php: ['8.1'] + steps: + - uses: actions/checkout@v3 - steps: - - uses: actions/checkout@v3 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: gd, intl, json - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: gd, intl, json - ini-values: date.timezone=UTC + - name: Set project php-version + run: | + echo "${{ matrix.php }}" > .php-version - - name: Set project php-version - run: | - echo ${{ matrix.php }} > .php-version + - name: Determine composer cache directory + id: composer-cache-directory + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - - name: Determine composer cache directory - id: composer-cache-directory - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: Cache dependencies installed with composer + uses: actions/cache@v3 + id: cache-composer + with: + path: ${{ steps.composer-cache-directory.outputs.directory }} + key: composer2-php:${{ matrix.php }}-${{ github.sha }} + restore-keys: composer2-php:${{ matrix.php }}- - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - id: cache-composer - with: - path: ${{ steps.composer-cache-directory.outputs.directory }} - key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }} - restore-keys: composer2-php:${{ matrix.php }}- - - name: Ensure that composer cache directory exists - run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} + - name: Ensure that composer cache directory exists + run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} - - name: Composer Github Auth - run: composer config -g github-oauth.github.com ${{ github.token }} + - name: Composer Github Auth + run: composer config -g github-oauth.github.com ${{ github.token }} - - name: Install PHP dependencies - run: composer update --prefer-dist + - name: Install PHP dependencies + run: composer update --prefer-dist - - uses: symfonycorp/security-checker-action@v4 + - uses: symfonycorp/security-checker-action@v4 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6c00389..6854a4d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,74 +1,75 @@ name: Tests on: - push: - branches: [ master ] - pull_request: + push: + branches: [ master ] + pull_request: jobs: - php: + php: - name: Quality tests (PHP ${{ matrix.php }}) + runs-on: ubuntu-latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['8.1', '8.2'] - strategy: - fail-fast: false - matrix: - php: ['8.1'] + env: + SYMFONY_ARGS: --no-tls + COMPOSER_ARGS: --prefer-dist + DOCKER_INTERACTIVE_ARGS: -t - env: - COMPOSER_ARGS: --prefer-dist - DOCKER_INTERACTIVE_ARGS: -t + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: gd, intl, json + ini-values: date.timezone=UTC + tools: symfony-cli - steps: - - uses: actions/checkout@v3 + - name: Set project php-version + run: | + echo "${{ matrix.php }}" > .php-version - - uses: actions/setup-node@v3 - with: - node-version: '16' + - name: Determine composer cache directory + id: composer-cache-directory + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: gd, intl, json - ini-values: date.timezone=UTC - tools: symfony-cli + - name: Cache dependencies installed with composer + uses: actions/cache@v3 + id: cache-composer + with: + path: ${{ steps.composer-cache-directory.outputs.directory }} + key: composer2-php:${{ matrix.php }}-${{ github.sha }} + restore-keys: composer2-php:${{ matrix.php }}- - - name: Set project php-version - run: | - echo ${{ matrix.php }} > .php-version + - name: Ensure that composer cache directory exists + run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} - - name: Determine composer cache directory - id: composer-cache-directory - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: Composer Github Auth + run: composer config -g github-oauth.github.com ${{ github.token }} - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - id: cache-composer - with: - path: ${{ steps.composer-cache-directory.outputs.directory }} - key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }} - restore-keys: composer2-php:${{ matrix.php }}- + - run: make install - - name: Ensure that composer cache directory exists - run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }} + - run: make test.composer - - name: Composer Github Auth - run: composer config -g github-oauth.github.com ${{ github.token }} + - run: make test.phpcs - - run: make install + - run: make test.phpstan - - run: make test.composer + - run: make test.phpmd - - run: make test.phpcs + - run: make test.yaml - - run: make test.phpstan + - run: make test.twig - - run: make test.phpmd + - run: make test.schema - - run: make test.yaml - - - run: make test.container + - run: make test.container diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 63907e0..09c47eb 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,18 +1,22 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ declare(strict_types=1); $header = <<<'HEADER' -This file is part of Monsieur Biz's for Sylius. +This file is part of Monsieur Biz' Sylius Plus Adapter plugin for Sylius. + (c) Monsieur Biz -For the full copyright and license information, please view the LICENSE + +For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code. HEADER; diff --git a/.php-version.dist b/.php-version.dist index b8eb026..2983cad 100644 --- a/.php-version.dist +++ b/.php-version.dist @@ -1 +1 @@ -8.1 +8.2 diff --git a/Makefile b/Makefile index 8f5959b..f891eb2 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,14 @@ .DEFAULT_GOAL := help SHELL=/bin/bash APP_DIR=tests/Application -SYLIUS_VERSION=1.12.0 +SYLIUS_VERSION=1.13.0 SYMFONY=cd ${APP_DIR} && symfony COMPOSER=symfony composer CONSOLE=${SYMFONY} console -export COMPOSE_PROJECT_NAME=sylius_plus_adapter_plugin +export COMPOSE_PROJECT_NAME=sylius-plus-adapter PLUGIN_NAME=sylius-plus-adapter-plugin COMPOSE=docker-compose YARN=yarn -DOCTRINE_MIGRATIONS_NAMESPACE=MonsieurBiz\SyliusPlusAdapterPlugin\Migrations - ### ### DEVELOPMENT @@ -77,15 +75,16 @@ setup_application: $(MAKE) ${APP_DIR}/.php-version $(MAKE) ${APP_DIR}/php.ini (cd ${APP_DIR} && ${COMPOSER} install --no-interaction) - (cd ${APP_DIR} && ${COMPOSER} require --no-progress monsieurbiz/sylius-cms-page-plugin) + $(MAKE) apply_dist (cd ${APP_DIR} && ${COMPOSER} require --no-progress monsieurbiz/${PLUGIN_NAME}="*@dev") - rm ${APP_DIR}/vendor/monsieurbiz/sylius-cms-page-plugin/src/DependencyInjection/MonsieurBizSyliusCmsPageExtension.php - cp dist/vendor/monsieurbiz/sylius-cms-page-plugin/src/DependencyInjection/MonsieurBizSyliusCmsPageExtension.php ${APP_DIR}/vendor/monsieurbiz/sylius-cms-page-plugin/src/DependencyInjection/MonsieurBizSyliusCmsPageExtension.php rm -rf ${APP_DIR}/var/cache + ${APP_DIR}/docker-compose.yaml: rm -f ${APP_DIR}/docker-compose.yml rm -f ${APP_DIR}/docker-compose.yaml + rm -f ${APP_DIR}/compose.yml # Remove Sylius file about Docker + rm -f ${APP_DIR}/compose.override.dist.yml # Remove Sylius file about Docker ln -s ../../docker-compose.yaml.dist ${APP_DIR}/docker-compose.yaml .PHONY: ${APP_DIR}/docker-compose.yaml @@ -110,7 +109,7 @@ apply_dist: ### TESTS ### ¯¯¯¯¯ -test.all: test.composer test.phpstan test.phpmd test.phpcs test.yaml test.container ## Run all tests in once +test.all: test.composer test.phpstan test.phpmd test.phpspec test.phpcs test.yaml test.schema test.twig test.container ## Run all tests in once test.composer: ## Validate composer.json ${COMPOSER} validate --strict @@ -121,6 +120,9 @@ test.phpstan: ## Run PHPStan test.phpmd: ## Run PHPMD ${COMPOSER} phpmd +test.phpspec: ## Run PHPSpec + ${COMPOSER} phpspec + test.phpcs: ## Run PHP CS Fixer in dry-run ${COMPOSER} run -- phpcs --dry-run -v @@ -131,19 +133,13 @@ test.container: ## Lint the symfony container ${CONSOLE} lint:container test.yaml: ## Lint the symfony Yaml files - ${CONSOLE} lint:yaml ../../src/Resources/config - -### -### MIGRATIONS -### ¯¯¯¯¯¯¯¯¯¯ + ${CONSOLE} lint:yaml ../../src/Resources/config --parse-tags -doctrine.migration.diff: ## Create a diff migration file for the plugin - ${CONSOLE} doctrine:migrations:diff --namespace="${DOCTRINE_MIGRATIONS_NAMESPACE}" -.PHONY: doctrine.migration.diff +test.schema: ## Validate MySQL Schema + ${CONSOLE} doctrine:schema:validate -doctrine.migration.migrate: ## Run migrations - ${CONSOLE} doctrine:migration:migrate -n -.PHONY: doctrine.migration.migrate +test.twig: ## Validate Twig templates + ${CONSOLE} lint:twig --no-debug templates/ ### ### SYLIUS @@ -205,18 +201,6 @@ server.start: ## Run the local webserver using Symfony server.stop: ## Stop the local webserver ${SYMFONY} local:server:stop -### -### GITHUB CODESPACES -### ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ - -codespace.hostname: ${APP_DIR}/.env.local ## Init the SYLIUS_FIXTURES_HOSTNAME variable in .env.local -ifdef CODESPACES - echo SYLIUS_FIXTURES_HOSTNAME=${CODESPACE_NAME}-8000.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} >> ${APP_DIR}/.env.local -endif - -${APP_DIR}/.env.local: - touch ${APP_DIR}/.env.local - ### ### HELP ### ¯¯¯¯ diff --git a/README.md b/README.md index 8e65055..afef667 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,26 @@ -# Sylius Plus Adapter Plugin +

Sylius Plus Adapter Plugin

+ +[![Menu Plugin license](https://img.shields.io/github/license/monsieurbiz/SyliusPlusAdapterPlugin?public)](https://github.com/monsieurbiz/SyliusPlusAdapterPlugin/blob/master/LICENSE.txt) +[![Tests Status](https://img.shields.io/github/actions/workflow/status/monsieurbiz/SyliusPlusAdapterPlugin/tests.yaml?branch=master&logo=github)](https://github.com/monsieurbiz/SyliusPlusAdapterPlugin/actions?query=workflow%3ATests) +[![Recipe Status](https://img.shields.io/github/actions/workflow/status/monsieurbiz/SyliusPlusAdapterPlugin/recipe.yaml?branch=master&label=recipes&logo=github)](https://github.com/monsieurbiz/SyliusPlusAdapterPlugin/actions?query=workflow%3ASecurity) +[![Security Status](https://img.shields.io/github/actions/workflow/status/monsieurbiz/SyliusPlusAdapterPlugin/security.yaml?branch=master&label=security&logo=github)](https://github.com/monsieurbiz/SyliusPlusAdapterPlugin/actions?query=workflow%3ASecurity) This plugin offer tools to adapt your plugins to Sylius Plus RBAC system. -There is no point in installing this plugin directly on Sylius Plus app at this time. +## Compatibility + +| Sylius Version | PHP Version | +|---|---| +| 1.11 | 8.0 - 8.1 | +| 1.12 | 8.1 - 8.2 | +| 1.13 | 8.1 - 8.2 | ## Installation +```bash +composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]' +``` + ```bash composer require monsieurbiz/sylius-plus-adapter-plugin ``` diff --git a/composer.json b/composer.json index 5e8fee8..5a79f56 100644 --- a/composer.json +++ b/composer.json @@ -1,44 +1,21 @@ { "name": "monsieurbiz/sylius-plus-adapter-plugin", "type": "sylius-plugin", - "keywords": ["sylius", "sylius-plugin"], - "description": "", + "keywords": ["sylius", "sylius-plugin", "monsieurbiz"], + "description": "This plugin offer tools to adapt your plugins to Sylius Plus RBAC system.", "license": "MIT", "require": { - "php": "~7.4|~8.0", - "sylius/sylius": ">=1.8 <1.13" + "php": "^8.0", + "sylius/sylius": ">=1.11 <1.14" }, "require-dev": { - "behat/behat": "^3.6.1", - "behat/mink-selenium2-driver": "^1.4", - "dmore/behat-chrome-extension": "^1.3", - "dmore/chrome-mink-driver": "^2.7", - "friends-of-behat/mink": "^1.8", - "friends-of-behat/mink-browserkit-driver": "^1.4", - "friends-of-behat/mink-debug-extension": "^2.0.0", - "friends-of-behat/mink-extension": "^2.4", - "friends-of-behat/page-object-extension": "^0.3", - "friends-of-behat/suite-settings-extension": "^1.0", - "friends-of-behat/symfony-extension": "^2.1", - "friends-of-behat/variadic-extension": "^1.3", - "phpspec/phpspec": "^7.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.8.1", - "phpstan/phpstan-doctrine": "1.3.40", - "phpstan/phpstan-strict-rules": "^1.3.0", - "phpstan/phpstan-webmozart-assert": "^1.2.0", - "phpunit/phpunit": "^9.5", - "polishsymfonycommunity/symfony-mocker-container": "^1.0", - "sylius-labs/coding-standard": "^4.2", - "symfony/browser-kit": "^5.4 || ^6.0", - "symfony/debug-bundle": "^5.4 || ^6.0", - "symfony/dotenv": "^5.4 || ^6.0", - "symfony/flex": "^2.2.2", - "symfony/intl": "^5.4 || ^6.0", - "symfony/web-profiler-bundle": "^5.4 || ^6.0", - "vimeo/psalm": "5.12.0", - "phpmd/phpmd": "^2.15", - "friendsofphp/php-cs-fixer": "^3.52" + "friendsofphp/php-cs-fixer": "^3.16", + "phpspec/phpspec": "^7.0", + "phpstan/phpstan": "^1.8.4", + "phpstan/phpstan-doctrine": "^1.3.2", + "phpstan/phpstan-webmozart-assert": "^1.1", + "phpunit/phpunit": "^10.5", + "phpmd/phpmd": "^2.15" }, "prefer-stable": true, "autoload": { @@ -51,32 +28,28 @@ "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, - "phpcs": "php-cs-fixer fix --using-cache=no", + "phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --using-cache=no", "phpstan": "phpstan analyse -c phpstan.neon src/", "phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml", "phpunit": "phpunit", "phpspec": "phpspec run" }, "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + }, "symfony": { "docker": false, - "endpoint": [ - "https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master", - "flex://defaults" - ] - }, - "branch-alias": { - "dev-master": "1.0-dev" + "endpoint": ["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master", "flex://defaults"] } }, "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, "symfony/thanks": true, - "ergebnis/composer-normalize": true, "symfony/flex": true, - "php-http/discovery": false, - "phpstan/extension-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true, + "php-http/discovery": true } } } diff --git a/phpstan.neon b/phpstan.neon index 14d0861..f69c6c9 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,12 +3,12 @@ parameters: paths: - %rootDir%/src/ - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false - excludePaths: # Makes PHPStan crash - 'src/DependencyInjection/SyliusPlusAdapterExtension.php' # Test dependencies - 'tests/Application/**/*' + + ignoreErrors: + - identifier: missingType.iterableValue From afb0192d2a485d5b3ce4723a54515505ef3787cc Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Tue, 2 Jul 2024 19:12:28 +0200 Subject: [PATCH 2/5] Fix PHP CS --- .../MonsieurBizSyliusPlusAdapterExtension.php | 6 ++++-- src/DependencyInjection/SyliusPlusCompatibilityTrait.php | 6 ++++-- src/Doctrine/ORM/ChannelRestrictionQueryBuilder.php | 6 ++++-- .../ORM/ChannelRestrictionQueryBuilderInterface.php | 6 ++++-- src/Form/Extension/FilteredChannelChoiceTypeExtension.php | 6 ++++-- src/MonsieurBizSyliusPlusAdapterPlugin.php | 6 ++++-- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/DependencyInjection/MonsieurBizSyliusPlusAdapterExtension.php b/src/DependencyInjection/MonsieurBizSyliusPlusAdapterExtension.php index 761c48b..e6e8f88 100644 --- a/src/DependencyInjection/MonsieurBizSyliusPlusAdapterExtension.php +++ b/src/DependencyInjection/MonsieurBizSyliusPlusAdapterExtension.php @@ -1,9 +1,11 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ diff --git a/src/DependencyInjection/SyliusPlusCompatibilityTrait.php b/src/DependencyInjection/SyliusPlusCompatibilityTrait.php index 754ea1b..04c8c87 100644 --- a/src/DependencyInjection/SyliusPlusCompatibilityTrait.php +++ b/src/DependencyInjection/SyliusPlusCompatibilityTrait.php @@ -1,9 +1,11 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ diff --git a/src/Doctrine/ORM/ChannelRestrictionQueryBuilder.php b/src/Doctrine/ORM/ChannelRestrictionQueryBuilder.php index 0a006d8..988e7f6 100644 --- a/src/Doctrine/ORM/ChannelRestrictionQueryBuilder.php +++ b/src/Doctrine/ORM/ChannelRestrictionQueryBuilder.php @@ -1,9 +1,11 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ diff --git a/src/Doctrine/ORM/ChannelRestrictionQueryBuilderInterface.php b/src/Doctrine/ORM/ChannelRestrictionQueryBuilderInterface.php index 64ad988..1129bb5 100644 --- a/src/Doctrine/ORM/ChannelRestrictionQueryBuilderInterface.php +++ b/src/Doctrine/ORM/ChannelRestrictionQueryBuilderInterface.php @@ -1,9 +1,11 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ diff --git a/src/Form/Extension/FilteredChannelChoiceTypeExtension.php b/src/Form/Extension/FilteredChannelChoiceTypeExtension.php index c96322f..845a7f8 100644 --- a/src/Form/Extension/FilteredChannelChoiceTypeExtension.php +++ b/src/Form/Extension/FilteredChannelChoiceTypeExtension.php @@ -1,9 +1,11 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ diff --git a/src/MonsieurBizSyliusPlusAdapterPlugin.php b/src/MonsieurBizSyliusPlusAdapterPlugin.php index 869fc40..28cb6d0 100644 --- a/src/MonsieurBizSyliusPlusAdapterPlugin.php +++ b/src/MonsieurBizSyliusPlusAdapterPlugin.php @@ -1,9 +1,11 @@ - * For the full copyright and license information, please view the LICENSE + * + * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ From e344e7ac352c596e06c01905eec5a5c3d4faee77 Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Wed, 3 Jul 2024 09:21:52 +0200 Subject: [PATCH 3/5] Remove PHP_CS_FIXER_IGNORE_ENV from composer json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5a79f56..6fe286f 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, - "phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --using-cache=no", + "phpcs": "php-cs-fixer fix --using-cache=no", "phpstan": "phpstan analyse -c phpstan.neon src/", "phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml", "phpunit": "phpunit", From 619ceca901e7e42780a9263b97d060a939cfd4e5 Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Wed, 3 Jul 2024 09:22:09 +0200 Subject: [PATCH 4/5] Rename LICENSE to LICENSE.txt --- LICENSE => LICENSE.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => LICENSE.txt (100%) diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt From bcaa31816d29725734a6e79fc0de3d317354ea67 Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Wed, 3 Jul 2024 09:22:23 +0200 Subject: [PATCH 5/5] Remove dev container from now --- .devcontainer/devcontainer.json | 55 --------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 085171a..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,55 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker -{ - "name": "Sylius Plus Adapter Plugin", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "version": "latest", - "enableNonRootDocker": "true", - "moby": "false" - }, - "ghcr.io/devcontainers/features/github-cli:1": { - "installDirectlyFromGitHubRelease": true, - "version": "latest" - }, - "ghcr.io/devcontainers/features/node:1": { - "nodeGypDependencies": true, - "version": "14", - "nvmVersion": "latest" - }, - "ghcr.io/shyim/devcontainers-features/php:0": { - "installComposer": true, - "version": "8.1" - }, - "ghcr.io/shyim/devcontainers-features/symfony-cli:0": {} - }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [ - 8000 - ], - "portsAttributes": { - "8000": { - "label": "Sylius Test Application" - } - }, - // Use 'postCreateCommand' to run commands after the container is created. - "onCreateCommand": "make dependencies application codespace.hostname docker.pull install stop", - "postStartCommand": "make up", - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-vscode.makefile-tools", - "TheNouillet.symfony-vscode", - "xdebug.php-debug", - "eamodio.gitlens" - ] - } - } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} -