Skip to content

Commit

Permalink
Statement: fixed explode()
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 30, 2021
1 parent 2db3144 commit a1c22cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DI/Definitions/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct($entity, array $arguments = [])

// normalize Class::method to [Class, method]
if (is_string($entity) && Strings::contains($entity, '::') && !Strings::contains($entity, '?')) {
$entity = explode('::', $entity);
$entity = explode('::', $entity, 2);
}
if (is_string($entity) && substr($entity, 0, 1) === '@') { // normalize @service to Reference
$entity = new Reference(substr($entity, 1));
Expand Down

0 comments on commit a1c22cb

Please sign in to comment.