From c8e015d1fba17cb586893664d12287ab6e3b0306 Mon Sep 17 00:00:00 2001 From: Edward Surov Date: Wed, 15 May 2024 00:07:15 +0300 Subject: [PATCH 1/2] fix extension initialization (fixes #123) --- .github/workflows/build.yml | 7 +------ README.md | 2 +- src/AllureCodeception.php | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62af546..c17d87b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" os: - ubuntu-latest - windows-latest @@ -49,10 +50,4 @@ jobs: ${{ matrix.composer-options }} - name: Run tests - if: ${{ matrix.php-version != '8.2' }} - run: composer test - - - name: Run tests (experimental) - if: ${{ matrix.php-version == '8.2' }} - continue-on-error: true run: composer test diff --git a/README.md b/README.md index 00aa2e2..9d5abdf 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ extensions: outputDirectory: allure-results linkTemplates: issue: https://example.org/issues/%s - setipHook: My\SetupHook + setupHook: My\SetupHook ``` `outputDirectory` is used to store Allure results and will be calculated diff --git a/src/AllureCodeception.php b/src/AllureCodeception.php index cbcabc9..ba9dbf4 100644 --- a/src/AllureCodeception.php +++ b/src/AllureCodeception.php @@ -68,7 +68,21 @@ final class AllureCodeception extends Extension * @throws ConfigurationException * phpcs:disable PSR2.Methods.MethodDeclaration.Underscore */ + public function _initialize(): void + { + parent::_initialize(); + $this->reconfigure(); + } + + /** + * @throws ConfigurationException + */ public function moduleInit(): void + { + $this->reconfigure(); + } + + private function reconfigure(): void { QametaAllure::reset(); $this->testLifecycle = null; From 76e0a877d0ec96b3e14c79cf2dd0c5fbdf5ea2fd Mon Sep 17 00:00:00 2001 From: Edward Surov Date: Sat, 25 May 2024 18:57:06 +0300 Subject: [PATCH 2/2] fix broken macos pipelines --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c17d87b..7326fda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,7 @@ jobs: - "--prefer-lowest" steps: - name: Checkout - uses: actions/checkout@v3.5.0 - - - name: Validate composer.json and composer.lock - run: composer validate + uses: actions/checkout@v4 - name: Set up PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 @@ -43,6 +40,9 @@ jobs: coverage: xdebug ini-values: error_reporting=E_ALL + - name: Validate composer.json and composer.lock + run: composer validate + - name: Install dependencies run: composer update --prefer-dist