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.
Go to file
Fabien Potencier 06e6c105b8 merged branch Seldaek/regressionfix (PR #7102)
This PR was merged into the 2.0 branch.

Commits
-------

179cd58 [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082

Discussion
----------

[Process][2.0] getcwd failure fix

Fix regression introduced in #6620
Fixes #7082

For reference, here is the current behavior I saw:

PHP 5.4.11, windows:

```
5.4.11\php.exe -r "chdir('c:\\'); var_dump(getcwd()); $p = proc_open('pwd', [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']], $pipes, null); var_dump(stream_get_contents($pipes[1]));"
string(3) "C:\\"
string(14) "/c/Users/seld\n"
```

(I use pwd which is a unix util so it dumps a funny path, but don't look at that)

PHP 5.5alpha4, windows (seems fixed):

```
5.5.0a4\php.exe  -r "chdir('c:\\'); var_dump(getcwd()); $p = proc_open('pwd', [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']], $pipes, null); var_dump(stream_get_contents($pipes[1]));"
string(3) "C:\"
string(3) "/c\n"
```

PHP 5.3.10, ubuntu:

```
php -r "chdir('/'); var_dump(getcwd()); \$p = proc_open('pwd', array(array('pipe', 'r'), array('p
ipe', 'w'), array('pipe', 'w')), \$pipes, null); var_dump(stream_get_contents(\$pipes[1]));"
string(1) "/"
string(2) "/\n"
```

Since the permission issue that #6620 originally was fixing is most likely not gonna happen on windows, this seems like a safe enough compromise. Ideally a check for PHP<5.5 should be introduced, but I would like to be sure it's been fixed and is not just a lucky coincidence (/cc @PierreJoye)

I would recommend merging fast and maybe adding the version check later, since it breaks composer create-project on windows. The workaround being: cd in the dir and run `composer install` again to finalize the project setup.

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

by vicb at 2013-02-17T20:12:17Z

Thanks @Seldaek !

Would you mind creating an issue for the version check so that it doesn't get lost ?

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

by Seldaek at 2013-02-18T10:43:56Z

@vicb done.

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

by vicb at 2013-02-18T11:45:16Z

thanks !
2013-02-18 22:26:24 +01:00
src/Symfony [Process] Fix regression introduced in #6620 / 880da01c49, fixes #7082 2013-02-17 20:36:49 +01:00
tests [DependencyInjection] fixed tests (refs #7017) 2013-02-11 12:41:22 +01:00
.gitignore add composer to gitignore in 2.0 2012-05-10 16:15:45 +03:00
.travis.yml Update .travis.yml 2013-01-04 09:48:20 +01:00
autoload.php.dist bumped minimal version of Swiftmailer to 4.2.0 2012-06-29 18:02:19 +02:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.22 2013-01-17 16:39:41 +01:00
composer.json Update monolog compatibility 2012-08-19 09:57:44 +02:00
CONTRIBUTING.md Making it easier to grab the PR template. 2012-12-15 21:57:27 +00:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.22 2013-01-17 16:40:10 +01:00
LICENSE updated license year 2013-01-04 17:59:43 +01:00
phpunit.xml.dist [Locale] fixed tests 2012-12-05 14:13:56 +01:00
README.md Making it easier to grab the PR template. 2012-12-15 21:57:27 +00:00
UPDATE.ja.md updated translation of UPDATE file (Japanese RC5 added) 2011-07-30 02:08:25 +09:00
UPDATE.md UPDATE.md: trivial markdown syntax fix 2011-11-15 10:19:29 -08:00
vendors.php updated vendors for 2.0.18 2012-10-25 10:54:02 +02:00

README

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.2 and up.

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section and use Pull Request Template.