Commit Graph

27924 Commits

Author SHA1 Message Date
Kévin Dunglas c82aa84c26
[DependencyInjection] minor: Fix a DocBlock 2017-01-19 14:34:44 +01:00
Fabien Potencier 419bcf6c58 bug #20871 [HttpKernel] Give higher priority to adding request formats (akeeman)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20871).

Discussion
----------

[HttpKernel] Give higher priority to adding request formats

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | yes (unlikely to break projects*)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | not documented

\* Only applies to the unlikely case where formats are used before this event is loaded key. Users must have specified custom formats, and actually using them should then break their application. I think that's an unlikely case.

## Problem
It's possible to extend the formats known by the `Request` using a piece of config:
```yaml
framework:
    request:
        formats:
            json: 'application/merge-patch+json'
```

Using this in a `kernel.request` event is currently not possible, as it loads after any custom events.

## Offered solution
Increasing the priority of the AddRequestFormatsListener listener resolves this problem.
This change only impacts projects that use the `framework.request.formats` configuration key, as the listener is not loaded if it isn't defined.

Commits
-------

9edb457e44 [HttpKernel] Give higher priority to adding request formats
2017-01-18 11:53:10 -08:00
Arjan Keeman 9edb457e44 [HttpKernel] Give higher priority to adding request formats 2017-01-18 11:53:09 -08:00
Fabien Potencier bfdac85304 bug #21332 [PropertyInfo] Don't try to access a property thru a static method (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Don't try to access a property thru a static method

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

See also #21331.

Commits
-------

3b4858fe88 [PropertyInfo] Don't try to access a property thru a static method
2017-01-18 11:21:25 -08:00
Fabien Potencier 0ca3e96d13 bug #21331 [PropertyInfo] Exclude static methods form properties guessing (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Exclude static methods form properties guessing

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

Commits
-------

190c736d3c [PropertyInfo] Exclude static methods form properties guessing
2017-01-18 07:18:26 -08:00
Kévin Dunglas 3b4858fe88
[PropertyInfo] Don't try to access a property thru a static method 2017-01-18 13:18:58 +01:00
Kévin Dunglas 190c736d3c
[PropertyInfo] Exclude static methods form properties guessing 2017-01-18 13:05:57 +01:00
Fabien Potencier 1dfb1080b2 minor #21324 [FrameworkBundle] Fix third level headers for MarkdownDescriptor (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix third level headers for MarkdownDescriptor

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

