Commit Graph

20077 Commits

Author SHA1 Message Date
Fabien Potencier
b72ef6b470 [Validator] re-added support for 2.4 API version in tests 2015-01-25 02:21:24 +01:00
Javier Spagnoletti
1e4a8d55cb [2.3] [HttpFoundation] [MimeTypeGuesser]
Updated exception message in MimeTypeGuesser when no guessers available
(issue #12857).

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12857
| License       | MIT
| Doc PR        | none
2015-01-24 20:09:16 -03:00
iamluc
1113999699 Refresh catalogues when resources change 2015-01-24 15:45:41 +01:00
Fabien Potencier
6000f60190 minor #13236 Consistent spaceless nodes in form templates (peterrehm)
This PR was merged into the 2.3 branch.

Discussion
----------

Consistent spaceless nodes in form templates

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

Added '-' at the start and at the end of all if, for, set and block nodes. Related to #12422.
Replaces #12560.

Commits
-------

41c5be6 Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes
2015-01-23 20:42:42 +01:00
Fabien Potencier
52dea4b13d bug #13501 [TwigBridge] Fix bootstrap rendering when user explicitly use form_label (lyrixx)
This PR was merged into the 2.6 branch.

Discussion
----------

[TwigBridge] Fix bootstrap rendering when user explicitly use form_label

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

I implemented what @javiereguiluz said in this [comment](https://github.com/symfony/symfony/issues/13417#issuecomment-71162558)

Commits
-------

717c6d1 [TwigBridge] Fix bootstrap rendering when user explicitly use form_label
2015-01-23 20:38:55 +01:00
Tobias Schultze
e2505b5cdc [Routing] merge instead of replace class and method scheme/method annotations 2015-01-23 18:16:45 +01:00
Grégoire Pineau
717c6d1800 [TwigBridge] Fix bootstrap rendering when user explicitly use form_label 2015-01-23 12:14:04 +01:00
Giorgio Premi
b6d4390ab6 Keep "pre" meaning for var_dump quick-and-dirty debug 2015-01-22 11:07:27 +01:00
sarah khalil
dbbe170168 Removed dead code and various cleaning 2015-01-21 21:57:55 +01:00
Arrilot
538195c7f5 [Var-Dumper] css-fix 2015-01-21 23:15:29 +03:00
sarah khalil
50973bace1 Removed dead code and various cleaning 2015-01-21 21:14:55 +01:00
Fabien Potencier
77cb48e1e2 bug #13487 [VarDumper] Fixed HtmlDumper with long string (alOneh)
This PR was merged into the 2.6 branch.

Discussion
----------

[VarDumper] Fixed HtmlDumper with long string

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

Commits
-------

0a327eb Fixed HtmlDumper with long string
2015-01-21 19:47:28 +01:00
Hippolyte Alain
0a327eb639 Fixed HtmlDumper with long string 2015-01-21 18:40:20 +01:00
sarah khalil
9272f86264 Removed dead code and various cleaning 2015-01-21 17:43:56 +01:00
Fabien Potencier
69748a1595 [TwigBundle] fixed Twig options (removed the parameter as it cannot contain service references) 2015-01-21 05:17:19 +01:00
Fabien Potencier
3d174a4058 fixed typos 2015-01-21 04:50:33 +01:00
Fabien Potencier
cc8abb210f fixed typo 2015-01-21 04:48:45 +01:00
Fabien Potencier
3b97306144 fixed typo 2015-01-21 04:46:04 +01:00
Fabien Potencier
7eb599e5a0 fixed BC layer 2015-01-21 04:40:42 +01:00
Fabien Potencier
5bb2816b0f feature #13475 [SecurityBundle] decouple the logout PHP helper and Twig extension (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] decouple the logout PHP helper and Twig extension

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

Commits
-------

f089dd4 [SecurityBundle] decouple the logout PHP helper and Twig extension
2015-01-21 04:39:05 +01:00
Fabien Potencier
f089dd4dd6 [SecurityBundle] decouple the logout PHP helper and Twig extension 2015-01-21 04:29:57 +01:00
Fabien Potencier
7be7e62cfc minor #13452 [Console] Clarify method arguments (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Clarify method arguments

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

Make it clear that the second argument is not about command options to avoid bug reports like #13415.

Commits
-------

32338af [Console] Make it clear that the second argument is not about command options.
2015-01-21 00:58:45 +01:00
Fabien Potencier
497fdd4cc6 minor #13474 [Validator] added Japanese translation for unresolvable host (id: 79) (issei-m)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] added Japanese translation for unresolvable host (id: 79)

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

Commits
-------

067e686 [Validator] added Japanese translation for unresolvable host (id: 79)
2015-01-21 00:33:28 +01:00
Issei.M
067e686c2b [Validator] added Japanese translation for unresolvable host (id: 79) 2015-01-21 08:07:46 +09:00
Abdellatif Ait boudad
7e19fab51c [FrameworkBundle][xsd] added missing logging attribute. 2015-01-20 22:59:02 +00:00
Stefano Sala
838857c992 [Toolbar] Reset right and left .sf-toolbar-info values needed for window resize 2015-01-20 22:09:33 +01:00
Fabien Potencier
002101094a minor #13442 [Serializer] minor: Fix PHPDoc (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] minor: Fix PHPDoc

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR       | n/a

Fix PHPDoc as pointed by @stof in https://github.com/symfony/symfony/pull/13255/files#r23134338

Commits
-------

d264486 [Serializer] Fix PHPDoc
2015-01-20 02:42:45 +01:00
Fabien Potencier
ba9392ce4f Merge branch '2.6' into 2.7
* 2.6:
  Minor plural/singular change
  print error message if server couldn't be started
  [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info
  [Twig][Bridge][TranslationDefaultDomain] add support of named arguments.
  [Form] Improved exception message if the data class is not found
  Fixes ArgvInput's argument getter with empty tokens
  execute cheaper checks before more expensive ones
  [DependencyInjection] Fix missing ExpressionLanguageProviders on extension bild
  [FrameworkBundle] FormDataCollector should be loaded only if form config is enabled
2015-01-20 02:40:35 +01:00
Fabien Potencier
7a3332b798 Merge branch '2.5' into 2.6
* 2.5:
  [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info
  [Twig][Bridge][TranslationDefaultDomain] add support of named arguments.
  [Form] Improved exception message if the data class is not found
  Fixes ArgvInput's argument getter with empty tokens
  execute cheaper checks before more expensive ones
  [FrameworkBundle] FormDataCollector should be loaded only if form config is enabled

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml
2015-01-20 02:40:20 +01:00
Fabien Potencier
760553176f Merge branch '2.3' into 2.5
* 2.3:
  [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info
  [Twig][Bridge][TranslationDefaultDomain] add support of named arguments.
  [Form] Improved exception message if the data class is not found
  Fixes ArgvInput's argument getter with empty tokens
  execute cheaper checks before more expensive ones

Conflicts:
	src/Symfony/Component/Form/FormConfigBuilder.php
2015-01-20 02:39:13 +01:00
Fabien Potencier
a5e6b0dc50 minor #13462 removed deprecation notice for internal constant (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed deprecation notice for internal constant

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

This notice is being raised when using the legacy validator, but it shouldn't. Moreover, as this is purely an internal constant, there is no point in raising a notice anyway.

Commits
-------

19be8b0 removed deprecation notice for internal constant
2015-01-20 02:01:35 +01:00
Fabien Potencier
19be8b0e54 removed deprecation notice for internal constant 2015-01-20 01:47:52 +01:00
Fabien Potencier
7ab2a5634d minor #13460 Fix usage of app.security (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix usage of app.security

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

Reverts the previous attempt to remove notices when using the `app.security` variable in Twig because it did not work (it prevents using `app.security` altogether).

So, instead, we inject the container and only get the security service (and thus triggering the deprecation notice) when the user is using `app.security`.

Commits
-------

09ed9b5 removed deprecated notices when using the security service
1067cc5 Revert "minor #13434 fixed some deprecated notices (fabpot)"
2015-01-20 01:44:37 +01:00
Fabien Potencier
09ed9b5495 removed deprecated notices when using the security service 2015-01-20 01:43:09 +01:00
Fabien Potencier
26323bc349 minor #13461 [Validator] fixed deprecation notice for ElementMetadata (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] fixed deprecation notice for ElementMetadata

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

Commits
-------

2606a6d [Validator] fixed deprecation notice for ElementMetadata
2015-01-20 01:40:55 +01:00
Fabien Potencier
2606a6d80e [Validator] fixed deprecation notice for ElementMetadata 2015-01-20 01:30:34 +01:00
Fabien Potencier
1067cc5815 Revert "minor #13434 fixed some deprecated notices (fabpot)"
This reverts commit 564ae34dd7, reversing
changes made to df76faaa39.
2015-01-19 23:27:25 +01:00
Jakub Zalas
32338af211 [Console] Make it clear that the second argument is not about command options. 2015-01-19 19:35:05 +00:00
Fabien Potencier
339afcac19 minor #13451 removed usage of the deprecated EsiListener class in core (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed usage of the deprecated EsiListener class in core

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

Commits
-------

55cc507 removed usage of the deprecated EsiListener class in core
2015-01-19 17:56:41 +01:00
Fabien Potencier
55cc507670 removed usage of the deprecated EsiListener class in core 2015-01-19 17:36:50 +01:00
Fabien Potencier
a38fde3fab minor #13439 [WebProfilerBundle] Minor plural/singular change (WouterJ)
This PR was merged into the 2.6 branch.

Discussion
----------

[WebProfilerBundle] Minor plural/singular change

| Q   | A
| --- | ---
| License | MIT
| Fixed tickets | -

Commits
-------

b3cfc1a Minor plural/singular change
2015-01-19 16:17:25 +01:00
Wouter J
b3cfc1abc0 Minor plural/singular change 2015-01-19 10:36:52 +01:00
Kévin Dunglas
d264486dc1 [Serializer] Fix PHPDoc 2015-01-18 20:33:52 +01:00
Peter Rehm
41c5be672f Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes 2015-01-18 15:22:12 +01:00
Fabien Potencier
fef2bd4812 feature #12891 [Form] Deprecated setDefaultOptions() in favor of configureOptions() (peterrehm)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Deprecated setDefaultOptions() in favor of configureOptions()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   |
| Fixed tickets | #12782
| License       | MIT
| Doc PR        | symfony/symfony-docs#4786

This tries to provide a compatible API with the depreciation of the OptionResolverInterface. I would like to have this in 2.6.2 but I think that might not be possible? To me I think we should always provide an API where you do not need to use deprecated classes.

Also can you think of any way to trigger errors on the use of the deprecated setDefaultOptions() method? Since it is usually overwritten without calling the parent class this might be tricky. Maybe only in the resolver if we can check if actual options has been resolved in a call to setDefaultOptions.

Commits
-------

3d43cae Deprecated setDefaultOptions() in favor of configureOptions()
2015-01-18 15:06:44 +01:00
Fabien Potencier
aeec129c5a bug #13343 [FrameworkBundle] FormDataCollector should be loaded only if form config is enabled (hason)
This PR was merged into the 2.5 branch.

Discussion
----------

[FrameworkBundle] FormDataCollector should be loaded only if form config is enabled

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

Commits
-------

af496ea [FrameworkBundle] FormDataCollector should be loaded only if form config is enabled
2015-01-18 14:51:01 +01:00
Fabien Potencier
fb1732aa64 bug #12258 [FrameworkBundle] print error message if server couldn't be started (xabbuh)
This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #12258).

Discussion
----------

[FrameworkBundle] print error message if server couldn't be started

As @weaverryan noticed in symfony/symfony-docs#4005, the `server:run` command would provide you with a success message even if there were a web server already listening.

Commits
-------

6b2537b print error message if server couldn't be started
2015-01-18 14:37:55 +01:00
Christian Flothmann
6b2537b902 print error message if server couldn't be started 2015-01-18 14:37:55 +01:00
Fabien Potencier
b8e4b4af3d bug #13039 [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info (rk3rn3r)
This PR was squashed before being merged into the 2.3 branch (closes #13039).

Discussion
----------

[HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info

Hi everyone!

We at trivago had an issue with the Request object. It seems that all versions of symfony 2.x and 3.x are affected from this (possible) bug (don't checked 1.x).
Here is the problem:

some old legacy pages are deployed in the Document Root, let's say /var/www/www.test.com/ .
one or more new applications based on symfony are deployed to /var/release/new_app1/ , /var/release/new_app2/ , ... .
in /var/www/www.test.com/ there is a symlink "app" to /var/release/new_app1/web, like:
/var/www/www.test.com/app --> /var/release/new_app1/web/

there is a "SEO"/human-readable rewrite rule for Document Root (if called path/file not exist): (.*) --> app/app.php

the problem comes, when the user calls a uri starting with "app" or whatever the rewrite rule / symlink points to:

the user calls "http://www.test.com/apparthotel-1234"
results in $_SERVER parameters like this
```
'DOCUMENT_ROOT' =>'/var/www/www.test.com',
'SCRIPT_FILENAME' => '/var/www/www.test.com/app/app.php',
'SCRIPT_NAME' => '/app/app.php',
'PHP_SELF' => '/app/app.php/apparthotel-1234'
```
in Request::prepareBaseUrl() there are checks to find the baseUrl:
```
        if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) {
            // full $baseUrl matches
            return $prefix;
        }

        if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, dirname($baseUrl))) {
            // directory portion of $baseUrl matches
            return rtrim($prefix, '/');
        }
```
first it is checked if (in our case) "/app/app.php" is in the request uri (/apparthotel-1234).
it's not.

then it takes the dirname (of /app/app.php) which is /app and checks if it is in the request uri (/apparthotel-1234), and YES, it is! and "/app" is returned, but this is wrong, it should be empty (because it comes from a rewrite rule from root: /)!

later in preparePathInfo(), if there is a baseUrl, then the baseUrl is removed from the request uri:
/apparthotel-1234  --->  /arthotel-1234

The cause is, the second baseUrl check, checks if the path of the application is already in the uri, like when the request was "http://www.test.com/app/apparthotel-1234" and hit a rewrite rule like (.*) --> app.php in there, but because it matches a directory it must match "dirname($baseUrl) . '/'".

I also needed to fix one unit test of the getBaseUrl test:
the request uri recently was "/foo%20bar".
but from the $_SERVER infos "foo bar" is a directory, see:
```
'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php',
'SCRIPT_NAME' => '/foo bar/app.php',
'PHP_SELF' => '/foo bar/app.php',
```

webservers will redirect a request "http://www.test.com/foo%20bar" to "http://www.test.com/foo%20bar/" when "foo bar" is a directory. checked this for apache 2.x and nginx 1.4.x.

this fix is for symfony master (3.0.x, see #13039).
I also prepared a merge request for actual 2.7 branch, it will also follow in some minutes. (see #13040)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | this, #13040, #13038, #7329
| License       | MIT

[HttpFoundation] [Request]
* added missing slash to baseUrl-path part check to remove the path, only when it's also a path in the uri
[HttpFoundation] [Tests] [RequestTest]
* fixed and added unittests

This is the symfony 2.3 branch fix for the issue related to #13038 and #13040

Happy christmas!

Commits
-------

3a3ecd3 [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info
2015-01-18 14:31:14 +01:00
rkerner
3a3ecd3353 [HttpFoundation] [Request] fix baseUrl parsing to fix wrong path_info 2015-01-18 14:31:11 +01:00