Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests fail with rte_ckeditor dependency in ext_emconf.php #295

Closed
CybotTM opened this issue Aug 1, 2024 · 5 comments
Closed

tests fail with rte_ckeditor dependency in ext_emconf.php #295

CybotTM opened this issue Aug 1, 2024 · 5 comments

Comments

@CybotTM
Copy link
Member

CybotTM commented Aug 1, 2024

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
)
@CybotTM
Copy link
Member Author

CybotTM commented Aug 1, 2024

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

@CybotTM
Copy link
Member Author

CybotTM commented Aug 1, 2024

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',
        ],
    ],
];

@CybotTM CybotTM changed the title tests fail with tests fail with rte_ckeditor dependency in ext_emconf.php Aug 1, 2024
@CybotTM
Copy link
Member Author

CybotTM commented Aug 2, 2024

Reason was missing $coreExtensionsToLoad in functional test:

    protected array $coreExtensionsToLoad = [
        'typo3/cms-rte-ckeditor',
    ];

Fixed with f9f8dac in branch/upgrade_testsuite with MR #294

@hdietrich-timespin
Copy link

hdietrich-timespin commented Aug 19, 2024

In my typo3 12.4.19 (non composer) installation is the extension in tyo3/sysext:
grafik
See also here: https://github.com/TYPO3/typo3/tree/v12.4.19/typo3/sysext/rte_ckeditor

@CybotTM
Copy link
Member Author

CybotTM commented Aug 21, 2024

fixed with #294

@CybotTM CybotTM closed this as completed Aug 21, 2024
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

No branches or pull requests

2 participants