Project

General

Profile

Actions

Bug #90743

closed

ResourceCompressor - @charset comment is seen as annotation (Semantical Error occurs)

Added by Dominik Hahn about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2020-03-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Accepted
  • Assignee set to Alexander Schnitzler
Actions #2

Updated by Alexander Schnitzler about 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.

Actions #3

Updated by Georg Ringer about 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.

Actions #4

Updated by Georg Ringer about 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

Actions

Also available in: Atom PDF