8000 Fix framework instantiation in event-dispatcher by GNi33 · Pull Request #7889 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Fix framework instantiation in event-dispatcher #7889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

GNi33
Copy link
Contributor
@GNi33 GNi33 commented May 9, 2017

As the $resolver parameter was split up into $controllerResolver and $argumentResolver, the Framework instantiation call in this code example seems to be outdated and not in line with earlier steps taken in the tutorial.

As the `$resolver` parameter was split up into `$controllerResolver` and `$argumentResolver`, the Framework instantiation call in this code example seems to be outdated and not in line with earlier steps taken in the tutorial.
@javiereguiluz
Copy link
Member

@iltar you know a lot about this controller/argument resolver thing. Could you please check if this proposal is correct? Thanks!

@linaori
Copy link
Contributor
linaori commented Jul 6, 2017

@GNi33 which tutorial are you referring to? This page seems to be up-to-date for the latest version (not the master at 4.0.0): https://symfony.com/doc/current/create_framework/http_kernel_controller_resolver.html

@GNi33
Copy link
Contributor Author
GNi33 commented Jul 6, 2017

@iltar I'm referring to the page about the Event Dispatcher in the Create Framework tutorial:

The pull request changes the code block after the "The last step is the creation..." paragraph, where Simplex\Framework is instantiated. There is only one $resolver parameter being passed.

On the Seperation of concerns page, the instantiation is correct (second code block), as well as on the unit testing page.

This is still present in 3.3, as well as in 3.4

@linaori
Copy link
Contributor
linaori commented Jul 6, 2017

Looks like the fix is to rename this to $controllerResolver and add an $argumentResolver after that. Note: the variables are not initialized in this particular example

@GNi33
Copy link
Contributor Author
GNi33 commented Jul 6, 2017

Yes, you are absolutely right, I missed that. Added it to the pull request.

The matcher isn't being initialized as well here. Are these being left out deliberately in this example?

Copy link
Contributor
@linaori linaori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind if they are left out if this example is to emphasize initialization or the event listener. In theory it is known what those variables should be. Besides of that initialization (which I have no strong opinion of), it looks good to me!

@xabbuh
Copy link
Member
xabbuh commented Jul 21, 2017

Thank you @GNi33.

xabbuh added a commit that referenced this pull request Jul 21, 2017
This PR was squashed before being merged into the 3.2 branch (closes #7889).

Discussion
----------

Fix framework instantiation in event-dispatcher

As the `$resolver` parameter was split up into `$controllerResolver` and `$argumentResolver`, the Framework instantiation call in this code example seems to be outdated and not in line with earlier steps taken in the tutorial.

Commits
-------

bdd6791 Fix framework instantiation in event-dispatcher
@xabbuh xabbuh closed this Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0