Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Config] Fix GeneratedConfigTest not being able to generate snapshots anymore#61140

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
KevinVanSonsbeek wants to merge1 commit intosymfony:7.2
base:7.2
Choose a base branch
Loading
fromKevinVanSonsbeek:bugfix/#61139-generatedconfigtest-unable-to-regenerate-snapshots

Conversation

KevinVanSonsbeek
Copy link
Contributor

@KevinVanSonsbeekKevinVanSonsbeek commentedJul 16, 2025
edited by nicolas-grekas
Loading

QA
Branch?7.2
Bug fix?no
New feature?no
Deprecations?no
IssuesFix#61139
LicenseMIT

PR#57614 Removed multiple uses ofuniqid. In the specific PR changes were made to the GeneratedConfigTest, to change how the directory was built for the config.

This inadvertedly broke the generating of snapshot files, due to the outputDir being changed to a by reference argument, and always overwriting the value to a temp dir. (While the snapshot files should not be written to a temp dir)

@KevinVanSonsbeek
Copy link
ContributorAuthor

Psalm errors seem unrelated to my changes

@KevinVanSonsbeekKevinVanSonsbeek changed the titlebugfix(#61139): Only generate an outputDir if none is set.bugfix(#61139): Fix GeneratedConfigTest not being able to generate snapshots anymoreJul 16, 2025
@carsonbotcarsonbot changed the titlebugfix(#61139): Fix GeneratedConfigTest not being able to generate snapshots anymore[Config] bugfix(#61139): Fix GeneratedConfigTest not being able to generate snapshots anymoreJul 17, 2025
@nicolas-grekasnicolas-grekas changed the title[Config] bugfix(#61139): Fix GeneratedConfigTest not being able to generate snapshots anymore[Config] Fix GeneratedConfigTest not being able to generate snapshots anymoreJul 17, 2025
unlink($outputDir);
mkdir($outputDir);
$this->tempDir[] = $outputDir;
if (null === $outputDir) {

Choose a reason for hiding this comment

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

$outputDir is going to be always null
what we need is probably

Suggested change
if (null ===$outputDir) {
if (1 <\func_num_args()) {

Copy link
ContributorAuthor

@KevinVanSonsbeekKevinVanSonsbeekJul 17, 2025
edited
Loading

Choose a reason for hiding this comment

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

Lines 87 -> 89 of the test contain commented code, that when uncommented try to regenerate the snapshot files.
On line 88 it specifically passes the directory of the expected code, so the new snapshots are generated in the given location. Resulting in the outputDir not being null.

Choose a reason for hiding this comment

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

got it thanks

unlink($outputDir);
mkdir($outputDir);
$this->tempDir[] = $outputDir;
if (null === $outputDir) {

Choose a reason for hiding this comment

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

got it thanks

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@GromNaNGromNaNAwaiting requested review from GromNaN

Assignees
No one assigned
Projects
None yet
Milestone
7.2
Development

Successfully merging this pull request may close these issues.

3 participants
@KevinVanSonsbeek@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp