Closed pquerner closed 5 years ago
My first question would be: why do you think your issues are related to this package? I don't think they are. :)
To your question: Hard to say without knowing details of your setup. From guessing it could be:
My suggestion would be to debug through the Composer autoloader and find out why these classes cannot be found.
My guess its related to this package, since its the one that splits public and private. My intention here is to find out, if thats the case or not.
I am on MacOS 10.14 here, running ddev locally. I have not tested this against Windows.
When I didnt split the folders (no private, just public folder) it worked fine.
Yes, it can be a composer bug. I'll try and debug through that.
From a class loading perspective (which actually is the issue you describe) this package changes nothing. It does not „split“ things, but just adds an additional folder. So the issues you are seeing are unrelated to this package.
But let me know what you find out in any case. I’m also happy to re-open the ticket when it turns out I’m wrong.
I have the same issue on CentOS 9 - composer/PHP follows the symlinks to the "packages" directory, which is outside the webservers DocumentRoot. This is a structural issue and to my mind it is related to secure-web extension: The PHP Files are NOT residing in the document root, in a normal installation, they are.
@fgerards PHP files do not need to reside in the document root. I have no clue about your exact setup, though. The PHP files must be accessible of course on the file system. It still is not related to this package, but likely a setup / server issue.
Note that with TYPO3 12, all PHP files are outside the document root as well (as in may other PHP applications)
Hey, I am going by the official guidelines (https://docs.typo3.org/m/typo3/guide-installation/master/en-us/MigrateToComposer/BestPractices.html) and playing with having my extensions in
./packages/*
. That all works fine, but sometimes some classes cannot be found and it errors withI tried with the full namespace, but also with namespace import
CuD\\Base
is in autoload_psr4.php of composer's autoloader.Pathing:
composer.json
ofcud_base
My best guess currently is, that because it got symlinked form ./packages/ to private/typo3conf/ext it cannot resolve the namespace imports?
Or does someone else have more input here?
Thanks!