Commit Graph

19732 Commits

Author SHA1 Message Date
Fabien Potencier
55c4b41c29 [TwigBundle] use the new Twig autoescaping strategy 2015-01-14 06:59:05 +01:00
Fabien Potencier
bd01a29eb4 moved the logic from debug:twig to the Twig bridge 2015-01-13 11:05:58 +01:00
Fabien Potencier
c7ae71d6da [FrameworkBundle] bumped deps for HttpKernel 2015-01-13 07:07:41 +01:00
Fabien Potencier
fa03bd59ba [TwigBundle] bumped deps for HttpKernel 2015-01-12 22:48:35 +01:00
Fabien Potencier
228be36d01 feature #13378 lazy-load fragment renderers (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

lazy-load fragment renderers

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

Now that we have more fragment renderers (inline, hinclude, esi, and ssi), it's a waste of time to load them all for every single requests; actually, most of the time, we load them for nothing.

So, like we did for event listeners, I propose to lazy-load them.

I've also move the classes to the HttpKernel component as the corresponding classes for the lazy-loading of listeners were moved to the EventDispatcher component a while ago to make them reusable outside of the Symfony2 context.

Last, but not the least, I've named the class with a `LazyLoading` prefix instead of the usual `ContainerAware` as I think it conveys the goal much better. I'd like to rename the other ones as well when it makes sense.

Commits
-------

2be8b6e [TwigBundle] optimized the hinclude fragement renderer when only Twig is used
6148652 [FrameworkBundle] removed obsolete ContainerAwareHIncludeFragmentRenderer class
e620cbf lazy-load fragment renderers
2015-01-12 22:23:21 +01:00
Fabien Potencier
eadb658c76 minor #13357 [2.7] Update README.md to min PHP 5.3.9 (xelaris)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Update README.md to min PHP 5.3.9

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

see 43c05650

Commits
-------

c8857c1 Update README.md to min PHP 5.3.9
2015-01-12 17:42:03 +01:00
Fabien Potencier
2be8b6e2ea [TwigBundle] optimized the hinclude fragement renderer when only Twig is used 2015-01-12 16:31:03 +01:00
Fabien Potencier
6148652d05 [FrameworkBundle] removed obsolete ContainerAwareHIncludeFragmentRenderer class 2015-01-12 16:31:03 +01:00
Fabien Potencier
e620cbfce2 lazy-load fragment renderers 2015-01-12 16:31:01 +01:00
Alexander Schwenn
c8857c100e Update README.md to min PHP 5.3.9 2015-01-10 19:20:22 +01:00
Fabien Potencier
7192b2f2f6 feature #13354 Twig decoupling from Templating (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Twig decoupling from Templating

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

The goal of this PR is to make Twig independent of the Symfony Templating system. With this PR, you can now use the Twig bundle without activating `framework.templating`. Also, even when registering the templating system in FrameworkBundle, the `php` engine is only registered when specified explicitly in `engines`.

First, the global variables has been decoupled from FrameworkBundle.

Then, the Twig bundle now tries to only rely on native Twig extensions and loaders and use the Templating sub-system only if `framework.templating` is enabled.

Commits
-------

18d4c41 [TwigBundle] added some tests
0d537c4 decoupled Twig from the Templating system
be5a208 decoupled global variables system in Twig from the Templating one
2015-01-10 16:52:07 +01:00
Fabien Potencier
18d4c4163c [TwigBundle] added some tests 2015-01-10 16:37:07 +01:00
Fabien Potencier
0d537c4e4d decoupled Twig from the Templating system 2015-01-10 16:22:08 +01:00
Fabien Potencier
be5a208c39 decoupled global variables system in Twig from the Templating one 2015-01-10 16:20:07 +01:00
Fabien Potencier
861804be5f feature #13264 URL manipulations as a Twig extension (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

URL manipulations as a Twig extension

| Q             | A
| ------------- | ---
| 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#4805

While working on the new asset component, I realized that the "absolute URL" feature was misplaced and would benefit from being exposed as a Twig function (composition is always a good thing). Then, I wondered if having a Twig function to generate a relative path (like done by the Routing component would also make sense). And here is the corresponding PR.

```jinja
{# generate an absolute URL for the given absolute path #}
{{ absolute_url('/me.png') }}

{# generate a relative path for the given absolute path (based on the current Request) #}
{{ relative_path('/foo/me.png') }}

{# compose as you see fit #}
{{ absolute_url(asset('me.png')) }}
```

As you can see, we require an absolute path for both functions (and we even add the leading slash if it is omitted), not sure if we want to do otherwise.

ping @tobion

Commits
-------

