Open t3easy opened 2 years ago
That's not correct. I thought first the ignore-as-root is needed. But that was an itermediate way.
It simply boils down to following:
If something exists in
Resources/Public/*
, the extension is symlinked to<publicpath>/typo3conf/ext/<ext-key>
A extra.typo3/cms
section is needed that the "root-package" is regonized as "extension" at all.
As I remember right, using the ignore-as-root: false has been a first solution, reworked couple of day after - and thus changed. Missing to correct the documentation.
Following from the changelog is what's needed to be described in the ExtensionTesting example(instructions):
However, when extensions are used as root package for testing (e.g., for running unit, functional or integration tests in a CI pipeline) and these extensions have files in the Resources/Public directory, a symlink in the typo3conf/ext directory is automatically created. Additionally the package path is adapted to be inside typo3conf/ext. This allows TYPO3 to properly calculate URLs for public resources of this extension.
If the root package isn’t of type typo3-cms-extension or does not have a Resources/Public directory the absolute path to the extension remains the original path to the composer root directory and no symlink is created.
This special behaviour for root packages of type typo3-cms-extension is introduced as a temporary fix to ease extension testing. It is explicitly NOT recommended to use such a setup in production.
I needed both. If i remove ignore-as-root, delete .Build and composer update, there is no /typo3conf/ext/my_ext
I wonder if the testing frameworks need a general adjustment to e.g. also symlink vendor
and thus have all typo3-cms-extension
packages available and active automatically. Then both $coreExtensionsToLoad
and $testExtensionsToLoad
would be obsolete. (The latter could still be used for actual test extensions.)
I needed both. If i remove ignore-as-root, delete .Build and composer update, there is no /typo3conf/ext/my_ext
Have done that do (except composer install instead of update) and the symlink was there. Without the "ignore-as-root" option.
Will recheck this later.
I updated the description of the issue.
@sbuerk @t3easy @mbrodala what's the status of this issue, is there still some documentation to adjust, or can it be closed?
Since TYPO3 11.4 it is necessary to set
Resources/Public
must be present in the extension e.g. by adding an extension iconResources/Public/Icons/Extension.svg
If this is missing, the extension isn't symlinked to
.Build/public/typo3conf/ext
and can't be includes in functional tests with$testExtensionsToLoad
. You'll get an error likeTYPO3\TestingFramework\Core\Exception: Test extension path /home/runner/work/my_ext/my_ext/.Build/public/typo3conf/ext/my_ext not found
.See: https://typo3.slack.com/archives/C027S5XR1/p1648153442350779 https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/Testing/ExtensionTesting.html https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Feature-94996-ConsiderAllComposerInstalledExtensionsAsActive.html
And thanks to @sbuerk!