-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Filesystem] Changed dumpFile to allow dumping to streams #16156
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
Conversation
aa428cc
to
a5b16ab
Compare
@@ -11,6 +11,7 @@ | |||
|
|||
namespace Symfony\Component\Filesystem; | |||
|
|||
use RuntimeException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be removed and \RuntimeException
used in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better, as we have exception classes for this component, they should be used instead.
@@ -11,6 +11,7 @@ | |||
|
|||
namespace Symfony\Component\Filesystem\Tests; | |||
|
|||
use Phar; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be remove and \Phar
should be used in the code.
Status: Needs Review |
{ | ||
$components = explode('://', $filename, 2); | ||
|
||
return 2 === count($components) ? array($components[0], $components[1]) : array(null, $components[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two whitespaces.
👍 |
👍 status: reviewed |
@pierredup I was too quick. |
@pierredup Can you have a look at the Windows failure? Thanks. |
…tive tempnam() and fixed dumpFile to allow dumping to streams
ping @fabpot |
Thank you @pierredup. |
…ams (markchalloner, pierredup) This PR was merged into the 2.8 branch. Discussion ---------- [Filesystem] Changed dumpFile to allow dumping to streams | Q | A | ------------- | --- | Bug fix? | yes | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10018 | License | MIT | Doc PR | symfony/symfony-docs#5393 This is a follow-up of #14970 with comments addressed Commits ------- 5ca7dee Fix mode a17aa5e Fixed failing test for HHVM 61a3afd Removed unused logic in MockStream 247266c Update coding standard for MockStream c6a7747 [Filesystem] added tempnam() stream wrapper aware version of PHP's native tempnam() and fixed dumpFile to allow dumping to streams
{ | ||
$components = explode('://', $filename, 2); | ||
|
||
return 2 === count($components) ? array($components[0], $components[1]) : array(null, $components[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldnt this be simlified to
return 2 === count($components) ? $components : array(null, $components[0]);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems so
This is a follow-up of #14970 with comments addressed