Commit Graph

29114 Commits

Author SHA1 Message Date
Nicolas Grekas
cc398dbf7a Merge branch '3.2'
* 3.2:
  [Cache] Using strpbrk() instead of strcspn() is faster
  bumped Symfony version to 3.2.3
  updated VERSION for 3.2.2
  updated CHANGELOG for 3.2.2
  bumped Symfony version to 3.1.10
  updated VERSION for 3.1.9
  updated CHANGELOG for 3.1.9
2017-01-13 11:13:02 +01:00
Nicolas Grekas
e7fcd28d78 Merge branch '3.1' into 3.2
* 3.1:
  [Cache] Using strpbrk() instead of strcspn() is faster
  bumped Symfony version to 3.1.10
  updated VERSION for 3.1.9
  updated CHANGELOG for 3.1.9
2017-01-13 11:11:31 +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
fda8832c4e minor #21255 [Profiler] Fix inline dump rendering (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Profiler] Fix inline dump rendering

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

I introduced a minor rendering issue in #21109 when adding a clearfix behavior to the `pre.sf-dump` element:

|Before|After|
|-------|-----|
|
<img width="890" alt="screenshot 2017-01-12 a 19 57 34" src="https://cloud.githubusercontent.com/assets/2211145/21903782/6989eb36-d901-11e6-8f02-99c4a8356725.PNG">|<img width="892" alt="screenshot 2017-01-12 a 19 52 56" src="https://cloud.githubusercontent.com/assets/2211145/21903721/407d3bbc-d901-11e6-901b-3f5b65bee650.PNG">|

This will fix the issue by removing it, as we don't need this behavior for inline dumps.

Commits
-------

81e2641 [Profiler] Fix inline dump rendering
2017-01-13 09:45:33 +01:00
Fabien Potencier
364ad971c2 bumped Symfony version to 3.2.3 2017-01-12 13:51:00 -08:00
Fabien Potencier
358c59fd21 Merge pull request #21261 from fabpot/release-3.2.2
released v3.2.2
2017-01-12 13:36:55 -08:00
Fabien Potencier
2c795ba970 updated VERSION for 3.2.2 2017-01-12 13:36:33 -08:00
Fabien Potencier
a95d15b05a updated CHANGELOG for 3.2.2 2017-01-12 13:36:24 -08: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
Nicolas Grekas
136a5ffc55 Merge branch '3.2'
* 3.2:
  Fix test
2017-01-12 21:17:32 +01:00
Nicolas Grekas
3d0a69e50f Fix test 2017-01-12 21:17:20 +01:00
Nicolas Grekas
c527f10b08 Merge branch '3.2'
* 3.2:
  [Profiler][Form] Fix form profiler errors profiler_dump
2017-01-12 20:46:56 +01:00
Nicolas Grekas
6ba798151e bug #21257 [Profiler][Form] Fix form profiler errors profiler_dump (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Profiler][Form] Fix form profiler errors profiler_dump

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

|Before|After|
|-|-|
|
<img width="807" alt="screenshot 2017-01-12 a 20 12 59" src="https://cloud.githubusercontent.com/assets/2211145/21904499/323d1a38-d904-11e6-85ef-0957ef226278.PNG">|<img width="806" alt="screenshot 2017-01-12 a 20 13 38" src="https://cloud.githubusercontent.com/assets/2211145/21904500/32429710-d904-11e6-9bed-0d8e37262cd5.PNG">|

Commits
-------

207fab6 [Profiler][Form] Fix form profiler errors profiler_dump
2017-01-12 20:46:27 +01:00
Nicolas Grekas
641bb1a890 Merge branch '3.2'
* 3.2:
  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:30:26 +01:00
Nicolas Grekas
ec858cea91 Merge branch '3.1' into 3.2
* 3.1:
  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:27:47 +01: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
