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

Fix #912: Ignore deleted files in file_size task #1055

Open
wants to merge 4 commits into
base: v2.x
Choose a base branch
from

Conversation

jmdelehaye
Copy link

Q A
Branch master for features and deprecations
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? no
Fixed tickets #912

This PR :

NB: This dev was made on v1.5.1, due to my local PHP version.

@jmdelehaye jmdelehaye changed the title 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 Fix #912: Ignore deleted files in file_size task Nov 25, 2022
@veewee
Copy link
Contributor

veewee commented Nov 29, 2022

Hello,

Thanks for the PR!
I am a bit confused though:

private function parseFilesFromDiff(Diff $diff): FilesCollection
{
$files = [];
/** @var File $file */
foreach ($diff->getFiles() as $file) {
$fileObject = $this->makeFileRelativeToProjectDir($file);
if ($file->isDeletion() || !$this->filesystem->exists($fileObject->getPathname())) {
continue;
}
$files[] = $fileObject;
}
return new FilesCollection($files);
}

The files should never contain any deleted files to begin with.
Can you tell me more on how I can reproduce the issue?

@veewee veewee changed the base branch from master to v2.x June 18, 2023 13:29
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.

File check always fail after a file is deleted from the repository
2 participants