Skip to content

[PHP] Migrated include_file to include_code. Added remove_indent for partial includes#3209

Merged
mnocon merged 2 commits into
5.0from
add-indent-true
May 18, 2026
Merged

[PHP] Migrated include_file to include_code. Added remove_indent for partial includes#3209
mnocon merged 2 commits into
5.0from
add-indent-true

Conversation

@mnocon

@mnocon mnocon commented May 17, 2026

Copy link
Copy Markdown
Contributor

Target: v5

For PHP code samples, In code blocks with only a single include_file call:

  • include_code is used instead
  • if the include is a partial one, remove_indent=True is added to the call

Multiple include_* calls within a single code blocks are not covered here, as they require more attention and will be done in a follow-up

To review this, please use HTML report I've attached on Slack - this makes the review much easier.

It contains the changes before and after, and a diff showing what has changed.
Please use the provided HTML file for reviewing - it's generated locally using the existing code samples usage job, this should make the review easier.

Screenshot 2026-05-18 at 11 55 42

@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown

Preview of modified files

Preview of modified Markdown:

@mnocon mnocon marked this pull request as ready for review May 18, 2026 08:49
@mnocon mnocon requested a review from a team May 18, 2026 09:59
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 Bot requested review from adriendupuis, dabrt and julitafalcondusza and removed request for a team May 18, 2026 10:00
@mnocon mnocon force-pushed the add-indent-true branch from 01b3dd3 to 898cd1a Compare May 18, 2026 10:25
@sonarqubecloud

Copy link
Copy Markdown

@dabrt

dabrt commented May 18, 2026

Copy link
Copy Markdown
Contributor

The indent removal seems to be working OK.
Have you tried testing snippets that contain multiple pieces of one file? Would we need to leave remove_indent=True out to not break the code?

@mnocon

mnocon commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Have you tried testing snippets that contain multiple pieces of one file? Would we need to leave remove_indent=True out to not break the code?

Yes, that's exactly why I didn't touch them in this PR - for them, each usage has to be carefully checked and the indent level must be adjusted manually to fit the whole code sample.

I've decided that it's not worth covering in this PR, we might do a follow-up in the future.

@mnocon mnocon merged commit f500dc8 into 5.0 May 18, 2026
18 checks passed
@mnocon mnocon deleted the add-indent-true branch May 18, 2026 17:13
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.

2 participants