Project

General

Profile

Actions

Feature #19503

closed

Implement autoloading for TYPO3

Added by Dmitry Dulepov about 16 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2008-10-24
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

The attached patch implements autoloading for TYPO3 classes.

The patch consists from two files. The first file adds autoloading, the second file changes TYPO3 Frontend to use autoloading.

Autoloading is based on the concept of class registry and uses SPL to add TYPO3 autoloader to the chain of system autoloaders.

Class registry consists from two groups, each group contains two files.

The first group is located at t3lib/stddb/autoload_*.ser and includes information about all classes from t3lib/ and typo3/ directories. This group is used when TYPO3 is just installed.

The second group consists from files with the same name in typo3conf/ directory. These files are unique for the installation and list classes for core + installed extensions. Extension Manager updates these files when extension is installed or uninstalled. This group reduced memory usage at runtime.

Registry exists for Frontend and Backend. Frontend version does not include Backend classes from typo3/ directory (but includes typo3/ext/ and typo3/sysext/).

When user just installs TYPO3, he can login to the system. The big yellow box will prompt him to update autoloader database and provide a link to Tools>DB module. Additionally command line script exists to update autoloader data if something goes wrong in Backend.

The second file removes require_once calls from TYPO3 Frontend and thus can be used as demo/test for autoloader feature.

(issue imported from #M9633)


Files

9633-part1-add-autoloader.diff (103 KB) 9633-part1-add-autoloader.diff Administrator Admin, 2008-10-24 10:07
9633-part2-use-autoloader-in-fe.diff (7.31 KB) 9633-part2-use-autoloader-in-fe.diff Administrator Admin, 2008-10-24 10:07
9633-part3-enable-autoload-for-BE.diff (2.2 KB) 9633-part3-enable-autoload-for-BE.diff Administrator Admin, 2008-10-25 11:46
9633-part1-v2-no_singleton.diff (103 KB) 9633-part1-v2-no_singleton.diff Administrator Admin, 2008-10-26 09:18
0009633_v5_essentials.patch (43.5 KB) 0009633_v5_essentials.patch Administrator Admin, 2009-02-20 21:41
0009633_v5_lang.patch (17.4 KB) 0009633_v5_lang.patch Administrator Admin, 2009-02-20 21:41
0009633_v5_cleanup.patch (107 KB) 0009633_v5_cleanup.patch Administrator Admin, 2009-02-21 12:07
0009633_v6_cleanup_t3lib.patch (11.9 KB) 0009633_v6_cleanup_t3lib.patch Administrator Admin, 2009-03-01 13:32
0009633_v6_essentials.patch (47.1 KB) 0009633_v6_essentials.patch Administrator Admin, 2009-03-01 13:33
typo3v4-autoload.patch (43.9 KB) typo3v4-autoload.patch Administrator Admin, 2009-04-26 15:59
extdeveval.patch (11.7 KB) extdeveval.patch Administrator Admin, 2009-04-26 15:59
0009633_v8_autoloader.patch (16.6 KB) 0009633_v8_autoloader.patch Administrator Admin, 2009-05-01 17:37
0009633_v8_enable.patch (8.81 KB) 0009633_v8_enable.patch Administrator Admin, 2009-05-01 17:37
0009633_v9_autoloader.patch (15.7 KB) 0009633_v9_autoloader.patch Administrator Admin, 2009-05-12 18:41

Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #19580: Some extensions do not work anymore in the frontendClosedOliver Hader2008-11-06

Actions
Related to TYPO3 Core - Bug #20483: Misbehaviours due to integration of autoloaderClosedOliver Hader2009-05-20

Actions
Is duplicate of TYPO3 Core - Feature #19192: Add autoloading to reduce require(_once) callsClosedIngo Renner2008-08-04

Actions
Is duplicate of TYPO3 Core - Feature #18548: Adding autoloadClosedOliver Hader2008-04-03

Actions
Has duplicate TYPO3 Core - Feature #16385: automatic file loading checkClosedChris topher2006-07-20

Actions
Actions

Also available in: Atom PDF