diff --git a/.ddev/commands/web/init-typo3 b/.ddev/commands/web/init-typo3 index ccedf06..7606fe2 100755 --- a/.ddev/commands/web/init-typo3 +++ b/.ddev/commands/web/init-typo3 @@ -51,6 +51,7 @@ if [ -f "$typo3cmsBinary" ]; then "$typo3cmsBinary" configuration:set SYS/trustedHostsPattern ".*" else "$typo3Binary" setup --no-interaction --force --quiet + "$typo3Binary" configuration:set SYS/trustedHostsPattern ".*" fi _done diff --git a/.ddev/config.yaml b/.ddev/config.yaml index eef263d..c3e24aa 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -18,7 +18,6 @@ webimage_extra_packages: [libxml2-utils] omit_containers: [ddev-ssh-agent] disable_settings_management: true web_environment: - - XDEBUG_MODE=debug,coverage - TESTING_DOMAIN=$DDEV_HOSTNAME - TYPO3_CONTEXT=Development/DDEV - typo3DatabaseHost=db diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc8daed..f36bb7e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,14 +16,14 @@ jobs: strategy: fail-fast: false matrix: - typo3-version: [ "11.5", "12.4" ] + typo3-version: [ "11.5", "12.4", "13.3" ] php-version: [ "7.4", "8.1", "8.2", "8.3" ] exclude: - typo3-version: "12.4" php-version: "7.4" - - typo3-version: "13.2" + - typo3-version: "13.3" php-version: "7.4" - - typo3-version: "13.2" + - typo3-version: "13.3" php-version: "8.1" steps: @@ -48,14 +48,13 @@ jobs: autostart: false - name: Configure and start DDEV run: | - ddev config --project-type=typo3 --php-version=${{ matrix.php-version }} --xdebug-enabled=true --web-environment-add="XDEBUG_MODE=coverage" + ddev config --project-type=typo3 --php-version=${{ matrix.php-version }} --xdebug-enabled=false --webimage-extra-packages= ddev start # Install dependencies - name: Install Composer dependencies uses: ramsey/composer-install@v2 with: - dependency-versions: ${{ matrix.dependencies }} composer-options: --with=typo3/cms-core:"^${{ matrix.typo3-version }}" # Fix namespace (add"/Support" to end of namespace) only for typo3-version 11 @@ -63,10 +62,6 @@ jobs: run: sed -i '1s/$/\\Support/' codeception.yml if: matrix.php-version == '7.4' - # Init TYPO3 - - name: Init TYPO3 - run: ddev init-typo3 - # Run tests - name: Run acceptance tests uses: nick-fields/retry@v3 @@ -74,17 +69,69 @@ jobs: max_attempts: 3 retry_on: error timeout_minutes: 10 - command: ddev composer ci:test:acceptance + command: ddev composer test:acceptance new_command_on_retry: ddev composer test:acceptance -- -g failed - name: Run functional and unit tests run: | - ddev composer ci:test:functional - ddev composer ci:test:unit + ddev composer test:functional + ddev composer test:unit # Save acceptance reports - uses: actions/upload-artifact@v4 with: name: acceptance-reports-${{ matrix.php-version }}-${{ matrix.typo3-version }} + path: Test/Acceptance/_output + if: failure() + + coverage: + name: Tests Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Prepare environment + - name: Setup PHP + uses: shivammathur/setup-php@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + php-version: 8.3 + coverage: none + extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql + + # Setup DDEV + - name: Setup DDEV + uses: ddev/github-action-setup-ddev@v1 + with: + autostart: false + - name: Configure and start DDEV + run: | + ddev config --project-type=typo3 --xdebug-enabled=true --webimage-extra-packages=php8.3-pcov --web-environment-add="XDEBUG_MODE=coverage" + ddev start + + # Install dependencies + - name: Install Composer dependencies + uses: ramsey/composer-install@v2 + + # Run tests + - name: Run acceptance tests + uses: nick-fields/retry@v3 + with: + max_attempts: 3 + retry_on: error + timeout_minutes: 10 + command: ddev composer test:coverage:acceptance + - name: Run functional and unit tests + run: | + ddev composer test:coverage:functional + ddev composer test:coverage:unit + + # Save acceptance reports + - uses: actions/upload-artifact@v4 + with: + name: acceptance-reports path: Tests/Acceptance/_output if: failure() diff --git a/Classes/Utility/LogParserUtility.php b/Classes/Utility/LogParserUtility.php index 40e2db9..7298e3c 100644 --- a/Classes/Utility/LogParserUtility.php +++ b/Classes/Utility/LogParserUtility.php @@ -220,6 +220,10 @@ public function loadMessages(): void $this->messages[] = $message; } } + + usort($this->messages, static function (MailMessage $a, MailMessage $b) { + return $b->date->getTimestamp() <=> $a->date->getTimestamp(); + }); } public function getMessageByFilename(string $filename): ?MailMessage diff --git a/Resources/Private/Templates/Backend/Index.html b/Resources/Private/Templates/Backend/Index.html index 12d0ce5..f3a9f03 100644 --- a/Resources/Private/Templates/Backend/Index.html +++ b/Resources/Private/Templates/Backend/Index.html @@ -9,14 +9,11 @@

Mail Log

- @@ -81,15 +78,13 @@

Mail Log

- HTML - Files + Files
@@ -114,9 +109,7 @@

Mail Log

+ + + + diff --git a/Resources/Private/Templates/LegacyBackend/Index.html b/Resources/Private/Templates/LegacyBackend/Index.html index ad577f5..4880111 100644 --- a/Resources/Private/Templates/LegacyBackend/Index.html +++ b/Resources/Private/Templates/LegacyBackend/Index.html @@ -78,7 +78,7 @@

Mail Log

- Files + Files
@@ -103,7 +103,7 @@

Mail Log