`~` is not valid as an underlining char when using markdown on the contrary of reStructuredText.
See the rendering of [builder_1_public.md (before)](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md)  vs [builder_1_public.md (after)](https://github.com/ogizanagi/symfony/blob/fix/2.7/fwb/md_third_lvl_headers/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md) for instance.

This PR fixes it by using a third level header.

~~**EDIT:** There is no BC break. Wrong PR template information.~~

Commits
-------

ce29ab1d92 [FrameworkBundle] Fix third level headers for MarkdownDescriptor
2017-01-17 12:04:54 -08:00
Maxime Steinhausser ce29ab1d92 [FrameworkBundle] Fix third level headers for MarkdownDescriptor 2017-01-17 19:39:37 +01:00
Fabien Potencier 0dd6a906ea bug #21291 [Ldap] Ldap username case fix (quentinus95)
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #21291).

Discussion
----------

[Ldap] Ldap username case fix

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

Commits
-------

c91689ba2d [Ldap] Using Ldap stored username instead of form submitted one
6641b79d58 [Ldap] load users with the good username case
2017-01-17 07:06:58 -08:00
Quentin de Longraye c91689ba2d [Ldap] Using Ldap stored username instead of form submitted one 2017-01-17 07:06:58 -08:00
Quentin de Longraye 6641b79d58 [Ldap] load users with the good username case 2017-01-17 07:06:58 -08:00
Jakub Zalas d3b5d8efdf
Fix tests with ICU 57.1 2017-01-17 14:48:15 +00:00
Jakub Zalas 677d820874
Fix the condition checking the minimum ICU version 2017-01-17 13:59:23 +00:00
Fabien Potencier d228d347b4 bug #21288 [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys (dmaicher, HeahDude)
This PR was merged into the 3.1 branch.

Discussion
----------

[Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys

| Q             | A
| ------------- | ---
| Branch?       | master / 3.1
| Bug fix?      | yes
| New feature?  |no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes (fail on php 7.1 unrelated?)
| Fixed tickets | https://github.com/symfony/symfony/issues/21274
| License       | MIT
| Doc PR        | -

This PR fixes an issue with the UniqueEntityValidator in case the entity being validated uses a composite primary key via relations to other entities whose classes do not have a `__toString` method.

Commits
-------

b3ced8608b [DoctrineBridge] Fixed invalid unique value as composite key
5aadce3989 [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
2017-01-16 08:52:47 -08:00
Robin Chalas 60a0c4bf91 [Serializer] Add missing conflict for property-info<3.1 2017-01-16 16:44:34 +01:00
HeahDude b3ced8608b [DoctrineBridge] Fixed invalid unique value as composite key
Fixed UniqueEntityValidator tests
2017-01-16 15:00:38 +01:00
Nicolas Grekas 4d247b0f89 minor #21277 [DX][Cache] Set right cacheItem type hint on AdapterInterface getters (andrerom)
This PR was merged into the 3.1 branch.

Discussion
----------

[DX][Cache] Set right cacheItem type hint on AdapterInterface getters

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

Fixes missing cache item type hint on pool getters so methods on Symfony CacheItem
is correctly suggested when using IDE's or api documentation.

As proposed here: https://github.com/symfony/symfony/issues/19728#issuecomment-269615921

_Note: Specifically sets array of CacheItems as return type of getItems as phpdoc and IDEs supports
this by now, and since this is specifically what is being returned. If Sami does not still support this we can adjust to what was originally suggested._

Commits
-------

5f7baa5 [DX][Cache] Set right type hint for cacheItem on AdapterInterface getters
2017-01-14 18:16:00 +01:00
Nicolas Grekas b860ec33a1 bug #21285 [TwigBundle] do not lose already set method calls (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] do not lose already set method calls

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

Commits
-------

cb1a4b7 [TwigBundle] do not lose already set method calls
2017-01-14 18:02:28 +01:00
David Maicher 5aadce3989 [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys 2017-01-14 12:59:07 +01:00
Christian Flothmann cb1a4b778f [TwigBundle] do not lose already set method calls 2017-01-14 10:53:53 +01:00
Christian Flothmann c18c93b51c bug #21279 #20411 fix Yaml parsing for very long quoted strings (RichardBradley)
This PR was merged into the 2.7 branch.

Discussion
----------

#20411 fix Yaml parsing for very long quoted strings

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

This fixes #20411, a YAML string with too many backslash escapes can trigger a `PREG_BACKTRACK_LIMIT_ERROR` error in the Yaml parser.

There should be no behavioural change other than the bug fix

I have included a test which fails before this fix and passes after this fix.

Commits
-------

51bca66 #20411 fix Yaml parsing for very long quoted strings
2017-01-14 08:26:19 +01:00
Richard Bradley 51bca66dfb #20411 fix Yaml parsing for very long quoted strings 2017-01-13 16:26:16 +00:00
André R 5f7baa5a42 [DX][Cache] Set right type hint for cacheItem on AdapterInterface getters
| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Fixes missing type hint for cache item on pool getters so methods on Symfony CacheItem
is correclty suggested when using IDE's or api documentation.

As proposed here: https://github.com/symfony/symfony/issues/19728#issuecomment-269615921

Note: Specifically sets array of items as return type of getItems as phpdoc and IDEs supports
this by now, and since this is specifically what is being returned.
2017-01-13 15:33:46 +01:00
Nicolas Grekas cbb5332b56 bug #21269 [Cache] Using strpbrk() instead of strcspn() is faster (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Using strpbrk() instead of strcspn() is faster

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

Keys validation using strpbrk is faster.
Eg on some micro bench:
- `isset($a[strcspn($a, '{}()/\@:')])`: 278ms
- `false !== strpbrk($a, '{}()/\@:')`: 183ms

Commits
-------

d68c451 [Cache] Using strpbrk() instead of strcspn() is faster
2017-01-13 11:08:47 +01:00
Nicolas Grekas d68c451711 [Cache] Using strpbrk() instead of strcspn() is faster 2017-01-13 10:53:08 +01:00
Nicolas Grekas aebb65923b minor #21256 [FrameworkBundle] Skip test if xdebug.file_link_format is defined. (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Skip test if xdebug.file_link_format is defined.

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

---

The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.

Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.

Commits
-------

7f15bc3 [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
2017-01-13 09:21:07 +01:00
Nicolas Grekas 6430d539ba minor #21264 CS: apply is_null (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: apply is_null

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

Commits
-------

47feb18 CS: apply is_null
2017-01-13 09:20:14 +01:00
Nicolas Grekas 2cff2f68fa minor #21262 DX: remove invalid inheritdoc (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

DX: remove invalid inheritdoc

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

those classes do not extend anything, inherit docs on them are wrong

Commits
-------

9e36436 DX: remove invalid inheritdoc
2017-01-13 09:19:35 +01:00
Dariusz Ruminski 47feb18d31 CS: apply is_null 2017-01-12 23:27:26 +01:00
Dariusz Ruminski 9e36436703 DX: remove invalid inheritdoc 2017-01-12 23:09:43 +01:00
Fabien Potencier d63160957d bumped Symfony version to 3.1.10 2017-01-12 13:34:53 -08:00
Fabien Potencier 8d80e330ac Merge pull request #21260 from fabpot/release-3.1.9
released v3.1.9
2017-01-12 12:44:00 -08:00
Fabien Potencier bb172ebfc5 updated VERSION for 3.1.9 2017-01-12 12:43:39 -08:00
Fabien Potencier 7e12e0ad30 updated CHANGELOG for 3.1.9 2017-01-12 12:43:31 -08:00
Fabien Potencier e18281eef6 bumped Symfony version to 2.8.17 2017-01-12 12:42:17 -08:00
Fabien Potencier 9fef72a3ab Merge pull request #21259 from fabpot/release-2.8.16
released v2.8.16
2017-01-12 12:27:46 -08:00
Fabien Potencier 953c2192a2 updated VERSION for 2.8.16 2017-01-12 12:27:24 -08:00
Fabien Potencier dd2b920dda updated CHANGELOG for 2.8.16 2017-01-12 12:27:19 -08:00
Fabien Potencier 6babdb3296 bumped Symfony version to 2.7.24 2017-01-12 12:24:37 -08:00
Fabien Potencier 9073fb2c76 Merge pull request #21258 from fabpot/release-2.7.23
released v2.7.23
2017-01-12 12:02:33 -08:00
Fabien Potencier 69a553a2a3 updated VERSION for 2.7.23 2017-01-12 12:02:12 -08:00
Fabien Potencier fe67ce5209 update CONTRIBUTORS for 2.7.23 2017-01-12 12:02:11 -08:00
Fabien Potencier dd3fbea149 updated CHANGELOG for 2.7.23 2017-01-12 12:02:04 -08:00
Nicolas Grekas 473fd3b026 Merge branch '2.8' into 3.1
* 2.8:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:26:57 +01:00
Nicolas Grekas 658a8a076c Merge branch '2.7' into 2.8
* 2.7:
  Fix getMock usage
2017-01-12 20:24:25 +01:00
Nicolas Grekas 52eeddc24e Fix getMock usage 2017-01-12 20:23:39 +01:00
Nicolas Grekas 9746314ecb Merge branch '2.7' into 2.8
* 2.7:
  Remove dead code
2017-01-12 20:21:19 +01:00
Nicolas Grekas 49fb0c033c Remove dead code 2017-01-12 20:18:32 +01:00
Nicolas Grekas 5ca27373e8 Merge branch '2.7' into 2.8
* 2.7:
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:18:05 +01:00