0ec852d added a relative_path Twig function
ee27ed8 added an absolute_url() Twig function
2015-01-10 08:28:57 +01:00
Fabien Potencier
545e1a4bc1 minor #13349 [2.7] Fix deprecations on TwigBundle and FrameworkBundle semantic configurations (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Fix deprecations on TwigBundle and FrameworkBundle semantic configurations

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

Commits
-------

8d60396 [FrameworkBundle|TwigBundle] update functional tests configuration files to not use deprecated config keys anymore.
2015-01-09 21:00:04 +01:00
Hugo Hamon
8d60396e0e [FrameworkBundle|TwigBundle] update functional tests configuration files to not use deprecated config keys anymore. 2015-01-09 19:19:37 +01:00
Fabien Potencier
7a4c5fcd78 Merge branch '2.6' into 2.7
* 2.6:
  [PropertyAccessor] Added test to allow null value for a array
  [Yaml] Fixed #10597: Improved Yaml directive parsing
  [Form] Fixed check of violation constraint #12792
  [Form] Set a child type to text if added to the form without a type.
2015-01-09 19:07:24 +01:00
Fabien Potencier
aed787878f Merge branch '2.5' into 2.6
* 2.5:
  [PropertyAccessor] Added test to allow null value for a array
  [Yaml] Fixed #10597: Improved Yaml directive parsing
  [Form] Set a child type to text if added to the form without a type.
2015-01-09 19:07:16 +01:00
Fabien Potencier
e300b4384f Merge branch '2.3' into 2.5
* 2.3:
  [PropertyAccessor] Added test to allow null value for a array
  [Yaml] Fixed #10597: Improved Yaml directive parsing
  [Form] Set a child type to text if added to the form without a type.

Conflicts:
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
2015-01-09 19:07:12 +01:00
Fabien Potencier
c06b82d3b4 feature #13289 [DependencyInjection] deprecated synchronized services (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] deprecated synchronized services

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

Commits
-------

82db9c2 [DependencyInjection] deprecated synchronized services
2015-01-09 19:01:49 +01:00
Fabien Potencier
82db9c2e52 [DependencyInjection] deprecated synchronized services 2015-01-09 18:43:28 +01:00
Fabien Potencier
55b8939183 bug #13346 [PropertyAccessor] Allow null value for a array (2.3) (boekkooi)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccessor] Allow null value for a array (2.3)

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

Original PR is #12511
A rebase on 2.3 was requested by @fabpot

Commits
-------

9706b09 [PropertyAccessor] Added test to allow null value for a array
2015-01-09 17:16:50 +01:00
Fabien Potencier
7f8ff501a5 minor #13344 [2.7] adds legacy tests for deprecated configuration keys. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] adds legacy tests for deprecated configuration keys.

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

Commits
-------

814527f [FrameworkBundle] adds legacy tests for deprecated configuration keys.
a290286 [TwigBundle] adds legacy tests for deprecated configuration keys.
2015-01-09 16:31:09 +01:00
Hugo Hamon
814527f9d2 [FrameworkBundle] adds legacy tests for deprecated configuration keys. 2015-01-09 15:59:37 +01:00
Hugo Hamon
a290286eea [TwigBundle] adds legacy tests for deprecated configuration keys. 2015-01-09 15:59:37 +01:00
Warnar Boekkooi
9706b090c0 [PropertyAccessor] Added test to allow null value for a array 2015-01-09 15:57:01 +01:00
Fabien Potencier
43c05650c6 bug #13338 Validator deprecation fixes (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Validator deprecation fixes

| 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
-------

a34220e [Validator] always use the lazy loading metadata factory
818ca58 [Validator] removed usage of deprecated getMessageParameters() and getMessagePluralization() in unit tests
c6f1f69 [Validator] fixed deprecation notices for BuildViolation() calls in constraints
fb3f9d2 [Validator] fixed usage of deprecate Validator features
91606b5 [Validator] removed obsolete code
5aa44ee removed the Validator BC layer for PHP < 5.3.9
a4139c0 removed code for PHP < 5.3.9
6dc8979 bumped min PHP version to 5.3.9
2015-01-09 15:41:30 +01:00
Fabien Potencier
d5e9de2f94 bug #13170 [Form] Set a child type to text if added to the form without a type. (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Set a child type to text if added to the form without a type.

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

This copies the behaviour of `FormBuilder::create()` to `Form::add()`.

ping @webmozart

Commits
-------

57070a2 [Form] Set a child type to text if added to the form without a type.
2015-01-09 15:25:23 +01:00
Fabien Potencier
425385400d bug #13334 [Yaml] Fixed #10597: Improved Yaml directive parsing (VictoriaQ)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13334).

Discussion
----------

[Yaml] Fixed #10597: Improved Yaml directive parsing

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

There was a problem with the regular expression used to process the YAML directive. The modifier `s` made the regex too greedy, replacing everything but the last line of the YAML. Existing tests using the YAML directive contained only one line, that's why they were passing.

