Skip to content

Commit

Permalink
DI: section factories is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 19, 2013
1 parent 958120f commit f547138
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Nette/DI/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ public static function parseServices(ContainerBuilder $builder, array $config, $
return strcmp(Config\Helpers::isInheriting($a), Config\Helpers::isInheriting($b));
});

if (!empty($config['factories'])) {
trigger_error("Section 'factories' is deprecated, move definitions to section `services`.", E_USER_DEPRECATED);
}

foreach ($all as $origName => $def) {
if ((string) (int) $origName === (string) $origName) {
$name = count($builder->getDefinitions())
Expand Down

0 comments on commit f547138

Please sign in to comment.