Skip to content

resolve aliases from container when using parameters#19071

Merged
taylorotwell merged 4 commits into
laravel:5.4from
lighe:makeWith-get-alias
May 5, 2017
Merged

resolve aliases from container when using parameters#19071
taylorotwell merged 4 commits into
laravel:5.4from
lighe:makeWith-get-alias

Conversation

@lighe

@lighe lighe commented May 5, 2017

Copy link
Copy Markdown
Contributor

$app->bind(CustomClass::class, function($app, $params) { ... });
$app->alias(CustomClass::class, 'CustomAlias');
$app->makeWith('CustomAlias', [..]); // exception "Class CustomAlias does not exist"

When passing parameters to Illuminate/Container/Container resolve() method, the alias will not be resolved correctly. This pull request fixes that.

@taylorotwell

Copy link
Copy Markdown
Member

Can you add a test?

@lighe

lighe commented May 5, 2017

Copy link
Copy Markdown
Contributor Author

Sure, I will sort over the weekend and update the pull request.

@taylorotwell
taylorotwell merged commit d4b4e18 into laravel:5.4 May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants