Commit Graph

12913 Commits

Author SHA1 Message Date
Fabien Potencier
70686ac7b3 merged branch franmomu/update_deprecated_calls_collection_validator (PR #6741)
This PR was merged into the master branch.

Commits
-------

9264431 Remove custom error handler for deprecations
c80c17e Change deprecated Min constraint to Range constraint
a39fdd8 Remove getPropertyPath in the tests
ffa4c6f [Validator][Constraints] CollectionValidator

Discussion
----------

[Validator][Constraints] Update CollectionValidator using new Validator API

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6648
License of the code: MIT

In the tests `$i = 1` is because in `validate` the first call to `$this->context` is `$this->context->getGroup();`, should I write this in a comment before each declaration?

---------------------------------------------------------------------------

by stof at 2013-01-15T21:50:41Z

You should also modify the CollectionValidator tests to use a different constraint than ``Min`` which is deprecated. Once it is done, these tests should not need to register a custom error handler catching deprecations anymore

---------------------------------------------------------------------------

by franmomu at 2013-01-15T22:33:43Z

Perfect, I'm going to do the same in #6743
2013-01-24 10:29:51 +01:00
Fabien Potencier
02738a509f merged branch CEikermann/patch-1 (PR #6728)
This PR was merged into the master branch.

Commits
-------

2061cc0 Update src/Symfony/Component/Validator/Mapping/ClassMetadata.php

Discussion
----------

[Validator] ClassMetadata use deprecated methods

Bug fix: yes
Feature addition: no
Backwards compatibility break: maybe yes (I don't have the knowlegde)
Symfony2 tests pass: yes
Fixes the following tickets: ?
Todo: Nothing
License of the code: MIT
Documentation PR: Nothing

getValue() is deprecated since version 2.2 and will be removed in 2.3. Use getPropertyValue() instead.

ClassMetadata is still using the deprecated method, changed it to getPropertyValue to prevent a trigger error.

---------------------------------------------------------------------------

by fabpot at 2013-01-14T15:35:28Z

ping @bschussek
2013-01-24 09:53:37 +01:00
Fabien Potencier
c3ee8f65f7 bumped Symfony version to 2.2.0-RC1-DEV 2013-01-24 09:14:41 +01:00
Fabien Potencier
86dd5e482d updated VERSION for 2.2.0-BETA2 2013-01-24 08:15:19 +01:00
Fabien Potencier
6a53180aa9 [HttpKernel] added a missing unit test 2013-01-24 07:51:29 +01:00
Fabien Potencier
c0d72d275f [HttpKernel] fixed typo (closes #6859) 2013-01-24 07:50:13 +01:00
Fabien Potencier
e5c3637fbc fixed file mode (refs #6734) 2013-01-23 21:26:57 +01:00
Fabien Potencier
3196dbdf52 Merge branch '2.1'
* 2.1:
  [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
  [Security] PHPDoc in SecurityEvents
  Fix typos in README
  Added an error message in the DebugClassLoader when using / instead of \.
  KNOWN_ISSUES with php 5.3.16
  [FrameworkBundle] fixed Client::doRequest that must call its parent method (closes #6737)
  [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786)
  [Yaml] fixed #6773
  [Yaml] fixed #6770
  bumped Symfony version to 2.1.8-DEV
  bumped Symfony version to 2.0.23-DEV

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Client.php
	src/Symfony/Component/HttpKernel/Kernel.php
2013-01-23 21:21:00 +01:00
Fabien Potencier
7c957e3411 merged branch MaksSlesarenko/fix-for-choice-widget (PR #6734)
This PR was squashed before being merged into the master branch (closes #6734).

Commits
-------

4d51ec0 Fix for hardcode (#6384) in choice widget

Discussion
----------

Fix for hardcode (#6384) in choice widget

empty_value should not be disabled if field is not required!

#6384

---------------------------------------------------------------------------

by sstok at 2013-01-15T15:51:08Z

You need to revert the file mode changes (100644 → 100755)

---------------------------------------------------------------------------

by MaksSlesarenko at 2013-01-18T16:44:42Z

fixed tests

---------------------------------------------------------------------------

by MaksSlesarenko at 2013-01-21T15:36:59Z

ping @fabpot

---------------------------------------------------------------------------

by fabpot at 2013-01-21T15:58:26Z

ping @bschussek

---------------------------------------------------------------------------

by MaksSlesarenko at 2013-01-23T11:15:37Z

ping @fabpot @bschussek

---------------------------------------------------------------------------

by Tobion at 2013-01-23T12:08:19Z

I think it's good to squash and merge.

---------------------------------------------------------------------------

by fabpot at 2013-01-23T12:16:37Z

Can you rebase and squash before I merge? Thanks.

---------------------------------------------------------------------------

by MaksSlesarenko at 2013-01-23T19:51:36Z

@fabpot done
2013-01-23 20:54:36 +01:00
Maks Slesarenko
4d51ec05d8 Fix for hardcode (#6384) in choice widget 2013-01-23 20:54:35 +01:00
Fabien Potencier
78e3da501f merged branch vicb/di/prepext (PR #6853)
This PR was merged into the master branch.

Commits
-------

7944860 [DIC] Move PrependExtensionInterface to the Extension namespace

Discussion
----------

[DIC] Move PrependExtensionInterface to the Extension namespace

@fabpot Please merge before 2.2 (no BC break) /cc @lsmith77
2013-01-23 18:53:45 +01:00
Victor
79448600f5 [DIC] Move PrependExtensionInterface to the Extension namespace 2013-01-23 17:42:45 +01:00
Fabien Potencier
2cc3331a6f merged branch fabpot/circular-reference-fix (PR #6850)
This PR was merged into the master branch.

Commits
-------

65b4112 fixed a circular reference (closes #6730)

Discussion
----------

fixed a circular reference (closes #6730)

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

---------------------------------------------------------------------------

by stof at 2013-01-23T13:56:19Z

shoudln't this be moved to the component ? Someone using the TwigBridge, HttpKernel and the DI component outside the full stack framework (let's say Drupal maybe) would also face the circular reference issue

---------------------------------------------------------------------------

by fabpot at 2013-01-23T13:58:28Z

No, they won't as the problem is only if you are using the templating component. So, Silex or Drupal won't have the problem.

---------------------------------------------------------------------------

by stof at 2013-01-23T14:01:03Z

ah, the issue is indeed with the TwigEngine, not with the Twig_Environment service.
2013-01-23 17:07:19 +01:00
Fabien Potencier
65b4112ddb fixed a circular reference (closes #6730) 2013-01-23 14:48:08 +01:00
Fabien Potencier
4bdfb92a35 updated CHANGELOGS 2013-01-23 14:21:06 +01:00
Fabien Potencier
b728aa2ad1 added PropertyAccess in composer.json 2013-01-23 14:09:35 +01:00
Fabien Potencier
877603a9f3 merged branch fabpot/content-renderer-request (PR #6829)
This PR was merged into the master branch.

Commits
-------

23f5145 renamed proxy to router_proxy
e5135f6 [HttpKernel] renamed path to _path to avoid collision
3193a90 made the proxy path configurable
ad82893 removed the need for a proxy route for rendering strategies
b9f0e17 [HttpKernel] made the Request required when using rendering strategies

Discussion
----------

Content renderer simplification

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

Todo:

  - [x] submit a PR for documentation update

The first commit makes the Request required when dealing with rendering strategies (see the commit why this was a bad idea to make it optional in the first place).

The second commit removes the need for a proxy route and replaces it with the same system we have in the security component.

The third commit makes the proxy path configurable (default to `/_proxy`).

This PR has been triggered by a discussion on #6791.

---------------------------------------------------------------------------

by fabpot at 2013-01-22T09:49:37Z

My opinion:

  * The first commit should be merged.

  * For the second and third one, I don't have a strong opinion. One of the benefits that the content renderer and its strategies do not rely on the Routing component anymore.

---------------------------------------------------------------------------

by fabpot at 2013-01-22T15:22:47Z

Any comments? ping @Tobion @vicb

---------------------------------------------------------------------------

by Tobion at 2013-01-22T16:07:15Z

Shouldn't the class name be like `SubRequestRenderingStrategyInterface` because currently it does not say anything about what is rendered. `RenderingStrategyInterface` makes it look like it's for rendering a normal master request, i.e. templating.

---------------------------------------------------------------------------

by fabpot at 2013-01-22T16:19:26Z

@Tobion: This was actually the first name I had but I found it too long. It is indeed rendering a normal request, but only in the context of a master request.

---------------------------------------------------------------------------

by Tobion at 2013-01-22T16:23:25Z

I found the correct term for what this is about: http://en.wikipedia.org/wiki/Transclusion
So it should probably be like `Symfony/Component/HttpKernel/Transclusion/TransclusionInterface`
or `TransclusionStrategyInterface`.
So the term `rendering` is misleading as it does not really render the subrequest, but only prints a reference to the subrequest. The rendering is done by ESI processor or hinclude etc.

---------------------------------------------------------------------------

by fabpot at 2013-01-22T16:37:00Z

The `RenderingStrategyInterface` does render a request and returns a Response. One of the strategy consist of returning an ESI tag, but this is still a Response.

I don't like introducing the `Transclusion` word as (at least for me) it does not evoke anything.

---------------------------------------------------------------------------

by Tobion at 2013-01-22T16:46:10Z

Also `DefaultRenderingStrategy` is not saying anything. What is default? It should express that it directly includes the resource in the other (term `integrate` comes to my mind).

---------------------------------------------------------------------------

by kriswallsmith at 2013-01-22T17:23:21Z

How about `InlineRenderingStrategy`?

---------------------------------------------------------------------------

by vicb at 2013-01-22T17:25:17Z

@Tobion @kriswallsmith 👍

---------------------------------------------------------------------------

by kriswallsmith at 2013-01-22T17:26:17Z

Also, `SubRequestStrategyInterface` may be more apparent (`InlineSubRequestStrategy`, `EsiSubRequestStrategy`…)

---------------------------------------------------------------------------

by Tobion at 2013-01-22T18:10:19Z

`SubRequestStrategyInterface` is missing the verb somehow. A strategy for what? @kriswallsmith as an English native speaker, is transclusion also not convenient for you?

---------------------------------------------------------------------------

by fabpot at 2013-01-22T18:11:41Z

Thanks for all your suggestions, I appreciate them, but what about the whole approach? Do you agree that it is better than the current one? I'd like to avoid the bikeshedding if the approach is not better.

---------------------------------------------------------------------------

by kriswallsmith at 2013-01-22T18:22:47Z

👍 for removing the router dependency.

@Tobion perhaps request is the verb there?

---------------------------------------------------------------------------

by Tobion at 2013-01-22T19:51:20Z

I'm also fine with making it independent from the routing component because routing is about making routes configurable with placeholders etc. for nice URLs. But this is not needed for a proxy feature.

---------------------------------------------------------------------------

by kriswallsmith at 2013-01-22T20:13:48Z

@fabpot Do you anticipate ever wanting a sub request to be handled differently based on HTTP method? Just thinking of possible reasons to continue using the routing component here…

---------------------------------------------------------------------------

by fabpot at 2013-01-22T20:40:06Z

No, sub-requests only make sense for GET requests. In fact, we even enforce that in HttpContentRenderer.

---------------------------------------------------------------------------

by fabpot at 2013-01-23T06:51:54Z

I'm not going to discuss names further in the context of this PR as it has already been discussed in the initial PR that introduced these classes and because this PR does not change anything to the meaning of these classes. If you think the names can be better, feel free to open a ticket and discuss names there.

---------------------------------------------------------------------------

by vicb at 2013-01-23T07:48:36Z

If I understand correctly, both hsi and esi will generate path starting with "/_proxy", isn't it a problem wrt access_control ? should it be possible to configure a per strategy path ?

---------------------------------------------------------------------------

by fabpot at 2013-01-23T07:56:11Z

@vicb: Yes, all strategies use the `/_proxy` path when the developer uses a controller reference. But the router proxy takes care of securing the route, so there is no need to do it yourself.

---------------------------------------------------------------------------

by vicb at 2013-01-23T08:07:36Z

@fabpot that's smart, I've missed it.

Some questions though (they should be answered by UT I think - and might already have been, I have not checked)
- Isn't there a pb with urlencoding in the listener ?
- Would the listener work with fragments (`#...') ?

---------------------------------------------------------------------------

by vicb at 2013-01-23T08:31:37Z

Some more points:

- Should we validate that the router_proxy is enabled when esi are enabled (early failure ?)
- Should we be able to enable each strategy individually (ie no need to expose the signer when hsi are not used)

---------------------------------------------------------------------------

by fabpot at 2013-01-23T09:58:45Z

Enabling the router proxy when using ESI si not required. The router proxy is "only" required when you use the `controller` Twig function (or the equivalent in PHP -> `ControllerReference`). But we can probably throw an exception in the `ControllerReference` constructor if the proxy is not enabled.

Enabling each strategy individually is indeed a good idea (and that's more a general question as we could do the same for the translator loaders, or the service container loaders). Let's create another issue on this global topic.

---------------------------------------------------------------------------

by vicb at 2013-01-23T10:10:29Z

> But we can probably throw an exception in the ControllerReference constructor if the proxy is not enabled.

It should probably be in a wrapper class then ?

---------------------------------------------------------------------------

by fabpot at 2013-01-23T12:45:36Z

The listener does not need to work with fragments as URLs as they are never part of the generated URL.
2013-01-23 14:01:56 +01:00
Fabien Potencier
23f51450bd renamed proxy to router_proxy 2013-01-23 13:57:53 +01:00
Fabien Potencier
e5135f67be [HttpKernel] renamed path to _path to avoid collision 2013-01-23 13:57:53 +01:00
Fabien Potencier
3193a90815 made the proxy path configurable 2013-01-23 13:57:53 +01:00
Fabien Potencier
ad82893691 removed the need for a proxy route for rendering strategies 2013-01-23 13:57:52 +01:00
Fabien Potencier
b9f0e17e67 [HttpKernel] made the Request required when using rendering strategies
The previous code allowed to pass null as a Request but that does not
really make sense as rendering a sub-request can only happen from a
master request. This was done to ease testing but that was a mistake.
2013-01-23 13:57:23 +01:00
Fabien Potencier
8a351f07cb merged branch kriswallsmith/master (PR #6842)
This PR was merged into the master branch.

Commits
-------

731cd49 made twig extension service private

Discussion
----------

[TwigBundle] made extension a private service

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~
2013-01-22 21:04:49 +01:00
Kris Wallsmith
731cd49781 made twig extension service private 2013-01-22 10:56:22 -08:00
Fabien Potencier
5d896f60f4 merged branch fabpot/proxy-route-fix (PR #6791)
This PR was merged into the master branch.

Commits
-------

cdf1d72 [FrameworkBundle] fixed requirement of the _controller palceholder for the proxy route (closes #6783)

Discussion
----------

[FrameworkBundle] fixed requirement of the _controller palceholder for the proxy route (closes #6783)

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

---------------------------------------------------------------------------

by vicb at 2013-01-18T10:23:06Z

What about a UT ?

---------------------------------------------------------------------------

by vicb at 2013-01-18T11:28:41Z

and the syntax is wrong also !

---------------------------------------------------------------------------

by gimler at 2013-01-21T19:59:57Z

same problem the sonata admin bundle use
```
{% render 'sonata.admin.controller.admin:getShortObjectDescriptionAction' %}
```

rewrite to
```
{% render controller('sonata.admin.controller.admin:getShortObjectDescriptionAction') %}
```
throws
```
An exception has been thrown during the rendering of a template ("Parameter "_controller" for route "_proxy" must match "[^/\.]++" ("sonata.admin.controller.admin:getShortObjectDescriptionAction" given) to generate a corresponding URL.") in "SonataAdminBundle:CRUD:edit.html.twig".
```
with the requirement fix it throws
```
An exception has been thrown during the rendering of a template ("Unable to parse the controller name "sonata".") in "SonataAdminBundle:CRUD:edit.html.twig".
```

---------------------------------------------------------------------------

by fabpot at 2013-01-22T06:40:14Z

ok, I've updated the patch. There is now a static segment (`/for`) between the controller and the format, which should fix the problem.

While thinking about this, there is another option, which might be even better: removing the need for the proxy route altogether and check for a defined path like `/_proxy`. It would remove the dependency on a Url Generator in the rendering strategy, and would not make the router proxy listener any more complex.

---------------------------------------------------------------------------

by gimler at 2013-01-22T07:20:43Z

+1 for me the patch works i will open a PR for sonata doctrine orm bundle
```
{% render controller('sonata.admin.controller.admin:getShortObjectDescriptionAction', {},  {
    'code':     sonata_admin.field_description.associationadmin.code,
    'objectId': sonata_admin.field_description.associationadmin.id(sonata_admin.value),
    'uniqid':   sonata_admin.field_description.associationadmin.uniqid
})
```

---------------------------------------------------------------------------

by gimler at 2013-01-22T07:22:21Z

When the proxy route is nessesary we should add a note into the upgrade guide.

+1 for less complexesy

---------------------------------------------------------------------------

by fabpot at 2013-01-22T08:02:12Z

There is one issue with removing the proxy route: when generating a proxy URL, we need a Request instance, which is not always the case. I'm going to submit another PR to "fix" that first.

---------------------------------------------------------------------------

by vicb at 2013-01-22T08:17:51Z

> It would remove the dependency

Paul leaves this body :)

---------------------------------------------------------------------------

by Tobion at 2013-01-22T08:53:52Z

I don't think removing the proxy route is good. That's the purpose of the routing system to handle generating and matching. Now if you do it manually it will probably show a bad approach to people to handle such stuff.
Also people cannot see what routes are defined explicitly and use tools like `router:debug`.

---------------------------------------------------------------------------

by fabpot at 2013-01-22T09:28:55Z

@Tobion: see #6829

---------------------------------------------------------------------------

by fabpot at 2013-01-22T09:57:57Z

I've again changed the route pattern to avoid any possible problems (even if a controller contains a `/`).

---------------------------------------------------------------------------

by Tobion at 2013-01-22T10:16:03Z

Can a controller contain `/`? It's neither a valid service nor a valid class name or?

---------------------------------------------------------------------------

by mvrhov at 2013-01-22T10:40:26Z

AFAIK yes, at least I used Namespace/SubController more then once...
2013-01-22 12:03:36 +01:00
Fabien Potencier
cdf1d72e2f [FrameworkBundle] fixed requirement of the _controller palceholder for the proxy route (closes #6783)
A controller name can be a service and service names can contain dots.
2013-01-22 10:57:00 +01:00
Fabien Potencier
bdc7e91865 Merge branch '2.0' into 2.1
* 2.0:
  [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
  [Security] PHPDoc in SecurityEvents
  [FrameworkBundle] fixed Client::doRequest that must call its parent method (closes #6737)
  [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes #6786)
  [Yaml] fixed #6773
  [Yaml] fixed #6770
  bumped Symfony version to 2.0.23-DEV

Conflicts:
	src/Symfony/Component/DependencyInjection/ContainerBuilder.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Yaml/Inline.php
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2013-01-22 08:14:57 +01:00
Fabien Potencier
115114b0dc merged branch fabpot/synthetic-service-fix (PR #6827)
This PR was merged into the 2.0 branch.

Commits
-------

4119caf [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder

Discussion
----------

[DependencyInjection] fixed the creation of synthetic services in ContainerBuilder

| 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

---------------------------------------------------------------------------

by stof at 2013-01-22T00:14:29Z

👍
2013-01-22 08:11:41 +01:00
Fabien Potencier
4119cafdbe [DependencyInjection] fixed the creation of synthetic services in ContainerBuilder 2013-01-21 23:08:41 +01:00
Fabien Potencier
696900e68f [HttpKernel] fixed failing test 2013-01-21 22:03:00 +01:00
Fabien Potencier
52124ebdc0 merged branch fabpot/hostname-rename (PR #6825)
This PR was merged into the master branch.

Commits
-------

94f6116 renamed hostname to host in the routing system (closes #6775)
001734a [Validator] fixed phpdoc
18b9e68 [HttpFoundation] renamed hostname to host in the test to be consistent

Discussion
----------

Hostname rename to host

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (does not exist in 2.1)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6775
| License       | MIT
| Doc PR        | symfony/symfony-docs#2165

see #6775

---------------------------------------------------------------------------

by WouterJ at 2013-01-21T18:44:20Z

+1
2013-01-21 21:04:57 +01:00
Fabien Potencier
94f6116f42 renamed hostname to host in the routing system (closes #6775)
As explained in #6775, this has been done for the following reasons:

1. It's also Request::getHost()
2. The term hostname has been obsoleted in
http://tools.ietf.org/html/rfc3986#appendix-D.2 and uses the host only
3. hostname in the RFC was defined as the registered domain name, but we
probably also want to match IP-Adresses with the pattern which is the
host = IP-literal / IPv4address / reg-name for.
2013-01-21 17:57:32 +01:00
Fabien Potencier
001734aa2e [Validator] fixed phpdoc 2013-01-21 17:57:12 +01:00
Fabien Potencier
18b9e68861 [HttpFoundation] renamed hostname to host in the test to be consistent 2013-01-21 17:56:55 +01:00
Fabien Potencier
5663820aa6 merged branch franmomu/added_phpdoc_security_events (PR #6818)
This PR was squashed before being merged into the 2.0 branch (closes #6818).

Commits
-------

598ae9d [Security] PHPDoc in SecurityEvents

Discussion
----------

[Security] PHPDoc in SecurityEvents

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

I'm not sure about the description given.
2013-01-21 16:19:16 +01:00
Fran Moreno
598ae9d050 [Security] PHPDoc in SecurityEvents 2013-01-21 16:19:16 +01:00
Fabien Potencier
b7614e9ca8 merged branch fabpot/content-renderer-refactoring (PR #6810)
This PR was merged into the master branch.

Commits
-------

aadefd3 [HttpKernel] refactored the HTTP content renderer to make it easier to extend

Discussion
----------

[HttpKernel] refactored the HTTP content renderer to make it easier to extend

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

This makes the StreamedResponse logic reusable for other strategies and it also makes the RenderingStrategy interface less fuzzy about its contract.

That also makes features like #4470 easier to implement from the outside.

---------------------------------------------------------------------------

by stof at 2013-01-20T11:01:29Z

👍
2013-01-21 16:18:25 +01:00
Fabien Potencier
aadefd378d [HttpKernel] refactored the HTTP content renderer to make it easier to extend 2013-01-21 16:17:47 +01:00
Fabien Potencier
e769d7f2ca merged branch fabpot/format_file (PR #6811)
This PR was merged into the master branch.

Commits
-------

32322a1 [TwigBridge] fixed format_file to include the line number even if the link text is passed

Discussion
----------

[TwigBridge] fixed format_file to include the line number even if the link text is passed

| 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

That fixes the logs in the profiler where lines were not displayed for deprecated calls.

---------------------------------------------------------------------------

by stof at 2013-01-20T10:58:58Z

shouldn't this be merged in older branches as it is a bugfix ?

---------------------------------------------------------------------------

by fabpot at 2013-01-20T15:14:50Z

It is a bug fix but people might rely on the current behavior. But then, nobody ever reported it. So, I prefer to keep it on 2.2 only.
2013-01-21 16:17:05 +01:00
Fabien Potencier
8bb8f90ac6 merged branch fabpot/deprecated_message (PR #6812)
This PR was merged into the master branch.

Commits
-------

1ab48db tweaked the deprecated error handler to actually display the deprecation message

Discussion
----------

tweaked the deprecated error handler to actually display the deprecation message

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

I've also removed uninterested information (like the trigger_error stack
frame).
2013-01-21 16:16:38 +01:00
Fabien Potencier
1ab48db367 tweaked the deprecated error handler to actually display the deprecation message
I've also removed uninterested information (like the trigger_error stack
frame).
2013-01-20 16:29:41 +01:00
Fabien Potencier
32322a13f4 [TwigBridge] fixed format_file to include the line number even if the link text is passed
That fixes the logs in the profiler where lines were not displayed for
deprecated calls.
2013-01-20 11:09:24 +01:00
Fabien Potencier
fada75c420 merged branch asm89/patch-3 (PR #6806)
This PR was merged into the 2.1 branch.

Commits
-------

e6a7e4c Fix typos in README

Discussion
----------

Fix typos in README
2013-01-20 09:33:14 +01:00
Alexander
e6a7e4ceb7 Fix typos in README 2013-01-19 11:32:41 +01:00
Fabien Potencier
6923a484c2 fixed markup 2013-01-19 08:50:02 +01:00
Fabien Potencier
62a4cc90cc merged branch beberlei/SerializerOptions (PR #6797)
This PR was merged into the master branch.

Commits
-------

fcabadf Fix JsonDecode to work on PHP 5.3, update the CHANGELOG.md
b6bdb45 Completly refactor the Serializer Options Pull Request to push context information directly and avoid state and dependencies between SerializerInterface and encoders/normalizers.
ef652e2 Added context to JsonEncoder
eacb7e2 Rename $options to $context, as it makes the intent much more clear.
8854b85 Fix CS issues, removed global options
9c54a4b [Serializer] Allow options to be passed to SerialiizerInterface#serialize and #unserialize. Thsee options are available to all encoders/decoders/normalizers that implement SerializerAwareInterface.

Discussion
----------

[2.2] [Serializer] Configurable Serializer

Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #4907, #4938
License of the code: MIT
Todo:

This is an extension of GH-6574 that removes the context state in favor of passing this information around.

---------------------------------------------------------------------------

by beberlei at 2013-01-18T13:12:39Z

@fabpot @lsmith I think this is how it should work from an OOP/OOD perpesctive, avoiding the context state. This makes for a much cleaner code and dependency graph.

---------------------------------------------------------------------------

by lsmith77 at 2013-01-18T14:14:37Z

makes sense. anything fancier would lose this components simplicity which IMHO is the main benefit versus JMS serializer.

---------------------------------------------------------------------------

by fabpot at 2013-01-18T14:26:25Z

Looks very good. 👍

---------------------------------------------------------------------------

by beberlei at 2013-01-18T14:37:32Z

I need to fix the failures with the JsonEncoder and then this is good to merge

---------------------------------------------------------------------------

by stof at 2013-01-18T14:40:21Z

you also need to update the CHANGELOG of the component

---------------------------------------------------------------------------

by beberlei at 2013-01-18T23:17:57Z

Fixed, only the Redis Profiler problem still failing the Travis builds. Also I updated the CHANGELOG.md.

@fabpot  Good to merge from my POV

---------------------------------------------------------------------------

by stof at 2013-01-18T23:27:59Z

@beberlei see #6804 for the Redis profiler issue
2013-01-19 08:48:06 +01:00
Fabien Potencier
84c6b486d1 merged branch stof/debug_class_loader (PR #6803)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6803).

Commits
-------

be05741 Added an error message in the DebugClassLoader when using / instead of \.

Discussion
----------

Added an error message in the DebugClassLoader when using / instead of \.

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

Using ``/`` instead of ``\`` when writing class names in a configuration seems to happen regularly. See aba8f1e180 (commitcomment-2461266) for the latest case I saw. I guess it may come from the fact that SensioGeneratorBundle allows using both for convenience in the CLI to get rid of escaping issues.
This will give people a better error message when they use a ``/`` instead of having them figure that the class name in the message using ``/`` and not ``\`` and this is the reason of the issue.
2013-01-19 08:47:26 +01:00
Christophe Coevoet
11aaa2e672 Added an error message in the DebugClassLoader when using / instead of \. 2013-01-19 08:47:26 +01:00
Fabien Potencier
c9cfcc1dc3 merged branch davedevelopment/new-twig-notation (PR #6805)
This PR was merged into the master branch.

Commits
-------

d5e73e5 [SecurityBundle] changed includes to use the new Twig notation

Discussion
----------

[SecurityBundle] changed includes to use the new Twig notation

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no - couple of unrelated failures
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A
2013-01-19 08:44:11 +01:00
Fabien Potencier
7f78f16dc7 merged branch stof/fix_tests (PR #6804)
This PR was merged into the master branch.

Commits
-------

3d762dd [HttpKernel] Fixed the Redis profiler storage return value
44fe249 Fixed some tests on Windows

Discussion
----------

Fix tests

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

This fixes the testsuite in master.
For the Redis storage, the test failure seems to come from a bad resolution when merging 2.1 into master.

---------------------------------------------------------------------------

by stof at 2013-01-18T20:58:59Z

I still have some failing tests in master locally:

- some tests with the incremental output tests in the Process component
- a timing test for the Stopwatch component (but passing when running only the Stopwatch tests)
- some mock expectations in the Form component.

However, all these tests are passing on Travis so it looks weird.
2013-01-19 08:43:27 +01:00