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

DOC Nested RequestHandlers #415

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Dec 4, 2023

Issue #401

Linting errors appear invalid, seem like linter rules need to be relaxed

@emteknetnz emteknetnz force-pushed the pulls/4.13/nested-requesthandlers branch 2 times, most recently from fd73a77 to 01a26a9 Compare December 4, 2023 21:34
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

This first review is just about the markdown linting - all of the failures were valid. Here's how you should resolve them:

en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
@emteknetnz emteknetnz force-pushed the pulls/4.13/nested-requesthandlers branch 6 times, most recently from 00cb8ad to 5cba9fc Compare December 6, 2023 04:32
@emteknetnz
Copy link
Member Author

emteknetnz commented Dec 6, 2023

@GuySartorelli Have updated. I really dislike the php namespace requirements linting, I don't want to add an empty namespace to the code examples because its unnecessary and will indent the examples. While I could add an arbitary namespace it might not match what someones project has. Can we simply disable that rule in the linter?

@GuySartorelli
Copy link
Member

GuySartorelli commented Dec 6, 2023

I really dislike the php namespace requirements linting, I don't want to add an empty namespace to the code examples

Do not use empty namespaces, unless the example explicitly is for the Page or PageController classes which we have included in recipes.

For everything else, a real namespace should be used (e.g. App\Model for models, App\Control for controllers, App\Extension for extensions, etc etc)

While I could add an arbitary namespace it might not match what someones project has

These are examples, which show best practice. People can use whatever namespace they want. They don't have to match the examples. They might name the classes or methods something else too - but we still have class names and method names in examples.

I still see people not using namespaces in their projects, and part of the reason seems to be that almost none of our examples have had namespaces until very recently. Documentation that shows best practice is more likely to lead to people using best practice in their own projects.

en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
en/02_Developer_Guides/02_Controllers/02_Routing.md Outdated Show resolved Hide resolved
@emteknetnz emteknetnz force-pushed the pulls/4.13/nested-requesthandlers branch 2 times, most recently from f61fd88 to 7481d4b Compare December 6, 2023 21:13
@emteknetnz emteknetnz force-pushed the pulls/4.13/nested-requesthandlers branch from 7481d4b to 979cbd5 Compare December 10, 2023 20:27
@GuySartorelli
Copy link
Member

Please rebase so the php linting passes

@emteknetnz emteknetnz force-pushed the pulls/4.13/nested-requesthandlers branch from 979cbd5 to 78e5322 Compare December 11, 2023 01:08
@emteknetnz
Copy link
Member Author

Done

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

LGTM

@GuySartorelli GuySartorelli merged commit 00ba6a0 into silverstripe:4.13 Dec 11, 2023
3 checks passed
@GuySartorelli GuySartorelli deleted the pulls/4.13/nested-requesthandlers branch December 11, 2023 01:11
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