Skip to content

fix: repair functional test fixtures and update test matrix#2

Closed
CybotTM wants to merge 1 commit intomainfrom
fix/functional-test-fixtures
Closed

fix: repair functional test fixtures and update test matrix#2
CybotTM wants to merge 1 commit intomainfrom
fix/functional-test-fixtures

Conversation

@CybotTM
Copy link
Member

@CybotTM CybotTM commented Mar 7, 2026

Summary

  • Fix broken functional test extension loading path
  • Update test matrix from 12.4/13.1/main to 12.4/13.4/main

Problems

1. Functional tests fail on all TYPO3 versions

ExtensionTestCase uses a legacy path format for the test extension:

'typo3conf/ext/codesnippet/Functional/Fixtures/Extensions/example_extension'

The testing-framework prepends ORIGINAL_ROOT to this, producing:

.Build/Web/typo3conf/ext/codesnippet/Functional/Fixtures/Extensions/example_extension

which doesn't exist. First test errors with "path not found", subsequent tests cascade-fail with "database connection not configured".

2. Test fixture only allows TYPO3 13.x

The example_extension/ext_emconf.php has 'typo3' => '13.1.0-13.99.99', preventing it from loading on 12.4 or 14.x.

3. Outdated TYPO3 versions in CI matrix

Workflows test against 13.0 and 13.1, but the current LTS is 13.4.

Fixes

  1. Use composer package name 'typo3tests/example-extension' instead of the broken legacy path — the testing-framework resolves this via getPackageInfoWithFallback() using the path repository already configured in composer.json
  2. Widen ext_emconf.php constraint to '12.4.0-14.99.99'
  3. Add TYPO3 13.4 support to runTests.sh
  4. Replace tests-13.1.yml with tests-13.4.yml
  5. Consolidate cgl.yml matrix: drop 13.0/13.1, add 13.4

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses critical issues affecting the reliability and scope of functional tests. It rectifies a broken extension loading path that previously caused test failures across TYPO3 versions and expands the compatibility of the test fixture. Furthermore, the CI test matrix has been updated to include support for TYPO3 13.4, ensuring tests run against the latest LTS version and improving the overall robustness of the testing environment.

Highlights

  • Functional Test Fix: Resolved issues preventing functional tests from running on all TYPO3 versions by correcting the extension loading path from a legacy format to a composer package name.
  • TYPO3 Version Compatibility: Widened the TYPO3 version constraint for the example extension's ext_emconf.php to support a broader range, specifically from 12.4.0 up to 14.99.99.
  • Test Matrix Update: Integrated TYPO3 13.4 into the test matrix, including updates to the runTests.sh script for proper dependency management and validation of supported versions.
Changelog
  • Build/Scripts/runTests.sh
    • Added '13.4' to the list of supported TYPO3 core major versions in the script's help message.
    • Updated the regular expression to validate '13.4' as a permissible TYPO3 version argument.
    • Introduced new conditional logic to install TYPO3 13.4 specific composer packages when the TYPO3_VERSION is set to '13.4'.
  • Tests/Functional/ExtensionTestCase.php
    • Updated the testExtensionsToLoad array to use the composer package name 'typo3tests/example-extension' instead of a legacy file path for the example extension.
  • Tests/Functional/Fixtures/Extensions/example_extension/ext_emconf.php
    • Modified the TYPO3 version constraint in ext_emconf.php from '13.1.0-13.99.99' to '12.4.0-14.99.99', broadening compatibility.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/cgl.yml
    • .github/workflows/tests-13.4.yml
    • .github/workflows/tests-main.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes broken functional tests by updating the extension loading path and widens the TYPO3 version compatibility for the test fixture. It also updates the CI test matrix to use newer TYPO3 versions. The changes in the PHP files are correct and well-implemented. However, in Build/Scripts/runTests.sh, the older TYPO3 versions (13.0, 13.1) that are being dropped from the CI matrix have not been fully removed from the script's options, validation, and logic. I've added comments with suggestions to clean this up for consistency.

- 8.3: use PHP 8.3

-t <12.4|13.0|13.1|main>
-t <12.4|13.0|13.1|13.4|main>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Based on the PR description, versions 13.0 and 13.1 are being dropped. To keep the script consistent with the updated CI matrix, please remove them from the list of supported versions here. You'll also need to remove the corresponding help text on lines 122-123.

Suggested change
-t <12.4|13.0|13.1|13.4|main>
-t <12.4|13.4|main>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed 13.0 and 13.1 from the help text, validation regex, and composer update blocks.

t)
TYPO3_VERSION=${OPTARG}
if ! [[ ${TYPO3_VERSION} =~ ^(12.4|13.0|13.1|main)$ ]]; then
if ! [[ ${TYPO3_VERSION} =~ ^(12.4|13.0|13.1|13.4|main)$ ]]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To align with the updated list of supported versions, please remove 13.0 and 13.1 from this validation check.

Suggested change
if ! [[ ${TYPO3_VERSION} =~ ^(12.4|13.0|13.1|13.4|main)$ ]]; then
if ! [[ ${TYPO3_VERSION} =~ ^(12.4|13.4|main)$ ]]; then

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in the same update.

Comment on lines +364 to +369
if [ "${TYPO3_VERSION}" == "13.4" ]; then
COMMAND=(composer req --dev --no-update typo3/cms-backend:~13.4@dev typo3/cms-recordlist:~13.4@dev typo3/cms-frontend:~13.4@dev typo3/cms-extbase:~13.4@dev typo3/cms-fluid:~13.4@dev typo3/cms-install:~13.4@dev --no-update --no-ansi --no-interaction --no-progress)
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-prepare-dev-${SUFFIX} -e COMPOSER_CACHE_DIR=.Build/.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} "${COMMAND[@]}"
COMMAND=(composer req typo3/cms-core:~13.4@dev -W --no-update --no-ansi --no-interaction --no-progress)
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-prepare-${SUFFIX} -e COMPOSER_CACHE_DIR=.Build/.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} "${COMMAND[@]}"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since versions 13.0 and 13.1 are being dropped according to the PR description, please also remove their corresponding blocks from the script to avoid confusion and dead code.

To avoid future code duplication when new 13.x versions are added, you could consider refactoring the logic for 13.x versions into a single block that uses the ${TYPO3_VERSION} variable to construct the package constraints.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed both 13.0 and 13.1 blocks entirely.

@CybotTM CybotTM force-pushed the fix/functional-test-fixtures branch 2 times, most recently from 720fdff to c93ce10 Compare March 7, 2026 15:43
- Fix testExtensionsToLoad path: use composer package name
  'typo3tests/example-extension' instead of broken legacy path
  'typo3conf/ext/codesnippet/Functional/Fixtures/Extensions/example_extension'
  which the testing-framework cannot resolve
- Widen example_extension ext_emconf.php TYPO3 constraint to 12.4-14.x
- Add TYPO3 13.4 support to runTests.sh, remove dead 13.0/13.1 code
- Replace tests-13.1 workflow with tests-13.4 (current LTS)
- Consolidate cgl.yml matrix: replace 13.0/13.1 entries with 13.4
- Update PHP version matrix:
  - v12.4: PHP 8.1, 8.2, 8.3, 8.4
  - v13.4: PHP 8.2, 8.3, 8.4, 8.5
  - v14/main: PHP 8.2, 8.3, 8.4, 8.5
- Add PHP 8.4 and 8.5 support to runTests.sh
- Restrict push trigger to main branch to avoid duplicate CI runs on PRs

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant