Skip to content

[%pS migration] Use %pS in ext/phar - #23166

Merged
DanielEScherzer merged 7 commits into
php:PHP-8.6from
DanielEScherzer:ps-migration-ext-phar
Oct 5, 2026
Merged

DanielEScherzer merged 7 commits into
php:PHP-8.6from
DanielEScherzer:ps-migration-ext-phar

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Member

No description provided.

@LamentXU123 LamentXU123 changed the title [%pS migration] Use %pS in ext/phar/* [%pS migration] Use %pS in ext/phar Aug 9, 2026
@DanielEScherzer
DanielEScherzer changed the base branch from master to PHP-8.6 October 3, 2026 19:38
@DanielEScherzer
DanielEScherzer marked this pull request as ready for review October 5, 2026 02:16

@LamentXU123 LamentXU123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you. If you are fine to merge yourself please go ahead :)

Comment thread ext/phar/phar_object.c Outdated
@DanielEScherzer

Copy link
Copy Markdown
Member Author

Thank you. If you are fine to merge yourself please go ahead :)

Since you're the extension maintainer: any preference on if this is squashed as a single commit, or done individually? Since the changes to each file are entirely separate can be done separately for clearer history tracking

Wait. Is this correct?
I think we should pass dir_name directly?

fixing

@LamentXU123

LamentXU123 commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

I don't have strong preferrence in this topic. If you'd prefer rebase and merge just do it.
Sorry I give the approval too quickly. I've checked it again and I think it's correct now :) (after your fix to my comments above)

@DanielEScherzer

Copy link
Copy Markdown
Member Author

I don't have strong preferrence in this topic. If you'd prefer rebase and merge just do it. Sorry I give the approval too quickly. I've checked it again and I think it's correct now :) (after your fix to my comments above)

Yeah, I was doing a bunch of these mechanically when I created them so was also going to do a confirmation check before merging, but thanks for catching that!

Comment thread ext/phar/phar.c

/* zip or tar-based phar */
name = zend_strpprintf(4096, "phar://%s/%s", ZSTR_VAL(file_handle->filename), ".phar/stub.php");
name = zend_strpprintf(4096, "phar://%pS/%s", file_handle->filename, ".phar/stub.php");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

as a follow up on master, we don't need %s for ".phar/stub.php" since we know the exact literal...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed. You can create a seperate commit about this.

@DanielEScherzer

Copy link
Copy Markdown
Member Author

Test failures are unrelated; since I need to upmerge this anyway I'll merge locally so that commits stay signed

@DanielEScherzer
DanielEScherzer merged commit 90a5c12 into php:PHP-8.6 Oct 5, 2026
17 of 18 checks passed
@DanielEScherzer
DanielEScherzer deleted the ps-migration-ext-phar branch October 5, 2026 06:53
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