Project

General

Profile

Actions

Feature #94280

closed

Using global namespace for cached version of ext_localconf and ext_tables

Added by Stefan Rumzucker over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2021-06-04
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
ext_localconf, ext_tables, namespace
Complexity:
easy
Sprint Focus:

Description

Is there any reason not to use global namespace statements when concatenating all ext_localconf resp. ext_table files?

Creating the cached file like

/**
 * Compiled ext_localconf.php cache file
 */

/**
 * Extension: core
 * File: .../typo3/sysext/core/ext_localconf.php
 */

namespace {
  // content of typo3/sysext/core/ext_localconf.php
}

/**
 * Extension: core
 * File: .../typo3/sysext/extbase/ext_localconf.php
 */

namespace {
  // content of typo3/sysext/extbase/ext_localconf.php
}

...

would relax some rules and allow use statements in those files, which would improve readability and maintainability for extensions.

As up to now no one could introduce namespaces in those files or shouldn't use use statements, it should be safe to introduce this simple wrapper.

I also could not think of any downside and suppose performance wouldn't be influenced in any way.

Any thoughts on this?


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #94983: Add Important.rst for #94280Closed2021-08-24

Actions
Related to TYPO3 Core - Task #94984: Declare strict types in ext_tables.php filesClosed2021-08-24

Actions
Related to TYPO3 Core - Task #94985: Use import instead of FQCN in ext_tables.php filesClosed2021-08-24

Actions
Actions #1

Updated by Gerrit Code Review over 3 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/c/Packages/TYPO3.CMS/+/70548

Actions #2

Updated by Gerrit Code Review over 3 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/c/Packages/TYPO3.CMS/+/70548

Actions #3

Updated by Gerrit Code Review over 3 years ago

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

Actions #4

Updated by Gerrit Code Review over 3 years ago

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

Actions #5

Updated by Wouter Wolters over 3 years ago

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

Updated by Andreas Kienast over 3 years ago

  • Related to Task #94983: Add Important.rst for #94280 added
Actions #7

Updated by Wouter Wolters over 3 years ago

  • Related to Task #94984: Declare strict types in ext_tables.php files added
Actions #8

Updated by Markus Klein over 3 years ago

  • Related to Task #94985: Use import instead of FQCN in ext_tables.php files added
Actions #9

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF