Skip to content

[TASK] Add v14 compatibility#124

Merged
maikschneider merged 1 commit into
maikschneider:mainfrom
o-ba:main
May 27, 2026
Merged

[TASK] Add v14 compatibility#124
maikschneider merged 1 commit into
maikschneider:mainfrom
o-ba:main

Conversation

@o-ba
Copy link
Copy Markdown
Contributor

@o-ba o-ba commented May 26, 2026

Summary by CodeRabbit

  • Compatibility

    • Extended platform compatibility to include TYPO3 14.0
  • Chores

    • Internal code cleanup and refactoring

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

📝 Walkthrough

Walkthrough

This PR adds TYPO3 14 compatibility support to the bw_captcha extension. Version constraints are updated in both Composer and extension configuration to declare support for TYPO3 14. Unused exception-related imports in CaptchaElement are cleaned up as part of the same update.

Changes

TYPO3 14 Compatibility Support

Layer / File(s) Summary
Import cleanup in CaptchaElement
Classes/Domain/Model/FormElements/CaptchaElement.php
Removed unused exception-related imports (Throwable, InvalidConfigurationTypeException) and associated docblock; class API remains unchanged.
Version constraint updates for TYPO3 14
composer.json, ext_emconf.php
Extended typo3/cms-core constraint from ^12.0 || ^13.0 to ^12.0 || ^13.0 || ^14.0 in composer.json; updated extension configuration to support TYPO3 versions 12.4.0-14.99.99 in ext_emconf.php.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A captcha hops through TYPO3 time,
From twelve to fourteen, all versions align,
Import dust swept, configurations bright,
The extension leaps forward—compatibility in sight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: adding TYPO3 v14 compatibility by updating version constraints in composer.json and ext_emconf.php.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@composer.json`:
- Line 21: composer.json currently allows "typo3/cms-core": "^12.0 || ^13.0 ||
^14.0" which conflicts with ext_emconf.php's declared support starting at 12.4;
update the composer requirement to match the extension metadata by changing the
constraint to "^12.4 || ^13.0 || ^14.0" (or an equivalent range like ">=12.4
<15.0") so Composer won't resolve unsupported 12.0–12.3 versions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 144d4321-9542-486d-9f42-c9d25f979981

📥 Commits

Reviewing files that changed from the base of the PR and between c97cc55 and 6bbe5f7.

📒 Files selected for processing (3)
  • Classes/Domain/Model/FormElements/CaptchaElement.php
  • composer.json
  • ext_emconf.php
💤 Files with no reviewable changes (1)
  • Classes/Domain/Model/FormElements/CaptchaElement.php

Comment thread composer.json
"php": "^8.1",
"ext-gd": "*",
"typo3/cms-core": "^12.0 || ^13.0"
"typo3/cms-core": "^12.0 || ^13.0 || ^14.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show composer.json line 21 (and a bit of context)
if [ -f composer.json ]; then
  echo "=== composer.json ==="
  nl -ba composer.json | sed -n '15,30p'
else
  echo "composer.json not found at repo root" >&2
fi

# Find and show ext_emconf.php (commonly in ext_emconf.php at root, but verify)
echo "=== ext_emconf.php search ==="
FILES=$(fd -a "ext_emconf\.php" . || true)
if [ -z "$FILES" ]; then
  echo "No ext_emconf.php found" >&2
  exit 0
fi
echo "$FILES"

for f in $FILES; do
  echo "--- $f (context around line ~14) ---"
  # Print around where TYPO3 support is usually declared
  nl -ba "$f" | sed -n '1,60p'
  # Try to extract the TYPO3 supportFrom/supportTo or 'typo3' array keys
  echo "--- grep likely support keys in $f ---"
  rg -n "support|TYPO3|typo3" "$f" || true
done

Repository: maikschneider/bw_captcha

Length of output: 151


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== repo root listing ==="
ls -la

echo "=== composer.json (first 60 lines) ==="
if [ -f composer.json ]; then
  sed -n '1,60p' composer.json | nl -ba | sed -n '1,60p' || sed -n '1,60p' composer.json
else
  echo "composer.json not found"
fi

echo "=== ext_emconf.php search ==="
FILES=$(fd -a "ext_emconf\.php" . || true)
echo "$FILES"
if [ -z "$FILES" ]; then
  exit 0
fi

for f in $FILES; do
  echo "--- $f (first 120 lines) ---"
  sed -n '1,120p' "$f" | sed -n '1,120p'
  echo "--- support-related matches in $f ---"
  rg -n "supportFrom|supportTo|TYPO3|typo3" "$f" || true
done

Repository: maikschneider/bw_captcha

Length of output: 4419


Align TYPO3 12 lower bound between composer.json and ext_emconf.php

composer.json allows typo3/cms-core ^12.0 || ^13.0 || ^14.0, while ext_emconf.php declares TYPO3 dependency 12.4.0-14.99.99—so Composer can resolve TYPO3 12.0–12.3 even though the extension claims support only from 12.4.

Suggested fix
-		"typo3/cms-core": "^12.0 || ^13.0 || ^14.0"
+		"typo3/cms-core": "^12.4 || ^13.0 || ^14.0"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"typo3/cms-core": "^12.0 || ^13.0 || ^14.0"
"typo3/cms-core": "^12.4 || ^13.0 || ^14.0"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composer.json` at line 21, composer.json currently allows "typo3/cms-core":
"^12.0 || ^13.0 || ^14.0" which conflicts with ext_emconf.php's declared support
starting at 12.4; update the composer requirement to match the extension
metadata by changing the constraint to "^12.4 || ^13.0 || ^14.0" (or an
equivalent range like ">=12.4 <15.0") so Composer won't resolve unsupported
12.0–12.3 versions.

@maikschneider maikschneider merged commit 545d470 into maikschneider:main May 27, 2026
2 of 3 checks passed
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.

2 participants