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

Make snippets CS compliant #2620

Merged
merged 2 commits into from Jul 28, 2022
Merged

Make snippets CS compliant #2620

merged 2 commits into from Jul 28, 2022

Conversation

nlemoine
Copy link
Member

@nlemoine nlemoine commented Jul 28, 2022

  • Fix CS on all v2 docs code snippets
  • Fix PHP syntax errors in snippets
  • Self promote var-dumper-configurator package :)

The choice of ECS to run coding standards checks was also motivated by its ability to fix code snippets in markdown files to avoid too much manual maintenance of docs snippets. Note that for the CS fixing to work properly, the snippets have to be valid PHP.

This PR has been a chance to fix many syntax errors in those snippets (missing parenthesis, bracket, etc.).

- Fix CS on all v2 docs code snippets
- Fix PHP syntax errors in snippets
- Self promote var-dumper-configurator package :)
@nlemoine
Copy link
Member Author

nlemoine commented Jul 28, 2022

The command to fix snippets:

vendor/bin/ecs check-markdown docs/v2/**/*.md --fix

Maybe we should include it in the composer scripts.

@coveralls
Copy link

coveralls commented Jul 28, 2022

Coverage Status

Coverage remained the same at 88.579% when pulling 1862f9d on 2.x-docs-snippets-cs into 58bc92f on 2.x.

@gchtr
Copy link
Member

gchtr commented Jul 28, 2022

Wait... that is... what in the …

rgtl

I didn’t know you could do that! Yes, yes, yes, yes! This is amazing. 🍾😍🥳

Let’s also include that command in the Composer scripts.

I assume you saw my note about the documentation coding standards in the changes to CONTRIBUTING.md in #2619. I can update that pull request based on this.

gchtr
gchtr previously approved these changes Jul 28, 2022
@nlemoine
Copy link
Member Author

Glad you like it with such enthusiasm! 😄

Can you approve it again?

@nlemoine nlemoine merged commit 9dfd85a into 2.x Jul 28, 2022
@nlemoine nlemoine deleted the 2.x-docs-snippets-cs branch July 28, 2022 14:26
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.

None yet

3 participants