Commit Graph

17297 Commits

Author SHA1 Message Date
Fabien Potencier
a25f90f7e8 minor #15051 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #15051).

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):
    - magic methods validity: resolved possible fatals
    - random api migration: used mt_* in some of components
    - *printf issues resolved

Commits
-------

aa5e616 [2.3] Static Code Analysis for Components
2015-06-21 22:11:34 +02:00
Vladimir Reznichenko
aa5e616511 [2.3] Static Code Analysis for Components 2015-06-21 22:11:32 +02:00
Abdellatif Ait boudad
a8f315b8dd [Translation][update cmd] taken account into bundle overrides path. 2015-06-19 15:48:24 +00:00
Bernhard Schussek
3d16094e5b bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed: Filter non-integers when selecting entities by int ID

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

This is #14950 cherry-picked on 2.3 with a fix embedded.

Commits
-------

086c58c [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
45579fd [Form] Fixed: Filter non-integers when selecting entities by int ID
2015-06-18 18:09:04 +02:00
Nicolas Grekas
086c58c716 [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader 2015-06-18 17:54:01 +02:00
Bernhard Schussek
45579fd7cd [Form] Fixed: Filter non-integers when selecting entities by int ID 2015-06-18 17:05:41 +02:00
Nicolas Grekas
17ffb5a81a bug #15000 [2.3][Debug] Fix fatal-errors handling on HHVM (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Debug] Fix fatal-errors handling on HHVM

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

Commits
-------

d29bfdc [2.3][Debug] Fix fatal-errors handling on HHVM
2015-06-18 14:49:57 +02:00
Nicolas Grekas
d29bfdcc31 [2.3][Debug] Fix fatal-errors handling on HHVM 2015-06-16 14:35:43 +02:00
Fabien Potencier
287a577b8c minor #14937 Standardize the name of the exception variables (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #14937).

Discussion
----------

Standardize the name of the exception variables

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

See https://github.com/symfony/symfony-docs/pull/4491 for the context of this change.

In Symfony source code there are 410 `try ... catch` blocks. More than 95% of them use `$e` as the name of the exception variable. After applying these changes, 407 out of 410 variables are named `$e`.

These are the three cases where I didn't change the name of the `$e` variable:

  * Nested exception in https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php#L40. It uses `$e2` as the name of the nested variable.
  * Nested exception in https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bundle/TwigBundle/TwigEngine.php#L82. I changed the name of the `$ex` variable to `$e2` to match the previous syntax.
  * https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Console/Helper/DialogHelper.php#L463. I don't know if it's safe to change the name of the `$error` exception variable.

Commits
-------

e8b924c Standardize the name of the exception variables
2015-06-15 18:26:37 +02:00
Javier Eguiluz
e8b924c2d3 Standardize the name of the exception variables 2015-06-15 18:26:34 +02:00
Tobias Schultze
d4b669bb63 minor #14890 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #14890).

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):
    - not optimal regular expressions usage
    - strlen miss-use
    - not optimal conditional statements in Process and Filesystem
    - unsafe uniquid usage

PS: re-creating to no spam history log with reverts

Commits
-------

4a4fea7 [2.3] Static Code Analysis for Components
2015-06-15 15:02:12 +02:00
Vladimir Reznichenko
4a4fea742b [2.3] Static Code Analysis for Components 2015-06-15 15:02:08 +02:00
Tobias Schultze
11010ca691 minor #14965 [Config] Remove duplicated paths (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Config] Remove duplicated paths

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

If someone sets the same path twice, the file locator will search for the the same file twice. We should remove duplicated paths before locate a file.

Commits
-------

97de887 Remove duplicated paths
2015-06-13 16:06:26 +02:00
Diego Saint Esteben
97de887222 Remove duplicated paths 2015-06-12 16:45:17 -03:00
Fabien Potencier
009efb8dec fixed CS 2015-06-11 15:53:10 +02:00
Fabien Potencier
e54d7161ab bug #14897 Allow new lines in Messages translated with transchoice() (replacement for #14867) (azine)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #14897).

Discussion
----------

 Allow new lines in Messages translated with transchoice() (replacement for #14867)

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

Hi,
I found that the MessageSelector does not handle new lines in messages very well.
I suggest adding the "s" modifier to the regexp used to identify the parts and ranges.
What do you think?

PS: would be nice to have this change also in Symfony 2.6 & 2.7

Commits
-------

786b8a6  Allow new lines in Messages translated with transchoice() (replacement for #14867)
2015-06-11 15:52:49 +02:00
azine
786b8a664e Allow new lines in Messages translated with transchoice() (replacement for #14867) 2015-06-11 15:52:49 +02:00
Fabien Potencier
c95d86c9c6 minor #14926 [2.3] Fix tests on Windows (WouterJ)
This PR was squashed before being merged into the 2.3 branch (closes #14926).

Discussion
----------

[2.3] Fix tests on Windows

There were quite a few tests failing when running on my Windows PC. These fixes are the ones I could easily fix.

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

Commits
-------

e3e5f3d [2.3] Fix tests on Windows
2015-06-10 02:09:28 +02:00
WouterJ
e3e5f3d661 [2.3] Fix tests on Windows 2015-06-10 02:09:26 +02:00
Fabien Potencier
a48d36ae31 bug #14895 [Form] Support DateTimeImmutable in transform() (c960657)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Support DateTimeImmutable in transform()

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

When passing a DateTimeImmutable instance to DateTimeToLocalizedStringTransformer::transform($dateTime), it throws an exception, `TransformationFailedException('Expected a \DateTime.')`.

The method just converts a date-time object into a string, so there is no reason that it should not support all DateTimeInterface implementations.

DateTimeInterface was added in PHP 5.5, so in order to support earlier versions, we need to do instanceof checks for both DateTime and DateTimeInterface. When Symfony requires PHP 5.5 or larger, we can remove the DateTime check and only check for DateTimeInterface.

This was originally submitted as a PR against the 2.7 branch in #14676.

Commits
-------

17346c5 [Form] Support DateTimeImmutable in transform()
2015-06-08 15:59:27 +02:00
Christian Schmidt
17346c53dc [Form] Support DateTimeImmutable in transform() 2015-06-08 07:38:09 +02:00
Fabien Potencier
a39dafaae3 minor #14896 [Form] Fix call to removed method (BC broken in 2.3) (taueres)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fix call to removed method (BC broken in 2.3)

ResolvedFormType#getTypeExtensions() was calling method
AbstractType#getExtensions() which has been removed in
commit b3081e85a0

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

Commits
-------

fa9da42 [Form] Fix call to removed method (BC broken in 2.3)
2015-06-06 20:32:18 +02:00
Sergio Santoro
fa9da42c22 [Form] Fix call to removed method (BC broken in 2.3)
ResolvedFormType#getTypeExtensions() was calling method
AbstractType#getExtensions() which has been removed in
commit b3081e85a0

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2015-06-06 18:24:30 +02:00
Fabien Potencier
b1003d57f3 minor #14738 [HttpFoundation] Get response content as resource several times for PHP >= 5.6 (dunglas)
This PR was squashed before being merged into the 2.3 branch (closes #14738).

Discussion
----------

[HttpFoundation] Get response content as resource several times for PHP >= 5.6

| 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

Since PHP 5.6, `php://input` can be opened several times.

Commits
-------

9f9b0f7 [HttpFoundation] Get response content as resource several times for PHP >= 5.6
2015-06-05 22:09:35 +02:00
Kévin Dunglas
9f9b0f73aa [HttpFoundation] Get response content as resource several times for PHP >= 5.6 2015-06-05 22:09:27 +02:00
Fabien Potencier
662e2816e3 minor #14746 [Config] Improved duplicated code in FileLocator (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Config] Improved duplicated code in FileLocator

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

This PR improves a duplicate check prepending the current path (if exists) to the list of paths.

Commits
-------

30aa4e9 Improved duplicated code in FileLocator
2015-06-05 15:57:41 +02:00
Fabien Potencier
5c7cb563db bug #14859 Improve the config validation in TwigBundle (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Improve the config validation in TwigBundle

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

This ensures we have better error messages in case of misconfiguration instead of having crappy errors from Twig (which does not validates its options fully either, missing these things)

Commits
-------

f4dfee3 Improve the config validation in TwigBundle
2015-06-04 15:38:55 +02:00
Christophe Coevoet
f4dfee3bea Improve the config validation in TwigBundle 2015-06-04 12:52:47 +02:00
Fabien Potencier
5607f71079 bug #14785 [BrowserKit] Fix bug when uri starts with http. (amouhzi)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Fix bug when uri starts with http.

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

Commits
-------

6d3ec63 [BrowserKit] Fix bug when uri starts with http.
2015-06-01 17:27:09 +02:00
Fabien Potencier
013009b6c8 minor #14474 [2.3] Static Code Analysis for Components (kalessil)
This PR was merged into the 2.3 branch.

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:
- resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString
- resolved callable name case mismatches

Commits
-------

9eb2b14 Php Inspections (EA Extended):     - resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString     -resolved implicit magic methods calls     -resolved callable name case mismatches
2015-06-01 17:18:16 +02:00
Fabien Potencier
8172f2fecb bug #14807 [Security][Acl] enforce string identifiers (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security][Acl] enforce string identifiers

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

Commits
-------

bbb1064 [Security][Acl] enforce string identifiers
2015-06-01 17:07:46 +02:00
Christian Flothmann
bbb1064c99 [Security][Acl] enforce string identifiers 2015-05-31 17:00:49 +02:00
Hassan Amouhzi
6d3ec633cd [BrowserKit] Fix bug when uri starts with http.
| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT
2015-05-30 22:07:20 +02:00
Fabien Potencier
cff69aa18b bumped Symfony version to 2.3.31 2015-05-30 00:42:49 +02:00
Fabien Potencier
6dfe5551b7 updated VERSION for 2.3.30 2015-05-30 00:16:04 +02:00
Fabien Potencier
cceb63e6d5 updated CHANGELOG for 2.3.30 2015-05-30 00:15:41 +02:00
Vladimir Reznichenko
9eb2b14115 Php Inspections (EA Extended):
- resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString
    -resolved implicit magic methods calls
    -resolved callable name case mismatches
2015-05-29 19:14:48 +02:00
Fabien Potencier
a3ee1c5c09 Revert "bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)"
This reverts commit 4d40852596, reversing
changes made to dd2fb850a7.
2015-05-29 16:42:01 +02:00
Fabien Potencier
afd0b105a1 minor #14762 InvalidResourceException file name (DancZer)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14762).

Discussion
----------

InvalidResourceException file name

Added filen ame to the InvalidResourceException,

Commits
-------

2e04e23 InvalidResourceException file name
2015-05-28 22:42:23 +02:00
Ladislav Tánczos
2e04e23c6a InvalidResourceException file name 2015-05-28 22:42:23 +02:00
Fabien Potencier
41adf224b5 minor #14643 [DependencyInjection] Avoid unnecessary calls to strtolower() (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Avoid unnecessary calls to strtolower()

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

Commits
-------

c27f564 [DependencyInjection] Avoid unnecessary calls to strtolower()
2015-05-28 16:28:38 +02:00
Fabien Potencier
a4e126d531 minor #14765 [Validators] Correct translation key and content [nl] (amouhzi)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validators] Correct translation key and content [nl]

The nl file is not up to date. Correct changed translation key.

Commits
-------

5bc4085 [Validators] Correct translation key and content [nl]
2015-05-28 05:26:02 +02:00
Fabien Potencier
fc39317691 minor #14766 [Validators] Remove forgotten space in a translation key [nl] (amouhzi)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validators] Remove forgotten space in a translation key [nl]

The nl file is not up to date. Correct changed translation key.

Commits
-------

51e3c22 [Validators] Remove forgotten space in a translation key [nl]
2015-05-28 05:24:15 +02:00
Hassan Amouhzi
51e3c222d4 [Validators] Remove forgotten space in a translation key [nl] 2015-05-27 23:21:50 +02:00
Hassan Amouhzi
5bc4085e4c [Validators] Correct translation key and content [nl] 2015-05-27 23:11:20 +02:00
Fabien Potencier
86ab2505a9 minor #14742 [CS] [Console] StreamOuput : fix loose comparison (ogizanagi)
This PR was merged into the 2.3 branch.

Discussion
----------

[CS] [Console] StreamOuput : fix loose comparison

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

Commits
-------

cd70ca8 [CS] [Console] StreamOuput : fix loose comparison
2015-05-27 20:33:26 +02:00
Fabien Potencier
ce2a47abe2 added missing CVE number 2015-05-27 01:41:50 +02:00
Fabien Potencier
a8886615e4 bumped Symfony version to 2.3.30 2015-05-27 01:35:14 +02:00
Fabien Potencier
c4da51ce0f updated VERSION for 2.3.29 2015-05-26 23:55:27 +02:00
Fabien Potencier
da10a3cb20 update CONTRIBUTORS for 2.3.29 2015-05-26 23:46:03 +02:00