Skip to content

[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

Merged
merged 5 commits into from
Nov 9, 2015

Conversation

pierredup
Copy link
Contributor

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

@pierredup pierredup changed the title Dumpfile [Filesystem] Changed dumpFile to allow dumping to streams Oct 6, 2015
@pierredup pierredup force-pushed the dumpfile branch 2 times, most recently from aa428cc to a5b16ab Compare October 6, 2015 23:00
@@ -11,6 +11,7 @@

namespace Symfony\Component\Filesystem;

use RuntimeException;
Copy link
Member

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.

Copy link
Member

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;
Copy link
Member

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.

@pierredup
Copy link
Contributor Author

Status: Needs Review

{
$components = explode('://', $filename, 2);

return 2 === count($components) ? array($components[0], $components[1]) : array(null, $components[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Two whitespaces.

@fabpot
Copy link
Member

fabpot commented Oct 13, 2015

👍

@jakzal
Copy link
Contributor

jakzal commented Oct 15, 2015

👍

status: reviewed

@jakzal
Copy link
Contributor

jakzal commented Oct 15, 2015

@pierredup I was too quick. testTempnamWithZlibSchemeFails() fails on windows.

@fabpot
Copy link
Member

fabpot commented Oct 16, 2015

@pierredup Can you have a look at the Windows failure? Thanks.

@pierredup
Copy link
Contributor Author

ping @fabpot

@fabpot
Copy link
Member

fabpot commented Nov 9, 2015

Thank you @pierredup.

@fabpot fabpot merged commit 5ca7dee into symfony:2.8 Nov 9, 2015
fabpot added a commit that referenced this pull request Nov 9, 2015
…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]);
Copy link
Contributor

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]);

Copy link
Member

Choose a reason for hiding this comment

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

seems so

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.

9 participants