Bug #90743
closedResourceCompressor - @charset comment is seen as annotation (Semantical Error occurs)
0%
Description
Hello,
on an old but recently upgraded installation (version 9.5.14) I kept getting the following error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: [Semantical Error] The annotation "@charset" in method TYPO3\CMS\Core\Resource\ResourceCompressor::cssFixStatements() was never imported. Did you maybe forget to add a "use" statement for this annotation? | Doctrine\Common\Annotations\AnnotationException thrown in file /var/www/html/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php in line 54.
In typo3/sysext/core/Classes/Resource/ResourceCompressor.php the @charset in the comment is probably seen as an annotation which causes this problem?!
My installation runs just fine if I remove this comment.
Just comment if you need any more information.
Updated by Georg Ringer over 4 years ago
- Status changed from New to Accepted
- Assignee set to Alexander Schnitzler
Updated by Alexander Schnitzler over 4 years ago
This can only happen if you inject the ResourceCompressor in your controllers/services. Question is: why would you do so?
The ResourceCompressor is called by the core and shouldn't be used directly by users in an Extbase context.
Updated by Georg Ringer over 4 years ago
- Status changed from Accepted to Needs Feedback
Additionally if you would really need this class, use GeneralUtility::makeInstance instead of the object manager.
Updated by Georg Ringer over 4 years ago
- Status changed from Needs Feedback to Closed
closing issue. feel free to contact me or alex on slack if you think it is valid