Skip to content

Commit

Permalink
Merge edee5b8 into 64022a7
Browse files Browse the repository at this point in the history
  • Loading branch information
LionsAd committed Dec 14, 2015
2 parents 64022a7 + edee5b8 commit e9d0ba8
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 804 deletions.
3 changes: 3 additions & 0 deletions HACK.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## List of classes that we've altered ##
- DependencyInjection:
- Drupal\Component\DependencyInjection\Container
- Drupal\Component\DependencyInjection\PhpArrayContainer
- Database:
- Drupal\Core\Database\Connection
- Drupal\Core\Database\Database
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Component/DependencyInjection/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER)
* {@inheritdoc}
*/
public function has($id) {
return isset($this->services[$id]) || isset($this->serviceDefinitions[$id]);
return isset($this->aliases[$id]) || isset($this->services[$id]) || isset($this->serviceDefinitions[$id]) || array_key_exists($id, $this->services);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected function dumpMethodCalls(array $calls) {
$arguments = $this->dumpCollection($call[1]);
}

$code[$key] = [$method, $arguments];
$code[$key] = array($method, $arguments);
}

return $code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ protected function resolveServicesAndParameters($arguments) {
}

// Resolve parameters.
if ($argument[0] === '%') {
if (isset($argument[0]) && $argument[0] === '%') {
$name = substr($argument, 1, -1);
if (!isset($this->parameters[$name])) {
$arguments[$key] = $this->getParameter($name);
Expand All @@ -254,7 +254,7 @@ protected function resolveServicesAndParameters($arguments) {
}

// Resolve services.
if ($argument[0] === '@') {
if (isset($argument[0]) && $argument[0] === '@') {
$id = substr($argument, 1);
$invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
if ($id[0] === '?') {
Expand Down
Loading

0 comments on commit e9d0ba8

Please sign in to comment.