symfony/symfony — pull request #6432 by mmenozzi (2012-12-20 07:19:34+00:00)
Title: [Finder] Re-enable BsdFindAdapter for Darwin shell and fix it

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (tested both Mac OS X and Debian)
Fixes the following tickets: #6412

----

BSD find command needs "-E" switch to evaluate POSIX regex.
Added the ability to Command to insert bits at a given index.

On some systems (Mac OS X for example) php's function
sys_get_temp_dir() returns a directory that is a symlink.
This causes tests failures because expected paths are different
from path returned by the adapter. So, has been added a realpath.

The building of sorting command has been totally moved on the adapter so
the sorting command for BsdFindAdapter has been fixed.

The building of content filtering command has been moved on the adapter.
In BsdFindAdapter version, -r switch has been replaced with initial grep
that srips out blank lines, this way is compatible with BSD shell.