diff --git a/.drone.yml b/.drone.yml index 5ac9cb7..af15ac4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,8 +19,8 @@ services: - COMPOSERVER=--2 - DOCUMENT_ROOT=/test/oe_multilingual mysql: - image: git.fpfis.tech.ec.europa.eu/fpfis/dependency_proxy/containers/percona:5.7 - command: --innodb-log-file-size=1G --max_allowed_packet=1G --innodb-buffer-pool-size=512M --wait_timeout=3000 --net_write_timeout=3000 --log_error_verbosity=3 + image: git.fpfis.tech.ec.europa.eu/fpfis/dependency_proxy/containers/percona:8.0 + command: --innodb-log-file-size=1G --max_allowed_packet=1G --innodb-buffer-pool-size=512M --wait_timeout=3000 --net_write_timeout=3000 --log_error_verbosity=3 --skip-log-bin --innodb-flush-log-at-trx-commit=2 --innodb-read-io-threads=16 --innodb-write-io-threads=16 environment: - MYSQL_ALLOW_EMPTY_PASSWORD=yes selenium: @@ -70,11 +70,11 @@ pipeline: matrix: include: - - CORE_VERSION: 10.1.0 + - CORE_VERSION: 10.3.0 PHP_VERSION: 8.1 - - CORE_VERSION: 10.1.0 - PHP_VERSION: 8.2 - - CORE_VERSION: 10.2.0 + - CORE_VERSION: 10.3.0 + PHP_VERSION: 8.3 + - CORE_VERSION: 10.4.0 PHP_VERSION: 8.1 - - CORE_VERSION: 10.2.0 - PHP_VERSION: 8.2 + - CORE_VERSION: 10.4.0 + PHP_VERSION: 8.3 diff --git a/composer.json b/composer.json index f7abf79..29e590c 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ "drush/drush": "^12.4", "mikey179/vfsstream": "^1.6.10", "openeuropa/behat-transformation-context": "^0.2", - "openeuropa/code-review": "^2.0.0-alpha6", - "openeuropa/task-runner-drupal-project-symlink": "^1.0-beta6", + "openeuropa/code-review-drupal": "^1.0.0-alpha", + "openeuropa/task-runner-drupal-project-symlink": "^1.0", "phpspec/prophecy-phpunit": "^2", "phpunit/phpunit": "^9.6", "symfony/phpunit-bridge": "^6.4" @@ -33,12 +33,20 @@ "post-install-cmd": "./vendor/bin/run drupal:site-setup", "post-update-cmd": "./vendor/bin/run drupal:site-setup" }, - "repositories": { - "drupal": { + "repositories": [ + { "type": "composer", "url": "https://packages.drupal.org/8" + }, + { + "type": "git", + "url": "https://github.com/openeuropa/DrupalDriver.git" + }, + { + "type": "git", + "url": "https://github.com/openeuropa/code-review-drupal.git" } - }, + ], "autoload": { "psr-4": { "Drupal\\oe_multilingual\\": "./src/" @@ -77,7 +85,9 @@ "cweagans/composer-patches": true, "dealerdirect/phpcodesniffer-composer-installer": true, "drupal/core-composer-scaffold": true, - "phpro/grumphp": true + "phpro/grumphp": true, + "phpro/grumphp-shim": true, + "phpstan/extension-installer": true } } } diff --git a/docker-compose.yml b/docker-compose.yml index 37dfc7e..06851b8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ -version: '2' services: web: - image: fpfis/httpd-php-dev:8.1 + image: fpfis/httpd-php-dev:8.3 working_dir: /var/www/html ports: - 8080:8080 @@ -17,8 +16,8 @@ services: # Enable step debugging for all PHP request. See ./README.md#step-debugging for more information. # XDEBUG_SESSION: 1 mysql: - image: percona/percona-server:5.7 - command: --innodb-log-file-size=1G --max_allowed_packet=1G --innodb-buffer-pool-size=512M --wait_timeout=3000 --net_write_timeout=3000 --log_error_verbosity=3 + image: percona/percona-server:8.0 + command: --innodb-log-file-size=1G --max_allowed_packet=1G --innodb-buffer-pool-size=512M --wait_timeout=3000 --net_write_timeout=3000 --log_error_verbosity=3 --skip-log-bin --innodb-flush-log-at-trx-commit=2 --innodb-read-io-threads=16 --innodb-write-io-threads=16 environment: MYSQL_ALLOW_EMPTY_PASSWORD: "yes" # ports: diff --git a/grumphp.yml.dist b/grumphp.yml.dist index c4ea916..af65fba 100644 --- a/grumphp.yml.dist +++ b/grumphp.yml.dist @@ -1,16 +1,12 @@ imports: - - { resource: vendor/openeuropa/code-review/dist/drupal-conventions.yml } -parameters: - tasks.phpcs.ignore_patterns: - - vendor/ - - node_modules/ - - build/ - tasks.phpcs.triggered_by: - - php - - module - - inc - - theme - - install + - { resource: ./vendor/openeuropa/code-review-drupal/dist/oe-component-conventions.yml } grumphp: + tasks: + phpparser: + ignore_patterns: + - vendor/ git_hook_variables: EXEC_GRUMPHP_COMMAND: 'docker-compose exec -T web' + +parameters: + tasks.phpstan.configuration: phpstan.neon.dist diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..ca9247a --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,2 @@ +includes: + - ./vendor/openeuropa/code-review-drupal/dist/phpstan.drupal.neon diff --git a/src/Commands/MultilingualCommands.php b/src/Commands/MultilingualCommands.php index f56f653..7378a52 100644 --- a/src/Commands/MultilingualCommands.php +++ b/src/Commands/MultilingualCommands.php @@ -53,6 +53,7 @@ public function importLocalTranslations(array $options = ['langcodes' => self::O drush_backend_batch_process(); // Update config translations. + // @phpstan-ignore-next-line if ($batch = locale_config_batch_update_components([])) { $this->logger()->notice('Importing configuration translations...'); batch_set($batch);