t3x-rte_ckeditor_image
t3x-rte_ckeditor_image copied to clipboard
tests fail with rte_ckeditor dependency in ext_emconf.php
Running
$ Build/Scripts/runTests.sh -p 8.1 -t 12 -s functional
with ext_emconf.php
<?php
$EM_CONF[$_EXTKEY] = [
'title' => 'CKEditor Rich Text Editor Image Support',
'description' => 'Adds FAL image support to CKEditor for TYPO3.',
'category' => 'be',
'state' => 'stable',
'clearCacheOnLoad' => 0,
'author' => 'Sebastian Koschel',
'author_email' => '[email protected]',
'version' => '12.0.2',
'constraints' => [
'depends' => [
'php' => '8.1.0-8.9.99',
'typo3' => '12.4.0-12.4.99',
'cms_rte_ckeditor' => '12.4.0-12.4.99',
],
'conflicts' => [],
'suggests' => [
'setup' => '',
],
],
];
does not report any problem. But users complain issues with TYPO3 installation: #292
Running
$ Build/Scripts/runTests.sh -p 8.1 -t 12 -s functional
with ext_emconf.php
<?php
$EM_CONF[$_EXTKEY] = [
'title' => 'CKEditor Rich Text Editor Image Support',
'description' => 'Adds FAL image support to CKEditor for TYPO3.',
'category' => 'be',
'state' => 'stable',
'clearCacheOnLoad' => 0,
'author' => 'Sebastian Koschel',
'author_email' => '[email protected]',
'version' => '12.0.2',
'constraints' => [
'depends' => [
'php' => '8.1.0-8.9.99',
'typo3' => '12.4.0-12.4.99',
'rte_ckeditor' => '12.4.0-12.4.99',
],
'conflicts' => [],
'suggests' => [
'setup' => '',
],
],
];
reports:
PHPUnit 10.5.29 by Sebastian Bergmann and contributors.
Runtime: PHP 8.1.29
Configuration: /workspaces/t3x-rte_ckeditor_image/Build/phpunit/FunctionalTests.xml
E 1 / 1 (100%)
Time: 00:00.098, Memory: 10.00 MB
There was 1 error:
1) Netresearch\RteCKEditorImage\Tests\Functional\DataHandling\RteImageSoftReferenceParserTest::updateReferenceIndexAddsIndexEntryForImage
TYPO3\TestingFramework\Core\Exception: Package "rte_ckeditor_image" depends on package "rte_ckeditor" which does not exist.
/workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/PackageCollection.php:267
/workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/PackageCollection.php:232
/workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/PackageCollection.php:123
/workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/PackageCollection.php:102
/workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/Testbase.php:641
/workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/Functional/FunctionalTestCase.php:366
/workspaces/t3x-rte_ckeditor_image/.Build/bin/phpunit:122
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
###########################################################################
Result of functional
Environment: local
PHP: 8.1
TYPO3: 12
CONTAINER_BIN: docker
DBMS: sqlite driver pdo_sqlite
FAILURE
###########################################################################
keys in $this->packages in /workspaces/t3x-rte_ckeditor_image/.Build/vendor/typo3/testing-framework/Classes/Core/PackageCollection.php:267 are the same in both cases:
(
[0] => core
[1] => backend
[2] => frontend
[3] => extbase
[4] => fluid
[5] => rte_ckeditor_image
[6] => json_response
[7] => private_container
)
ext_emconf.php with cms_rte_ckeditor works because the name is identical to the composer package name and will be ignored by the check:
if ($this->isComposerDependency($dependentPackageKey)) {
ext_emconf.php with rte_ckeditor fails.
In both cases, the extension (rte_ckeditor or cms_rte_ckeditor) itself is missing in the extension list:
[0] => core
[1] => backend
[2] => frontend
[3] => extbase
[4] => fluid
[5] => rte_ckeditor_image
[6] => json_response
[7] => private_container
The extension itself is installed:
$ cat .Build/vendor/typo3/cms-rte-ckeditor/ext_emconf.php
<?php
$EM_CONF[$_EXTKEY] = [
'title' => 'TYPO3 CMS RTE CKEditor',
'description' => 'Integration of CKEditor as a Rich Text Editor for the TYPO3 backend.',
'category' => 'be',
'state' => 'stable',
'author' => 'TYPO3 Core Team',
'author_email' => '[email protected]',
'version' => '12.4.17',
'constraints' => [
'depends' => [
'typo3' => '12.4.17',
],
'conflicts' => [],
'suggests' => [
'setup' => '12.4.17',
],
],
];
Reason was missing $coreExtensionsToLoad in functional test:
protected array $coreExtensionsToLoad = [
'typo3/cms-rte-ckeditor',
];
Fixed with f9f8dac43721c095ec60478edba2a9e50bbfd40c in branch/upgrade_testsuite with MR #294
In my typo3 12.4.19 (non composer) installation is the extension in tyo3/sysext:
See also here: https://github.com/TYPO3/typo3/tree/v12.4.19/typo3/sysext/rte_ckeditor
fixed with #294