From 1da8c8ef8e5c58cbdde76deefb9a73fa9cb6d533 Mon Sep 17 00:00:00 2001 From: maartenderie Date: Thu, 28 Oct 2021 14:12:37 +0200 Subject: [PATCH 1/6] Break CI by removing fix_composer work-around --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd96b2a..67837ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,6 @@ jobs: php-version: ${{ matrix.php }} coverage: none - - run: php Tests/fix_composer_json.php - - uses: "ramsey/composer-install@v1" - run: vendor/bin/phpunit --exclude-group=functional From 9f77f6a8d9fa462a12945217614099b3eef345a1 Mon Sep 17 00:00:00 2001 From: maartenderie Date: Thu, 28 Oct 2021 14:16:41 +0200 Subject: [PATCH 2/6] Delete fix_composer work-around file itself --- Tests/fix_composer_json.php | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Tests/fix_composer_json.php diff --git a/Tests/fix_composer_json.php b/Tests/fix_composer_json.php deleted file mode 100644 index b778f6f..0000000 --- a/Tests/fix_composer_json.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Thu, 28 Oct 2021 14:17:58 +0200 Subject: [PATCH 3/6] CI; Add 'ignore ext-rdkafka' to composer --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67837ef..d09dc49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,5 +23,7 @@ jobs: coverage: none - uses: "ramsey/composer-install@v1" + with: + composer-options: "--ignore-platform-req=ext-rdkafka" - run: vendor/bin/phpunit --exclude-group=functional From 31eea190c77c3be093740fd8bd6c747f159a34ca Mon Sep 17 00:00:00 2001 From: maartenderie Date: Thu, 28 Oct 2021 14:49:04 +0200 Subject: [PATCH 4/6] Attempt with alternative to ramsey/composer --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d09dc49..659cf94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,10 @@ jobs: php-version: ${{ matrix.php }} coverage: none - - uses: "ramsey/composer-install@v1" - with: - composer-options: "--ignore-platform-req=ext-rdkafka" + - name: Install Composer dependencies + run: > # rdkafka unneeded for tests, and a pain to install on CI; + composer install + --no-progress --prefer-dist --optimize-autoloader + --ignore-platform-req=ext-rdkafka - run: vendor/bin/phpunit --exclude-group=functional From ee3db78cd879306406656f607e0de006bc6673e2 Mon Sep 17 00:00:00 2001 From: maartenderie Date: Thu, 28 Oct 2021 15:07:05 +0200 Subject: [PATCH 5/6] Stub a high version for RD_KAFKA_VERSION while testing --- Tests/bootstrap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index bf11262..1d4816c 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -12,5 +12,8 @@ } } +// Pretend that a high version was installed, opposed to 0.8.5 from kwn/php-rdkafka-stubs +const RD_KAFKA_VERSION = 42424242; + include_once $kafkaStubsDir.'/stubs/constants.php'; include_once $kafkaStubsDir.'/stubs/functions.php'; From 4f89b1127046d5979709704bf1a43398ecc5da48 Mon Sep 17 00:00:00 2001 From: maartenderie Date: Fri, 29 Oct 2021 10:14:25 +0200 Subject: [PATCH 6/6] put back ramsey/composer --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 659cf94..5f6516a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,8 @@ jobs: php-version: ${{ matrix.php }} coverage: none - - name: Install Composer dependencies - run: > # rdkafka unneeded for tests, and a pain to install on CI; - composer install - --no-progress --prefer-dist --optimize-autoloader - --ignore-platform-req=ext-rdkafka + - uses: "ramsey/composer-install@v1" + with: # ext-rdkafka not needed for tests, and a pain to install on CI; + composer-options: "--ignore-platform-req=ext-rdkafka" - run: vendor/bin/phpunit --exclude-group=functional