Project

General

Profile

Actions

Task #73053

closed

Error "Could not analyse class XY" may hide useful PHP warning

Added by Xavier Perseguers almost 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2016-02-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Sprint Focus:

Description

After creating a VH, I systematically got an error:

#1289386765: Could not analyse class: "VendorName\ExtensionKey\ViewHelpers\ResponsiveImageViewHelper" maybe not loaded or no autoloader?

I really did not get why it failed although typo3temp/autoload had been flushed, no opcode whatsoever.

Finally, digging into the Core and breaking where the exception occured, I had a look at the actual exception and found a PHP warning:

PHP Warning: Declaration of VendorName\ExtensionKey\ViewHelpers\ResponsiveImageViewHelper::render($src = NULL, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL, $treatIdAsReference = false, $image = NULL) should be compatible with TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper::render($src = NULL, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL, $treatIdAsReference = false, $image = NULL, $crop = NULL, $absolute = false) in /path/to/extension_key/Classes/ViewHelpers/ResponsiveImageViewHelper.php line 27 (More information)

This is highly valuable debugging information and should not get hidden.

Actions #1

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46425

Actions #2

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46425

Actions #3

Updated by Gerrit Code Review almost 9 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46453

Actions #4

Updated by Xavier Perseguers almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF