thephpleague / container

Small but powerful dependency injection container

Home Page:http://container.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't override a definition.

Boevsson opened this issue · comments

Given:
$container->add('test', function() { return 'test1'; });
$container->add('test', function() { return 'test2'; });

Then:
$testClass = $container->get('test' );

Expected result:
$testClass to equal 'test2'

Actual result:
$testClass equals 'test1'