Skip to content

Fix clearing cache when build_dir equals cache_dir #38549

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

Closed
wants to merge 1 commit into from
Closed

Fix clearing cache when build_dir equals cache_dir #38549

wants to merge 1 commit into from

Conversation

BoShurik
Copy link
Contributor

@BoShurik BoShurik commented Oct 13, 2020

Q A
Branch? 5.x
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #38547
License MIT
Doc PR -

Possible solution for equal build_dir and cache_dir introduced in #36515

/cc @mnapoli

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you. I see that we both worked on this: #38548

if ($useBuildDir) {
$fs->rename($realBuildDir, $oldBuildDir);
// Copy the content of the warmed cache in the build dir
$fs->copy($realCacheDir, $realBuildDir);
Copy link
Member

Choose a reason for hiding this comment

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

One need to use mirror().

Also, You just removed $realCacheDir, you cannot use it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$warmupDir was renamed to $realCacheDir previously

Nyholm added a commit to Nyholm/symfony that referenced this pull request Oct 13, 2020
@BoShurik
Copy link
Contributor Author

Fixed in #38548

@BoShurik BoShurik closed this Oct 13, 2020
@BoShurik BoShurik deleted the cache-clear-fix branch October 30, 2020 14:05
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.

Exception while clearing cache in 5.2.0-BETA1
3 participants