Project

General

Profile

Actions

Bug #76457

closed

Could not scan for classes inside "..." which does not appear to be a file nor a folder

Added by Saskia B almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-06-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello,

Typo3 does show the following message every time I try to install or update an extension, but the extension is still updated or installed.
Could not scan for classes inside "/.../htdocs/me/typo3conf/ext/<extname>/htdocs/typo3conf/ext/<extname>/Classes/" which does not appear to be a file nor a folder

I guess the issue is due to the doubled folder path (/htdocs/me/typo3conf/ext/.../htdocs/typo3conf/...)

Best regards,

Saskia

Actions #1

Updated by Nicole Cordes almost 8 years ago

  • Category deleted (Extension Manager)

The issue has nothing to do with the Extension Manager. It is an error that is thrown from the ClassMapGenerator during gathering the class loading information.

Actions #2

Updated by Nicole Cordes almost 8 years ago

  • Status changed from New to Needs Feedback

Dear Saskia,

Can you tell us which extension are affected? Can you please have a look in your PackageStates.php and check the 'packagePath' for those extensions. Thank you very much.

Actions #3

Updated by Tobias Gülzow over 7 years ago

Hi everyone.

I might shed some light on this one:
When you point the composer to some none existing directory or files, it "breaks" the ClassMapGenerator.

Just add something like this:

  "autoload": {
    "psr-4": {
      "Whatever\\Break\\": "Classes" 
    },
    "files": ["somedir/somefile.php"]
  }

to your composer.json. The file and directory does not exist.

As far as I can see, is the mainproblem here, that it stops the ClassMapGenerator in it's tracks. New extensions can not be installed afterwards without a fatal.
Tested with TYPO3 7.6.10

How to reproduce:
1.) Create an extension with wrong autoloader configuration.
2.) Install something new from the TER
3.) Get a "class not found" fatal, because the ClassMapGenerator could not reach the new installed extension.

Hope this helps.

Tobi

Actions #4

Updated by Nicole Cordes over 7 years ago

Hi Tobi,

thanks for your answer. But referring to a non-existing path in your composer.json is breaking in every way because not only the ClassMapGenerator will throw an error, but composer itself will fail with installation.

If the problem only occurs with invalid paths this is not a core issue at all.

Actions #5

Updated by Tobias Gülzow over 7 years ago

Hi Nicole.

The installation of the faulty extension actually works, but composer class map will crash with a handled TYPO3 warning.

If the problem only occurs with invalid paths this is not a core issue at all.

That is how I see it, too. Although I have not tested, what happens if I disable all error handling. If disabling the error handler works, the core might be able to work around this issue.

Edit: Disabling error handling does not work, because a \RuntimeException is explicitly thrown, halting the code.

Tobi

Actions #6

Updated by Tobias Pinnekamp over 7 years ago

I can report a similar behavior.

Just update my local installation with composer update which jumped from 7.6.9 to 7.6.11 and at the end of the process I get the following error message

[RuntimeException]
Could not scan for classes inside "web/typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/" which does not appear to be a file nor a folder

The same I get with composer dump-autoload.

The problem may be the composer.json of extbase which contains

"autoload-dev": {
    "psr-4": {
        "TYPO3\\CMS\\Extbase\\Tests\\": "Tests/" 
    },
    "classmap": ["Tests/Unit/Object/Container/Fixtures/"]
}

but doesn't contain any Test folder.

As a result the system doesn't run properly.

Actions #7

Updated by Wouter Wolters over 7 years ago

Do you need these fixture files? If not please remove the autoload-dev information from your root composer file.

Actions #8

Updated by Tobias Pinnekamp over 7 years ago

Ah, perfect. Good to know. Works perfectly now. Thank you very much for that fast hint.

Actions #9

Updated by Alex no-lastname-given over 7 years ago

Just trying to install extension PerfectLightBox 4.0.2 on Typo3 7.6.11. It says:

Could not scan for classes inside "D:/wamp/www/typo3conf/ext/perfectlightbox/Classes/" which does not appear to be a file nor a folder

After manual creating of "Classes" folder the problem is gone.

Actions #10

Updated by Nicole Cordes over 7 years ago

Hi Alex!

The problem with perfectlightbox in version 4.0.2 is, that is hasn't any Classes folder but specifies this one in its composer autoload information. This is no core but an extension bug and has to be resolved in there.

Actions #11

Updated by Nicole Cordes over 7 years ago

  • Status changed from Needs Feedback to Closed

I'm closing this issue now as it cannot be reproduced with valid paths and extensions.

Actions

Also available in: Atom PDF