This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Fabien Potencier 62005b9736 merged branch pulzarraider/windows_proces_hang_fix (PR #4069)
Commits
-------

e3296cb fix php5.4 problem
c2405c0 fix hanging of unit tests on Windows

Discussion
----------

[WIP] [Process] Fix hanging of unit tests on Windows

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3798
Todo: -

This PR tries to fix hanging unit tests on Windows platform. The problem is caused by known [PHP bug](https://bugs.php.net/bug.php?id=51800). PHP hangs forever while reading from STDOUT pipe if the output is too big.

I tried different combinatios and this is not ideal, but a working patch - STDOUT is sending to a file.

@Tobion, @drak and other developers working on Windows - can you please confirm, if this solution works for you, too?

---------------------------------------------------------------------------

by Seldaek at 2012-04-22T20:56:20Z

Tried it on 5.4.0 - I get the following when I checkout your branch:

```
SS..........ESSSSSSSSSS...E.S

Time: 0 seconds, Memory: 19.75Mb

There were 2 errors:

1) Symfony\Component\Process\Tests\ProcessTest::testProcessResponses with data set #0 ('output', 'getOutput', 'echo \'output\';')
Undefined offset: 1

C:\Users\seld\Web\symfony\framework\src\Symfony\Component\Process\Process.php:342
C:\Users\seld\Web\symfony\framework\src\Symfony\Component\Process\Process.php:168
C:\Users\seld\Web\symfony\framework\src\Symfony\Component\Process\Tests\ProcessTest.php:46

2) Symfony\Component\Process\Tests\ProcessTest::testIsRunning
Undefined offset: 1

C:\Users\seld\Web\symfony\framework\src\Symfony\Component\Process\Process.php:342
C:\Users\seld\Web\symfony\framework\src\Symfony\Component\Process\Tests\ProcessTest.php:106
```

When I remove the skipping of `ProcessTest::testProcessPipes` - it still hangs so it looks like your fix is not working.

Just for reference, with latest master checkout I get this:

```
SS...........SSSSSSSSSS.....S

Time: 2 seconds, Memory: 19.75Mb

OK, but incomplete or skipped tests!
```

Don't have time right now, but if I find time to look at your diff in more details I will, maybe it's possible to fix it.

---------------------------------------------------------------------------

by pulzarraider at 2012-04-22T22:23:05Z

@Seldaek Thanks, fixed php5.4 problem, my php5.3.8 passed every Process tests.

This patch isn't fixing problem with pipes in general. I don't think it's even possible from PHP code. We have to wait for PHP core developers to fix this problem. This patch only fix issue with hanging unit tests (not the one with pipes you mentioned). In my environment, symfony unit tests never finished and hangs on SwitchUserTest from SecurityBundle on 98%. Now with this patch, I can see final informations about all tests and their errors.

---------------------------------------------------------------------------

by Seldaek at 2012-04-23T07:44:16Z

Ok, it passes again on 5.4.
2012-04-23 12:23:49 +02:00
..
BrowserKit [BrowserKit] Fixed cs. 2012-04-07 19:45:50 +01:00
ClassLoader [2.1][Component][ClassLoader] cs 2012-04-23 08:41:33 +02:00
Config Fix umasks in chmod() calls 2012-04-19 15:47:04 +02:00
Console fixed typo 2012-04-20 16:24:24 +02:00
CssSelector [PhpUnit] Fix the path to the boostrap files in the components 2012-03-30 13:49:28 +02:00
DependencyInjection [DependencyInjection] Fixed composer.json 2012-04-22 15:37:21 +02:00
DomCrawler [Tests] Use proper assertions 2012-04-14 10:05:05 +02:00
EventDispatcher [EventDispatcher] Remove data property 2012-04-20 14:49:32 +05:45
Filesystem merged branch michal-pipa/symlink-fix (PR #4012) 2012-04-20 08:50:33 +02:00
Finder Implement Countable 2012-04-22 16:16:11 +02:00
Form fixed CS 2012-04-20 09:05:48 +02:00
HttpFoundation Skip PDOSessionHandlerTest if PDO SQLite is not available 2012-04-21 12:28:57 +02:00
HttpKernel removed unused use statement 2012-04-21 11:24:50 +02:00
Locale Merge branch '2.0' 2012-04-18 11:42:52 +02:00
Process fix php5.4 problem 2012-04-23 00:05:10 +02:00
Routing Merge branch '2.0' 2012-04-18 11:42:52 +02:00
Security [Security][ACL] Fixed ObjectIdentity::fromDomainObject and UserSecurityIdentity::from(Account|Token) when working with proxies 2012-04-12 00:40:59 +02:00
Serializer allow more control on GetSetMethodNormalizer by using callback functions and an ignoreAttributes list 2012-04-07 18:07:14 +02:00
Templating Add test to prevent regressions 2012-04-19 11:54:19 +02:00
Translation merged 2.0 2012-04-06 14:21:18 +02:00
Validator merged branch umpirsky/issue-3379 (PR #3922) 2012-04-18 11:57:20 +02:00
Yaml merged 2.0 2012-04-20 12:18:51 +02:00