diff --git a/.drone.jsonnet b/.drone.jsonnet index 3a3f2b35..0bedfefe 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -25,6 +25,7 @@ local composer(phpversion, params) = { local phpunit(phpversion) = { name: "PHPUnit", image: "joomlaprojects/docker-images:php" + phpversion, + [if phpversion == "8.2" then "failure"]: "ignore", commands: ["vendor/bin/phpunit"] }; @@ -60,7 +61,7 @@ local pipeline(name, phpversion, params) = { depends: [ "composer" ], commands: [ "vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", - "vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/" + "vendor/bin/phpcs --standard=ruleset.xml src/" ] }, { @@ -110,5 +111,6 @@ local pipeline(name, phpversion, params) = { pipeline("7.3", "7.3", "--prefer-stable"), pipeline("7.4", "7.4", "--prefer-stable"), pipeline("8.0", "8.0", "--prefer-stable"), - pipeline("8.1", "8.1", "--prefer-stable") + pipeline("8.1", "8.1", "--prefer-stable"), + pipeline("8.2", "8.2", "--prefer-stable --ignore-platform-reqs"), ] diff --git a/.drone.yml b/.drone.yml index 683bb815..d701ac06 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,231 +1,347 @@ --- -kind: pipeline -name: Codequality - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update - - composer require phpmd/phpmd phpstan/phpstan - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: phpcs - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards - - vendor/bin/phpcs -p --report=full --extensions=php --standard=ruleset.xml src/ - -- name: phpmd - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpmd src text cleancode - - vendor/bin/phpmd src text codesize - - vendor/bin/phpmd src text controversial - - vendor/bin/phpmd src text design - - vendor/bin/phpmd src text unusedcode - failure: ignore - -- name: phpstan - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpstan analyse src - failure: ignore - -- name: phploc - image: joomlaprojects/docker-images:php7.4 - commands: - - phploc src - failure: ignore - -- name: phpcpd - image: joomlaprojects/docker-images:php7.4 - commands: - - phpcpd src - failure: ignore - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "Codequality", + "steps": [ + { + "commands": [ + "php -v", + "composer update", + "composer require phpmd/phpmd phpstan/phpstan" + ], + "image": "joomlaprojects/docker-images:php7.4", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpcs --config-set installed_paths vendor/joomla/coding-standards", + "vendor/bin/phpcs --standard=ruleset.xml src/" + ], + "depends": [ + "composer" + ], + "image": "joomlaprojects/docker-images:php7.4", + "name": "phpcs" + }, + { + "commands": [ + "vendor/bin/phpmd src text cleancode", + "vendor/bin/phpmd src text codesize", + "vendor/bin/phpmd src text controversial", + "vendor/bin/phpmd src text design", + "vendor/bin/phpmd src text unusedcode" + ], + "depends": [ + "composer" + ], + "failure": "ignore", + "image": "joomlaprojects/docker-images:php7.4", + "name": "phpmd" + }, + { + "commands": [ + "vendor/bin/phpstan analyse src" + ], + "depends": [ + "composer" + ], + "failure": "ignore", + "image": "joomlaprojects/docker-images:php7.4", + "name": "phpstan" + }, + { + "commands": [ + "phploc src" + ], + "depends": [ + "composer" + ], + "failure": "ignore", + "image": "joomlaprojects/docker-images:php7.4", + "name": "phploc" + }, + { + "commands": [ + "phpcpd src" + ], + "depends": [ + "composer" + ], + "failure": "ignore", + "image": "joomlaprojects/docker-images:php7.4", + "name": "phpcpd" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- -kind: pipeline -name: PHP 7.2 lowest - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.2 - commands: - - php -v - - composer update --prefer-stable --prefer-lowest - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.2 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "PHP 7.2 lowest", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable --prefer-lowest" + ], + "image": "joomlaprojects/docker-images:php7.2", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "image": "joomlaprojects/docker-images:php7.2", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- -kind: pipeline -name: PHP 7.2 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.2 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.2 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "PHP 7.2", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable" + ], + "image": "joomlaprojects/docker-images:php7.2", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "image": "joomlaprojects/docker-images:php7.2", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- -kind: pipeline -name: PHP 7.3 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.3 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.3 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "PHP 7.3", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable" + ], + "image": "joomlaprojects/docker-images:php7.3", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "image": "joomlaprojects/docker-images:php7.3", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- -kind: pipeline -name: PHP 7.4 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php7.4 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php7.4 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "PHP 7.4", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable" + ], + "image": "joomlaprojects/docker-images:php7.4", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "image": "joomlaprojects/docker-images:php7.4", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- -kind: pipeline -name: PHP 8.0 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php8.0 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php8.0 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "PHP 8.0", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable" + ], + "image": "joomlaprojects/docker-images:php8.0", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "image": "joomlaprojects/docker-images:php8.0", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- -kind: pipeline -name: PHP 8.1 - -platform: - os: linux - arch: amd64 - -steps: -- name: composer - image: joomlaprojects/docker-images:php8.1 - commands: - - php -v - - composer update --prefer-stable - volumes: - - name: composer-cache - path: /tmp/composer-cache - -- name: PHPUnit - image: joomlaprojects/docker-images:php8.1 - commands: - - vendor/bin/phpunit - -volumes: -- name: composer-cache - host: - path: /tmp/composer-cache - +{ + "kind": "pipeline", + "name": "PHP 8.1", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable" + ], + "image": "joomlaprojects/docker-images:php8.1", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "image": "joomlaprojects/docker-images:php8.1", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} +--- +{ + "kind": "pipeline", + "name": "PHP 8.2", + "steps": [ + { + "commands": [ + "php -v", + "composer update --prefer-stable --ignore-platform-reqs" + ], + "image": "joomlaprojects/docker-images:php8.2", + "name": "composer", + "volumes": [ + { + "name": "composer-cache", + "path": "/tmp/composer-cache" + } + ] + }, + { + "commands": [ + "vendor/bin/phpunit" + ], + "failure": "ignore", + "image": "joomlaprojects/docker-images:php8.2", + "name": "PHPUnit" + } + ], + "volumes": [ + { + "host": { + "path": "/tmp/composer-cache" + }, + "name": "composer-cache" + } + ] +} --- kind: signature -hmac: ef7eaaa4dab03be15f5ca91154f6a0bd0fb572b615feb5de5ab8c800cfe03b0e +hmac: 2f694b65e34b9eafbca3bcd06a984cab6e57211a3dffab512363ed14d3176886 ... diff --git a/composer.json b/composer.json index 7f599e18..f716e1d4 100644 --- a/composer.json +++ b/composer.json @@ -6,10 +6,10 @@ "homepage": "https://github.com/joomla-framework/uri", "license": "GPL-2.0-or-later", "require": { - "php": "^7.2.5|^8.0" + "php": "^7.2.5|~8.0.0|~8.1.0" }, "require-dev": { - "joomla/coding-standards": "^2.0@alpha", + "joomla/coding-standards": "^3.0@dev", "phpunit/phpunit": "^8.5|^9.0" }, "autoload": {