Skip to content
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

[Documentation] Add hint about disabling autowire when extending a controller #10706

Conversation

adrianmarte
Copy link
Contributor

Q A
Branch? 1.6
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets mentioned in #9353
License MIT

@adrianmarte adrianmarte requested a review from a team as a code owner September 25, 2019 19:43
methods: [GET]
defaults:
_controller: app.controller.shop.homepage:customAction
_controller: app.controller.product:showAction
Copy link
Member

Choose a reason for hiding this comment

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

It shouldn't work, this service should still be named sylius.controller.product. Current documentation seems ok for me. Can you explain your problem briefly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The documentation is in my opinion a bit misleading.
In the chapter "How to customize a Resource Controller?" there's described how to create the App\Controller\ProductController to overwrite sylius.controller.product. So it should be mentioned in this chapter how to configure the route for it.

But I understand now, that this doc is heavily relying on the linked pull request und with that it makes more sense, and will think again how to possible improve the docs. Because in my option there are too much dependencies to the pull request, which does not ONLY override a controller, but also the repository.
So at the moment I have the idea to add a second, simpler pull request to link in the docs which just overrides controller...

Copy link
Member

Choose a reason for hiding this comment

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

I would love to review and merge it :)

And I'm aware that our docs require a few improvements here and there. Thanks for understanding and help :)

@Zales0123 Zales0123 added the Documentation Documentation related issues and PRs - requests, fixes, proposals. label Oct 10, 2019
@stale
Copy link

stale bot commented Jan 2, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Issues and PRs with no recent activity, about to be closed soon. label Jan 2, 2020
@stale stale bot closed this Jan 9, 2020
@lchrusciel lchrusciel reopened this Jan 12, 2020
@stale stale bot removed the Stale Issues and PRs with no recent activity, about to be closed soon. label Jan 12, 2020
pamil and others added 3 commits January 13, 2020 12:25
@lchrusciel lchrusciel changed the base branch from 1.6 to 1.5 January 13, 2020 15:43
@lchrusciel lchrusciel force-pushed the docs/improving_how-to-customize-a-resource-controller branch from bab242d to 47096a6 Compare January 13, 2020 15:43
… html requests (pfazzi)

This PR was merged into the 1.5 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.6
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes Sylius#10930
| License         | MIT



Commits
-------

c6cea6f [API] Fixed OrderController save action issue in not html requests
@lchrusciel lchrusciel force-pushed the docs/improving_how-to-customize-a-resource-controller branch from 47096a6 to 85f1e67 Compare January 13, 2020 15:50
@lchrusciel lchrusciel changed the base branch from 1.5 to 1.6 January 13, 2020 15:50
@lchrusciel lchrusciel changed the base branch from 1.6 to 1.5 January 13, 2020 15:50
@lchrusciel lchrusciel force-pushed the docs/improving_how-to-customize-a-resource-controller branch from 85f1e67 to d4ca7ee Compare January 13, 2020 15:50
@lchrusciel
Copy link
Member

The base of this pull-request was changed, you need fetch and reset your local branch
if you want to add new commits to this pull request. Reset before you pull, else commits
may become messed-up.

Unless you added new commits (to this branch) locally that you did not push yet,
execute git fetch origin && git reset "docs/improving_how-to-customize-a-resource-controller" to update your local branch.

Feel free to ask for assistance when you get stuck 👍

@lchrusciel
Copy link
Member

There were some problems with commits so I've opened a new PR with your proposal(and your commits). I hope you don't mind.

Closing in favor of #11019.

@lchrusciel lchrusciel closed this Jan 14, 2020
lchrusciel added a commit that referenced this pull request Jan 15, 2020
…ending a controller (adrianmarte)

This PR was merged into the 1.5 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.5
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | replaces #10706
| License         | MIT

Commits
-------

390b073 Improve docs for extending a controller
b946dc9 Fix code block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation related issues and PRs - requests, fixes, proposals.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants