Project

General

Profile

Actions

Task #56944

closed

Check for a proper extension key on load

Added by Pascal Dürsteler over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2014-03-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I discussed this with Stefan Neufeind yesterday and are now submitting this as a task. The aim is mainly to enforce the CGL for extension keys, so developers won't run into errors which are very frustrating and time-consuming to resolve.

When developing an extension, and the first character of the vendor name is not uppercase, you will run into troubles when trying to implement model relations. The error you'll get is Found an invalid element type declaration in %s. A type "'\\vendor\\package\\Domain\\Repository\\FooRepository'" does not exist.

I ran into that very problem yesterday and would have loved to get some guidance from TYPO3 instead of an error which you need to google to get your solution, and this at a very late point.

My suggestion is to implement a check when loading the extension in the extension manager. If the key is not well formatted, it won't be loaded and you'll see a clear error telling you the actual problem. This clearly is a "nice to have" feature. As the check only happens when loading the extension, the general performance of the extension should not be affected.

Actions #1

Updated by Pascal Dürsteler over 10 years ago

Doing it through the extension manager would be a lot of work. I decided to put it into the ExtensionUtility, since there are other checks performing. I am working on this, however, I have a few questions here..

http://docs.typo3.org/typo3cms/CodingGuidelinesReference/PhpFileFormatting/FileStructure/Index.html?highlight=namespace only mentions that "TYPO3 Core" extensions are UpperCamelCase. So, does that also count for other extensions? And if so...

There are extensions which do not comply to these CGL (UpperCamelCase). If the extension is just providing libraries, there most likely won't be any issue using them. So I am not sure if we should throw exceptions (which would render them unusable) or just log something into the deprecation log, which may be ignored by the developer.

Actions #2

Updated by Gerrit Code Review over 10 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/28469

Actions #3

Updated by Gerrit Code Review over 10 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/28469

Actions #4

Updated by Gerrit Code Review over 10 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/28469

Actions #5

Updated by Gerrit Code Review over 10 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/28469

Actions #6

Updated by Gerrit Code Review over 10 years ago

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

Actions #7

Updated by Gerrit Code Review over 10 years ago

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

Actions #8

Updated by Gerrit Code Review over 9 years ago

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

Actions #9

Updated by Gerrit Code Review over 9 years ago

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

Actions #10

Updated by Pascal Dürsteler over 9 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF