Bug #30312

Entity class name is not properly detected in Repository::__construct()

Added by Bastian Waidelich almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Persistence
Start date:
2011-09-27
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

If a package key contains the string "Repository", model class names are not correctly resolved in the Repository constructor because the line:

$this->entityClassName = str_replace(array('\\Repository\\', 'Repository'), array('\\Model\\', ''), get_class($this));

fails to detect the correct position of the substring and should be replaced by something like:
$this->entityClassName = preg_replace(array('/\\Repository\\/', '/Repository$/'), array('\\Model\\', ''), get_class($this));

See #30306

#2

Updated by Mr. Hudson almost 10 years ago

  • Status changed from New to Under Review

Patch set 1 of change I9698f905edfc038d9a618ae1462da0e0e540c0c2 has been pushed to the review server.
It is available at http://review.typo3.org/6514

#3

Updated by Mr. Hudson almost 10 years ago

Patch set 2 of change I9698f905edfc038d9a618ae1462da0e0e540c0c2 has been pushed to the review server.
It is available at http://review.typo3.org/6514

#4

Updated by Karsten Dambekalns over 9 years ago

  • Assignee set to Thomas Hempel
  • Target version set to 1.0.1
  • Has patch set to No
#5

Updated by Mr. Hudson over 9 years ago

Patch set 3 of change I9698f905edfc038d9a618ae1462da0e0e540c0c2 has been pushed to the review server.
It is available at http://review.typo3.org/6514

#6

Updated by Thomas Hempel over 9 years ago

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

Also available in: Atom PDF