[TYPO3-mvc] 6.2: How to debug recursive validation

Helmut Hummel helmut.hummel at typo3.org
Sat Jun 7 13:24:38 CEST 2014


Hi!

On 06.06.14 16:04, g4-lisz at tonarchiv.ch wrote:

>                  $repository = new
> Tx_Hplusinfo_Domain_Repository_MessungRepository();
>                  return $repository->findByKlinik($this);
>          }

Never *ever* instantiate objects with makeInstance or new operator, 
especially do not do so for singleton objects.

Instead use the object manager to create the object so that all 
dependiencies will be injected into the object.

You can get access to the object manager by dependency injection.

> This worked in 4.6.

There was a compatibility layer if someone nevertheless used new or 
makeInstance to create repository objects, which has now been removed.


Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list