Commit Graph

12715 Commits

Author SHA1 Message Date
Fabien Potencier
89f9b24575 merged branch fabpot/routing-options (PR #6738)
This PR was merged into the master branch.

Commits
-------

9fc7def added the UPGRADE file for Symfony 3.0
e84cad2 [Routing] updated CHANGELOG
65eca8a [Routing] added new schemes and methods options to the annotation loader
5082994 [Routing] renamed pattern to path
b357caf [Routing] renamed hostname pattern to just hostname
e803f46 made schemes and methods available in XmlFileLoader
d374e70 made schemes and methods available in YamlFileLoader
2834e7e added scheme and method setter in RouteCollection
10183de make scheme and method requirements first-class citizen in Route

Discussion
----------

Routing options

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #5989, #5990, #6049
| License       | MIT

In #5989, it has unanimously been decided to renamed `hostname_pattern` to `hostname` and `pattern` to `path`. That makes a lot of sense and I would like to do the renaming now as `hostname_pattern` is new in Symfony 2.2, so I'd like to avoid breaking BC just after the release. As we are modifying the route options, I've also included changes introduced by @Tobion in #6049 which were discussed in #5990.

As everything is BC, I think it's wise to include that in 2.2. What do you think?

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

by Tobion at 2013-01-14T18:25:53Z

I agree it should be done in 2.2. Thanks for working on it.

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

by vicb at 2013-01-14T23:11:12Z

@fabpot "Everything is BC" until it breaks BC in 3.0, that's why I'd like to see [deprecations in PR summary](https://github.com/symfony/symfony-docs/pull/2116) what do you think ?

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

by vicb at 2013-01-14T23:16:40Z

it would also be great to update the CHANGELOG with deprecations (it could also help people answering your question)

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

by fabpot at 2013-01-15T07:07:03Z

@vicb: I've just updated the CHANGELOG and created the UPGRADE file for 3.0.

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

by vicb at 2013-01-15T07:15:32Z

@fabpot thanks.
2013-01-15 17:25:04 +01:00
Fabien Potencier
9fc7def298 added the UPGRADE file for Symfony 3.0 2013-01-15 17:22:42 +01:00
Fabien Potencier
e84cad28f0 [Routing] updated CHANGELOG 2013-01-15 17:22:41 +01:00
Fabien Potencier
65eca8a3d9 [Routing] added new schemes and methods options to the annotation loader 2013-01-15 17:22:41 +01:00
Fabien Potencier
508299400d [Routing] renamed pattern to path 2013-01-15 17:22:36 +01:00
Fabien Potencier
80c30fa1d9 merged branch kriswallsmith/master (PR #6742)
This PR was merged into the master branch.

Commits
-------

c9e8ee1 fixed typo

Discussion
----------

fixed typo
2013-01-15 07:54:56 +01:00
Kris Wallsmith
c9e8ee153d fixed typo 2013-01-14 16:03:02 -08:00
Fabien Potencier
b357cafd00 [Routing] renamed hostname pattern to just hostname 2013-01-14 17:14:02 +01:00
Victor Berchet
fb526a4809 [FileProfilerStorage] optimize file reads 2013-01-14 15:59:38 +01:00
Fabien Potencier
acad72e55c merged branch oscartv/patch-1 (PR #6736)
This PR was merged into the master branch.

Commits
-------

a0ba4cf Update src/Symfony/Component/Form/Resources/translations/validators.ca.xlf

Discussion
----------

Update src/Symfony/Component/Form/Resources/translations/validators.ca.x...

...lf
2013-01-14 14:50:40 +01:00
oscartv
a0ba4cf537 Update src/Symfony/Component/Form/Resources/translations/validators.ca.xlf 2013-01-14 14:48:41 +01:00
Fabien Potencier
45a8c1a691 merged branch inmarelibero/patch-1 (PR #6729)
This PR was merged into the master branch.

Commits
-------

a5a04b8 fixed italian translation typo

Discussion
----------

fixed italian translation typo
2013-01-14 12:08:23 +01:00
Fabien Potencier
1493fda08d merged branch hason/cs_fix (PR #6731)
This PR was merged into the master branch.

Commits
-------

cd3d6de [Security] Fixed typo in cs translation

Discussion
----------

[Security] Fixed typo in cs translation
2013-01-14 12:07:45 +01:00
Martin Hasoň
cd3d6de849 [Security] Fixed typo in cs translation 2013-01-14 10:10:39 +01:00
Emanuele Gaspari
a5a04b81f3 fixed italian translation typo 2013-01-14 09:21:46 +01:00
Fabien Potencier
e2f85cad89 merged branch philipphoffmann/patch-1 (PR #6722)
This PR was merged into the master branch.

Commits
-------

c1d5f16 Update src/Symfony/Component/HttpKernel/Tests/EventListener/RouterProxyListenerTest.php

Discussion
----------

Typo fix

Just a typo fix
2013-01-13 20:55:12 +01:00
Fabien Potencier
de0d077367 merged branch rubenrua/master (PR #6726)
This PR was merged into the master branch.

Commits
-------

309067a Added Galician translation in security component

Discussion
----------

Added Galician translation in security component
2013-01-13 20:53:31 +01:00
rubenrua
309067a897 Added Galician translation in security component 2013-01-13 20:31:40 +01:00
Philipp Hoffmann
c1d5f16c87 Update src/Symfony/Component/HttpKernel/Tests/EventListener/RouterProxyListenerTest.php
Just a typo fix
2013-01-13 12:48:31 +01:00
Fabien Potencier
d506106b77 merged branch maerlyn/master (PR #6719)
This PR was merged into the master branch.

Commits
-------

f582138 [Security] fix Hungarian translation

Discussion
----------

[Security] fix Hungarian translation

Fixing a small translation mistake in the Hungarian translation.
2013-01-12 23:04:55 +01:00
Gábor Fási
f58213867a [Security] fix Hungarian translation 2013-01-12 21:57:43 +01:00
Fabien Potencier
43a9e6caee merged branch franmomu/rename_catalonian_translation (PR #6714)
This PR was merged into the master branch.

Commits
-------

eeceafa [Security] Renamed catalonian translation file

Discussion
----------

[Security] Renamed catalonian translation file

Renamed as validators file in [Validator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf) and in [Form](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf) following ISO639-1 language code.
2013-01-12 08:14:18 +01:00
Fabien Potencier
4be5ae4203 merged branch alexolmos/patch-1 (PR #6712)
This PR was merged into the master branch.

Commits
-------

fb52d94 Update src/Symfony/Component/Security/Resources/translations/security.es_CA.xlf

Discussion
----------

Update src/Symfony/Component/Security/Resources/translations/security.es...

..._CA.xlf
2013-01-12 08:12:58 +01:00
Fabien Potencier
3245c1ce3a merged branch pborreli/typophpdoc (PR #6710)
This PR was merged into the master branch.

Commits
-------

b1c6881 Fixed PHPDoc

Discussion
----------

Fixed PHPDoc
2013-01-12 08:12:39 +01:00
Fabien Potencier
5fb9bc6af6 merged branch jorgemartind/patch-1 (PR #6709)
This PR was merged into the master branch.

Commits
-------

9d31064 Update src/Symfony/Component/Security/Resources/translations/security.es_CA.xlf

Discussion
----------

Update src/Symfony/Component/Security/Resources/translations/security.es...

..._CA.xlf

[Security] update catalonian translation
2013-01-12 08:12:01 +01:00
Fabien Potencier
9a579062b0 merged branch lazyhammer/security-translations (PR #6711)
This PR was merged into the master branch.

Commits
-------

0a060ca Fix Russian and Ukrainian translations for Security component

Discussion
----------

[Security] Fix Russian and Ukrainian translations
2013-01-12 08:11:32 +01:00
Fabien Potencier
36b946932f merged branch umpirsky/security-sr-cyrl (PR #6713)
This PR was merged into the master branch.

Commits
-------

67f7ed5 Added Serbian Cyrillic tanslation for security component

Discussion
----------

Added Serbian Cyrillic tanslation for security component
2013-01-12 08:10:33 +01:00
umpirsky
67f7ed5358 Added Serbian Cyrillic tanslation for security component 2013-01-11 19:40:23 +01:00
Fran Moreno
eeceafa45c [Security] Renamed catalonian translation file 2013-01-11 19:36:08 +01:00
Alex Olmos
fb52d941f4 Update src/Symfony/Component/Security/Resources/translations/security.es_CA.xlf 2013-01-11 19:16:45 +01:00
Pascal Borreli
b1c68815f5 Fixed PHPDoc 2013-01-11 17:38:19 +00:00
Dmitrii Chekaliuk
0a060cabeb Fix Russian and Ukrainian translations for Security component 2013-01-11 19:28:56 +02:00
jorgemartind
9d310647e9 Update src/Symfony/Component/Security/Resources/translations/security.es_CA.xlf
[Security] update catalonian translation
2013-01-11 18:10:54 +01:00
Fabien Potencier
aec3c8aa1d merged branch Burgov/patch-3 (PR #6702)
This PR was merged into the master branch.

Commits
-------

6b669fb Update src/Symfony/Component/Security/Resources/translations/security.nl.xlf

Discussion
----------

Update src/Symfony/Component/Security/Resources/translations/security.nl.xlf

see #6668

Some more minor tweaks
2013-01-11 14:34:34 +01:00
Fabien Potencier
1d548d4168 merged branch Engerim/patch-1 (PR #6706)
This PR was merged into the master branch.

Commits
-------

f127781 Update src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Discussion
----------

[FrameworkBundle] add missing use statement HttpKernelInterface for forward method

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

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

by lsmith77 at 2013-01-11T13:31:01Z

+1
2013-01-11 14:33:21 +01:00
Fabien Potencier
d96b96e942 merged branch cristobal/master (PR #6707)
This PR was merged into the master branch.

Commits
-------

83d0469 Create security.no.xlf

Discussion
----------

Norwegian Translation for Security

Norwegian Translation
2013-01-11 14:15:10 +01:00
Fabien Potencier
9e1ca1916b merged branch 2085020/master (PR #6705)
This PR was squashed before being merged into the master branch (closes #6705).

Commits
-------

5ee65aa Contribution to translation to Catalan of the security messages

Discussion
----------

Contribution to translation to Catalan of the security messages

Contribution to translation to Catalan of the security messages
2013-01-11 14:12:54 +01:00
Joan Cruz
5ee65aa8be Contribution to translation to Catalan of the security messages 2013-01-11 14:12:53 +01:00
Cristobal Dabed
83d04699d2 Create security.no.xlf
Norwegian Translation
2013-01-11 05:12:25 -08:00
Alexander Miehe
f127781f2e Update src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
Add use HttpKernelInterface for refactored forward method
2013-01-11 13:33:14 +01:00
Fabien Potencier
69aa428d47 merged branch stloyd/bugfix/nulllogger (PR #6704)
This PR was merged into the master branch.

Commits
-------

eb0d2ab [HttpKernel] Remove conflicting `use` from `NullLogger`

Discussion
----------

[HttpKernel] Remove conflicting `use` from `NullLogger`

Without this code dies with fatal:
> Cannot use Psr\Log\LoggerInterface as LoggerInterface because the name is already in use

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

by Seldaek at 2013-01-11T11:00:50Z

Oops :)
2013-01-11 12:17:32 +01:00
Joseph Bielawski
eb0d2abb1b [HttpKernel] Remove conflicting use from NullLogger 2013-01-11 11:33:37 +01:00
Bart van den Burg
6b669fbddf Update src/Symfony/Component/Security/Resources/translations/security.nl.xlf
see #6668

Some more minor tweaks
2013-01-11 10:49:55 +01:00
Fabien Potencier
3d808b59de merged branch sineld/master (PR #6700)
This PR was merged into the master branch.

Commits
-------

2617cf6 Added Turkish translation for security component

Discussion
----------

Added Turkish translation for security component
2013-01-11 09:57:54 +01:00
Sinan Eldem
2617cf64c3 Added Turkish translation for security component 2013-01-11 10:47:35 +02:00
Fabien Potencier
6c3393a96a merged branch Seldaek/wording (PR #6698)
This PR was merged into the master branch.

Commits
-------

8d06c57 [HttpFoundation] Fix sentence and provide a hint at the solution for affected people

Discussion
----------

[HttpFoundation] Fix sentence and provide a hint at the solution for affected people
2013-01-11 09:27:47 +01:00
Jordi Boggiano
8d06c571ed [HttpFoundation] Fix sentence and provide a hint at the solution for affected people 2013-01-11 09:20:00 +01:00
Fabien Potencier
a31a6531c7 [HttpKernel] fixed usage of false as a valid strategy (for BC) 2013-01-11 09:12:57 +01:00
Fabien Potencier
9f25451134 merged branch stephpy/redis_profiler (PR #6680)
This PR was merged into the master branch.

Commits
-------

d027f45 [PROFILER][REDIS] Support database, auth on redis connection

Discussion
----------

[PROFILER][REDIS] Support database, auth on redis connection

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes

Allow database and password on dsn:

```yml
framework:
    profiler:
        dsn: redis://127.0.0.1:6379
        dsn: redis://127.0.0.1:6379/3
        dsn: redis://user:password@127.0.0.1:6379/3
```

Since redis uses only password for authentification, user will not be used ...

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

by shouze at 2013-01-10T16:58:02Z

👍 db selection is a must have
2013-01-11 08:49:43 +01:00
Fabien Potencier
b58e8ce9aa merged branch fabpot/kernel-refactor (PR #6459)
This PR was merged into the master branch.

Commits
-------

76fefe3 updated CHANGELOG and UPGRADE files
f7da1f0 added some unit tests (and fixed some bugs)
f17f586 moved the container aware HTTP kernel to the HttpKernel component
2eea768 moved the deprecation logic calls outside the new HttpContentRenderer class
bd102c5 made the content renderer work even when ESI is disabled or when no templating engine is available (the latter being mostly useful when testing)
a8ea4e4 [FrameworkBundle] deprecated HttpKernel::forward() (it is only used once now and not part of any interface anyway)
1240690 [HttpKernel] made the strategy a regular parameter in HttpContentRenderer::render()
adc067e [FrameworkBundle] made some services private
1f1392d [HttpKernel] simplified and enhanced code managing the hinclude strategy
403bb06 [HttpKernel] added missing phpdoc and tweaked existing ones
892f00f [HttpKernel] added a URL signer mechanism for hincludes
a0c49c3 [TwigBridge] added a render_* function to ease usage of custom rendering strategies
9aaceb1 moved the logic from HttpKernel in FrameworkBundle to the HttpKernel component

Discussion
----------

[WIP] Kernel refactor

Currently, the handling of sub-requests (including ESI and hinclude) is mostly done in FrameworkBundle. It makes these important features harder to implement for people using only HttpKernel (like Drupal and Silex for instance).

This PR moves the code to HttpKernel instead. The code has also been refactored to allow easier integration of other rendering strategies (refs #6108).

The internal route has been re-introduced but it can only be used for trusted IPs (so for the internal rendering which is managed by Symfony itself, or by a trusted reverse proxy like Varnish for ESI handling). For the hinclude strategy, when using a controller, the URL is automatically signed (see #6463).

The usage of a listener instead of a controller to handle internal sub-requests speeds up things quite a lot as it saves one sub-request handling. In Symfony 2.0 and 2.1, the handling of a sub-request actually creates two sub-requests.

Rendering a sub-request from a controller can be done with the following code:

```jinja
{# default strategy #}
{{ render(path("partial")) }}
{{ render(controller("SomeBundle:Controller:partial")) }}

{# ESI strategy #}
{{ render(path("partial"), { strategy: 'esi' }) }}
{{ render(controller("SomeBundle:Controller:partial"), { strategy: 'esi' }) }}

{# hinclude strategy #}
{{ render(path("default1"), { strategy: 'hinclude' }) }}
```

The second commit allows to simplify the calls a little bit thanks to some nice syntactic sugar:

```jinja
{# default strategy #}
{{ render(path("partial")) }}
{{ render(controller("SomeBundle:Controller:partial")) }}

{# ESI strategy #}
{{ render_esi(path("partial")) }}
{{ render_esi(controller("SomeBundle:Controller:partial")) }}

{# hinclude strategy #}
{{ render_hinclude(path("default1")) }}
```

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

by fabpot at 2013-01-03T17:58:49Z

I've just pushed a new version of the code that actually works in my browser (but I've not yet written any unit tests). I've updated the PR description accordingly.

All comments welcome!

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

by Koc at 2013-01-03T20:11:43Z

what about `render(controller="SomeBundle:Controller:partial", strategy="esi")`?

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

by stof at 2013-01-04T09:01:01Z

shouldn't we have interfaces for the UriSigner and the HttpContentRenderer ?

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

by lsmith77 at 2013-01-04T19:28:09Z

btw .. as mentioned in #6213 i think it would make sense to refactor the HttpCache to use a cache layer to allow more flexibility in where to cache the data (including clustering) and better invalidation. as such if you are refactoring HttpKernel .. it might also make sense to explore splitting off HttpCache.

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

by fabpot at 2013-01-04T19:30:07Z

@lsmith77 This is a totally different topic. This PR is just about moving things from FrameworkBundle to HttpKernel to make them more reusable outside of the full-stack framework.

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

by fabpot at 2013-01-05T09:39:52Z

I think this PR is almost ready now. I still need to update the docs and add some unit tests. Any other comments on the whole approach? The class names? The `controller` function thingy? The URI signer mechanism? The proxy protection for the internal controller? The proxy to handle internal routes?

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

by sstok at 2013-01-05T10:08:25Z

Looks good to me 👍

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

by sdboyer at 2013-01-07T18:17:08Z

@Crell asked me to weigh in, since i'm one of the Drupal folks who's likely to work most with this.

i think i've grokked about 60% of the big picture here, and i'm generally happy with what i see. the assumption that the HInclude strategy makes about working with templates probably isn't one that we'll be able to use (and so, would need to write our own), but that's not a big deal since the whole goal here is to make strategies pluggable.

so, yeah. +1.

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

by winzou at 2013-01-09T20:21:44Z

Just for my information: will this PR be merged for 2.2 version? Thanks.

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

by stof at 2013-01-09T20:41:04Z

@winzou according to the blog post announcing the beta 1 release, yes. It is explicitly listed as being one of the reason to make it a beta instead of the first RC.

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

by winzou at 2013-01-09T20:49:36Z

OK thanks, I've totally skipped this blog post.

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

by fabpot at 2013-01-10T15:26:15Z

I've just added a bunch of unit tests and fix some bugs I found while writing the tests.
2013-01-11 08:24:18 +01:00