Open
Description
What are you trying to achieve?
Run functional tests for a TYPO3 extension which uses the same psr-4
autoload prefix as a library package.
What do you get instead?
Frontend subrequests fail with an error:
Error: Class "Acme\Example\ClassFromLibraryPackage" not found
How to reproduce the issue?
Steps to reproduce the behavior:
- Have a TYPO3 extension package like
acme/typo3-example
with apsr-4
autoload prefix likeAcme\\Example\\
- Require a library package like
acme/example
in that extension with exactly the same autoload prefixAcme\\Example\\
- Set up a usable TYPO3 site and use
executeFrontendSubRequest()
to perform a subrequest
Additional information you would like to provide?
The issue does not occur when actually installing the TYPO3 extension (which consequently pulls the library package).
For functional testing the issue can be avoided by adding another psr-4
entry to autoload-dev
with Acme\\Example\\
and vendor/acme/example/src/
as path:
"autoload": {
"psr-4": {
"Acme\\Example\\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"Acme\\Example\\": "vendor/acme/example/src/",
"Acme\\Example\\Tests\\": "Tests/"
}
},
Specify some data of the environment
- TYPO3 testing framework version: 9.1.2
- TYPO3 version: 11/12/13
- PHP version: 8.1
Metadata
Metadata
Assignees
Labels
No labels