remove realpath call

I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:

https://bugs.php.net/bug.php?id=52769

After this change, my archive works just like a normal app/console call
merged branch Burgov/patch-2 (PR #6263)

This PR was merged into the 2.0 branch.

Commits
-------

e6bb156 remove realpath call

Discussion
----------

[HttpKernel] remove realpath call

I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:

https://bugs.php.net/bug.php?id=52769

After this change, my archive works just like a normal app/console call
[FrameworkBundle] used the new method for trusted proxies
checked for a potentially missing key

The 'function' key isn't always available in the trace. This was
causing me a notice.
merged branch bamarni/patch-14 (PR #6273)

This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #6273).

Commits
-------

9273b62 [HttpKernel] checked for a potentially missing key

Discussion
----------

[HttpKernel] checked for a potentially missing key
[FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()
[FrameworkBundle] Added tests for trusted_proxies configuration.
Added comment
Merge pull request #1 from pylebecq/2.0

[FrameworkBundle] Added tests for trusted_proxies configuration.
merged branch francisbesset/check_mime_type (PR #6345)

This PR was merged into the 2.0 branch.

Commits
-------

d3f5f3a Added comment
773d818 [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()

Discussion
----------

[FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()

Fixed a bug on `CodeHelper::fileExcerpt()`.

I add a check on the file mime type because I use a phar of phpunit and when a exception throwed in a test, Symfony build a page with the stack trace of the exception.

The phpunit.phar path is in the stack trace and Symfony call `highlight_file()` function on this file path.
`highlight_file()` cannot parse the phar file and warnings are displayed.

This PR add a check on the file mime type.
**This PR can be applied on 2.0, 2.1 and master branches.**

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
License of the code: MIT
[Session] Fixed a bug with the TestListener

When the session is not started, the test listener would still save the
session causing the session data to be emptied.
[Session] Added exception to save method

A RuntimeException is thrown if there is an attempt to save the session
without it being started, or if it has already been closed.
merged branch baldurrensch/testlistener_fix (PR #6362)

This PR was merged into the 2.1 branch.

Commits
-------

098b593 [Session] Added exception to save method
6b9ee87 [Session] Fixed a bug with the TestListener

Discussion
----------

[Session] Fixed bug with TestListener

Fixed a bug where an unstarted mock session would be emptied with a save. Here are the steps to reproduce:

Use the test client from Symfony\Bundle\FrameworkBundle\Test\WebTestCase::createClient(), and add something to its session. (I actually had it authenticate against a firewall).
Take the cookies of this first test client and add them to a second test client
Have the second test client request a URL that results in a 404
Since the 404 does not need to start the session, hence when save is called (automatically), the mock session is overwritten with an empty array. This does not happen with the other session handlers.
The added unit test in this PR shows this problem. If this PR gets accepted, will it also get merged into the 2.1.x-dev branch?

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This is a follow up PR since my original one (https://github.com/symfony/symfony/pull/6342) was against the wrong upstream branch.
[FrameworkBundle] Fixed logic under test environment.
merged branch drak/frameworktestsession (PR #6369)

This PR was merged into the 2.1 branch.

Commits
-------

54d3f81 [FrameworkBundle] Fixed logic under test environment.

Discussion
----------

[FrameworkBundle] Fixed logic under test environment.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:-
Todo: -
License of the code: MIT
Documentation PR: -

Please note the travis build failed on some Forms stuff which is nothing to do with this PR.
merged branch bamarni/2.0 (PR #6154)

This PR was merged into the 2.0 branch.

Commits
-------

f0743b1 Merge pull request #1 from pylebecq/2.0
555e777 [FrameworkBundle] Added tests for trusted_proxies configuration.
a0e2391 [FrameworkBundle] used the new method for trusted proxies

Discussion
----------

[FrameworkBundle] used the new method for trusted proxies

This makes the framework bundle using the new method from the request class.

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

by fabpot at 2012-12-05T10:38:20Z

As this is a sensitive issue, can you add some tests? Thanks.

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

by bamarni at 2012-12-06T13:00:24Z

Well I don't know why it fails on travis, I can't run the full test suite locally because of a segfault but ```phpunit src/Symfony/Bundle/``` marks all the tests as passing.

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

by fabpot at 2012-12-06T13:08:11Z

But it looks like the failing tests come from what you've changed.

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

by bamarni at 2012-12-06T13:29:33Z

Yes, I'm not saying it's not my fault but I can't reproduce this as locally it tells me they pass, I'll try to fix this this evening.

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

by bamarni at 2012-12-06T17:49:28Z

Apparently it fails only when running the whole testsuite, looking at other travis builds I can see this one on 2.0 : https://travis-ci.org/symfony/symfony/jobs/3495511 which fails in a similar way than here (https://travis-ci.org/symfony/symfony/jobs/3530928). Because of a place trying to access an undefined $_SERVER key : ```PHP Notice:  Undefined index: SCRIPT_NAME ...``` but I can't find where, and the stack trace references some phpunit classes.

I'd be happy if someone could give me some pointers in here as I don't have any clue about how to fix this..

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

by bamarni at 2012-12-06T18:00:57Z

As a consulsion I'd say I can't run the whole testsuite locally (it fails even when I revert my commit), so there is no reliable way for me to fix this, if anyone is up for continuing this feel free.

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

by fabpot at 2012-12-11T09:47:48Z

@bamarni Can you just update this PR with the code change and no tests at all? I will then finish the PR. Thanks.

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

by bamarni at 2012-12-11T16:58:17Z

@fabpot: thanks for helping me out on this, hope you won't run into the same issue!
Merge branch '2.0' into 2.1

* 2.0:
  Added comment
  [FrameworkBundle] Added tests for trusted_proxies configuration.
  [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()
  checked for a potentially missing key
  [FrameworkBundle] used the new method for trusted proxies
  remove realpath call

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
[FrameworkBundle] fixed broken tests
Merge branch '2.1'

* 2.1:
  [FrameworkBundle] fixed broken tests
  [FrameworkBundle] Fixed logic under test environment.
  [Session] Added exception to save method
  [Session] Fixed a bug with the TestListener
  Added comment
  [FrameworkBundle] Added tests for trusted_proxies configuration.
  [FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()
  checked for a potentially missing key
  [FrameworkBundle] used the new method for trusted proxies
  remove realpath call

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
[FrameworkBundle] fixed broken tests