Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
allow synthetic before compilation
  • Loading branch information
ro0NL committed Aug 23, 2016
commit bf412ebb881aaf93f7cb7ac6c5914849ddfaf69c
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@ public function has($id)
*/
public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
if (!$this->compiled) {
@trigger_error(sprintf('Calling %s() before compiling the container is deprecated since version 3.2 and will throw an exception in 4.0.', __METHOD__), E_USER_DEPRECATED);
}

$id = strtolower($id);

if ($service = parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) {
Expand All @@ -415,6 +411,10 @@ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INV
return $this->get($this->aliasDefinitions[$id]);
}

if (!$this->compiled) {
@trigger_error(sprintf('Calling %s() before compiling the container is deprecated for non-synthetic services since version 3.2 and will throw an exception in 4.0.', __METHOD__), E_USER_DEPRECATED);
}

try {
$definition = $this->getDefinition($id);
} catch (ServiceNotFoundException $e) {
Expand Down