Commit Graph

21003 Commits

Author SHA1 Message Date
Tobias Schultze
4545af24cf bug #14381 [FrameworkBundle] Initialize translator with the default locale. (aitboudad)
This PR was merged into the 2.6 branch.

Discussion
----------

[FrameworkBundle] Initialize translator with the default locale.

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

Commits
-------

a0d185a [FrameworkBundle] Initialize translator with the default locale.
2015-04-17 16:55:35 +02:00
Tobias Schultze
a8d0b1aa75 bug #14325 [Routing][DependencyInjection] Support .yaml extension in YAML loaders (thunderer)
This PR was squashed before being merged into the 2.3 branch (closes #14325).

Discussion
----------

[Routing][DependencyInjection] Support .yaml extension in YAML loaders

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

YAML [FAQ](http://www.yaml.org/faq.html) states that .yaml file extension should be used whenever possible. I tweaked YamlFileLoader supports() method in Symfony Routing component to accept both .yml and .yaml and added some asserts in tests for that behavior.

This PR replaces #14319 as it was based on 2.7. BTW Is there a way to "rebase" PR branch without redoing all the work?

Commits
-------

dd5a811 [Routing][DependencyInjection] Support .yaml extension in YAML loaders
2015-04-17 12:05:01 +02:00
Tomasz Kowalczyk
dd5a811de6 [Routing][DependencyInjection] Support .yaml extension in YAML loaders 2015-04-17 12:04:38 +02:00
Luis Cordova
a2deb618db [DX] improve file loader error for router/other resources in bundle 2015-04-17 01:24:38 -05:00
Abdellatif Ait boudad
a0d185a43c [FrameworkBundle] Initialize translator with the default locale. 2015-04-17 00:52:06 +01:00
Fabien Potencier
03f6c04b73 minor #14371 [2.7][Translation] remove duplicate code for loading catalogue. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][Translation] remove duplicate code for loading catalogue.

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

Commits
-------

9a9c83b2 [2.7][Translation] remove duplicate code for loading catalogue.
2015-04-16 18:16:17 +02:00
Fabien Potencier
7b2873f983 minor #14370 [2.6][Translation] remove duplicate code for loading catalogue. (aitboudad)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6][Translation] remove duplicate code for loading catalogue.

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

Commits
-------

973ee2e [2.6][Translation] remove duplicate code for loading catalogue.
2015-04-16 18:11:02 +02:00
Nicolas Grekas
7e95a244d8 [FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors 2015-04-16 14:03:59 +02:00
Abdellatif Ait boudad
9a9c83b2a4 [2.7][Translation] remove duplicate code for loading catalogue. 2015-04-16 11:20:34 +01:00
Abdellatif Ait boudad
973ee2e1e4 [2.6][Translation] remove duplicate code for loading catalogue. 2015-04-16 11:17:38 +01:00
Abdellatif Ait boudad
8584bfc3d4 bug #14344 [Translation][fixed test] refresh cache when resources are no longer fresh. (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation][fixed test] refresh cache when resources are no longer fresh.

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

Commits
-------

04b8e4e [Translation][fixed test] refresh cache when resources are no longer fresh.
2015-04-16 11:02:56 +01:00
Nicolas Grekas
d97279e942 [HttpKernel] Cleanup ExceptionListener 2015-04-16 10:51:32 +02:00
Dariusz Ruminski
cfa3e95f4d CS fixes 2015-04-16 09:01:03 +02:00
Fabien Potencier
eb2ff793e8 bug #14346 [WebProfilerBundle] Fix resiliency to exceptions thrown by the url generator (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

 [WebProfilerBundle] Fix resiliency to exceptions thrown by the url generator

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14111, #14337, #14342 in conjunction with #14345
| License       | MIT
| Doc PR        | -

Commits
-------

92e33e4 [WebProfilerBundle] Fix resiliency to exceptions thrown by the url generator
2015-04-16 08:58:21 +02:00
Fabien Potencier
995448c6ef minor #14287 [Finder] Removed duplicated toRegex() code (jaytaph)
This PR was merged into the 2.7 branch.

Discussion
----------

[Finder] Removed duplicated toRegex() code

This patch removes duplicated `toRegex()` code by using the already existing `Glob` class. As this class wasn't unit-tested to begin with, this duplication also makes sure this class is tested properly.

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

Commits
-------

6150c3a Removed duplicated toRegex() code
2015-04-15 17:30:29 +02:00
Fabien Potencier
c52320b964 minor #14331 [2.7][Translation][change log] added DataCollectorTranslator. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][Translation][change log] added DataCollectorTranslator.

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

Commits
-------

9b4f00c [2.7][Translation][change log] added DataCollectorTranslator.
2015-04-15 17:27:29 +02:00
Fabien Potencier
32db442aef bug #14338 [FrameworkBundle] improve usage of Table helper (xabbuh)
This PR was merged into the 2.6 branch.

Discussion
----------

[FrameworkBundle] improve usage of Table helper

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

Use the `Table` helper if present in favor of the deprecated
`TableHelper` class.

Commits
-------

71d84e6 [FrameworkBundle] improve usage of Table helper
2015-04-15 17:26:47 +02:00
Fabien Potencier
65e08fa51b minor #14354 [Translation] DataCollectorTranslator clarifications (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] DataCollectorTranslator clarifications

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

Commits
-------

d66d75d [Translation] DataCollectorTranslator clarifications
2015-04-15 17:21:58 +02:00
Fabien Potencier
bb4d45e777 minor #14356 [Translation] LoggingTranslator simplifications (xabbuh)
This PR was merged into the 2.6 branch.

Discussion
----------

[Translation] LoggingTranslator simplifications

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

Commits
-------

5d7a4f9 [Translation] LoggingTranslator simplifications
2015-04-15 17:20:44 +02:00
Fabien Potencier
942f7f2fd1 minor #14231 [DependencyInjection] Show better error when the Yaml component is not installed (dosten)
This PR was squashed before being merged into the 2.3 branch (closes #14231).

Discussion
----------

[DependencyInjection] Show better error when the Yaml component is not installed

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

As the Yaml component is a suggested dependency, if someone try to use the `YamlFileLoader` or the `YamlDumper` without the component will get an ugly message:
```
PHP Fatal error:  Class 'Symfony\Component\Yaml\Dumper' not found in xxxx
```
With this PR the error will be an exception with the message: `Unable to dump the container as the Symfony Yaml Component is not installed.` for `YamlDumper` and `Unable to load YAML files service definitions as the Symfony Yaml Component is not installed.'` for `YamlFileLoader`

Commits
-------

870a299 [DependencyInjection] Show better error when the Yaml component is not installed
2015-04-15 17:14:38 +02:00
Diego Saint Esteben
870a299eb3 [DependencyInjection] Show better error when the Yaml component is not installed 2015-04-15 17:14:35 +02:00
Fabien Potencier
c74cd4adbb minor #14206 [2.3] SCA for Components - reference mismatches (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #14206).

Discussion
----------

[2.3] SCA for Components - reference mismatches

| 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

Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- worked out some of reference mismatches

Commits
-------

f732659 [2.3] SCA for Components - reference mismatches
2015-04-15 17:09:40 +02:00
Vladimir Reznichenko
f732659219 [2.3] SCA for Components - reference mismatches 2015-04-15 17:09:34 +02:00
Nicolas Grekas
3450122061 [Debug] Scream as LogLevel::DEBUG (but for fatal errors / uncaught exceptions) 2015-04-15 16:47:26 +02:00
Fabien Potencier
49cbf1c7d1 minor #14097 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #14097).

Discussion
----------

[2.3] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- array_keys/array_values usage as foreach array
- foreach value by reference - added unsets to keep scope clear
- strstr usage as strpos fixed
- array_push miss-use resolved

Commits
-------

78cc93c [2.3] Static Code Analysis for Components
2015-04-15 16:34:30 +02:00
Vladimir Reznichenko
78cc93c3b2 [2.3] Static Code Analysis for Components 2015-04-15 16:34:28 +02:00
Nicolas Grekas
92e33e482f [WebProfilerBundle] Fix resiliency to exceptions thrown by the url generator 2015-04-15 09:58:17 +02:00
Christian Flothmann
5d7a4f99f7 [Translation] LoggingTranslator simplifications 2015-04-15 00:06:07 +02:00
Christian Flothmann
f36803eb00 [EventDispatcher] make listeners removable from an executed listener 2015-04-14 22:43:17 +02:00
Christian Flothmann
d66d75dddc [Translation] DataCollectorTranslator clarifications 2015-04-14 20:42:21 +02:00
Abdellatif Ait boudad
cbffabff37 bug #14315 [Translation] Revert inlining fallback catalogues as it might cause inconsistent results when a cache is used (mpdude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] Revert inlining fallback catalogues as it might cause inconsistent results when a cache is used

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

The results from `getCatalogue()` are inconsistent when we're in production *and* a cache comes into play.

This is due to the changes in 6eb5e7395c, where the fallback catalogues will be *merged* into the primary catalogue when it is written to the cache.

Strictly speaking, this is a BC break because it behaved differently before.

I am not sure what the relevance of this might be in practice.

However, it may cause headaches because
* The result changes only in the second+ try (when the cache is warm); a priori you cannot tell whether you're going to see this
* The catalogue is clearly not what the loader provided
* You have no chance of telling whether the message was originally available in the catalogue or not
* Generally, for every message you retrieve from the catalogue, you have no way of telling which locale it actually comes from (it need not be from the catalogue's locale, and the catalogue does not provide fallback catalogues either)

Regarding the last point, you usually don't care when using the `Translator`. Its purpose is to get the "best" translation available. However, when you bother to explicitly retrieve the catalogue, chances are your intentions are different.

Commits
-------

12a183a Revert inlining the fallback messages in production that was added in 6eb5e7395c
2015-04-14 09:32:15 +01:00
Abdellatif Ait boudad
04b8e4e77e [Translation][fixed test] refresh cache when resources are no longer fresh. 2015-04-14 08:53:08 +01:00
Fabien Potencier
85a494c12d bug #14129 [FrameworkBundle] Fixed server:start --router relative path issue #14124 (abulford)
This PR was squashed before being merged into the 2.6 branch (closes #14129).

Discussion
----------

[FrameworkBundle] Fixed server:start --router relative path issue #14124

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

This ensures that a relative path can be used to specify the router script, and that if the router script cannot be found an error is reported and the command fails.

The file path for the router script is now determined and checked prior to the child process being forked, which seems cleaner.  The same change could be made in ServerRunCommand.php, or possibly in the ServerCommand base class; to keep the scope small, though, this wasn't done as part of this bug fix.

Commits
-------

0c1b9ba [FrameworkBundle] Fixed server:start --router relative path issue #14124
2015-04-13 17:33:55 +02:00
abulford
0c1b9bacd8 [FrameworkBundle] Fixed server:start --router relative path issue #14124 2015-04-13 17:33:51 +02:00
Christian Flothmann
71d84e66e4 [FrameworkBundle] improve usage of Table helper
Use the `Table` helper if present in favor of the deprecated
`TableHelper` class.
2015-04-13 17:21:02 +02:00
Matthias Pigulla
12a183a983 Revert inlining the fallback messages in production that was added in 6eb5e7395c
Also add a test that shows where this would cause inconsistent behaviour of the getFallbackCatalogue() method.
2015-04-13 13:42:58 +02:00
Baptiste Dupuch
c3eecb591d Add better phpdoc message for getListeners method of the EventDispatcher 2015-04-13 12:57:04 +02:00
Abdellatif Ait boudad
9b4f00c7ab [2.7][Translation][change log] added DataCollectorTranslator. 2015-04-12 23:10:02 +01:00
Fabien Potencier
5d428b7091 minor #14324 [Validator] Added missing Simplified Chinese (zh_CN) translations (foxwoods)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Added missing Simplified Chinese (zh_CN) translations

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

Added the missing Mandarin Chinese translations.

Commits
-------

c0f0258 [Validator] Added missing Simplified Chinese (zh_CN) translations
2015-04-12 20:28:23 +02:00
Jingyu Wang
c0f0258c56 [Validator] Added missing Simplified Chinese (zh_CN) translations 2015-04-12 10:14:47 +08:00
Tobias Schultze
e00f037472 minor #14323 Use PSR-4 everywhere instead of PSR-0 (Tobion, Seldaek)
This PR was merged into the 2.7 branch.

Discussion
----------

Use PSR-4 everywhere instead of PSR-0

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

Rebased and updated #12466

Commits
-------

8072213 adjust phpdoc for class not found handler
e2bbf07 add phpunit bridge to psr4
60d4994 Tweak classmap paths
cc17234 Add two more components to psr-4
17f61af Add psr-4 support to the ClassNotFoundFatalErrorHandler
4e85901 Use PSR-4 everywhere instead of PSR-0
2015-04-12 00:30:26 +02:00
Tobias Schultze
8072213afe adjust phpdoc for class not found handler 2015-04-12 00:21:29 +02:00
Tobias Schultze
e2bbf074b5 add phpunit bridge to psr4 2015-04-11 23:43:46 +02:00
Jordi Boggiano
60d4994e70 Tweak classmap paths 2015-04-11 23:38:34 +02:00
Jordi Boggiano
cc17234464 Add two more components to psr-4 2015-04-11 23:38:34 +02:00
Jordi Boggiano
17f61afe08 Add psr-4 support to the ClassNotFoundFatalErrorHandler 2015-04-11 23:38:33 +02:00
Tobias Schultze
4e85901380 Use PSR-4 everywhere instead of PSR-0 2015-04-11 23:38:32 +02:00
Joshua Thijssen
6150c3a72b Removed duplicated toRegex() code 2015-04-11 21:29:31 +02:00
Fabien Potencier
37611405e5 bug #14313 [HttpKernel] fixed a regression when no exception listeners are registered (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] fixed a regression when no exception listeners are registered

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

This fixes a regression in 2.7. When no exception listeners are registered, the original exception should not be wrapped by the exception management layer of HttpKernel.

Commits
-------

27930fb [HttpKernel] fixed a regression when no exception listeners are registered
2015-04-11 10:42:37 +02:00
Fabien Potencier
27930fb626 [HttpKernel] fixed a regression when no exception listeners are registered 2015-04-11 10:15:54 +02:00