From bfb1bbe9e866a4629b0d105a7659f2a081d0275e Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Sun, 25 May 2025 11:28:18 +0200 Subject: [PATCH 1/4] feat: php 8.4 support --- .github/workflows/continuous-integration.yml | 80 +++++++++----------- src/Context/Context.php | 2 +- src/Context/ContextBuilder.php | 2 +- src/Docker.php | 2 +- src/DockerClientFactory.php | 4 +- src/Endpoint/ContainerAttach.php | 2 +- src/Endpoint/ExecStart.php | 2 +- src/Endpoint/ImageBuild.php | 2 +- src/Endpoint/ImageCreate.php | 2 +- src/Endpoint/ImagePush.php | 2 +- src/Endpoint/SystemEvents.php | 2 +- 11 files changed, 47 insertions(+), 55 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 16a20180..794e609b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -3,12 +3,12 @@ name: "Continuous Integration" on: push: paths-ignore: - - 'doc/**' - - '.github/**' + - "doc/**" + - ".github/**" pull_request: paths-ignore: - - 'doc/**' - - '.github/**' + - "doc/**" + - ".github/**" jobs: phpunit: @@ -21,53 +21,45 @@ jobs: fail-fast: false matrix: php-version: - - '8.1' - - '8.2' - - '8.3' + - "8.1" + - "8.2" + - "8.3" + - "8.4" dependency-versions: [lowest, highest] experimental: [false] - include: - - php-version: '8.4' - dependency-versions: lowest - experimental: true - composer-options: --ignore-platform-reqs - - php-version: '8.4' - dependency-versions: highest - experimental: true - composer-options: --ignore-platform-reqs steps: - - name: Repository checkout - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + - name: Repository checkout + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 - - name: Setup PHP with PECL extension - uses: shivammathur/setup-php@efffd0e4f2504f936fcfe3b69293d31ce0e2fd7a # v2.30.3 - with: - php-version: ${{ matrix.php-version }} - tools: composer:v2 - coverage: pcov + - name: Setup PHP with PECL extension + uses: shivammathur/setup-php@efffd0e4f2504f936fcfe3b69293d31ce0e2fd7a # v2.30.3 + with: + php-version: ${{ matrix.php-version }} + tools: composer:v2 + coverage: pcov - - name: Validate composer.json and composer.lock - run: composer validate --strict + - name: Validate composer.json and composer.lock + run: composer validate --strict - - name: Install dependencies - uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0 - with: - dependency-versions: ${{ matrix.dependency-versions }} - composer-options: ${{ matrix.composer-options }} + - name: Install dependencies + uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0 + with: + dependency-versions: ${{ matrix.dependency-versions }} + composer-options: ${{ matrix.composer-options }} - - name: Pull the docker image used by the tests. - run: docker pull busybox:latest + - name: Pull the docker image used by the tests. + run: docker pull busybox:latest - - name: Run PHPUnit test suite - run: composer run-script test-ci + - name: Run PHPUnit test suite + run: composer run-script test-ci - - name: Publish code coverage - uses: paambaati/codeclimate-action@a1831d7162ea1fbc612ffe5fb3b90278b7999d59 # v5.0.0 - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - with: - coverageCommand: composer run-script test-coverage - coverageLocations: | - ${{github.workspace}}/clover.xml:clover - if: github.event_name != 'pull_request' + - name: Publish code coverage + uses: paambaati/codeclimate-action@a1831d7162ea1fbc612ffe5fb3b90278b7999d59 # v5.0.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: composer run-script test-coverage + coverageLocations: | + ${{github.workspace}}/clover.xml:clover + if: github.event_name != 'pull_request' diff --git a/src/Context/Context.php b/src/Context/Context.php index 1cc9b1ec..320f131f 100644 --- a/src/Context/Context.php +++ b/src/Context/Context.php @@ -52,7 +52,7 @@ class Context implements ContextInterface * @param string $format Format to use when sending the call (stream or tar: string) * @param Filesystem $fs filesystem object for cleaning the context directory on destruction */ - public function __construct($directory, $format = self::FORMAT_STREAM, Filesystem $fs = null) + public function __construct($directory, $format = self::FORMAT_STREAM, ?Filesystem $fs = null) { $this->directory = $directory; $this->format = $format; diff --git a/src/Context/ContextBuilder.php b/src/Context/ContextBuilder.php index 0464b15a..cda9629f 100644 --- a/src/Context/ContextBuilder.php +++ b/src/Context/ContextBuilder.php @@ -41,7 +41,7 @@ class ContextBuilder /** * @param \Symfony\Component\Filesystem\Filesystem $fs */ - public function __construct(Filesystem $fs = null) + public function __construct(?Filesystem $fs = null) { $this->fs = $fs ?: new Filesystem(); $this->format = Context::FORMAT_STREAM; diff --git a/src/Docker.php b/src/Docker.php index b63c99cd..9333e7e3 100644 --- a/src/Docker.php +++ b/src/Docker.php @@ -66,7 +66,7 @@ public function imageBuild($requestBody = null, array $queryParameters = [], arr /** * {@inheritdoc} */ - public function imageCreate(string $requestBody = null, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + public function imageCreate(?string $requestBody = null, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new ImageCreate($requestBody, $queryParameters, $headerParameters), $fetch); } diff --git a/src/DockerClientFactory.php b/src/DockerClientFactory.php index 74a43dd8..0b6fbfb8 100644 --- a/src/DockerClientFactory.php +++ b/src/DockerClientFactory.php @@ -16,7 +16,7 @@ final class DockerClientFactory { - public static function create(array $config = [], PluginClientFactory $pluginClientFactory = null): PluginClient + public static function create(array $config = [], ?PluginClientFactory $pluginClientFactory = null): PluginClient { if (!\array_key_exists('remote_socket', $config)) { $config['remote_socket'] = 'unix:///var/run/docker.sock'; @@ -46,7 +46,7 @@ public static function create(array $config = [], PluginClientFactory $pluginCli ); } - public static function createFromEnv(PluginClientFactory $pluginClientFactory = null): PluginClient + public static function createFromEnv(?PluginClientFactory $pluginClientFactory = null): PluginClient { $options = [ 'remote_socket' => getenv('DOCKER_HOST') ? getenv('DOCKER_HOST') : 'unix:///var/run/docker.sock', diff --git a/src/Endpoint/ContainerAttach.php b/src/Endpoint/ContainerAttach.php index 571ec225..1c776639 100644 --- a/src/Endpoint/ContainerAttach.php +++ b/src/Endpoint/ContainerAttach.php @@ -11,7 +11,7 @@ class ContainerAttach extends BaseEndpoint { - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode() && DockerRawStream::HEADER === $contentType) { return new DockerRawStream($response->getBody()); diff --git a/src/Endpoint/ExecStart.php b/src/Endpoint/ExecStart.php index 844a4906..e2d8985b 100644 --- a/src/Endpoint/ExecStart.php +++ b/src/Endpoint/ExecStart.php @@ -11,7 +11,7 @@ class ExecStart extends BaseEndpoint { - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode() && DockerRawStream::HEADER === $contentType) { return new DockerRawStream($response->getBody()); diff --git a/src/Endpoint/ImageBuild.php b/src/Endpoint/ImageBuild.php index c0ceb645..49239c4c 100644 --- a/src/Endpoint/ImageBuild.php +++ b/src/Endpoint/ImageBuild.php @@ -24,7 +24,7 @@ public function getBody(SerializerInterface $serializer, $streamFactory = null): return [['Content-Type' => ['application/octet-stream']], $body]; } - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode()) { return new BuildStream($response->getBody(), $serializer); diff --git a/src/Endpoint/ImageCreate.php b/src/Endpoint/ImageCreate.php index 3ea1aad0..3a50da2e 100644 --- a/src/Endpoint/ImageCreate.php +++ b/src/Endpoint/ImageCreate.php @@ -11,7 +11,7 @@ class ImageCreate extends BaseEndpoint { - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode()) { return new CreateImageStream($response->getBody(), $serializer); diff --git a/src/Endpoint/ImagePush.php b/src/Endpoint/ImagePush.php index 64ea660b..61e16591 100644 --- a/src/Endpoint/ImagePush.php +++ b/src/Endpoint/ImagePush.php @@ -16,7 +16,7 @@ public function getUri(): string return str_replace(['{name}'], [urlencode($this->name)], '/images/{name}/push'); } - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode()) { return new PushStream($response->getBody(), $serializer); diff --git a/src/Endpoint/SystemEvents.php b/src/Endpoint/SystemEvents.php index 339a6062..3f57e916 100644 --- a/src/Endpoint/SystemEvents.php +++ b/src/Endpoint/SystemEvents.php @@ -11,7 +11,7 @@ class SystemEvents extends BaseEndpoint { - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode()) { return new EventStream($response->getBody(), $serializer); From 47b4aaa3671ca1f7e537ce3f98e47838ac8ae957 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Sun, 25 May 2025 11:39:39 +0200 Subject: [PATCH 2/4] fix: update to phpunit 10, to fix pipeline issues --- .gitignore | 1 + composer.json | 174 +++++++++++++-------------- tests/Stream/MultiJsonStreamTest.php | 11 +- 3 files changed, 97 insertions(+), 89 deletions(-) diff --git a/.gitignore b/.gitignore index 64afb0b5..8d49b551 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ bin/ composer.lock .vagrant /.php-cs-fixer.cache +/.phpunit.result.cache diff --git a/composer.json b/composer.json index 2e80e384..276633f7 100644 --- a/composer.json +++ b/composer.json @@ -1,91 +1,91 @@ { - "name": "beluga-php/docker-php", - "description": "A Docker PHP client", - "license": "MIT", - "type": "library", - "funding": [ - { - "type": "github", - "url": "https://github.com/flavioheleno" - } - ], - "require": { - "php": ">=8.1", - "beluga-php/docker-php-api": "7.1.45.*", - "nyholm/psr7": "^1.8", - "php-http/client-common": "^2.7", - "php-http/discovery": "^1.19", - "php-http/socket-client": "^2.1", - "psr/http-message": "^2.0", - "symfony/filesystem": "^6.3 || ^7.0", - "symfony/process": "^6.3 || ^7.0", - "symfony/serializer": "^6.3 || ^7.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.42", - "friendsofphp/php-cs-fixer": "^3.8", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.5", - "psy/psysh": "^0.12", - "roave/security-advisories": "dev-latest" - }, - "conflict": { - "docker-php/docker-php": "*", - "nikic/php-parser": "<4.13", - "php-http/message": "<1.15" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "autoload": { - "psr-4": { - "Docker\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Docker\\Tests\\": "tests/" - } - }, - "config": { - "allow-plugins": { - "ergebnis/composer-normalize": true, - "php-http/discovery": false - }, - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true - }, - "extra": { - "branch-alias": { - "1.41": "1.41.x-dev", - "1.42": "1.42.x-dev", - "1.43": "1.43.x-dev", - "1.44": "1.44.x-dev", - "1.45": "1.45.x-dev", - "dev-master": "1.46.x-dev" - } - }, - "scripts": { - "console": "vendor/bin/psysh", - "lint": "vendor/bin/parallel-lint --exclude vendor .", - "php-cs-fixer": "vendor/bin/php-cs-fixer fix --dry-run --verbose --diff", - "php-cs-fixer-fix": "vendor/bin/php-cs-fixer fix --verbose", - "phpstan": "vendor/bin/phpstan analyse --level 2 src", - "phpunit": "vendor/bin/phpunit ./tests/ --coverage-html=./report/coverage/ --whitelist=./src/ --testdox-html=./report/testdox.html --disallow-test-output --process-isolation", - "test": [ - "@lint", - "@phpunit" - ], - "test-ci": "vendor/bin/phpunit ./tests/ --disallow-test-output --process-isolation", - "test-coverage": "vendor/bin/phpunit ./tests/ --whitelist=./src/ --coverage-clover=clover.xml" + "name": "beluga-php/docker-php", + "description": "A Docker PHP client", + "license": "MIT", + "type": "library", + "funding": [ + { + "type": "github", + "url": "https://github.com/flavioheleno" + } + ], + "require": { + "php": ">=8.1", + "beluga-php/docker-php-api": "7.1.45.*", + "nyholm/psr7": "^1.8", + "php-http/client-common": "^2.7", + "php-http/discovery": "^1.19", + "php-http/socket-client": "^2.3", + "psr/http-message": "^2.0", + "symfony/filesystem": "^6.3 || ^7.0", + "symfony/process": "^6.3 || ^7.0", + "symfony/serializer": "^6.3 || ^7.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.42", + "friendsofphp/php-cs-fixer": "^3.8", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5.46", + "psy/psysh": "^0.12.8", + "roave/security-advisories": "dev-latest" + }, + "conflict": { + "docker-php/docker-php": "*", + "nikic/php-parser": "<4.13", + "php-http/message": "<1.15" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Docker\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Docker\\Tests\\": "tests/" + } + }, + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true, + "php-http/discovery": false }, - "scripts-descriptions": { - "console": "Runs PsySH Console", - "lint": "Runs complete codebase lint testing", - "phpunit": "Runs library test suite", - "test": "Runs all tests", - "test-ci": "Runs library test suite (for continuous integration)", - "test-coverage": "Runs test-coverage analysis" + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "extra": { + "branch-alias": { + "1.41": "1.41.x-dev", + "1.42": "1.42.x-dev", + "1.43": "1.43.x-dev", + "1.44": "1.44.x-dev", + "1.45": "1.45.x-dev", + "dev-master": "1.46.x-dev" } + }, + "scripts": { + "console": "vendor/bin/psysh", + "lint": "vendor/bin/parallel-lint --exclude vendor .", + "php-cs-fixer": "vendor/bin/php-cs-fixer fix --dry-run --verbose --diff", + "php-cs-fixer-fix": "vendor/bin/php-cs-fixer fix --verbose", + "phpstan": "vendor/bin/phpstan analyse --level 2 src", + "phpunit": "vendor/bin/phpunit ./tests/ --coverage-html=./report/coverage/ --whitelist=./src/ --testdox-html=./report/testdox.html --disallow-test-output --process-isolation", + "test": [ + "@lint", + "@phpunit" + ], + "test-ci": "vendor/bin/phpunit ./tests/ --disallow-test-output --process-isolation", + "test-coverage": "vendor/bin/phpunit ./tests/ --whitelist=./src/ --coverage-clover=clover.xml" + }, + "scripts-descriptions": { + "console": "Runs PsySH Console", + "lint": "Runs complete codebase lint testing", + "phpunit": "Runs library test suite", + "test": "Runs all tests", + "test-ci": "Runs library test suite (for continuous integration)", + "test-coverage": "Runs test-coverage analysis" + } } diff --git a/tests/Stream/MultiJsonStreamTest.php b/tests/Stream/MultiJsonStreamTest.php index 29d65739..6d4a46ac 100644 --- a/tests/Stream/MultiJsonStreamTest.php +++ b/tests/Stream/MultiJsonStreamTest.php @@ -41,11 +41,18 @@ public function testReadJsonEscapedDoubleQuote(string $jsonStream, array $jsonPa $serializer = $this->getMockBuilder(SerializerInterface::class) ->getMock(); + $callIndex = 0; $serializer ->expects($this->exactly(\count($jsonParts))) ->method('deserialize') - ->withConsecutive(...array_map(fn ($part) => [$part, BuildInfo::class, 'json', []], $jsonParts)) - ; + ->willReturnCallback(function ($data, $class, $format, $context) use ($jsonParts, &$callIndex) { + $this->assertEquals($jsonParts[$callIndex], $data); + $this->assertEquals(BuildInfo::class, $class); + $this->assertEquals('json', $format); + $this->assertEquals([], $context); + $callIndex++; + return null; + }); $stub = $this->getMockForAbstractClass(MultiJsonStream::class, [$stream, $serializer]); $stub->expects($this->any()) From d403f39b4e7de36cdb7d1e8147221859742658a8 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Sun, 25 May 2025 11:40:46 +0200 Subject: [PATCH 3/4] ci: publish code climate only on main repo --- .github/workflows/continuous-integration.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 794e609b..c6d09174 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -4,15 +4,14 @@ on: push: paths-ignore: - "doc/**" - - ".github/**" pull_request: paths-ignore: - "doc/**" - - ".github/**" + jobs: phpunit: - name: PHP ${{ matrix.php-version }} (${{ matrix.dependency-version }}) + name: PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }}) runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental }} @@ -55,6 +54,7 @@ jobs: run: composer run-script test-ci - name: Publish code coverage + if: github.repository == 'beluga-php/docker-php' && github.event_name != 'pull_request' uses: paambaati/codeclimate-action@a1831d7162ea1fbc612ffe5fb3b90278b7999d59 # v5.0.0 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} @@ -62,4 +62,4 @@ jobs: coverageCommand: composer run-script test-coverage coverageLocations: | ${{github.workspace}}/clover.xml:clover - if: github.event_name != 'pull_request' + From c836444aa31f4597a5dafbc0ced76e973ce72106 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Sun, 25 May 2025 11:51:51 +0200 Subject: [PATCH 4/4] feat: add editor config --- .editorconfig | 16 +++++ composer.json | 174 +++++++++++++++++++++++++------------------------- 2 files changed, 103 insertions(+), 87 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..d95b72a2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true + +# JSON files +[*.json] +indent_style = space +indent_size = 4 diff --git a/composer.json b/composer.json index 276633f7..f680bd44 100644 --- a/composer.json +++ b/composer.json @@ -1,91 +1,91 @@ { - "name": "beluga-php/docker-php", - "description": "A Docker PHP client", - "license": "MIT", - "type": "library", - "funding": [ - { - "type": "github", - "url": "https://github.com/flavioheleno" - } - ], - "require": { - "php": ">=8.1", - "beluga-php/docker-php-api": "7.1.45.*", - "nyholm/psr7": "^1.8", - "php-http/client-common": "^2.7", - "php-http/discovery": "^1.19", - "php-http/socket-client": "^2.3", - "psr/http-message": "^2.0", - "symfony/filesystem": "^6.3 || ^7.0", - "symfony/process": "^6.3 || ^7.0", - "symfony/serializer": "^6.3 || ^7.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.42", - "friendsofphp/php-cs-fixer": "^3.8", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5.46", - "psy/psysh": "^0.12.8", - "roave/security-advisories": "dev-latest" - }, - "conflict": { - "docker-php/docker-php": "*", - "nikic/php-parser": "<4.13", - "php-http/message": "<1.15" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "autoload": { - "psr-4": { - "Docker\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Docker\\Tests\\": "tests/" - } - }, - "config": { - "allow-plugins": { - "ergebnis/composer-normalize": true, - "php-http/discovery": false + "name": "beluga-php/docker-php", + "description": "A Docker PHP client", + "license": "MIT", + "type": "library", + "funding": [ + { + "type": "github", + "url": "https://github.com/flavioheleno" + } + ], + "require": { + "php": ">=8.1", + "beluga-php/docker-php-api": "7.1.45.*", + "nyholm/psr7": "^1.8", + "php-http/client-common": "^2.7", + "php-http/discovery": "^1.19", + "php-http/socket-client": "^2.3", + "psr/http-message": "^2.0", + "symfony/filesystem": "^6.3 || ^7.0", + "symfony/process": "^6.3 || ^7.0", + "symfony/serializer": "^6.3 || ^7.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.42", + "friendsofphp/php-cs-fixer": "^3.8", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5.46", + "psy/psysh": "^0.12.8", + "roave/security-advisories": "dev-latest" + }, + "conflict": { + "docker-php/docker-php": "*", + "nikic/php-parser": "<4.13", + "php-http/message": "<1.15" }, - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true - }, - "extra": { - "branch-alias": { - "1.41": "1.41.x-dev", - "1.42": "1.42.x-dev", - "1.43": "1.43.x-dev", - "1.44": "1.44.x-dev", - "1.45": "1.45.x-dev", - "dev-master": "1.46.x-dev" + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Docker\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Docker\\Tests\\": "tests/" + } + }, + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true, + "php-http/discovery": false + }, + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "extra": { + "branch-alias": { + "1.41": "1.41.x-dev", + "1.42": "1.42.x-dev", + "1.43": "1.43.x-dev", + "1.44": "1.44.x-dev", + "1.45": "1.45.x-dev", + "dev-master": "1.46.x-dev" + } + }, + "scripts": { + "console": "vendor/bin/psysh", + "lint": "vendor/bin/parallel-lint --exclude vendor .", + "php-cs-fixer": "vendor/bin/php-cs-fixer fix --dry-run --verbose --diff", + "php-cs-fixer-fix": "vendor/bin/php-cs-fixer fix --verbose", + "phpstan": "vendor/bin/phpstan analyse --level 2 src", + "phpunit": "vendor/bin/phpunit ./tests/ --coverage-html=./report/coverage/ --whitelist=./src/ --testdox-html=./report/testdox.html --disallow-test-output --process-isolation", + "test": [ + "@lint", + "@phpunit" + ], + "test-ci": "vendor/bin/phpunit ./tests/ --disallow-test-output --process-isolation", + "test-coverage": "vendor/bin/phpunit ./tests/ --whitelist=./src/ --coverage-clover=clover.xml" + }, + "scripts-descriptions": { + "console": "Runs PsySH Console", + "lint": "Runs complete codebase lint testing", + "phpunit": "Runs library test suite", + "test": "Runs all tests", + "test-ci": "Runs library test suite (for continuous integration)", + "test-coverage": "Runs test-coverage analysis" } - }, - "scripts": { - "console": "vendor/bin/psysh", - "lint": "vendor/bin/parallel-lint --exclude vendor .", - "php-cs-fixer": "vendor/bin/php-cs-fixer fix --dry-run --verbose --diff", - "php-cs-fixer-fix": "vendor/bin/php-cs-fixer fix --verbose", - "phpstan": "vendor/bin/phpstan analyse --level 2 src", - "phpunit": "vendor/bin/phpunit ./tests/ --coverage-html=./report/coverage/ --whitelist=./src/ --testdox-html=./report/testdox.html --disallow-test-output --process-isolation", - "test": [ - "@lint", - "@phpunit" - ], - "test-ci": "vendor/bin/phpunit ./tests/ --disallow-test-output --process-isolation", - "test-coverage": "vendor/bin/phpunit ./tests/ --whitelist=./src/ --coverage-clover=clover.xml" - }, - "scripts-descriptions": { - "console": "Runs PsySH Console", - "lint": "Runs complete codebase lint testing", - "phpunit": "Runs library test suite", - "test": "Runs all tests", - "test-ci": "Runs library test suite (for continuous integration)", - "test-coverage": "Runs test-coverage analysis" - } }