Skip to content

[Filesystem] improved errors for invalid dump targets #24134

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

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 8, 2017

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #24097
License MIT
Doc PR

@xabbuh xabbuh added this to the 2.7 milestone Sep 8, 2017
}

if (is_link($dir)) {
throw new IOException(sprintf('The parent path of "%s" is a symlink to a not existing directory.', $dir));
Copy link
Member

Choose a reason for hiding this comment

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

Would nonexistent (dir) sound better than not existing (dir)?

@xabbuh xabbuh force-pushed the issue-24097 branch 3 times, most recently from 0337f1f to c6ccc3f Compare September 11, 2017 08:48
@robfrawley
Copy link
Contributor

@xabbuh This pull request works great, and without error when applied to symfony/symfony:2.7.x-dev during a liip/imagine-bundle test suite run, resolving #24105 (comment)!

*/
public function testDumpFailsIfTargetIsSymlinkAndSymlinkTargetDoesNotExist()
{
$this->markAsSkippedIfSymlinkIsMissing();
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to check why this does not apply on Appveyor or if is_link() works differently on Windows than on Unix. If someone using Windows can help here, that would be really appreciated.

@@ -525,13 +525,21 @@ public function isAbsolutePath($file)
* @param null|int $mode The file mode (octal). If null, file permissions are not modified
* Deprecated since version 2.3.12, to be removed in 3.0.
*
* @throws IOException If the file cannot be written to.
* @throws IOException if the file cannot be written to
Copy link
Member

Choose a reason for hiding this comment

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

I think we disabled the fabbot rule triggering this, can you check?

Copy link
Member

Choose a reason for hiding this comment

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

No, I've fixed everything in the codebase... using php-cs-fixer.

@nicolas-grekas
Copy link
Member

Failure on Windows looks related.

Status: needs work

@fabpot
Copy link
Member

fabpot commented Mar 31, 2018

@xabbuh Can you have a look at the tests?

@fabpot fabpot modified the milestones: 2.7, 2.8 May 28, 2018
@fabpot
Copy link
Member

fabpot commented May 28, 2018

@xabbuh Can you try to finish this one?

@fabpot
Copy link
Member

fabpot commented Sep 4, 2018

soft ping @xabbuh

@xabbuh
Copy link
Member Author

xabbuh commented Sep 6, 2018

I have no idea how to make the test pass on Windows and I don't have access to a Windows machine to debug this properly. I am closing here for now. Anyone wanting to dig into the issue can reuse the changes here (#24134 (comment) is the part that still needs to be fixed). I will gladly help with any questions regard the current state of the changes.

@xabbuh xabbuh closed this Sep 6, 2018
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.

7 participants