Commits
-------

95d8ce3 [Yaml] Fixed #10597: Improved Yaml directive parsing
2015-01-09 15:23:47 +01:00
victoria
95d8ce3031 [Yaml] Fixed #10597: Improved Yaml directive parsing 2015-01-09 15:23:46 +01:00
Fabien Potencier
a34220ec3e [Validator] always use the lazy loading metadata factory 2015-01-09 15:21:10 +01:00
Fabien Potencier
818ca589d8 [Validator] removed usage of deprecated getMessageParameters() and getMessagePluralization() in unit tests 2015-01-09 15:21:10 +01:00
Fabien Potencier
c6f1f69b7a [Validator] fixed deprecation notices for BuildViolation() calls in constraints 2015-01-09 15:21:09 +01:00
Fabien Potencier
47d5133252 bug #13198 [Form] Fixed check of violation constraint #12792 (xelaris)
This PR was merged into the 2.6 branch.

Discussion
----------

[Form] Fixed check of violation constraint #12792

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

ConstraintViolation::getConstraint() must not expect to provide a constraint as long as Symfony\Component\Validator\ExecutionContext exists (before 3.0)

Commits
-------

aedabc7 [Form] Fixed check of violation constraint #12792
2015-01-09 15:03:07 +01:00
Fabien Potencier
fb3f9d2d1c [Validator] fixed usage of deprecate Validator features 2015-01-09 14:24:20 +01:00
Fabien Potencier
91606b55b5 [Validator] removed obsolete code 2015-01-09 14:24:19 +01:00
Fabien Potencier
5aa44eec3d removed the Validator BC layer for PHP < 5.3.9 2015-01-09 14:24:19 +01:00
Fabien Potencier
a4139c0be5 removed code for PHP < 5.3.9 2015-01-09 14:24:18 +01:00
Fabien Potencier
6dc897931b bumped min PHP version to 5.3.9 2015-01-09 07:51:41 +01:00
Fabien Potencier
9a6f52e419 minor #13333 fixed deprecation summary and missing error_reporting() in tests (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

fixed deprecation summary and missing error_reporting() in tests

| 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
-------

367184a fixed deprecation summary and missing error_reporting() in tests
2015-01-09 07:49:58 +01:00
Fabien Potencier
367184a6d7 fixed deprecation summary and missing error_reporting() in tests 2015-01-09 07:47:56 +01:00
Fabien Potencier
70a739897c minor #13337 [TwigBundle] adds missing deprecation notice for the twig.form.resources configuration key. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] adds missing deprecation notice for the twig.form.resources configuration key.

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

Commits
-------

07beabf [TwigBundle] adds missing deprecation notice for the twig.form.resources configuration key.
2015-01-09 07:34:32 +01:00
Fabien Potencier
251c9c0b9a minor #13339 [FrameworkBundle] adds deprecation notice on framework.csrf_protection.field_name configuration key. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] adds deprecation notice on framework.csrf_protection.field_name configuration key.

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

Commits
-------

d79d2cf [FrameworkBundle] adds deprecation notice on framework.csrf_protection.field_name configuration key.
2015-01-09 07:33:06 +01:00
Alexander Schwenn
aedabc76b6 [Form] Fixed check of violation constraint #12792
ConstraintViolation::getConstraint() must not expect to provide a
constraint as long as Symfony\Component\Validator\ExecutionContext
exists (before 3.0)
2015-01-09 05:45:27 +01:00
Hugo Hamon
d79d2cf185 [FrameworkBundle] adds deprecation notice on framework.csrf_protection.field_name configuration key. 2015-01-09 00:20:25 +01:00
Hugo Hamon
07beabfe73 [TwigBundle] adds missing deprecation notice for the twig.form.resources configuration key. 2015-01-08 22:30:44 +01:00
Fabien Potencier
66da1d23f5 minor #13335 [FrameworkBundle] avoid using deprecated classes for reflection (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] avoid using deprecated classes for reflection

| 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
-------

26fa1a5 [FrameworkBundle] avoid using deprecated classes for reflection
2015-01-08 22:30:25 +01:00
Fabien Potencier
2cdeae5d50 bug #13336 Make that AddExpressionLanguageProviderPass works with aliases (maarekj, jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

Make that AddExpressionLanguageProviderPass works with aliases

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

Replaces #12982 by @maarekj (includes his commit).

Commits
-------

16a22cd [FrameworkBundle] Add a test case for service aliases used with AddExpressionLanguageProviderPass.
fd97cef [FrameworkBundle] fixed #12847 AddExpressionLanguageProviderPass
2015-01-08 22:28:04 +01:00
Fabien Potencier
26fa1a5417 [FrameworkBundle] avoid using deprecated classes for reflection 2015-01-08 19:00:48 +01:00