be smarter when guessing the document root
feature #12538 [FrameworkBundle] be smarter when guessing the document root (xabbuh)

This PR was merged into the 2.6 branch.

Discussion
----------

[FrameworkBundle] be smarter when guessing the document root

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

Commits
-------

83d768d be smarter when guessing the document root