Commit Graph

27192 Commits

Author SHA1 Message Date
Leo Feyer
ee4adaaf27 Use a dedicated exception in the file locator 2016-08-09 07:23:16 -07:00
Fabien Potencier
2faf6f32d2 feature #19529 Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates (Alex Pott)
This PR was squashed before being merged into the 3.2-dev branch (closes #19529).

Discussion
----------

Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/19526
| License       | MIT
| Doc PR        |

Commits
-------

cb362f2 Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates
2016-08-09 06:44:53 -07:00
Alex Pott
cb362f284f Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates 2016-08-09 06:44:52 -07:00
Fabien Potencier
90f7ff50c8 feature #19473 [Security] Expose the required roles in AccessDeniedException (Nicofuma)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Security] Expose the required roles in AccessDeniedException

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Nowadays it is more and more common to protect some sensitive actions and part of a website using 2FA or some re-authentication mechanism (per example, on Github you have to enter your password again when you add an ssh key). But currently, in Symfony, it is really hard to implement without having to duplicate the logic, provide an explicit list of URLs to protect or hack into the security component.

A good way to achieve that would be to add a special role (like IS_AUTHENTICATED_FULLY) and use it in the access map. But it requires us to be able to have a custom logic in an ExceptionListener depending on the roles behind an AccessDeniedException.

With this patch we could write an ExceptionListener of this kind (a similar logic could also be used in an AccessDeniedHandler):

```php
    public function onKernelException(GetResponseForExceptionEvent $event)
    {
        $exception = $event->getException();
        do {
            if ($exception instanceof AccessDeniedException) {
                foreach ($exception->getAttributes() as $role) {
                    if ($role === 'IS_AUTHENTICATED_2FA' && !$this->accessDecisionManager->decide($this->tokenStorage->getToken(), $role, $exception->getObject())) {
                        // Start 2FA
                    }
                }
            }
        } while (null !== $exception = $exception->getPrevious());
    }
```

Replaces #18661

Commits
-------

6618c18 [Security] Expose the required roles in AccessDeniedException
2016-08-09 06:40:33 -07:00
Fabien Potencier
5e601b95a2 minor #19561 [Console] Fix indentation of Help: section of txt usage help (okdana)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19561).

Discussion
----------

[Console] Fix indentation of Help: section of txt usage help

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

I noticed that all of the sections output by `TextDescriptor` (*Usage*, *Arguments*, *Options*, *Available commands*, &c.) are indented by 2 spaces, except for the *Help* section, which is indented by only 1 space:

<img width="1039" alt="screen shot 2016-08-07 at 08 53 53" src="https://cloud.githubusercontent.com/assets/122095/17462818/34c99cfc-5c7e-11e6-9674-9324c537fc01.png">

This PR makes the indentation consistent with the other sections. (I don't *think* that qualifies as a BC break?)

Commits
-------

4e4c674 Console: Fix indentation of Help: section of txt usage help
2016-08-09 06:38:26 -07:00
dana
4e4c674c09 Console: Fix indentation of Help: section of txt usage help 2016-08-09 06:38:20 -07:00
Fabien Potencier
454b16db88 minor #19468 [Intl] Update ICU data to 57.1 (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #19468).

Discussion
----------

[Intl] Update ICU data to 57.1

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

I think the only thing that makes sense with ICU is to always be on the latest available version.

Commits
-------

a48c00b [Intl] Update ICU data to 57.1
2016-08-09 06:34:05 -07:00
Jakub Zalas
a48c00ba9c [Intl] Update ICU data to 57.1 2016-08-09 06:33:47 -07:00
Nicolas Grekas
cb6c925798 minor #19476 [Config] Improved test (zomberg)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Improved test

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

Commits
-------

456d53a [Config] Improved test
2016-08-09 13:59:32 +02:00
Evgeniy Tetenchuk
d1cf4d15d3 [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes') 2016-08-09 17:15:01 +07:00
Nicolas Grekas
ba539190c5 bug #19564 Added class existence check if is_subclass_of() fails in compiler passes (SCIF)
This PR was merged into the 2.7 branch.

Discussion
----------

Added class existence check if is_subclass_of() fails in compiler passes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | no

Backport of #19342 to 2.7 branch

Commits
-------

77adea7 Added class existence check if is_subclass_of() fails in compiler passes
2016-08-09 11:00:18 +02:00
Timothée Barray
6d5a65dd8b Add named constructor on JsonResponse
To make easier construction with raw json
2016-08-08 09:59:55 +02:00
Nicolas Grekas
02f59fe20b [Cache] Fix TagAwareAdapter::hasItem() 2016-08-07 18:24:25 +02:00
Nicolas Grekas
66b84b2264 feature #19524 [Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter) (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter)

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6858

This PR replaces TagAwareRedisAdapter introduced in #19047 by a generic `TagAwareAdapter` that works with any two adapters.

Commits
-------

288308b [Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter)
2016-08-07 17:41:20 +02:00
Nicolas Grekas
288308bc0d [Cache] Add generic TagAwareAdapter wrapper (replaces TagAwareRedisAdapter) 2016-08-07 17:20:59 +02:00
Nicolas Grekas
673cec79b2 Merge branch '3.1'
* 3.1:
  [Routing] Reorder assert parameters
  [Cache] Use SCAN instead of KEYS with Redis >= 2.8
  Added missing czech validators translation of not expected charset
  Improved deprecation message
  Workaround another buggy PHP warning
  Add czech translation for Url and Length validator
  Add slovak translation for Url and Length validator
2016-08-07 17:19:41 +02:00
Nicolas Grekas
d13c4244b4 Merge branch '2.8' into 3.1
* 2.8:
  [Routing] Reorder assert parameters
  Added missing czech validators translation of not expected charset
  Workaround another buggy PHP warning
  Add czech translation for Url and Length validator
  Add slovak translation for Url and Length validator
2016-08-07 17:17:34 +02:00
Nicolas Grekas
5e2093ac77 Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Reorder assert parameters
  Added missing czech validators translation of not expected charset
  Workaround another buggy PHP warning
  Add czech translation for Url and Length validator
  Add slovak translation for Url and Length validator
2016-08-07 17:15:52 +02:00
Nicolas Grekas
540842a9be bug #19551 [Cache] Use SCAN instead of KEYS with Redis >= 2.8 (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Use SCAN instead of KEYS with Redis >= 2.8

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

With #19521 coming,  clearing cache keys by prefix is going to be used a lot more often.
Time to fix Redis cache clearing.

Commits
-------

aadeb11 [Cache] Use SCAN instead of KEYS with Redis >= 2.8
2016-08-07 17:12:11 +02:00
Fabien Potencier
00e2a42d8a minor #19554 [Routing] Reorder assert parameters (Ener-Getick)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Reorder assert parameters

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

The expected value must be the first parameter.

Commits
-------

7f88796 [Routing] Reorder assert parameters
2016-08-06 08:24:04 -07:00
Fabien Potencier
3936c4b22d minor #19534 Add czech translation for Url and Length validator (pulzarraider)
This PR was merged into the 2.7 branch.

Discussion
----------

Add czech translation for Url and Length validator

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

Commits
-------

bfd1644 Add czech translation for Url and Length validator
2016-08-06 08:23:12 -07:00
Fabien Potencier
ec53d79648 minor #19533 Add slovak translation for Url and Length validator (pulzarraider)
This PR was merged into the 2.7 branch.

Discussion
----------

Add slovak translation for Url and Length validator

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

Commits
-------

b29cab3 Add slovak translation for Url and Length validator
2016-08-06 08:21:36 -07:00
Fabien Potencier
2dfbc6f19a minor #19543 [DX] Improved YAML deprecation message (peterrehm)
This PR was merged into the 3.1 branch.

Discussion
----------

[DX] Improved YAML deprecation message

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This eases the upgrade as it shows you which strings you need to update.

Commits
-------

3e16ef8 Improved deprecation message
2016-08-06 08:20:41 -07:00
Fabien Potencier
4335829d58 minor #19550 Added missing czech validators translation of not expected charset (maryo)
This PR was merged into the 2.7 branch.

Discussion
----------

Added missing czech validators translation of not expected charset

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Profiler was complaining about using a not translated message so I translated it.
Not sure if bug or feature. The bug label is probably not apropriate, sorry. But I guess it should be merged to all versions.

Commits
-------

7eacae8 Added missing czech validators translation of not expected charset
2016-08-06 08:19:33 -07:00
Fabien Potencier
cd3d04eb74 minor #19535 Workaround another buggy PHP warning (cbj4074)
This PR was merged into the 2.7 branch.

Discussion
----------

Workaround another buggy PHP warning

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

Added error-suppression to the `is_executable($path)` call, too, per the bug noted just above.

The cited issue manifests as such without it:

```
ErrorException in ExecutableFinder.php line 63:
is_executable(): open_basedir restriction in effect. File(/usr/share/php) is not within the allowed path(s): (/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/local/zend/var/zray/extensions:/usr/local/zend/share:/usr/local/zend/var/plugins)
```

Commits
-------

4348f4b Workaround another buggy PHP warning
2016-08-06 08:16:23 -07:00
Guilhem N
7f8879686c [Routing] Reorder assert parameters 2016-08-06 17:00:05 +02:00
Nicolas Grekas
aadeb117ac [Cache] Use SCAN instead of KEYS with Redis >= 2.8 2016-08-06 11:34:31 +02:00
maryo
7eacae8817 Added missing czech validators translation of not expected charset 2016-08-05 19:33:08 +02:00
Matteo Beccati
c951bb6e97 Fix #19531 [Form] DateType fails parsing when midnight is not a valid time 2016-08-05 12:25:39 +02:00
Nicolas Grekas
64ace101fb Merge branch '3.1'
* 3.1:
  [Cache] Skip tests that sleep() but can't be clock-mocked
2016-08-05 12:06:06 +02:00
Nicolas Grekas
49a2cb8761 minor #19544 [Cache] Skip tests that sleep() but can't be clock-mocked (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Skip tests that sleep() but can't be clock-mocked

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Skip tests that require real calls to `sleep()`: they slow down the test suite too much and don't test much.
`@group time-sensitive` tests will run these test cases just fine, but they can't be used on tests that use an external source for time, i.e. for redis or apcu.

Commits
-------

d476725 [Cache] Skip tests that sleep() but can't be clock-mocked
2016-08-05 11:57:57 +02:00
Nicolas Grekas
d4767253b9 [Cache] Skip tests that sleep() but can't be clock-mocked 2016-08-05 11:47:07 +02:00
Peter Rehm
3e16ef871c Improved deprecation message 2016-08-05 11:04:52 +02:00
Nicolas Grekas
973f295512 Merge branch '3.1'
* 3.1:
  Relax 1 test failing with latest PHP versions
  bumped Symfony version to 2.8.10
  [Cache] Minor cleanup
  Remove usage of __CLASS__ outside of a class
  [HttpKernel] Fix variable conflicting name
  [Process] Fix double-fread() when reading unix pipes
  [Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
  [Validator] Fix dockblock typehint in XmlFileLoader
  bumped Symfony version to 3.1.4
  updated VERSION for 3.1.3
  updated CHANGELOG for 3.1.3
  bumped Symfony version to 2.8.10
  updated VERSION for 2.8.9
  updated CHANGELOG for 2.8.9
  bumped Symfony version to 2.7.17
  updated VERSION for 2.7.16
  update CONTRIBUTORS for 2.7.16
  updated CHANGELOG for 2.7.16

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Component/HttpKernel/Kernel.php
2016-08-05 10:52:18 +02:00
Nicolas Grekas
c45b91650c minor #19540 [Cache] Minor cleanup (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Minor cleanup

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

34d9518 [Cache] Minor cleanup
2016-08-05 10:40:17 +02:00
Nicolas Grekas
6f390d45e3 Merge branch '2.8' into 3.1
* 2.8:
  Relax 1 test failing with latest PHP versions
  bumped Symfony version to 2.8.10
  Remove usage of __CLASS__ outside of a class
  [HttpKernel] Fix variable conflicting name
  [Process] Fix double-fread() when reading unix pipes
  [Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
  [Validator] Fix dockblock typehint in XmlFileLoader
  bumped Symfony version to 2.8.10
  updated VERSION for 2.8.9
  updated CHANGELOG for 2.8.9
  bumped Symfony version to 2.7.17
  updated VERSION for 2.7.16
  update CONTRIBUTORS for 2.7.16
  updated CHANGELOG for 2.7.16
  Minor fixes
  [Console] Overcomplete argument exception message tweak.
  fixed bad auto merge
  Console table cleanup
  undefined offset fix (#19406)
  [EventDispatcher] Removed unused variable

Conflicts:
	CHANGELOG-2.7.md
	CHANGELOG-3.0.md
	src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
	src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
	src/Symfony/Component/Console/Tests/Helper/TableTest.php
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php
	src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
	src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
	src/Symfony/Component/HttpKernel/Kernel.php
2016-08-05 10:37:39 +02:00
Nicolas Grekas
2f9921f02e minor #19539 [VarDumper] Relax 1 test failing with latest PHP versions (fabpot, remicollet)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Relax 1 test failing with latest PHP versions

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | o
| BC breaks?    |  no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Related to php bug https://bugs.php.net/72646 which is fixed in 5.6.25RC1, 7.0.10RC1, 7.1.0beta2

Detected in Fedora CI, failed since 7.0.10RC1, see
https://apps.fedoraproject.org/koschei/package/php-symfony

Commits
-------

6703b41 Relax 1 test failing with latest PHP versions
eabbcf0 bumped Symfony version to 2.8.10
2016-08-05 10:30:48 +02:00
Remi Collet
6703b416d8 Relax 1 test failing with latest PHP versions
Related to php bug #52646 which is fixed in 5.6.25RC1, 7.0.10RC1, 7.1.0beta2
2016-08-05 10:08:39 +02:00
Fabien Potencier
eabbcf097e bumped Symfony version to 2.8.10 2016-08-05 10:08:38 +02:00
Nicolas Grekas
4ebe440d26 Merge branch '2.7' into 2.8
* 2.7:
  Remove usage of __CLASS__ outside of a class
  [HttpKernel] Fix variable conflicting name
  [Process] Fix double-fread() when reading unix pipes
  [Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
  [Validator] Fix dockblock typehint in XmlFileLoader
  bumped Symfony version to 2.7.17
  updated VERSION for 2.7.16
  update CONTRIBUTORS for 2.7.16
  updated CHANGELOG for 2.7.16

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2016-08-05 10:07:44 +02:00
Nicolas Grekas
34d9518c54 [Cache] Minor cleanup 2016-08-05 09:41:15 +02:00
Christian Flothmann
3cd293280d [Yaml] update changelog and upgrade files 2016-08-05 00:00:11 +02:00
Ben Johnson
4348f4be99 Workaround another buggy PHP warning
Added error-suppression to the `is_executable($path)` call, too, per the bug noted just above.

The cited issue manifests as such without it:

```
ErrorException in ExecutableFinder.php line 63:
is_executable(): open_basedir restriction in effect. File(/usr/share/php) is not within the allowed path(s): (/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/local/zend/var/zray/extensions:/usr/local/zend/share:/usr/local/zend/var/plugins)
```
2016-08-04 13:11:16 -04:00
Andrej Hudec
bfd1644343 Add czech translation for Url and Length validator 2016-08-04 17:08:51 +02:00
Andrej Hudec
b29cab3547 Add slovak translation for Url and Length validator 2016-08-04 17:02:35 +02:00
Nicolas Grekas
aae8e3da57 bug #19522 [SwiftMailerBridge] Fix flawed deprecation message (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[SwiftMailerBridge] Fix flawed deprecation message

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Given `__CLASS__` returns null outside of a class, the deprecation message is incomplete.

Commits
-------

9b0cbab Remove usage of __CLASS__ outside of a class
2016-08-04 12:28:42 +02:00
Robin Chalas
9b0cbabf3e
Remove usage of __CLASS__ outside of a class 2016-08-03 21:26:43 +02:00
Nicolas Grekas
624890b14e [Cache] Drop TaggedCacheItemInterface 2016-08-03 08:54:03 +02:00
Nicolas Grekas
1976b8bc5d minor #19512 [HttpKernel] Fix variable conflicting name (tgalopin)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix variable conflicting name

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

Simply fix a conflicting name (`$bundle` is used for the foreach on line 466 and 476). It works for the moment only because there is nothing after the second foreach inside the first.

Commits
-------

9ac9f55 [HttpKernel] Fix variable conflicting name
2016-08-03 08:46:02 +02:00
Nicolas Grekas
5f59927307 bug #19510 [Process] Fix double-fread() when reading unix pipes (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Fix double-fread() when reading unix pipes

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

While looking at the blackfire profile of a `composer install`, I was able to reduce the number of calls to `fread` from 90k to 60k using this patch (and from 60k to <1k with https://github.com/composer/composer/pull/5569 but that's another story).

In fact, we should continue reading only if there might be something next, which won"t be the case if the buffer has not been filled.

Commits
-------

ac17617 [Process] Fix double-fread() when reading unix pipes
2016-08-03 08:45:31 +02:00