Maxime Steinhausser
207fab63db [Profiler][Form] Fix form profiler errors profiler_dump 2017-01-12 20:16:54 +01:00
Nicolas Grekas
566732db1f Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Add annotated validator cache test case
  Fix a typo
  [Ldap] Always have a valid connection when using the EntryManager
  [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers
2017-01-12 20:06:21 +01:00
Nicolas Grekas
2e4d87fd6e Merge branch '3.1' into 3.2
* 3.1:
  [Ldap] Always have a valid connection when using the EntryManager
2017-01-12 20:04:24 +01:00
Fabien Potencier
6fe9319e66 feature #21253 [TwigBridge][Worklow] Added a new workflow_has_place function (Padam87, lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBridge][Worklow] Added a new workflow_has_place function

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

---

This PR follow up #20781

I also increased the Coverage of the WorkflowExtension and finally I added an extra commit that is not related to clean-up 2 unused properties

Commits
-------

108c89d1cf [TwigBridge] Removed unused class property
77f820ee7c [TwigBridge][Workflow] Added more tests on WorkflowExtension
efe500da84 [TwigBridge][Workflow] Fixed code and tests
4d0cc6836f [TwigBridge][Workflow] Added workflow_has_place twig function
2017-01-12 10:57:19 -08:00
Grégoire Pineau
108c89d1cf [TwigBridge] Removed unused class property 2017-01-12 19:56:36 +01:00
Grégoire Pineau
77f820ee7c [TwigBridge][Workflow] Added more tests on WorkflowExtension 2017-01-12 19:55:06 +01:00
Grégoire Pineau
efe500da84 [TwigBridge][Workflow] Fixed code and tests 2017-01-12 19:55:06 +01:00
Adam Prager
4d0cc6836f [TwigBridge][Workflow] Added workflow_has_place twig function 2017-01-12 19:55:06 +01:00
Maxime Steinhausser
81e2641199 [Profiler] Fix inline dump rendering 2017-01-12 19:54:12 +01:00
Fabien Potencier
75de5eb8f4 bug #21243 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers (nicolas-grekas, mpajunen)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers

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

Follow up of #21102

Commits
-------

e09dccc762 [FrameworkBundle] Add annotated validator cache test case
c60009eae8 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers
2017-01-12 10:52:44 -08:00
Fabien Potencier
5cf600dfbd bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only

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

The `DateTimeToLocalizedStringTransformer` when used with a pattern that have only date (in `DateType` for instance) does not convert the result in the desired output

Reproduction steps:
- Use `DateType` in a form
- Set the `model_timezone` to `Pacific/Tahiti`, having default timezone to `Europe/Berlin`.
- Enter the date `2017-01-10`
- Submit the form
- Notice that the received data is `2017-01-10 00:00 Europe/Berlin`, whereas it should be `2017-01-10 11:00 Europe/Berlin`

Commits
-------

031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
2017-01-12 10:42:17 -08:00
Fabien Potencier
bcab8b8ac8 bug #21248 [FrameworkBundle] Prevent an error when the console component isn't installed (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Prevent an error when the console component isn't installed

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

Finish #19443. Alternative to #21246.

Commits
-------

ab133caa8c [FrameworkBundle] Prevent an error when the console component isn't installed
2017-01-12 10:31:45 -08:00
Fabien Potencier
90891317eb feature #21234 Add a new Dotenv component (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add a new Dotenv component

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

This introduces a new Dotnv Component that manages `.env` files. Read the referenced doc PR above for more information about usage:

But here, I want to explain the rationale behind creating such a component instead of reusing an existing one.

 * First, this version only implements what you can do in a "real" bash shell script (which is what a `.env` really is): so **no value validation** for instance (and anyway, an env var value is always a string). That's important as in production, we should use real env variables, and we don't have validation for them there;

 * It allows to only parse a file without populating the env variables (we have 3 stages: `load` `parse` and `populate`);

 * Strict implementation of what you can do in a `.env` file, same behavior as bash ($VAR and ${VAR} are supported for instance, executing commands as well);

 * Great error messages: I spent a lot of time being sure that error reporting is top notch;

 * Clean, simple, and straightforward code (small public API);

 * It only does `.env` management, there is no uneeded abstractions like being able to add an env variable directly (just use `putenv`);

There are some unimplemented features as I don't think they are needed and would increase the complexity of the code: several concatenated strings `FOO='foo'"bar"` for instance.

Commits
-------

5a6be8ae9c [Dotenv] added the component
2017-01-12 10:01:47 -08:00
Fabien Potencier
5a6be8ae9c [Dotenv] added the component 2017-01-12 08:39:44 -08:00
Nicolas Grekas
7ba3bc6867 minor #21250 Fix a typo (GuilhemN)
This PR was merged into the 3.2 branch.

Discussion
----------

Fix a typo

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21194#discussion_r95668246
| License       | MIT
| Doc PR        |

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

2dcb22e Fix a typo
2017-01-12 17:37:52 +01:00
Mikael Pajunen
e09dccc762 [FrameworkBundle] Add annotated validator cache test case 2017-01-12 17:32:18 +01:00
Guilhem N
2dcb22e68e Fix a typo 2017-01-12 17:27:24 +01:00
Fabien Potencier
a99538340d feature #20861 Add a --show-arguments flag to the debug:container command (Cydonia7)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add a --show-arguments flag to the debug:container command

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

This PR adds a `--show-arguments` flag to the `debug:container` command that shows arguments in the services in the different available formats.

(Ping @dunglas)

Commits
-------

5c151d0439 Add a --show-arguments flag to the container debug command
2017-01-12 08:07:31 -08:00
Fabien Potencier
5c68c69da1 bug #20605 [Ldap] Always have a valid connection when using the EntryManager (bobvandevijver)
This PR was submitted for the 3.2 branch but it was merged into the 3.1 branch instead (closes #20605).

Discussion
----------

[Ldap] Always have a valid connection when using the EntryManager

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

The connection might be `null` when calling the `getEntryManager` function as it uses the `$this->connection` instead of retrieved it from it's own method which checks (and constructs if necessary) it first.

Commits
-------

7775ec210f [Ldap] Always have a valid connection when using the EntryManager
2017-01-12 07:53:09 -08:00
Bob van de Vijver
7775ec210f [Ldap] Always have a valid connection when using the EntryManager 2017-01-12 07:53:08 -08:00
Kévin Dunglas
ab133caa8c
[FrameworkBundle] Prevent an error when the console component isn't installed 2017-01-12 15:52:48 +01:00
Baptiste Lafontaine
031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date 2017-01-12 15:37:51 +01:00
Nicolas Grekas
d7bc68a3ed bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] fix IPv6 address handling in server commands

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21039#discussion_r93915788
| License       | MIT
| Doc PR        |

This fixes https://github.com/symfony/symfony/pull/21039#discussion_r93915788 as reported by @sstok for the existing commands by backporting @fabpot's patch from #21039.

Commits
-------

2bb4713 fix IPv6 address handling in server commands
2017-01-12 14:01:00 +01:00
Nicolas Grekas
4769ca2164 bug #20793 [Validator] Fix caching of constraints derived from non-serializable parents (uwej711)
This PR was squashed before being merged into the 2.7 branch (closes #20793).

Discussion
----------

[Validator] Fix caching of constraints derived from non-serializable parents

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

This change allows to still cache constraints even when an uncachable constraint (i.e. Callback)
is added to a parent class at runtime.

This is achived by caching only the constraints that are loaded for the class in question only
and merging parent and interface constraints after reading from cache.

Commits
-------

9dd6b0c [Validator] Fix caching of constraints derived from non-serializable parents
2017-01-12 13:52:00 +01:00
Uwe Jäger
9dd6b0cf64 [Validator] Fix caching of constraints derived from non-serializable parents 2017-01-12 13:51:22 +01:00