Project

General

Profile

Actions

Bug #67996

closed

Provide reasonable way to clear autoloader caches

Added by Joschi Kuphal almost 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-07-09
Due date:
% Done:

0%

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

Description

As a follow up to #67972, I'd vote for providing a reasonable way of flushing (or temporarily disabling) the autoloader cache other than manually clearing `typo3temp/autoload`. Just stating "it doesn't work anymore" seems as much of an option as "changing the extension list" after each creation of a new class during extension development. Including the autoloader cache into "clear system caches" (for example) would surely save quite some hours of helpless frustration.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #67972: New custom viewhelpers only work after manually clearing typo3temp/ directoryClosed2015-07-08

Actions
Related to TYPO3 Core - Bug #68589: Add CLI command to dump class loading informationClosedHelmut Hummel2015-07-28

Actions
Has duplicate TYPO3 Core - Bug #68387: New Classes were not found while developingRejected2015-07-20

Actions
Actions #1

Updated by Markus Klein almost 9 years ago

  • Assignee set to Helmut Hummel
Actions #2

Updated by Helmut Hummel almost 9 years ago

  • Status changed from New to Needs Feedback

Joschi Kuphal wrote:

As a follow up to #67972, I'd vote for providing a reasonable way of flushing (or temporarily disabling) the autoloader cache other than manually clearing `typo3temp/autoload`. Just stating "it doesn't work anymore" seems as much of an option as "changing the extension list" after each creation of a new class during extension development. Including the autoloader cache into "clear system caches" (for example) would surely save quite some hours of helpless frustration.

Thank you for your report and suggestion.

The class loading information written to typo3temp/autoload however is no cache and thus should not be flushed with system caches.

To avoid frustration, you should add a composer.json to the extension you are developing and add a autoload/psr-4 section to it.
By doing so (and (re-)activating your extension in the extension manager, you can add as many psr-4 compliant classes as you like during development without the need to flush any class loading information at all.

Would you be fine if I'd close this ticket, once I added documentation for this fact in a prominent place?

What would be doable however, is a CLI command, which re-builds the autoload information (not flushing it).

If you think these steps are not enough, please explain the cases where you need more than that.

Actions #3

Updated by Joschi Kuphal over 8 years ago

Hi Helmut,

thanks for your feedback. Yes, personally I'd be fine with both your suggestions (composer.json + builtin CLI command) as long as they are well documented somewhere. I must however say that this isn't really what I consider comfortable. At least half of my developers aren't exactly CLI-savvy, and in a certain way I think the tools we use should serve us instead of the other way round ... just my 2 cents. ;)

Thanks for working on in.

Cheers.

Actions #4

Updated by Wouter Wolters over 8 years ago

Meanwhile the CLI command is added to rebuild the autoload files.
Is this enough for you?

Actions #5

Updated by Joschi Kuphal over 8 years ago

Sorry for the late reply. Yes, sounds good. Do you have a link to some kind of documentation for this?

Actions #6

Updated by Alexander Opitz about 8 years ago

I think the command "./cli_dispatch.phpsh extbase extension:dumpclassloadinginformation" is the one in question here.

https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.4/Feature-68589-AddCLICommandToDumpClassLoadingInformation.html

Actions #7

Updated by Alexander Opitz about 8 years ago

Can we close this issue?

Actions #8

Updated by Joschi Kuphal about 8 years ago

Sounds good, yes. Issue can be closed.

Actions #9

Updated by Riccardo De Contardi about 8 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Helmut Hummel)

Closed; thank you for your feedback!

Actions #10

Updated by Alexander Dick over 7 years ago

In my opinion, the typo3temp/autoload/ directory should at least be cleared if you "clear all cache" in the install tool.

Actions

Also available in: Atom PDF