maikschneider / bw_captcha

TYPO3 extension that adds a captcha element with audio support for the TYPO3 form component. The captcha generation uses Gregwar/Captcha, no Google or 3rd party includes.
6 stars 6 forks source link

`use` Statements in ext_localconf.php might lead to error in TYPO3 v10 #22

Closed kpnielsen closed 1 year ago

kpnielsen commented 1 year ago

v2.0.0 replaced FQCNs in ext_localconf.php with use Statements in this commit. This only reliably works in TYPO3 v11, according to the documentation. Installing bw_captcha in a v10 installation leads to a Fatal error: Cannot use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider as SvgIconProvider because the name is already in use[…]-error in a cached ext_localconf file, if another extension already erroneously includes that directive.

maikschneider commented 1 year ago

Hi @kpnielsen , thanks for the feedback! Oha, you're right - the version 2.x supports v10 und should have FQDNs in ext_ files. However I just tested the extension in v10 and had no issues during install via composer. I guess this is highly dependent on the setup. I'll provide a patch.

kpnielsen commented 1 year ago

HI @maikschneider. Thanks for the quick reply.

Indeed, in most setups it should work. However, if another extension in the same installation has the same error (in my case it was one of our own), then an error is thrown.

I'll can provide a PR. Just complaining without contributing is neither in the spirit of Open Source, nor in that of TYPO3 ;-)

EDIT NVM the PR, you were faster ;-) Thanks for the quick reactioN!

maikschneider commented 1 year ago

Hehe, you're welcome - fixed in v2.0.5 :)