Commit Graph

6675 Commits

Author SHA1 Message Date
Fabien Potencier
463b464c10 replaced usage of Route::getPattern() by Route::getPath() 2013-01-16 23:04:10 +01:00
Fabien Potencier
8c62123533 merged branch vicentgodella/master (PR #6755)
This PR was merged into the master branch.

Commits
-------

1c5d74c Fixed coding standards issues in invalid-xml-resources.xlf file.
552a806 Fixed coding standards issues.
293991d [Translation] Added some tests to QtFileLoader.

Discussion
----------

[Translation] Added some tests to QtFileLoader.

Added one test for testing exception is thrown if resource is not local.
Added one test for testing exception is thrown if xml resource is invalid.

QtFileLoader has now 100% code coverage.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
2013-01-16 22:49:14 +01:00
Fabien Potencier
a83a60fd39 merged branch toin0u/SecurityTranslation (PR #6761)
This PR was merged into the master branch.

Commits
-------

68ac23f [Security] Added Danish translation

Discussion
----------

[Security] Added Danish translation

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Deprecations: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2013-01-16 22:48:50 +01:00
umpirsky
ed2d542b4b Added Serbian Latin tanslation for security component 2013-01-16 22:29:52 +01:00
Antoine Corcy
68ac23fe22 [Security] Added Danish translation 2013-01-16 11:53:34 +01:00
Fabien Potencier
2dfe9660a2 fixed CS 2013-01-16 10:27:54 +01:00
Fabien Potencier
4c366252a5 merged branch stloyd/bugfix/process_phpdocs (PR #6626)
This PR was merged into the 2.1 branch.

Commits
-------

a62e04f [Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`

Discussion
----------

[2.1][Process] Fix docblocks, remove `return` from `PhpProcess#start()`
2013-01-16 10:23:50 +01:00
Gordon Franke
37af92d979 add test for compiler replace alias with invalid alias 2013-01-16 09:59:03 +01:00
Gordon Franke
27d9385d4d wrap the exception to get information about where the exception comes from 2013-01-16 09:37:50 +01:00
vicentgodella
1c5d74c891 Fixed coding standards issues in invalid-xml-resources.xlf file. 2013-01-16 09:33:58 +01:00
Vicent
552a806762 Fixed coding standards issues. 2013-01-16 01:28:01 +01:00
Vicent
293991df7b [Translation] Added some tests to QtFileLoader.
Added one test for testing exception is thrown if resource is not local.
Added one test for testing exception is thrown if xml resource is invalid.
2013-01-16 00:45:18 +01:00
Fran Moreno
8bfd7a7a35 Remove custom error handler for deprecations 2013-01-16 00:14:35 +01:00
Fran Moreno
efbff0c425 Change deprecated Min and Max constraint 2013-01-16 00:10:57 +01:00
Fran Moreno
9264431e37 Remove custom error handler for deprecations 2013-01-15 23:53:36 +01:00
Fran Moreno
c80c17ebee Change deprecated Min constraint to Range constraint 2013-01-15 23:50:37 +01:00
Tobias Schultze
632023d7b0 [Routing] fix typo in phpdoc and make it more consistent 2013-01-15 18:01:40 +01:00
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
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
Fran Moreno
c47f02735a [Validator][Constraints] Update AllValidator using new Validator API 2013-01-15 01:52:28 +01:00
Fran Moreno
a39fdd88f4 Remove getPropertyPath in the tests 2013-01-15 00:53:09 +01:00
Fran Moreno
ffa4c6f25b [Validator][Constraints] CollectionValidator 2013-01-15 00:03:31 +01: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
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
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
Christian Eikermann
2061cc03b7 Update src/Symfony/Component/Validator/Mapping/ClassMetadata.php
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.
2013-01-14 09:10:09 +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
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
Gábor Fási
f58213867a [Security] fix Hungarian translation 2013-01-12 21:57:43 +01:00
Joseph Bielawski
a62e04f8d1 [Process] Fix docblocks, remove return from PhpProcess#start() as parent returns nothing, cleaned up ExecutableFinder 2013-01-12 13:49:05 +01:00
Johannes M. Schmitt
785d3655dd fixes a bug when output/error output contains a % character 2013-01-12 11:09:29 +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
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
dc2cc6b13c [Console] fixed input bug when the value of an option is empty (closes #6649, closes #6689) 2013-01-11 14:49:52 +01:00
Fabien Potencier
92f951fd7a merged branch LawnGnome/PHP-5.5-compat (PR #6647)
This PR was merged into the 2.1 branch.

Commits
-------

4991607 Fix version_compare() calls for PHP 5.5.
34def9f Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.

Discussion
----------

[Form] [Locale] PHP 5.5 compatibility fixes

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: N/A
Todo: None
License of the code: MIT
Documentation PR: N/A

IntlDateFormatter::setTimeZoneId() is deprecated in PHP 5.5, which results in E_DEPRECATED errors when using the date form type. This PR works around that.

Furthermore, the version_compare() tests used in locale to detect PHP 5.5 are broken with snapshot and Git builds of PHP. I've also committed a fix for those tests in this PR.

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

by stof at 2013-01-10T08:24:15Z

shouldn't it even be done in 2.0 as it is a bugfix ?

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

by LawnGnome at 2013-01-11T00:49:11Z

Possibly — I don't know enough about Symfony's release management to know whether this is appropriate for 2.0, and I was mostly scratching my own itch, honestly.

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

by stof at 2013-01-11T01:51:35Z

well, it is a bugfix and 2.0 is also impacted, so it should be done in it.

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

by LawnGnome at 2013-01-11T02:52:21Z

The diff for 2.0 looks like it'll be just the StubIntlDateFormatter.php changes — the deprecated method isn't called in DateType on that branch, and there aren't any StubIntlDateFormatter tests on 2.0. How do you want that submitted — as a separate PR against 2.0?

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

by fabpot at 2013-01-11T07:20:18Z

@LawnGnome A separate pull request would be good. Thanks.

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

by LawnGnome at 2013-01-11T08:29:48Z

2.0 PR added as #6699.
2013-01-11 14:37:17 +01:00
Fabien Potencier
e463a63906 Merge branch '2.0' into 2.1
* 2.0:
  Fix version_compare() calls for PHP 5.5.
  [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)

Conflicts:
	src/Symfony/Component/Form/Extension/Core/ChoiceList/MonthChoiceList.php
2013-01-11 14:37:04 +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
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
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
Stéphane PY
9257b0371c [Profiler] [Redis] Fix sort of profiler rows. 2013-01-11 11:35:43 +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
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
Adam Harvey
c7bfce9116 Fix version_compare() calls for PHP 5.5.
Until PHP 5.5 hits beta, the version number for Git builds is still 5.5.0-dev,
which is less than 5.5.0alpha1 according to version_compare(). This means that
the branches for 5.5 aren't being executed on 5.5 snapshots at present.
2013-01-11 16:02:30 +08: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
Fabien Potencier
2aba3aa490 [HttpFoundation] added missing info in CHANGELOG 2013-01-11 08:05:42 +01:00
Jordi Boggiano
2d07a17cbd Remove special handling of empty arrays, fixes #5506 2013-01-11 08:01:56 +01:00
Fabien Potencier
b868bf6249 merged branch lmcd/php-sapi (PR #6636)
This PR was merged into the master branch.

Commits
-------

16b3426 Show PHP SAPI in WDT

Discussion
----------

[WDT] Show PHP SAPI in WDT

PHP running under Apache as a module:
![sapi-apache](https://f.cloud.github.com/assets/363540/53093/7709dc8a-5a48-11e2-8c09-031e0645e3ea.png)

PHP running with the in-built CLI web server (via `server:run`)
![sapi-cli](https://f.cloud.github.com/assets/363540/53094/96df9a0e-5a48-11e2-96e9-7bc2f452083d.png)
2013-01-11 08:00:38 +01:00
Jan Kramer
69535cfe42 Fixed broken setter in Form/Util/PropertyPath 2013-01-11 07:43:26 +01:00
Jakub Zalas
802426272f Removed underscores from test method names to be consistent with other components.
It is more common to use fully camel-cased names for test methods. Only some of the test methods are called with underscore notation. To avoid confusion it is better to be consistent.
2013-01-11 00:31:43 +00:00
Fabien Potencier
0acefc9a81 merged branch sstok/patch-3 (PR #6691)
This PR was merged into the master branch.

Commits
-------

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

Discussion
----------

Minor tone of voice correction in security.nl.xlf

For the Dutch people under us. http://www.kiezelcommunicatie.nl/kiezelblog/woorden-die-niet-meer-mogen-aflevering-1/

Yes I'm picky ;)
2013-01-10 23:25:39 +01:00
Tiago Brito
0d6be2e81a Added Portuguese (Portugal) translation to Security
Added Portuguese from Portugal translation for Security component
2013-01-10 22:01:22 +00:00
Sebastiaan Stok
08f9c7633e Update src/Symfony/Component/Security/Resources/translations/security.nl.xlf
For the Dutch people under us. http://www.kiezelcommunicatie.nl/kiezelblog/woorden-die-niet-meer-mogen-aflevering-1/

Yes I'm picky ;)
2013-01-10 19:55:35 +01:00
Fabien Potencier
39686077f8 merged branch bschussek/property-path (PR #6595)
This PR was merged into the master branch.

Commits
-------

6b1652e [PropertyAccess] Property path, small refactoring, read/writeProperty to read/write Property/Index.
1bae7b2 [PropertyAccess] Extracted PropertyAccess component out of Form

Discussion
----------

[PropertyAccess] Extracted PropertyAccess component out of Form

Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

TODO: adapt DoctrineBundle/PropelBundle to pass the "property_accessor" service to EntityType/ModelType

Usage:

```php
$accessor = PropertyAccess::getPropertyAccessor();

// equivalent to $object->getFoo()->setBar('value')
$accessor->setValue($object, 'foo.bar', 'value');

// equivalent to $object->getFoo()->getBar()
$accessor->getValue($object, 'foo.bar');

// equivalent to $object->getFoo()['bar']
$accessor->getValue($object, 'foo[bar]');

// equivalent to $array['foo']->setBar('value')
$accessor->setValue($array, '[foo].bar', 'value');

// equivalent to $array['foo']['bar']
$accessor->getValue($array, '[foo][bar]');
```

Later on, once we have generation and caching of class-specific accessors, configuration will be something like this (consistent with the Form and Validator component):

```php
$accessor = PropertyAccess::getPropertyAccessorBuilder()
    ->setCacheDirectory(__DIR__ . '/cache')
    ->setCacheLifeTime(86400)
    ->enableMagicGetSet()
    ->enableMagicCall()
    ->getPropertyAccessor();
```

or

```php
$accessor = PropertyAccess::getPropertyAccessorBuilder()
    ->setCache($cache)
    ->getPropertyAccessor();
```

etc.

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

by Burgov at 2013-01-07T08:48:15Z

+1. I use this feature outside of the Form context a lot

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

by stof at 2013-01-07T08:49:34Z

The classes in the Form component should be kept for BC (and deprecated) for people using the feature

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

by michelsalib at 2013-01-07T10:02:19Z

YES YES YES 👍. Sorry for my enthusiasm, but I already copy pasted the PropertyPath class to some of my libraries to avoid linking to the whole Form component. I thus will be glad to officially use this component into my libraries via composer.

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

by norzechowicz at 2013-01-07T10:17:39Z

Same as @michelsalib to avoid linking full Form component I was using copied parts of code. Can't wait to use this component in my lib. 👍

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

by bschussek at 2013-01-07T10:43:41Z

I split away `getValue()` and `setValue()` from `PropertyPath` into a new class `ReflectionGraph`. The component is also named ReflectionGraph now.

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

by michelsalib at 2013-01-07T10:47:10Z

I am not found of the name. What do you intend to do in the component more than what PropertyPath does ?

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

by bschussek at 2013-01-07T10:58:59Z

@michelsalib A `PropertyPath` is simply a string like `foo.bar[baz]`. `getValue()` and `setValue()` interpret this path. There may be different interpretations for the same path, so these methods were split into a new class.

I chose the name `ReflectionGraph` because the functionality is very similar to `ReflectionProperty`.

```php
$reflProperty = new ReflectionProperty('Vendor/Class', 'property');
$reflProperty->setValue($object, 'foo');

$reflGraph = new ReflectionGraph();
$reflGraph->setValue($object, 'property.path', 'foo');
```

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

by michelsalib at 2013-01-07T11:00:42Z

What about naming it `Reflection`, maybe sometime we will want to add more reflection tools for classes, interfaces... ?

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

by bschussek at 2013-01-07T11:02:32Z

@michelsalib I doubt that we will do that. PHP's implementation is sufficient.

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

by vicb at 2013-01-07T11:03:57Z

> Backwards compatibility break: no

Really ?

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

by michelsalib at 2013-01-07T11:05:07Z

Well, that is just a suggestion. If I am the only one to oppose, I won't complain.

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

by bschussek at 2013-01-07T11:09:08Z

> Really ?

@vicb Would you please refrain from such meanginless comments in the future? I'm getting a bit tired of them. If you think that BC is broken somewhere, tell me where so that I can fix it.

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

by stof at 2013-01-07T11:09:43Z

@vicb There is no BC break as he kept deprecated classes for BC

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

by norzechowicz at 2013-01-07T11:13:12Z

@bschussek what do you think about some kind of factory for Reflection? This will prevent creating new Reflection objects each time you want to access properties values.

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

by vicb at 2013-01-07T11:18:47Z

@bschussek my point is that my comment is no more meaningless than closing #6453 because it will break BC.We could also keep BC by extending the classes in the new ns but in both cases BC will ultimately be broken (when the legacy classes are removed)

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

by vicb at 2013-01-07T12:23:45Z

@bschussek @stof I think that modifying the constructor signatures of `EntityChoiceList`, `FormType` are BC breaks (this is not an exhaustive list)

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

by bschussek at 2013-01-07T12:35:13Z

@vicb You are right. I added corresponding entries to the CHANGELOG and adapted the above description.

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

by vicb at 2013-01-08T13:39:13Z

@bschussek looking at this PR, I was wondering if an alternate syntax would make sense:

```php
<?php
$reflGraph = new ReflectionGraph($object);

// equivalent to $object->getFoo()->setBar('value')
$reflGraph['foo.bar'] = 'value';

// equivalent to $object->getFoo()->getBar()
$reflGraph['foo.bar'];
```

_Sorry for the off topic_

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

by vicb at 2013-01-08T13:49:46Z

The advantage of using such a `ReflectionGraph` factory is that it might be easier to return specialized reflection graphs, ie optimized instances (that would be cached).

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

by Toflar at 2013-01-08T14:49:54Z

I was also puzzled by the fact that there will be many `ReflectionGraph` instances although they don't have to. I'm with @vicb and I'd also vote for using the constructor to set the subject you're working on. Otherwise you'll repeat yourself over and over again by passing the subject - say `$object` - to `getValue()` or `setValue()`. If however you don't like the constructor thing then why do we have to have an instance of `ReflectionGraph` rather than just go for static methods and use `ReflectionGraph::getValue()` and `ReflectionGraph::setValue()`?

In my opinion there are a few methods that could be static anyway (especially some private ones) :)

But probably I misunderstood something as I'm just about to discover the SF components and don't have any experience working with them (so basically I just read the PR because of @bschussek's tweet :D)

Couldn't come up with any intuitive name for the component though :(
Generally when we talk about "getting" and "setting" values we call those things "mutators"...so `GraphMutator` might be more intuitive than the word `Reflection` :)

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

by Taluu at 2013-01-08T14:57:42Z

I like the last proposition made by @vicb (implementing `ArrayAccess` on `ReflectionGraph` - or whatever name will be chosen (`PathMutator` for example :D), and also specify which object should be worked on in the constructor rather than in each method).

Would this also be used in the `Validator` component ?

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

by stof at 2013-01-08T15:16:12Z

@Toflar A static ``ReflectionGraph::getValue()`` means you have a coupling to the implementation (as with any static call). The current implementation allows you to replace it with your own implementation as long as you implement the interface as it follows the DI pattern (as done in other places in Symfony).

@vicb The issue with ``$reflGraph = new ReflectionGraph($object);`` is that you cannot inject the ReflectionGraph anymore, as you need a new one each time. This would mean adding a ``ReflectionGraphFactory`` to be injected (and which could then be replaced by a factory using code generation). Using the constructor directly would not allow using a replacement based on code generation later. So the resulting code would more likely be

```php

$reflGraph = new ReflectionGraph();

$mutator = $reflGraph->getMutator($object);

// equivalent to $object->getFoo()->setBar('value')
$mutator['foo.bar'] = 'value';

// equivalent to $object->getFoo()->getBar()
$mutator['foo.bar'];
```

Btw, writing this, I find the naming Mutator suggested by @Taluu good when it concerns the setter, but quite weird when getting the value.

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

by Taluu at 2013-01-08T15:21:00Z

I was not the one to suggest though, it was @everzet. But then something like `PathAccessor`, as it is both a mutator and a getter ? I also like @stof suggestion, still in the idea of avoiding to have to put the object as an argument and also allowing to use an `ArrayAccess` interface..

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

by vicb at 2013-01-08T15:21:54Z

@stof your remark makes sense.

What about `Accessor`, the benefit being that it might well be the name of a coming PHP feature: https://wiki.php.net/rfc/propertygetsetsyntax-v1.2

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

by everzet at 2013-01-08T15:27:02Z

```php
$manager = new PropertyManager(new PropertyPath());
$num = $manager->getValue($object, 'foo.num');
$manager->setValue($object, 'foo.num', $num + 1);

$objectManager = new ObjectPropertyManager($object[, $manager]);
$num = $objectManager->getValue('foo.num');
$objectManager->setValue('foo.num', $num + 1);

$objectManager['foo.num'] += 1;
```

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

by bschussek at 2013-01-08T15:28:01Z

It might be me, but I don't like `ArrayAccess` to be misused for features like that. If I access a key in an array access structure, I expect it to be something like a collection, an associative array or a key value store. This class is neither.

Putting that aside, an accessor for a specific object might make sense, but I'm not sure about that yet.

```php
$reflObject->setValue('foo.bar', 'value');
$reflObject->getValue('foo.bar');
```

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

by stof at 2013-01-08T15:28:52Z

@vicb I would vote for PathAccessor then, as we are not doing simple accessor but accessors through a path in an object graph.
In my snippet above, we would then have a ReflectionGraph instance and a PathAccessor instance (``$mutator``).

Btw, I would also keep the methods ``setValue`` and ``getValue``. I find it more clear.

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

by bschussek at 2013-01-08T15:32:07Z

@stof But then we're rather left with the question of ReflectionGraph **vs.** PathAccessor. I don't think that the tiny interface difference (one global, one object-based) justifies the big naming difference.

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

by vicb at 2013-01-08T15:33:24Z

> This class is neither.

It might be `$pa['foo.bar[baz]'] = $pa['foo.bar']['baz'];` I don't know if it would help though.

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

by stof at 2013-01-08T15:35:51Z

@bschussek In my suggestion, ``ReflectionGraph`` is a factory for the PathAccessor objects. It is not accessing anymore itself (which would probably continue to cause issues to implement it with code generation). But the naming could indeed be changed to something else.
2013-01-10 19:35:24 +01:00
Fabien Potencier
357d747311 merged branch theUniC/master (PR #6684)
This PR was merged into the master branch.

Commits
-------

1edf302 Fixed some translation typos

Discussion
----------

Fixed translation typos on the Security componente

Hi,

In my last PR I've introduced some translation typos on the Security component messages for the Spanish translation.

So sorry.

Christian.
2013-01-10 19:21:27 +01:00
Fabien Potencier
e4aa64b84e merged branch pborreli/patch-5 (PR #6687)
This PR was merged into the master branch.

Commits
-------

d4bbb6b [Security] Missing trailing dot.

Discussion
----------

[Security] Missing trailing dot.
2013-01-10 19:20:57 +01:00
Fabien Potencier
711fadcd18 merged branch pborreli/patch-4 (PR #6683)
This PR was merged into the master branch.

Commits
-------

53c5d9b [Security] Missing trailing dot.

Discussion
----------

[Security] Missing trailing dot.
2013-01-10 19:20:53 +01:00
Fabien Potencier
c084d3ff5e merged branch tkinast/patch-1 (PR #6688)
This PR was merged into the master branch.

Commits
-------

77545a2 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf

Discussion
----------

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

....xlf

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

by mweimerskirch at 2013-01-10T17:43:38Z

Duplicate of #6684?
2013-01-10 19:19:59 +01:00
Fabien Potencier
5864858539 merged branch mweimerskirch/patch-10 (PR #6685)
This PR was merged into the master branch.

Commits
-------

a1ef9d8 Fixed 2 typos in French translation

Discussion
----------

Fixed 2 typos in French translation
2013-01-10 19:18:42 +01:00
Fabien Potencier
8f497de806 merged branch tobiassjosten/patch-1 (PR #6690)
This PR was merged into the master branch.

Commits
-------

65bb3d2 Added Swedish translation

Discussion
----------

Added Swedish translation
2013-01-10 19:18:28 +01:00
Tobias Sjösten
65bb3d20ae Added Swedish translation 2013-01-10 10:04:48 -08:00
tkinast
77545a2ee5 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf 2013-01-10 15:37:47 -02:00
Pascal Borreli
d4bbb6b737 [Security] Missing trailing dot. 2013-01-10 17:33:44 +00:00
Michel Weimerskirch
a1ef9d86f0 Fixed 2 typos in French translation 2013-01-10 18:19:20 +01:00
Fabien Potencier
1c0e3538ef merged branch mweimerskirch/patch-9 (PR #6682)
This PR was merged into the master branch.

Commits
-------

b92973c Fixed German translations for security component

Discussion
----------

Fixed German translations for security component

authentication != authorisation
plus a few other minor things
2013-01-10 18:16:15 +01:00
Pascal Borreli
53c5d9bf66 [Security] Missing trailing dot. 2013-01-10 17:14:38 +00:00
Christian
1edf3026d7 Fixed some translation typos 2013-01-10 18:12:39 +01:00
Fabien Potencier
5c653d4d02 merged branch mweimerskirch/security_lb (PR #6681)
This PR was merged into the master branch.

Commits
-------

9471a1c Added Luxembourgish translation for security component

Discussion
----------

Added Luxembourgish translation for security component
2013-01-10 18:11:37 +01:00
Michel Weimerskirch
b92973ca35 Fixed German translations for security component
authentication != authorisation
+ a few other minor things
2013-01-10 18:09:49 +01:00
Michel Weimerskirch
9471a1ce5a Added Luxembourgish translation for security component 2013-01-10 18:06:17 +01:00
Fabien Potencier
f0a66db79a merged branch Seldaek/psr3 (PR #6628)
This PR was merged into the master branch.

Commits
-------

67d7423 Remove use of deprecated HttpKernel LoggerInterface
dca4528 [HttpKernel] Extend psr/log's NullLogger class
1e5a890 [Monolog] Mark old non-PSR3 methods as deprecated
91a86f8 [HttpKernel][Monolog] Add PSR-3 support to the LoggerInterface

Discussion
----------

[HttpKernel][MonologBridge] PSR-3 support

This enables PSR-3 support and monolog 1.3+. The first commit is the main part. The rest deals with deprecation of short-hand methods (warn/err/crit/emerg) that are fully expanded in PSR-3 (warning/error/critical/emergency).

The downside of deprecating them is that for bundles it's a bit harder to support older and newer versions. If that is too much of a hassle you can drop that for now and cherry pick the first commit.

The upside is that it forces people to move towards PSR-3 compatible stuff, which means eventually we could completely drop the LoggerInterface from the framework. In any case I think the documentation should only mention the `Psr\Log\LoggerInterface` and people should start hinting against that. The change should be done in core as well I suppose.

Anyway I wanted to throw this out there as it is to get feedback.

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

by stof at 2013-01-09T09:15:15Z

@Seldaek I also think you should change the typehint to use the PSR LoggerInterface in all classes using the logger

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

by Seldaek at 2013-01-09T09:54:55Z

OK updated according to all the feedback. I tested it in an app and it still seems to work so there shouldn't be any major issues.

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

by Seldaek at 2013-01-09T09:59:55Z

@fabpot if you merge please merge also the bundle PR, otherwise it won't be possible to update without conflict.

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

by frosas at 2013-01-10T14:59:20Z

I'm trying to understand why a `composer update` of a Symfony 2.1.* resulted in a fatal error. Shouldn't a stable version don't break like this?

As @olaurendeau points, why Symfony depends 1.* instead of 1.2.*? Or why Monolog 1.3 breaks its public interface (EDIT: I'm not sure about it)? Or why isn't this PR being merged (into branch 2.1) at the same time Monolog 1.3 is released?

Please, understand I'm not looking for who to blame, it's just I want to know if this situation is unexpected or if otherwise a `composer update` on a stable branch is not as innocent as it seems.

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

by stof at 2013-01-10T15:06:51Z

@frosas it cannot be merged into 2.1 as it is a BC break. The 2.1 branch has been updated to forbid Monolog 1.3 already

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

by Seldaek at 2013-01-10T15:11:58Z

@frosas you can blame me for releasing as 1.3.0 and not 2.0, but technically for monolog this isn't really a BC break, I just added an interface. The problem is due to the way it's used in symfony, it ended up as a fatal error. In any case the situation is now sorted out I think.

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

by frosas at 2013-01-10T15:26:43Z

@stof now I see this `>=1.0,<1.3-dev` change in the 2.1 branch. Now, shouldn't a new (2.1.7) version be released for all of us not in the dev minimum-stability?

@Seldaek then do you see feasible to rely only in X.Y.* versions to avoid this kind of errors?

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

by Seldaek at 2013-01-10T15:45:22Z

@frosas relying on X.Y.* is painful because you always need to wait until someone updates the constraint to get the new version. Of course using ~1.3 like in this PR means if I fuck up and break BC people will update to it, but that's a less likely occurrence than the alternative I think, so I would rather not use X.Y.*

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

by frosas at 2013-01-10T15:50:50Z

@Seldaek you are right about this, but I was thinking more in changing it only for the stable versions. EDIT: I mean, how often do you need a new feature in a branch you only apply fixes to?

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

by stof at 2013-01-10T15:57:32Z

@frosas Monolog and Symfony have separate release cycles. Foorcing Symfony users to use an old version of Monolog until they update to a new version of Symfony whereas the newer Monolog is compatible is a bad idea. Thus, as Monolog keeps BC, it does not maintain bugfix releases for all older versions (just like Twig does too). So it would also forbid you to get the fixes done in newer Monolog versions.

The incompatibility between Symfony 2.1 LoggerInterface and PSR-3 (whereas they expect exactly the same behavior and signature for methods with the same name) is unfortunate and is the reason why we get some issues here.

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

by frosas at 2013-01-10T16:21:06Z

@stof I appreciate you prefer to allow newer versions at the price of having to be constantly monitoring its changes to avoid breaks.

Another similar but safer strategy would be to stick to X.Y.* versions and upgrade to X.Y+1.* once the new version integration is tested, but I understand this is discutible in projects as close to Symfony as Monolog.

Returning to the issue, what do you say to release this 2.1.7 version? Or is it only me who is having issues here?

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

by stof at 2013-01-10T16:26:20Z

@frosas a minor release should not break BC when following smeantic versionning (Symfony warned about the fact it is not strictly followed for the first releases of 2.x). But as far as monolog is concerned, 1.3 is BC with 1.2.

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

by Seldaek at 2013-01-10T16:49:55Z

@frosas sorry I didn't get you still had the problem. I tagged a 2.1.7 of monologbundle which hopefully fixes your issue.
2013-01-10 17:57:14 +01:00
Fabien Potencier
8a7a120ed5 merged branch spolischook/master (PR #6679)
This PR was merged into the master branch.

Commits
-------

b74c00f [security][translation] added ukrainian message translations

Discussion
----------

Added ukrainian message translations
2013-01-10 17:47:27 +01:00
Stéphane PY
d027f45833 [PROFILER][REDIS] Support database, auth on redis connection 2013-01-10 17:46:24 +01:00
SPolischook
b74c00f9a8 [security][translation] added ukrainian message translations 2013-01-10 18:37:41 +02:00
Jakub Kucharovic
c6eb81938b Created security.cs.xlf 2013-01-10 08:19:03 -08:00
Fabien Potencier
7ab8e48373 merged branch thunderer/security-polish-translation (PR #6674)
This PR was merged into the master branch.

Commits
-------

0b75f67 Security component Polish message translations

Discussion
----------

[Security] Polish message translations

Security component messages translated from English to Polish.
2013-01-10 17:12:04 +01:00
Fabien Potencier
b6d5be3901 merged branch theUniC/master (PR #6669)
This PR was merged into the master branch.

Commits
-------

c06e627 Fixed some typos

Discussion
----------

FIxed some typos in the Spainsh translation of the Security component messages

Hi,

In order to show the most clear and less _"robotic"_ messages in Spanish, I've fixed some typos and some incorrect translations in the Spanish translation file of the Security component.

Christian.
2013-01-10 17:11:41 +01:00
Fabien Potencier
f9ccd27af5 merged branch skoop/NL-translation-fixes (PR #6672)
This PR was merged into the master branch.

Commits
-------

e84a8d0 fixed some small issues with grammar and used terminology

Discussion
----------

fixed some small issues with grammar and used terminology
2013-01-10 17:10:56 +01:00
Fabien Potencier
955400106b merged branch peterkokot/translations (PR #6673)
This PR was merged into the master branch.

Commits
-------

d5825aa slovenian translations of security component added

Discussion
----------

Slovenian translations of security component added
2013-01-10 17:10:37 +01:00
Fabien Potencier
76fefe3537 updated CHANGELOG and UPGRADE files 2013-01-10 17:09:48 +01:00
Fabien Potencier
b954a5b132 merged branch kucharovic/master (PR #6676)
This PR was merged into the master branch.

Commits
-------

d6f972b Created Slovak translation to Security

Discussion
----------

[security][tranlation] Created Slovak translation to Security
2013-01-10 17:07:49 +01:00
Jakub Kucharovic
d6f972bc1e Created Slovak translation to Security 2013-01-10 08:01:03 -08:00
Alex Demchenko
e848bc589b Add Russian translations 2013-01-10 07:53:38 -08:00
Tomasz Kowalczyk
0b75f67ae5 Security component Polish message translations 2013-01-10 16:50:43 +01:00
unknown
d5825aac2f slovenian translations of security component added 2013-01-10 16:29:45 +01:00
Fabien Potencier
f7da1f0eb8 added some unit tests (and fixed some bugs) 2013-01-10 16:26:59 +01:00
Stefan Koopmanschap
e84a8d0106 fixed some small issues with grammar and used terminology 2013-01-10 16:22:58 +01:00
Christian
c06e627e17 Fixed some typos 2013-01-10 15:54:27 +01:00
Fabien Potencier
d600759cc9 merged branch pborreli/typo-hu (PR #6666)
This PR was merged into the master branch.

Commits
-------

9db1515 [Security] Removed extra space

Discussion
----------

[Security] Removed extra space
2013-01-10 15:46:09 +01:00
Pascal Borreli
9db1515b31 [Security] Removed extra space 2013-01-10 14:44:10 +00:00
Fabien Potencier
03c7f59d50 merged branch iambrosi/patch-1 (PR #6663)
This PR was merged into the master branch.

Commits
-------

e908a52 Fixed spanish typos

Discussion
----------

Fixed spanish typos
2013-01-10 15:42:11 +01:00
Fabien Potencier
37aca2df6e merged branch VictorMateo/patch-1 (PR #6662)
This PR was merged into the master branch.

Commits
-------

6ae8ca8 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf

Discussion
----------

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

....xlf
2013-01-10 15:41:58 +01:00
Fabien Potencier
6f9d957b1e merged branch plebs/patch-2 (PR #6661)
This PR was merged into the master branch.

Commits
-------

9b8428d [security][tranlation]Fixed spanish translation

Discussion
----------

[security][tranlation]Fixed spanish translation
2013-01-10 15:41:50 +01:00
Fabien Potencier
cec47c80a7 merged branch inspiran/master (PR #6664)
This PR was merged into the master branch.

Commits
-------

3c4437c Added Dutch translations

Discussion
----------

	 Added Dutch translations

	 Added Dutch translations
2013-01-10 15:41:13 +01:00
Ismael Ambrosi
e908a523d3 Fixed spanish typos 2013-01-10 12:36:30 -02:00
inspiran
3c4437c975 Added Dutch translations 2013-01-10 15:34:58 +01:00
Fabien Potencier
dc109fc7a1 merged branch matteosister/security_component_italian_translations (PR #6656)
This PR was merged into the master branch.

Commits
-------

0b5177b added italian translations

Discussion
----------

added italian translations for the security component

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

by matteosister at 2013-01-10T14:22:54Z

not sure if the file should be named **security.it_IT.xlf** or **security.it.xlf**

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

by fabpot at 2013-01-10T14:25:49Z

security.it.xlf

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

by matteosister at 2013-01-10T14:31:14Z

ok, renamed the files, and squashed the pr to a single commit!
Thanks @fabpot!
2013-01-10 15:34:09 +01:00
Victor Mateo
6ae8ca8042 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf 2013-01-10 15:33:04 +01:00
plebs
9b8428d44f [security][tranlation]Fixed spanish translation 2013-01-10 15:32:29 +01:00
Fabien Potencier
770271fa8c merged branch vincentaubert/master (PR #6660)
This PR was squashed before being merged into the master branch (closes #6660).

Commits
-------

45c8682 [Security][Translation]Created fr translation for Security

Discussion
----------

[Security][Translation]Created fr translation for Security

adds french translations for the security component
2013-01-10 15:29:18 +01:00
Vincent AUBERT
45c8682606 [Security][Translation]Created fr translation for Security 2013-01-10 15:29:18 +01:00
matteo giachino
0b5177b8e8 added italian translations 2013-01-10 15:28:50 +01:00
Fabien Potencier
605328d42e merged branch 1ed/patch-5 (PR #6658)
This PR was merged into the master branch.

Commits
-------

c3a6659 [Security] added Hungarian translations for exception messages

Discussion
----------

[Security] added Hungarian translations for exception messages
2013-01-10 15:26:36 +01:00
Fabien Potencier
713c284126 merged branch dmecke/patch-1 (PR #6657)
This PR was merged into the master branch.

Commits
-------

2f51961 Created de translation for Security

Discussion
----------

[Security][Translation]Created de translation for Security
2013-01-10 15:26:06 +01:00
Fabien Potencier
13640a22bd merged branch dlsniper/ro-trans (PR #6654)
This PR was merged into the master branch.

Commits
-------

e35998f Translated to Romanian

Discussion
----------

[Security] Translated to Romanian

Added Romanian version for Security messages.

Thanks!
2013-01-10 15:25:03 +01:00
Fabien Potencier
3150a065d9 merged branch AV4TAr/spanish-translation (PR #6655)
This PR was merged into the master branch.

Commits
-------

b194607 spanish translation

Discussion
----------

Security / spanish translation

Spanish Translation.
2013-01-10 15:23:48 +01:00
Gábor Egyed
c3a6659856 [Security] added Hungarian translations for exception messages 2013-01-10 06:23:20 -08:00
Daniel Mecke
2f5196161a Created de translation for Security 2013-01-10 06:19:49 -08:00
Diego Sapriza
b194607e34 spanish translation 2013-01-10 12:17:16 -02:00
Florin Patan
e35998f7fb Translated to Romanian 2013-01-10 16:16:00 +02:00
Rafael Dohms
ff5ba380c5 Created PT_BR translation for Security
Added the PT_BR strings for Security strings.
2013-01-10 06:03:36 -08:00
Fabien Potencier
7e2d2a6b7f merged branch stof/enhance_deprecation (PR #6646)
This PR was merged into the master branch.

Commits
-------

68257d3 Enhanced the triggering of E_USER_DEPRECATED errors

Discussion
----------

Enhanced the triggering of E_USER_DEPRECATED errors

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Deprecations: no
Symfony2 tests pass: yes
Fixes the following tickets: none

- Removed useless error handlers around FormEvent as the triggering has
  been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
  method provide some user logic needing to be converted to a new way.
  For instance, AbstractType should trigger the error when the type extending it overwrites the deprecated methods instead of ``setDefaultOptions``, which was not the case previously.
- Enhanced the deprecation messages to mention the replacement whenever
  possible.

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

by stof at 2013-01-10T01:23:49Z

@fabpot should I remove ``Symfony\Component\Form\Test\DeprecationErrorHandler::getFormEvent`` ? It is not used anymore in the testsuite and is not needed anymore as the constructor of FormEvent does not trigger the deprecation erronously.

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

by fabpot at 2013-01-10T07:24:02Z

@stof: yes, remove it then. Thanks.

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

by stof at 2013-01-10T08:23:14Z

done
2013-01-10 14:43:24 +01:00
Fabien Potencier
3e99f4e976 merged branch asm89/issue-837 (PR #4935)
This PR was merged into the master branch.

Commits
-------

73db84f [Security] Move translations file to 'security' domain
324703a [Security] Switch to English messages as message keys
aa74769 [Security] Fix CS + unreachable code
2d7a7ba [Security] Fix `AuthenticationException` serialization
50d5724 [Security] Introduced `UsernameNotFoundException#get/setUsername`
39da27a [Security] Removed `get/setExtraInformation`, added `get/set(Token|User)`
837ae15 [Security] Add note about changed constructor to changelog
d6c57cf [FrameworkBundle] Register security exception translations
d7129b9 [Security] Fix exception constructors called in `UserChecker`
0038fbb [Security] Add initial translations for AccountStatusException childs
50e2cfc [Security] Add custom `getMessageKey` AccountStatusException childs
1147977 [Security] Fix InsufficientAuthenticationException constructor calls
79430b8 [Security] Fix AuthenticationServiceException constructor calls
42cced4 [Security] Fix AuthenticationException constructor calls
963a1d7 [Security] Add initial translations for the exceptions
ed6eed4 [Security] Add `getMessageKey` and `getMessageData` to auth exceptions
694c47c [Security] Change signature of `AuthenticationException` to match `\Exception`

Discussion
----------

[2.2][Security] AuthenticationException enhancements

Bug fix: semi
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=issue-837)](http://travis-ci.org/asm89/symfony)
Fixes the following tickets: #837
License of the code: MIT

This PR adds the functionality discussed in #837 and changes the constructor of the `AuthenticationException` to match that of `\Exception`. This PR will allow developers to show a translated (save) authentication exception message to the user. :)

*Todo:*
- Add some functional test to check that the exceptions can indeed be translated?
- Get feedback on the current English messages

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

by asm89 at 2012-07-15T14:04:11Z

ping @schmittjoh

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

by schmittjoh at 2012-07-15T14:57:32Z

Looks good to me.

While you are at the exceptions, I think we can also get rid of the "extra information" thing and replace it by explicit getters/setters. Mostly that will mean adding set/getToken, set/getUser, set/getUsername. Bundles might add custom exceptions which have other data. This will make it a bit more useful and predictable.

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

by asm89 at 2012-07-15T15:40:45Z

@schmittjoh I removed the `get/setExtraInformation` and added the more explicit getters/setters as you suggested.

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

by asm89 at 2012-07-15T19:33:15Z

@fabpot Did you reschedule this for 2.2? Why? It was originally a 2.1 ticket. I think it is an important one because at the moment there is no reliable way to show users the cause of an `AuthenticationException` without the threat of exposing sensitive information. This issue has been around for a while, see the original issue this PR refers to, or for example [this TODO comment in FOSUB](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Controller/SecurityController.php#L37).

The PR itself is ready to merge now. My only question that remains is about whether the actual translations should be functional tested?

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

by fabpot at 2012-07-15T19:43:19Z

We need to stop at some point. If not, we never release anything. beta3 was scheduled for today and I don't plan any other one before the first RC and I won't have time to review this PR next week. So, if you, @schmittjoh, @vicb, @stof, and a few other core devs "validate" this PR, I might consider merging it before 2.1.

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

by asm89 at 2012-07-15T19:46:09Z

@fabpot I totally agree with your point of view. I just have been trying to pickup some security issues that were still open. :)

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

by stof at 2012-07-15T19:50:29Z

This looks good to me

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

by asm89 at 2012-08-12T09:06:24Z

Since the beta period is over I assume the window was missed to get this security related PR in 2.1. If I have feedback from @fabpot I'll still try to make it mergeable asap though.

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

by fabpot at 2012-08-13T10:10:32Z

@asm89 This would indeed be considered for merging in 2.2.

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

by Antek88 at 2012-10-03T10:30:46Z

+1

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

by stof at 2012-10-04T21:27:15Z

@asm89 could you rebase this PR ? It conflicts with master

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

by fabpot at 2012-10-05T17:16:44Z

What's the status of this PR? @asm89 Have you taken all the feedback into account?

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

by stof at 2012-10-13T17:48:48Z

@asm89 ping

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

by fabpot at 2012-10-29T09:48:40Z

@asm89 If you don't have time, I can finish the work on this PR, but can you just tell me what's left?

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

by asm89 at 2012-10-29T10:02:22Z

I can pick this up, but I have two outstanding questions:
- One about adding `::create()`? https://github.com/symfony/symfony/pull/4935#discussion_r1358297
- And what is the final verdict on the messages? https://github.com/symfony/symfony/pull/4935#discussion_r1165701 The initial idea was that the exception itself have an exception message which is plain english and informative for the developer. If you want to display the 'safe' user messages you have the optional dependency on the translator. There is a comparison made with the Validator component, but in my opinion that's a different case because the violations always contain the message directed at the user and have no plain english message for the developer. Apart from that the Validator component contains it's own code for replacing `{{ }}` variables in messages (duplication? not as flexible as the translator). Concluding I'd opt for: optional dependency on translator component if you want to show 'safe' user messages + message keys.

@schmittjoh Any things to add?

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

by schmittjoh at 2012-10-29T10:14:09Z

Message keys sound good to me. I wouldn't add the ``create`` method for now.

On Mon, Oct 29, 2012 at 11:02 AM, Alexander <notifications@github.com>wrote:

> I can pick this up, but I have two outstanding questions:
>
>    - One about adding ::create()? symfony/symfony#4935<https://github.com/symfony/symfony/issues/4935#discussion_r1358297>
>    - And what is the final verdict on the messages? symfony/symfony#4935<https://github.com/symfony/symfony/issues/4935#discussion_r1165701>The initial idea was that the exception itself have an exception message
>    which is plain english and informative for the developer. If you want to
>    display the 'safe' user messages you have the optional dependency on the
>    translator. There is a comparison made with the Validator component, but in
>    my opinion that's a different case because the violations always contain
>    the message directed at the user and have no plain english message for the
>    developer. Apart from that the Validator component contains it's own code
>    for replacing {{ }} variables in messages (duplication? not as
>    flexible as the translator). Concluding I'd opt for: optional dependency on
>    translator component if you want to show 'safe' user messages + message
>    keys.
>
> @schmittjoh <https://github.com/schmittjoh> Any things to add?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/4935#issuecomment-9861016>.
>
>

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

by fabpot at 2012-10-29T10:27:37Z

As I said in the discussion about the translations, I'm -1 for the message keys to be consistent with how we manage translations everywhere else in the framework.

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

by stof at 2012-10-29T10:30:50Z

@fabpot When we changed the English translation for the validation errors in 2.1, we had to tag the commit as a BC rbeak as it was changing the source for all other translations. And if you look at the state of the files now, you will see that we are *not* using the English as source anymore in some places as some validation errors have a pluralized translation but the source has not been changed.
So I think using a key is more future-proof.

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

by asm89 at 2012-10-30T19:44:49Z

Any final decision on this? On one hand I have @stof and @schmittjoh +1 on message keys, on the other @fabpot -1. I guess it's your call @fabpot.

Edit: also @vicb seemed to be +1 on message keys earlier on.

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

by drak at 2012-11-01T20:19:00Z

I am also -1, I agree with @fabpot

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

by asm89 at 2012-11-12T09:38:51Z

@fabpot Can you please give a definite answer on this? I personally think @stof and @vicb have good points to do message keys, but with all these different people +1 and -1'ing the PR I'm lost on what it should actually do.

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

by asm89 at 2012-11-14T09:59:06Z

ping @fabpot

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

by asm89 at 2012-11-26T10:01:27Z

ping @fabpot We talked about this in Berlin. Any final thoughts on the PR? :) One idea was to do message keys + opt depend on the translator component if you want to use them, or use your own implementation.

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

by fabpot at 2012-11-26T14:01:37Z

The conclusion is: keep using plain English.

On Mon, Nov 26, 2012 at 11:01 AM, Alexander <notifications@github.com>wrote:

> ping @fabpot <https://github.com/fabpot> We talked about this in Berlin.
> Any final thoughts on the PR? :) One idea was to do message keys + opt
> depend on the translator component if you want to use them, or use your own
> implementation.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/4935#issuecomment-10709997>.
>
>

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

by Inori at 2012-11-26T15:00:22Z

is this final? if not, then +1 for message keys

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

by vicb at 2012-11-27T22:33:47Z

@fabpot I can't understand why we keep discussing this for months as this implementation use *both* keys and plain Englis, ie using  keys  is optional ( if it was not it would not be an issue according to #6129)

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

by asm89 at 2013-01-02T21:43:46Z

@fabpot @vicb I'll rebase this PR, fix the comments and refactor the message keys to use plain English + {{ }} syntax for the placeholders.

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

by asm89 at 2013-01-07T15:00:58Z

@fabpot If I fix this tonight, will it make the beta?

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

by fabpot at 2013-01-07T15:53:00Z

yes, definitely.

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

by asm89 at 2013-01-07T20:13:38Z

@fabpot I switched the implementation to English messages instead of message keys and fixed the final comments + rebased. Anything you want me to do after this?

Still happy with `getMessageKey()`?
2013-01-10 14:38:06 +01:00
Joseph Bielawski
880da01c49 [Process] In edge cases getcwd() can return false, then proc_open() should get null to use default value (the working dir of the current PHP process) 2013-01-10 12:59:53 +01:00
Yaroslav Kiliba
6b1652e5ee [PropertyAccess] Property path, small refactoring, read/writeProperty to read/write Property/Index. 2013-01-10 09:49:43 +01:00
Bernhard Schussek
1bae7b242c [PropertyAccess] Extracted PropertyAccess component out of Form 2013-01-10 09:49:37 +01:00
Christophe Coevoet
68257d372f Enhanced the triggering of E_USER_DEPRECATED errors
- Removed useless error handlers around FormEvent as the triggering has
  been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
  method provide some user logic needing to be converted to a new way.
- Enhanced the deprecation messages to mention the replacement whenever
  possible.
2013-01-10 09:22:55 +01:00
Fabien Potencier
f17f5867a8 moved the container aware HTTP kernel to the HttpKernel component 2013-01-10 09:21:32 +01:00
Fabien Potencier
2eea7682e7 moved the deprecation logic calls outside the new HttpContentRenderer class 2013-01-10 09:21:32 +01:00
Fabien Potencier
bd102c5eba made the content renderer work even when ESI is disabled or when no templating engine is available (the latter being mostly useful when testing) 2013-01-10 09:21:31 +01:00
Fabien Potencier
1240690cac [HttpKernel] made the strategy a regular parameter in HttpContentRenderer::render() 2013-01-10 09:21:31 +01:00
Fabien Potencier
1f1392dc8b [HttpKernel] simplified and enhanced code managing the hinclude strategy 2013-01-10 09:21:31 +01:00
Fabien Potencier
403bb060ce [HttpKernel] added missing phpdoc and tweaked existing ones 2013-01-10 09:21:31 +01:00
Fabien Potencier
892f00ffee [HttpKernel] added a URL signer mechanism for hincludes 2013-01-10 09:21:31 +01:00
Fabien Potencier
9aaceb19ee moved the logic from HttpKernel in FrameworkBundle to the HttpKernel component 2013-01-10 09:21:30 +01:00
Adam Harvey
4991607f00 Fix version_compare() calls for PHP 5.5.
Until PHP 5.5 hits beta, the version number for Git builds is still 5.5.0-dev,
which is less than 5.5.0alpha1 according to version_compare(). This means that
the branches for 5.5 aren't being executed on 5.5 snapshots at present.
2013-01-10 12:41:59 +08:00
Adam Harvey
34def9f94f Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
Optionally use the new IntlDateFormatter::setTimeZone() method if it exists.
2013-01-10 12:41:51 +08:00
Lee McDermott
16b342607c Show PHP SAPI in WDT 2013-01-09 10:34:35 +00:00
Jordi Boggiano
67d7423456 Remove use of deprecated HttpKernel LoggerInterface 2013-01-09 10:52:29 +01:00
Fabien Potencier
b981a6fa60 merged branch bschussek/bugfix (PR #6630)
This PR was merged into the master branch.

Commits
-------

c1aff96 [Form] Fixed regression introduced when merging 2.1 into master

Discussion
----------

[Form] Fixed regression introduced when merging 2.1 into master

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2013-01-09 10:47:19 +01:00
Bernhard Schussek
c1aff96eb0 [Form] Fixed regression introduced when merging 2.1 into master 2013-01-09 10:35:45 +01:00
Fabien Potencier
3a4869dd14 merged branch Tobion/relative-path (PR #3958)
This PR was merged into the master branch.

Commits
-------

6703fb5 added changelog entries
1997e2e fix phpdoc of UrlGeneratorInterface that missed some exceptions and improve language of exception message
f0415ed [Routing] made reference type fully BC and improved phpdoc considerably
7db07d9 [Routing] added tests for generating relative paths and network paths
75f59eb [Routing] add support for path-relative and scheme-relative URL generation

Discussion
----------

[2.2] [Routing] add support for path-relative URL generation

Tests pass: yes
Feature addition: yes
BC break: <del>tiny (see below)</del> NO
deprecations: NO

At the moment the Routing component only supports absolute and domain-relative URLs, e.g.
`http://example.org/user-slug/article-slug/comments` and
`/user-slug/article-slug/comments`.

But there are two link types missing: schema-relative URLs and path-relative URLs.
schema-relative: e.g. `//example.org/user-slug/article-slug/comments`
path-relative: e.g. `comments`.

Both of them would now be possible with this PR. I think it closes a huge gap in the Routing component.
Use cases are pretty common. Schema-relative URLs are for example used when you want to include assets (scripts, images etc) in a secured website with HTTPS. Path-relative URLs are the only option when you want to generate static files (e.g. documentation) that can be downloaded as an HTML archive. Such use-cases are currently not possible with symfony.

The calculation of the relative path based on the request path and target path is hightly unit tested. So it is really equivalent. I found several implemenations on the internet but none of them worked in all cases. Mine is pretty short and works.

I also added an optional parameter to the twig `path` function, so this feature can also be used in twig templates.

Ref: This implements path-relative URLs as suggested in #3908.

<del>[BC BREAK] The signature of UrlGeneratorInterface::generate changed to support scheme-relative and path-relative URLs. The core UrlGenerator is BC and does not break anything, but users who implemented their own UrlGenerator need to be aware of this change. See UrlGenerator::convertReferenceType.</del>

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

by jalliot at 2012-04-16T09:56:56Z

@Tobion For completeness, you should add the option to the `url` and `asset` twig functions/template helpers.

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

by stof at 2012-04-16T10:46:06Z

@jalliot adding the option to ``url`` does not make any sense. The difference between ``path`` and ``url`` is that ``path`` generates a path and ``url`` generates an absolute url (thus including the scheme and the hostname)

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

by Tobion at 2012-04-16T12:27:49Z

@stof I guess jalliot meant we could then generate scheme-relative URLs with `url`. Otherwise this would have no equivalent in twig.

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

by jalliot at 2012-04-16T12:34:08Z

@stof Yep I meant what @Tobion said :)

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

by Tobion at 2012-04-18T11:57:04Z

The $relative parameter I added besides the existing $absolute parameter of the `->generate` method was not clear enough. So I merged those into a different parameter `referenceType`. I adjusted all parts of symfony to use the new signature. And also made the default `UrlGenerator` implementation BC with the old style. So almost nobody will recognize a change. The only BC break would be for somebody who implemented his own `UrlGenerator` and did not call the parent default generator.
Using `referenceType` instead of a simple Boolean is much more flexible. It will for example allow a custom generator to support a new reference type like http://en.wikipedia.org/wiki/CURIE

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

by Tobion at 2012-04-18T13:34:58Z

ping @schmittjoh considering your https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/Router/I18nRouter.php would need a tiny change

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

by schmittjoh at 2012-04-18T13:37:39Z

Can you elaborate the necessary change?

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

by Tobion at 2012-04-18T13:51:10Z

This PR changes the signature of `generate` to be able to generate path-relative and scheme-relative URLs. So it needs to be
`public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)` and your implementation would need to change `if ($absolute && $this->hostMap) {` to `if (self::ABSOLUTE_URL === $referenceType && $this->hostMap) {`
I can do a PR if this gets merged.

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

by schmittjoh at 2012-04-18T13:52:14Z

If I understand correctly, the old parameter still works, no?

edit: Ah, ok I see what you mean now.

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

by Tobion at 2012-04-18T13:56:33Z

Yeah the old parameter still works but $absolute would also evaluate to true (a string) in your case for non-absolute URLs, i.e. paths.

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

by Tobion at 2012-04-19T21:09:46Z

ping @fabpot

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

by fabpot at 2012-04-20T04:30:18Z

Let's discuss that feature for 2.2.

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

by Tobion at 2012-04-20T10:40:59Z

What are your objections against it? It's already implemented, it works and it adds support for things that are part of a web standard. The BC break is tiny at the moment (almost nobody is affected) because the core UrlGenerator works as before. But if we waited for 2.2 it will be much harder to make the transition because 2.1 is LTS. So I think is makes sense to add it now. Furthermore it makes it much more future-proof as custom generators can more easiliy add support for other link types like CURIE. At the moment a Boolean for absolute URLs is simply too limited and also somehow inconsistent because $absolute = false stands for an absolute path. You see the awkwardness in this naming.

Btw, I added a note in the changelog. And I will add documentation of this feature in symfony-docs once this is merged.

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

by fabpot at 2012-04-20T12:14:32Z

nobody has ever said that 2.1 would be LTS. Actually, I think we are going to wait for 2.3 for LTS.

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

by Tobion at 2012-04-20T12:27:18Z

Well what I meant is, the longer we wait with this, the harder to apply it.
In 04ac1fdba2 you modified `generate` signature for better extensibility that is not even made use of. I think changing `$abolute` param goes in the same direction and has direct use.

I'd like to know your reason to wait for 2.2. Not enough time to review it, or afraid of breaking something, or marketing for 2.2?

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

by stof at 2012-04-20T16:28:27Z

@Tobion the issue is that merging new features forces to postpone the release so that it is tested by enough devs first to be sure there is no blocking bug in it. Big changes cannot be merged when we are hunting the remaining bugs to be able to release.

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

by schmittjoh at 2012-04-20T16:42:11Z

Considering the changes that have been made to the Form component, and are still being made, I think this is in comparison to that a fairly minor change.

Maybe a clearer guideline on the release process, or the direction would help, and avoid confusion, or wrong expectations on contributors' part.

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

by Tobion at 2012-10-05T13:52:11Z

@fabpot this is ready. So if you agree with it, I would create a documentation PR.

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

by stof at 2012-10-13T16:09:47Z

@fabpot what do you think about this PR ?

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

by Crell at 2012-11-01T16:05:01Z

This feels like it's overloading the generate() method to do double duty: One, make a URl based on a route.  Two, make a  URI based on a URI snippet.  Those are two separate operations.  Why not just add a second method that does the second operation and avoid the conditionals?  (We're likely to do that in Drupal for our own generator as well.)

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

by Tobion at 2012-11-01T16:38:39Z

@crell: No, you must have misunderstood something. The generate method still only generates a URI based on a route. The returned URI reference can now also be a relative path and a network path. Thats all.

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

by Tobion at 2012-12-13T18:30:28Z

@fabpot this is ready. It is fully BC! I also improved phpdoc considerably.

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

by Tobion at 2012-12-14T20:51:38Z

@fabpot Do you want me to write documentation for it? I would also be interested to write about the new features of the routing component in general. I wanted to do that anyway and it would probably be a good fit for your "new in symfony" articles.

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

by fabpot at 2012-12-14T20:58:16Z

Im' going to review this PR in the next coming days. And to answer your second question, more documentation or better documentation is always a good thing, so go for it.

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

by Tobion at 2013-01-02T21:50:20Z

@fabpot ping. I added changelog entries.
2013-01-09 10:27:51 +01:00
Jordi Boggiano
dca4528ba8 [HttpKernel] Extend psr/log's NullLogger class 2013-01-09 10:19:55 +01:00
Jordi Boggiano
1e5a890864 [Monolog] Mark old non-PSR3 methods as deprecated 2013-01-09 10:19:50 +01:00
Fabien Potencier
aa8b63b530 merged branch pborreli/typo-2013 (PR #6625)
This PR was merged into the master branch.

Commits
-------

36197dc Fixed typos

Discussion
----------

Fixed typos

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
2013-01-09 10:13:49 +01:00
Pascal Borreli
36197dcb83 Fixed typos 2013-01-09 09:07:22 +00:00
Fabien Potencier
b33d5bc352 removed the .gitattributes files (closes #6605, reverts #5674) 2013-01-09 09:51:07 +01:00
Fabien Potencier
f07c61d25c merged branch bschussek/issue5844 (PR #6137)
This PR was merged into the master branch.

Commits
-------

586a16e [Validator] Changed DefaultTranslator::getLocale() to always return 'en'
58bfd60 [Validator] Improved the inline documentation of DefaultTranslator
cd662cc [Validator] Added ExceptionInterface, BadMethodCallException and InvalidArgumentException
e00e5ec [Validator] Fixed failing test
cc0df0a [Validator] Changed validator to support pluralized messages by default
56d61eb [Form][Validator] Added BC breaks in unstable code to the CHANGELOG
1e34e91 [Form] Added upgrade instructions to the UPGRADE file
b94a256 [DoctrineBridge] Adapted DoctrineBridge to translator integration in the validator
c96a051 [FrameworkBundle] Adapted FrameworkBundle to translator integration in the validator
92a3b27 [TwigBridge] Adapted TwigBridge to translator integration in the validator
e7eb5b0 [Form] Adapted Form component to translator integration in the validator
46f751c [Validator] Extracted message interpolation logic of ConstraintViolation and used the Translation component for that

Discussion
----------

[Validator] Integrated the Translator in the Validator component

Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #5844, #6117
Todo: -
License of the code: MIT
Documentation PR: -

This PR allows to replace the default message substitution strategy in the validator (`strtr()`) by passing an implementation of `Symfony\Component\Translation\TranslatorInterface`. The motivation for this are both #5844 and the need to replace the translation strategy in Drupal's integration of the Validator.

In the stand-alone usage of the validator, both the translator and the default translation domain can now be passed to `ValidatorBuilderInterface`:

```php
$validator = Validation::createValidatorBuilder()
    ->setTranslator(new MyTranslator())
    ->setTranslationDomain('validators')
    ->getValidator();
```

References:

* #5844
* #6117
* #6129
* [Add a validation framework to Drupal 8](http://drupal.org/node/1845546)
* [Add the symfony validator component to core despite Symfony potentially releasing BC-breaking updates after 2.3.](http://drupal.org/node/1849564)

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

by Tobion at 2012-11-28T08:53:25Z

no BC break? Looking at ValidatorBuilderInterface there is definitely one.

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

by bschussek at 2012-11-28T08:55:01Z

ValidatorBuilderInterface is not part of the stable API. You are not supposed to implement this interface.

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

by Tobion at 2012-11-28T09:01:07Z

We're not only documenting bc breaks for stable API, otherwise we could remove 90% of the upgrade file since few methods are tagged with API.
An interface that nobody should implement?

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

by bschussek at 2012-11-28T09:30:02Z

The question is what to consider a BC break. Something will always break for someone. Should we consequently mark everything as BC break? I don't think so.

For example, since 2.1, you are supposed to use `Validation::createValidator*()` for creating a validator. Because of that, I won't consider changing the constructor signature of `Validator` a BC break anymore from 2.1 on.

The same for the unstable interfaces. These are currently meant to be used only, that is, type hint against them and call their methods. But we don't guarantee that we won't add methods to them.

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

by Tobion at 2012-11-28T09:38:19Z

I agree that almost any change could be considered a BC break. So we probably need to better define what a BC break is and what not. Otherwise Symfony will stop evolving after 2.3 because from then on Fabien wanted to prevent BC breaks which is almost impossible in a strict definition of bc break.

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

by fabpot at 2012-11-28T11:37:22Z

BC breaks should always be documented, and we guarantee BC only for things tagged with @api. I'm going to update the docs to make things clearer.

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

by bschussek at 2012-11-28T13:09:57Z

@fabpot I documented these changes now in the CHANGELOG: af99ebb1206ac92889b7193ba1ecc12bf2617e85

Are we sure we want to document *all* BC breaks from now on, even in non-@api code? This could rather scare people looking at our changelogs (lots of BC BREAKS there).

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

by fago at 2012-11-28T17:29:58Z

Unfortunately, it turns out the symfony translator interface does not mach the Drupal translation system as well as we initally thought, see http://drupal.org/node/1852106. Given that, this would integrating the validator component into Drupal even harder, because it introduces the dependency on the (unwanted) translation component. :(

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

by stof at 2012-11-28T18:19:36Z

If this does not help Drupal anyway, maybe #5844 is a better way to manage translations for people using the validator outside forms ?
and the Drupal guys would simply follow a similar approach, but based on their own translator instead of the symfony one.

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

by fago at 2012-11-28T18:50:12Z

Yeah. The only problem I see with the approach of #5844 is that *after* validation only the translated messages are available. We'd need to have access to the untranslated messages also.

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

by fago at 2012-11-29T09:49:47Z

As our translation system handles translating pluralized messages differently, the current ExecutionContextInterface::addViolation() method poses a problem also. We need to pass on - both the single and plural - message, as the message gets chosen during translation, see http://api.drupal.org/api/drupal/core!includes!common.inc/function/format_plural/8
So maybe, we could allow adding an already created ConstraintViolation object also? Then, we could implement a "PluralConstraintViolation" class that takes both message templates.

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

by bschussek at 2012-12-03T15:52:36Z

I updated this PR to support pluralized messages by default in the validator. This should solve the problem of the Drupal guys, because their implementation of `TranslatorInterface::transChoice($id, $number, ...)` can now simply split the $id by pipes (`|`) and pass the parts to their own `format_plural($count, $singular, $plural, ...)` function.

For us, it breaks BC because translation catalog sources had to be adapted.

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

by fabpot at 2012-12-03T16:25:52Z

Most of the XLF files are broken (the end is missing now).

IIUC, we now have a hard dependency on the Translation component, which is something we wanted to avoid.

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

by fabpot at 2012-12-03T16:27:56Z

Oops, clicked on the "comment" button too fast.

So, the dependency is hard (you need to install the dep) but light as we only rely on the translation interface from the component (when using the default translator). It looks acceptable to me, especially because we now use Composer to manage dependencies.

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

by bschussek at 2012-12-03T16:54:10Z

@fabpot Thanks for the hint. Going to fix this.

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

by bschussek at 2012-12-04T11:34:43Z

@fabpot Fixed.

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

by bschussek at 2012-12-07T12:40:24Z

Is there anything missing for this PR to be merged?
2013-01-09 09:22:50 +01:00
Fabien Potencier
d0dc59c7b2 merged branch igorw/exception-listener-comment (PR #6611)
This PR was squashed before being merged into the 2.1 branch (closes #6611).

Commits
-------

bde5a7f [HttpKernel] Clarify misleading comment in ExceptionListener

Discussion
----------

[HttpKernel] Clarify misleading comment in ExceptionListener

Regression from 295860dfaf.

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

by fabpot at 2013-01-08T09:02:53Z

The comment is right. Returning without a Response will re-throw the exception (in HttpKernel).

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

by staabm at 2013-01-08T11:00:36Z

so the comment should point out, that the httpkernel will rethrow the exception in that case?

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

by igorw at 2013-01-08T13:38:43Z

I missed that on the commit I linked. I've updated the patch to re-introduce the comment but clarify that `throw` is in HttpKernel.
2013-01-09 09:17:23 +01:00
Igor Wiedler
bde5a7f51a [HttpKernel] Clarify misleading comment in ExceptionListener 2013-01-09 09:17:22 +01:00
Jordi Boggiano
91a86f8bec [HttpKernel][Monolog] Add PSR-3 support to the LoggerInterface 2013-01-08 23:39:39 +01:00
Fabien Potencier
2b14410a1f updated VERSION for 2.2.0-BETA1 2013-01-08 19:55:25 +01:00
Fabien Potencier
aba96c7cae Merge branch '2.1'
* 2.1:
  [Console] Fix style escaping parsing
  [Console] Make style formatter matching less greedy to avoid having to escape when not needed
  [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
  [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class.
  [Form] Fixed EntityChoiceList when loading objects with negative integer IDs
  [TwigBundle] There is no CSS visibility of display, should be visible instead
  [Form] corrected source node for a Danish translation
  [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
  [HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
  [CssSelector] added css selector with empty string
  [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
  [DependencyInjection] refactored code to avoid logic duplication
  [Form] Deleted references in FormBuilder::getFormConfig() to improve performance
  [HttpFoundation] Update docblock for non-working method

Conflicts:
	src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig
	src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig
2013-01-08 19:17:41 +01:00
Fabien Potencier
8321127cda Merge branch '2.0' into 2.1
* 2.0:
  [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
  [TwigBundle] There is no CSS visibility of display, should be visible instead
  [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
  [HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
  [CssSelector] added css selector with empty string
  [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
  [DependencyInjection] refactored code to avoid logic duplication

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml
	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
	src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
2013-01-08 19:16:44 +01:00
Fabien Potencier
1949ce0ed7 merged branch hhamon/cs_fix (PR #6621)
This PR was merged into the 2.1 branch.

Commits
-------

2155719 [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class.

Discussion
----------

[2.1] [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
2013-01-08 17:57:17 +01:00
Jordi Boggiano
eb93e66aa7 [Console] Fix style escaping parsing 2013-01-08 17:21:26 +01:00
Jordi Boggiano
8ca1b805ce [Console] Make style formatter matching less greedy to avoid having to escape when not needed 2013-01-08 17:05:32 +01:00
Bernhard Schussek
586a16e8f8 [Validator] Changed DefaultTranslator::getLocale() to always return 'en' 2013-01-08 15:58:21 +01:00
Bernhard Schussek
58bfd60b0f [Validator] Improved the inline documentation of DefaultTranslator 2013-01-08 15:58:17 +01:00
Hugo Hamon
2155719398 [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class. 2013-01-08 15:45:08 +01:00
Bernhard Schussek
cd662ccf7a [Validator] Added ExceptionInterface, BadMethodCallException and InvalidArgumentException 2013-01-08 15:20:14 +01:00
Bernhard Schussek
e00e5ecf4e [Validator] Fixed failing test 2013-01-08 14:59:49 +01:00
Bernhard Schussek
cc0df0a5af [Validator] Changed validator to support pluralized messages by default
This was implemented in order to satisfy Drupal's requirements for a
singular and a plural message whenever a message is passed to their
implementation of transChoice().
2013-01-08 14:59:49 +01:00
Bernhard Schussek
56d61eb6da [Form][Validator] Added BC breaks in unstable code to the CHANGELOG 2013-01-08 14:45:43 +01:00
Bernhard Schussek
e7eb5b0d7d [Form] Adapted Form component to translator integration in the validator 2013-01-08 14:43:29 +01:00
Bernhard Schussek
46f751ccf2 [Validator] Extracted message interpolation logic of ConstraintViolation and used the Translation component for that 2013-01-08 14:43:29 +01:00
Lee McDermott
4d7c895021 Fix bug where backspacing to an empty string and using the arrow keys would fail. Added test to prevent in future 2013-01-08 13:05:24 +01:00
Lee McDermott
cd1def3693 Fix bad unit test with undefined offset (spotted by @stloyd) 2013-01-08 12:58:44 +01:00
Joseph Bielawski
7f149ae0aa [Console] Split tests for DialogHelper that tests ask() method 2013-01-08 12:54:42 +01:00
Joseph Bielawski
e6574deb40 [Console] Fix stty reset when using DialogHelper#ask() with autocomplete functionality 2013-01-08 12:53:29 +01:00
Douglas Greenshields
ae3d4541a9 [Form] corrected source node for a Danish translation 2013-01-07 22:34:59 +00:00
Ricard Clau
5be0042be0 better regexp, more test cases, added comments about each credit card 2013-01-07 22:57:38 +01:00
Sebastian Goettschkes
cc278aff69 [Validator] Fix CardSchemeValidator double violation when value is non-numeric.
Making scheme option accept strings in addition to arrays.
2013-01-07 22:54:50 +01:00
Fabien Potencier
a538c42df1 merged branch fabpot/strict-flag-bug (PR #6608)
This PR was merged into the 2.0 branch.

Commits
-------

1d362b8 [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)

Discussion
----------

[DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
2013-01-07 22:47:08 +01:00
Fabien Potencier
1d362b8849 [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607) 2013-01-07 22:36:09 +01:00
Alexander
73db84fd5e [Security] Move translations file to 'security' domain 2013-01-07 21:11:25 +01:00
Alexander
324703a9ff [Security] Switch to English messages as message keys 2013-01-07 21:11:24 +01:00
Alexander
aa7476967a [Security] Fix CS + unreachable code 2013-01-07 21:11:19 +01:00
Alexander
2d7a7ba139 [Security] Fix AuthenticationException serialization 2013-01-07 20:58:58 +01:00
Alexander
50d5724c23 [Security] Introduced UsernameNotFoundException#get/setUsername 2013-01-07 20:58:58 +01:00
Alexander
39da27a06d [Security] Removed get/setExtraInformation, added get/set(Token|User) 2013-01-07 20:58:58 +01:00
Alexander
837ae15102 [Security] Add note about changed constructor to changelog 2013-01-07 20:58:58 +01:00
Alexander
d7129b9a7e [Security] Fix exception constructors called in UserChecker 2013-01-07 20:58:58 +01:00
Alexander
0038fbb8b6 [Security] Add initial translations for AccountStatusException childs 2013-01-07 20:58:58 +01:00
Alexander
50e2cfc1f5 [Security] Add custom getMessageKey AccountStatusException childs 2013-01-07 20:58:58 +01:00
Alexander
1147977212 [Security] Fix InsufficientAuthenticationException constructor calls 2013-01-07 20:58:58 +01:00
Alexander
79430b8238 [Security] Fix AuthenticationServiceException constructor calls 2013-01-07 20:58:58 +01:00
Alexander
42cced4c97 [Security] Fix AuthenticationException constructor calls 2013-01-07 20:58:57 +01:00
Alexander
963a1d7b81 [Security] Add initial translations for the exceptions 2013-01-07 20:58:57 +01:00
Alexander
ed6eed4c36 [Security] Add getMessageKey and getMessageData to auth exceptions 2013-01-07 20:58:57 +01:00
Alexander
694c47ce96 [Security] Change signature of AuthenticationException to match \Exception 2013-01-07 20:58:57 +01:00
Bernhard Schussek
bcc5552de4 [Form] Protected methods in FormConfigBuilder and FormBuilder from being called when it is turned into a FormConfigInterface instance 2013-01-07 16:58:41 +01:00
Bernhard Schussek
fee1bf5448 [Form] Introduced base ExceptionInterface 2013-01-07 16:58:41 +01:00
Fabien Potencier
cd04bd7a12 merged branch drak/flashcount (PR #6423)
This PR was merged into the 2.1 branch.

Commits
-------

8513777 [HttpFoundation] Update docblock for non-working method

Discussion
----------

[HttpFoundation] Update docblock for non-working method

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Rerences the following tickets: #6408
Todo: -
License of the code: MIT
Documentation PR: -

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

by piotrpasich at 2012-12-19T21:32:24Z

I think that we shouldn't comment it as not working but add new methods called countFlashes and countFlashesTypes. CountFlashesTypes should return count($this->flashBag) and countFlashes should count all items in every array inside flashbag.

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

by drak at 2012-12-20T17:43:38Z

ping @fabpot
2013-01-07 16:55:04 +01:00
Drak
0cf9fcb304 [HttpFoundation] Deprecated count() and \Countable 2013-01-07 15:50:53 +00:00
Fabien Potencier
87a85b6696 merged branch bschussek/issue6558 (PR #6578)
This PR was merged into the 2.1 branch.

Commits
-------

33e9d00 [Form] Deleted references in FormBuilder::getFormConfig() to improve performance

Discussion
----------

[Form] Deleted references in FormBuilder::getFormConfig() to improve performance

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6558
Todo: -
License of the code: MIT
Documentation PR: -

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

by vicb at 2013-01-07T11:09:24Z

> Backwards compatibility break: no

Really ?

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

by vicb at 2013-01-07T12:27:37Z

Adding a public method is a BC break.

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

by bschussek at 2013-01-07T12:42:14Z

The method is inherited from the parent class, so the change should not affect BC.

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

by vicb at 2013-01-07T13:27:21Z

my bad.
2013-01-07 16:44:13 +01:00
srsbiz
3195122905 [HttpFoundation] Check if required shell functions for FileBinaryMimeTypeGuesser are not disabled 2013-01-07 14:18:29 +01:00
Fabien Potencier
43d056fb15 merged branch Tobion/static-compile (PR #6491)
This PR was squashed before being merged into the master branch (closes #6491).

Commits
-------

5d264ce [Routing] made RouteCompilerInterface::compile static

Discussion
----------

[Routing] made RouteCompilerInterface::compile static

bc break: yes but probably nobody affected

It makes much more sense that the compile method is static because having instances of a compiler is strange. Also the compiler could not use DI or anything anyway as the `Route` class was instantiating compiler instances itself and was assuming there are no constructor arguments.
2013-01-07 12:20:12 +01:00
Tobias Schultze
5d264ce9b6 [Routing] made RouteCompilerInterface::compile static 2013-01-07 12:20:12 +01:00
Fabien Potencier
5adecd7780 merged branch lmcd/autocomplete-cleanups (PR #6594)
This PR was squashed before being merged into the master branch (closes #6594).

Commits
-------

9d94fc7 [Console] Autocomplete cleanups/optimisations

Discussion
----------

[Console] Autocomplete cleanups/optimisations

I know the optimisations to this code are getting kinda ridiculous, but I found a few more things to tidy up.
2013-01-07 12:16:36 +01:00
Lee McDermott
9d94fc7a49 [Console] Autocomplete cleanups/optimisations 2013-01-07 12:16:36 +01:00
Fabien Potencier
886f721dc0 merged branch stloyd/feature/request_phpdoc (PR #6599)
This PR was merged into the 2.0 branch.

Commits
-------

666283c [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia

Discussion
----------

[2.0][HttpFoundation] Docblock for Request::isXmlHttpRequest()

Docblock now points to [Wikipedia entry](http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript) instead of pointing all known JS frameworks.

Replacement for #6444.
2013-01-07 12:13:42 +01:00
Fabien Potencier
5ec6b2a050 merged branch kosssi/bugfix/css-selector-empty (PR #6271)
This PR was squashed before being merged into the 2.0 branch (closes #6271).

Commits
-------

dbafc2c [CssSelector] added css selector with empty string

Discussion
----------

[CssSelector] added css selector with empty string

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

by kosssi at 2012-12-14T18:29:40Z

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

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

by stloyd at 2013-01-07T08:21:56Z

@fabpot ping

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

by fabpot at 2013-01-07T10:28:54Z

Sorry, but I don't understand the use case.

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

by kosssi at 2013-01-07T10:36:31Z

if you have this code :
    \<img src="..." alt="">

you can find
    $this->assertCount(1, $crawler->filter('img[alt=""]'));

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

by fabpot at 2013-01-07T10:40:12Z

Then, can you change the unit test with the real use case?

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

by kosssi at 2013-01-07T11:05:50Z

I don't know if it suits you

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

by fabpot at 2013-01-07T11:07:11Z

thanks
2013-01-07 12:07:21 +01:00
Simon Constans
dbafc2c365 [CssSelector] added css selector with empty string 2013-01-07 12:07:20 +01:00
Joseph Bielawski
666283cb76 [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia 2013-01-07 11:47:53 +01:00
Joseph Bielawski
d570dbe545 [Security][Acl] CS fix for commit: 3c3a90b9e5 2013-01-07 10:00:39 +01:00
Ilya Biryukov
3c3a90b9e5 [Security][Acl] Reduce query size when Select ACL entries for many instances of the same Type at once 2013-01-07 09:54:34 +01:00
Fabien Potencier
dc4a10e931 merged branch vitaliytv/master (PR #6590)
This PR was merged into the master branch.

Commits
-------

4bf82e0 Update Ukrainian translation for master branch

Discussion
----------

[Validator] Update Ukrainian translation for master branch
2013-01-07 08:09:43 +01:00
Fabien Potencier
ce212fcf65 Merge branch '2.1'
* 2.1:
  Update Ukrainian translation for 2.1 branch
2013-01-07 08:09:06 +01:00
Ricard Clau
b1f190fd6c covers edge case for Luhn 2013-01-06 22:18:36 +01:00
vitaliytv
4bf82e03dc Update Ukrainian translation for master branch 2013-01-06 23:17:37 +02:00
vitaliytv
31edf85e61 Update Ukrainian translation for 2.1 branch 2013-01-06 23:14:22 +02:00
Fabien Potencier
64bf80c2bb merged branch lmcd/autocomplete-arrows-new (PR #6564)
This PR was merged into the master branch.

Commits
-------

2b73975 Add new tests and fix problem with the second option being chosen on down arrow
8a0bcfb Use strpos in place of substr
9864d95 Not much use in blanking the array each time
a4d711c Enable arrow keys to browse matched autocomplete options

Discussion
----------

[Console] Enable arrow keys to browse matched autocomplete options

See notes in original autocomplete pull request: #6391
See also @bamarni's pull request implementing more or less the same stuff: #6561

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

by fabpot at 2013-01-05T10:12:47Z

Looks good to me. Can you add some unit tests?

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

by bamarni at 2013-01-05T12:51:51Z

1 line addition... you definitely got me on the diff!

That's what I had mind too, excepted for the default highlight, but as you said it's usually displayed in the question so it 's not necessary. 👍

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

by lmcd at 2013-01-06T04:07:02Z

@fabpot Added tests
2013-01-06 11:18:09 +01:00
Fabien Potencier
1e2fb64817 [DependencyInjection] refactored code to avoid logic duplication 2013-01-06 08:52:07 +01:00
Lee McDermott
2b73975023 Add new tests and fix problem with the second option being chosen on down arrow 2013-01-06 04:05:03 +00:00
Lee McDermott
8a0bcfbed2 Use strpos in place of substr 2013-01-06 02:24:44 +00:00
Lee McDermott
9864d9572d Not much use in blanking the array each time 2013-01-06 02:21:42 +00:00
Fabien Potencier
583d999b4e Merge branch '2.1'
* 2.1:
  [Console] made Application::getTerminalDimensions() public
  Revert "merged branch egeloen/f-2.0-terminal-width (PR #6571)"
  [2.1] [Console] Added getTerminalDimensions() with fix for osx/freebsd
  Restrict Monolog version to be in version `<1.3`. Because of conflict between `HttpKernel/Log/LoggerInterface` and `Psr\Log\LoggerInterface` (PSR-3)

Conflicts:
	composer.json
2013-01-05 21:35:20 +01:00
Fabien Potencier
d786e09341 [Console] made Application::getTerminalDimensions() public 2013-01-05 21:33:45 +01:00
Fabien Potencier
5699a342ed Merge branch '2.0' into 2.1
* 2.0:
  Revert "merged branch egeloen/f-2.0-terminal-width (PR #6571)"
2013-01-05 21:32:41 +01:00
Fabien Potencier
151f2c17bf Revert "merged branch egeloen/f-2.0-terminal-width (PR #6571)"
This reverts commit 515769385a, reversing
changes made to cd0a9d7a1d.
2013-01-05 21:32:06 +01:00
Fabien Potencier
af070084d3 merged branch bschussek/issue6217-no-dots-between-date-fields (PR #6575)
This PR was merged into the master branch.

Commits
-------

e0b4480 [Form] Removed separator characters between choice or text fields in DateType

Discussion
----------

[Form] Removed separator characters between choice or text fields in DateType

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This commit was originally contained in #6217 (for 2.1) but then split away for master since it changes behavior.
2013-01-05 19:29:03 +01:00
Fabien Potencier
47b3f8636f merged branch bschussek/exceptionfix (PR #6582)
This PR was merged into the master branch.

Commits
-------

184c8e5 Fixed @expectedException definitions to reference absolute exception paths

Discussion
----------

Added leading slashes to @expectedException definitions

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This PR adds leading backslashes `\` to `@expectedException` declarations.

The current version is inconsistent with other class references in doc blocks, which default to *relative* class names unless class name has a leading backslash.

```php
/**
 * @param RelativeNs\Class $param1
 * @param \AbsoluteNs\Class $param2
 */

but

/**
 * @expectedException AbsoluteNs\Class
 */
```

Consequently, PHPStorm does not understand the current statements and marks them as erroneous (and correctly so IMO, even though PHPUnit's interpretation is more relaxed).
2013-01-05 19:24:35 +01:00
Chris Heng
8f21f89eaf [2.1] [Console] Added getTerminalDimensions() with fix for osx/freebsd 2013-01-06 01:54:53 +08:00
Bernhard Schussek
184c8e586f Fixed @expectedException definitions to reference absolute exception paths 2013-01-05 18:52:40 +01:00
Bernhard Schussek
33e9d002a7 [Form] Deleted references in FormBuilder::getFormConfig() to improve performance 2013-01-05 18:04:01 +01:00
Fabien Potencier
6250476eaa Merge branch '2.1'
* 2.1:
  Restrict Monolog version to be in version <1.3
  [Console] Make getTerminalWith & getTerminalHeight public
  [DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly
  [DependencyInjection] fixed PhpDumper when an inlined service definition has some properties
  [DependencyInjection] added some tests for PhpDumper when the container is compiled
  [DependencyInjection] fixed CS
  [Process] Do not reset stdout/stderr pipes on Interrupted system call
  [Locale] Adjust `StubIntlDateFormatter` to have new methods added in PHP 5.5
  use the right RequestMatcherInterface
  [Locale] Fix failing `StubIntlDateFormatter` tests in PHP 5.5
  [Locale] Fix failing `StubIntlDateFormatter` in PHP 5.5
  [Form] Fix failing `MonthChoiceList` in PHP 5.5
  Update .travis.yml

Conflicts:
	src/Symfony/Bridge/Monolog/composer.json
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
2013-01-05 16:33:05 +01:00
Fabien Potencier
f1d2fe9d5d Merge branch '2.0' into 2.1
* 2.0:
  Restrict Monolog version to be in version <1.3
  [Console] Make getTerminalWith & getTerminalHeight public
  [DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly
  [DependencyInjection] fixed PhpDumper when an inlined service definition has some properties
  [DependencyInjection] added some tests for PhpDumper when the container is compiled
  [DependencyInjection] fixed CS
  [Locale] Adjust `StubIntlDateFormatter` to have new methods added in PHP 5.5
  [Locale] Fix failing `StubIntlDateFormatter` tests in PHP 5.5
  [Locale] Fix failing `StubIntlDateFormatter` in PHP 5.5
  [Form] Fix failing `MonthChoiceList` in PHP 5.5
  Update .travis.yml

Conflicts:
	src/Symfony/Bridge/Monolog/composer.json
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
	src/Symfony/Component/Form/Extension/Core/ChoiceList/MonthChoiceList.php
	tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services9.yml
2013-01-05 16:31:25 +01:00
Fabien Potencier
5258edbe9e merged branch fabpot/container-dumper-fixes (PR #6565)
This PR was merged into the 2.0 branch.

Commits
-------

e0923ae [DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly
cd15390 [DependencyInjection] fixed PhpDumper when an inlined service definition has some properties
e939a42 [DependencyInjection] added some tests for PhpDumper when the container is compiled
3827e3e [DependencyInjection] fixed CS

Discussion
----------

[DependencyInjection] Fixed PhpDumper when compiling inlined services
2013-01-05 16:22:59 +01:00
Bernhard Schussek
e0b4480a1b [Form] Removed separator characters between choice or text fields in DateType 2013-01-05 16:18:31 +01:00
Florin Patan
ef652e2d8f Added context to JsonEncoder 2013-01-05 16:36:09 +02:00
Fabien Potencier
515769385a merged branch egeloen/f-2.0-terminal-width (PR #6571)
This PR was merged into the 2.0 branch.

Commits
-------

f299bd0 [Console] Make getTerminalWith & getTerminalHeight public

Discussion
----------

[Console] Make getTerminalWith & getTerminalHeight public

Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: ~
Todo: -
License of the code: MIT
Documentation PR: ~

After demand in #6567, I open an other one on the 2.0 branch.
2013-01-05 14:38:35 +01:00
Eric GELOEN
f299bd0968 [Console] Make getTerminalWith & getTerminalHeight public 2013-01-05 14:32:58 +01:00
Jakub Zalas
97bc257c69 [Locale] Rolled back normalizeIcuVersion() method in unit tests.
This makes it consistent with 2.0 and 2.1.

We just need to check if version is 4.4 or 4.8 and we do not need to know if it is 4.8.0 or 4.8.1.1 (at least for now there are no big differences between minor ICU versions).
2013-01-05 11:41:28 +01:00
Fabien Potencier
e0923ae1d0 [DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly 2013-01-05 10:18:27 +01:00
Fabien Potencier
cd153901ea [DependencyInjection] fixed PhpDumper when an inlined service definition has some properties 2013-01-05 10:03:43 +01:00
Fabien Potencier
3827e3ed1e [DependencyInjection] fixed CS 2013-01-05 09:01:42 +01:00
Lee McDermott
a4d711cb2a Enable arrow keys to browse matched autocomplete options 2013-01-05 06:34:01 +00:00
Fabien Potencier
94aacec717 merged branch romainneutron/StreamSelect (PR #6540)
This PR was merged into the 2.1 branch.

Commits
-------

fa6fb6f [Process] Do not reset stdout/stderr pipes on Interrupted system call

Discussion
----------

[Process][2.1] Do not reset stdout/stderr pipes on stream_select failure

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

When `stream_select` is called and failed, pipes are currently reset to an empty array. As a result, both error-output and output are empty whereas the exitcode is 0 (successful process).

There is no reason (at least I don't see it) to reset pipes when an error occurs.

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

by fabpot at 2013-01-04T08:18:03Z

This behavior was introduced by @Seldaek in bcf8cf91. Any reason?

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

by Seldaek at 2013-01-04T17:22:33Z

The rationale was that if stream_select failed, it will fail every time (maybe this is an incorrect assumption and I introduced a bug there). Since the while loop checks for $this->pipes being not empty, if the process dies off and stream_select() starts failing, it will be stuck in the while loop forever. That's what I was fixing there. As far as I can tell, your fix reintroduces that problem. Can you explain a bit more what you mean by "error-output and output are empty"? Maybe adding a test for the case you are seeing would help too?

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

by romainneutron at 2013-01-04T17:47:00Z

Hi !

I'm actually using `Process` in a amqp client using PhpAmqpLib. Sometimes both output and error-output of a process are empty whereas the process returned with an exitcode equal to 0.

By *empty*, I mean that the output of both `$process->getOuptut()` and `$process->getErrorOuptut()` are equal to `''`.

I removed the `@` before the `stream_select` and realized that some calls where failing :

```
stream_select(): unable to select [4]: Interrupted system call (max_fd=13) in .../vendor/symfony/process/Symfony/Component/Process/Process.php on line 341
```

With my patch, it appears that if a `stream_select` call fails one time, it can be called with success a second time.

Adding a test case that triggers this error does not seem easy as it seems system related.

What do you think about it ?

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

by Seldaek at 2013-01-04T17:52:04Z

Ok I see. So I guess your fix makes sense since stream_select can fail legitimately, but it's not the whole story. If it fails because the process died off (or whatever the cause was on windows) we shouldn't keep trying forever. Maybe just adding a limit of N retries that is reset whenever a call succeeds would be enough to go over the odd system call being interrupted without allowing infinite loops. Not sure what N makes sense.

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

by igorw at 2013-01-04T17:53:45Z

As per the `stream_select` manpage it can return false when interrupted by a system call. That does not indicate that something is broken. However, I'm not sure if it is possible to distinguish between actual errors and interrupts without capturing and parsing the error message.

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

by romainneutron at 2013-01-04T18:50:56Z

I've updated the PR to consider the error message as it's currently the only solution to find out why `stream_select` failed

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

by romainneutron at 2013-01-04T18:59:15Z

Merged fixes suggested by @stloyd  and @Seldaek
2013-01-04 22:46:41 +01:00
Romain Neutron
fa6fb6fa80 [Process] Do not reset stdout/stderr pipes on Interrupted system call
When `stream_select` is called and return false because of an `Interrupted
system call`, pipes are currently reset to an empty array.
As a result, both error-output and output are empty whereas the
exitcode is 0 (successful process).
2013-01-04 19:58:07 +01:00