fix: repair functional test fixtures and update test matrix#2
fix: repair functional test fixtures and update test matrix#2
Conversation
Summary of ChangesHello, 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
Changelog
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
Build/Scripts/runTests.sh
Outdated
| - 8.3: use PHP 8.3 | ||
|
|
||
| -t <12.4|13.0|13.1|main> | ||
| -t <12.4|13.0|13.1|13.4|main> |
There was a problem hiding this comment.
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.
| -t <12.4|13.0|13.1|13.4|main> | |
| -t <12.4|13.4|main> |
There was a problem hiding this comment.
Done — removed 13.0 and 13.1 from the help text, validation regex, and composer update blocks.
Build/Scripts/runTests.sh
Outdated
| 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 |
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Done — removed both 13.0 and 13.1 blocks entirely.
720fdff to
c93ce10
Compare
- 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>
c93ce10 to
1431b08
Compare
Summary
Problems
1. Functional tests fail on all TYPO3 versions
ExtensionTestCaseuses a legacy path format for the test extension:'typo3conf/ext/codesnippet/Functional/Fixtures/Extensions/example_extension'The testing-framework prepends
ORIGINAL_ROOTto this, producing: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.phphas'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
'typo3tests/example-extension'instead of the broken legacy path — the testing-framework resolves this viagetPackageInfoWithFallback()using the path repository already configured incomposer.json'12.4.0-14.99.99'runTests.shtests-13.1.ymlwithtests-13.4.ymlcgl.ymlmatrix: drop 13.0/13.1, add 13.4