Commit Graph

6991 Commits

Author SHA1 Message Date
alexandresalome
ba6bd4b221 [HttpKernel] Fix the FileProfileStorage, according to the tests 2011-10-09 22:45:55 +02:00
alexandresalome
1654473a4c [HttpKernel] Create a test to outline the problem with file storage 2011-10-09 22:32:11 +02:00
Fabien Potencier
a1adef7fd1 merged branch tigranazatyan/master (PR #2361)
Commits
-------

f49bbb7 updated
319fd9c Updated the file
0dc8c3f Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hy.xliff via GitHub
25d7596 Added 42-48 messages to Armenian translation

Discussion
----------

Armenian Translation (new)

updated armenian translation file for Framework Bundle
2011-10-09 08:37:44 +02:00
Tigran Azatyan
f49bbb7498 updated 2011-10-09 04:04:49 +06:00
Tigran Azatyan
319fd9ced3 Updated the file 2011-10-09 04:02:26 +06:00
Tigran Azatyan
0dc8c3f536 Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hy.xliff via GitHub 2011-10-09 03:20:20 +06:00
Tigran Azatyan
25d7596407 Added 42-48 messages to Armenian translation 2011-10-09 03:19:37 +06:00
Fabien Potencier
a8faa83708 merged 2.0 2011-10-08 22:58:00 +02:00
Tigran Azatyan
d2d849cf60 First 2011-10-08 22:57:17 +02:00
Fabien Potencier
36f619b57d merged branch tigranazatyan/master (PR #2359)
Commits
-------

05663ec First

Discussion
----------

Armenian Translation

I added armenian translation to Framework Bundle Validators

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

by stof at 2011/10/08 13:48:31 -0700

Can you do a PR based on the 2.0 branch instead ?

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

by tigranazatyan at 2011/10/08 13:51:03 -0700

I do not have skills using github, please do it yourself:)
2011-10-08 22:56:09 +02:00
Tigran Azatyan
05663ec527 First 2011-10-09 01:07:53 +05:00
Fabien Potencier
74bc699b27 moved management of the locale from the Session class to the Request class
The locale management does not require sessions anymore.

In the Symfony2 spirit, the locale should be part of your URLs. If this is the case
(via the special _locale request attribute), Symfony will store it in the request
(getLocale()).

This feature is now also configurable/replaceable at will as everything is now managed
by the new LocaleListener event listener.

How to upgrade:

The default locale configuration has been moved from session to the main configuration:

Before:

framework:
    session:
        default_locale: en

After:

framework:
    default_locale: en

Whenever you want to get the current locale, call getLocale() on the request (was on the
session before).
2011-10-08 18:34:49 +02:00
Fabien Potencier
8b55541aee added an UPGRADE file 2011-10-08 18:29:31 +02:00
Fabien Potencier
6a4b853b27 removed the UPDATE files 2011-10-08 18:26:01 +02:00
Fabien Potencier
35c5e1b8cd merged branch mvrhov/test_fixes (PR #2357)
Commits
-------

395f580 Rebuild resource files with genrb from ICU 4.2. as ICU 4.4 by default builds them in newer format. Also added all files necessary to build resources.dat with pkgdat because syntax for command is so cryptic
438581d Skip test if running as superuser as it will fail

Discussion
----------

Fixes failing tests

This one closes both the #2355 and #2356
2011-10-08 18:10:49 +02:00
Miha Vrhovnik
395f580fd7 Rebuild resource files with genrb from ICU 4.2. as ICU 4.4 by default builds them in newer format.
Also added all files necessary to build resources.dat with pkgdat because syntax for command is so cryptic
2011-10-08 16:41:17 +02:00
Fabien Potencier
d867f22b46 merged branch craue/patch-14 (PR #2354)
Commits
-------

2e5869d fixed "using $this when not in object context" error for 2.0 branch (replaces #2353)

Discussion
----------

fixed "using $this when not in object context" error for 2.0 branch (replaces #2353)
2011-10-08 14:23:35 +02:00
Miha Vrhovnik
438581deda Skip test if running as superuser as it will fail 2011-10-08 14:10:49 +02:00
Christian Raue
2e5869db00 fixed "using $this when not in object context" error for 2.0 branch (replaces #2353) 2011-10-08 14:05:33 +02:00
Fabien Potencier
f75f46682d merged branch stealth35/fix_distant_trans (PR #2346)
Commits
-------

ae0685a [Translation] Loader should only load local files

Discussion
----------

[Translation] Security : Loader should only load local files

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
See: #2327
2011-10-08 13:34:50 +02:00
stealth35
ae0685a314 [Translation] Loader should only load local files 2011-10-07 18:30:56 +02:00
Fabien Potencier
3d64d8e70f fixed typo 2011-10-07 16:14:09 +02:00
Fabien Potencier
f6e4c2a428 updated CHANGELOG for 2.1 2011-10-07 14:12:01 +02:00
Fabien Potencier
b25a8767ad merged branch schmittjoh/dbalSessionStorage (PR #2182)
Commits
-------

3f8e8c9 fixes a session max lifetime handling
3abb7f3 fixed some conflicts with garbage collection
a1888b2 added a dbal session storage

Discussion
----------

Dbal session storage

Adds a session storage based on Doctrine DBAL.

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

by lsmith77 at 2011/09/14 13:39:28 -0700

guess it would be nice to then provide a service inside the DoctrineBundle that reuses a global DoctrineDBAL connection, guess the connection to use would then need to be configured via the doctrine app config.

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

by schmittjoh at 2011/09/14 13:42:34 -0700

I haven't found a sane way to provide automatic configuration that's why I left this to the user to implement. It's also relatively easy:

```yml
services:
    dbal_session_storage:
        class: Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionStorage
        arguments: [@database_connection]

framework:
    session: { storage_id: dbal_session_storage }

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

by stof at 2011/09/14 13:57:48 -0700

@lsmith77 There is an issue about reusing another DBAL connection: if the transaction is aborted by the ORM, the session could be aborted too as you cannot have 2 independent transactions AFAIK

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

by lsmith77 at 2011/09/14 13:59:57 -0700

not sure how this is relevant. i mean why does the transaction need to be left open? just begin, write, commit ..

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

by stof at 2011/09/14 14:02:39 -0700

and what if the transaction of the ORM is still opened (let's say you use SimpleThingsTransactionalBundle) ?

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

by lsmith77 at 2011/09/14 14:06:12 -0700

well thats a bit of an edge case imho. also i wonder if SimpleThingsTransactionalBundle shouldn't make sure that its transaction is closed before the session is written.

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

by schmittjoh at 2011/09/14 14:06:56 -0700

It closes them.

On Wed, Sep 14, 2011 at 11:06 PM, Lukas Kahwe Smith <
reply@reply.github.com>wrote:

> well thats a bit of an edge case imho. also i wonder if
> SimpleThingsTransactionalBundle shouldn't make sure that its transaction is
> closed before the session is written.
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/2182#issuecomment-2098100
>

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

by stof at 2011/09/14 14:15:02 -0700

@schmittjoh Does it close them **before** writing the session ?

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

by schmittjoh at 2011/09/14 14:44:15 -0700

I think either commit, or rollback is called, but @beberlei can probably answer that better.

Anyway, it is not really related to this PR because it is up to the user which connection is used.

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

by stof at 2011/09/14 14:58:48 -0700

I know that one of them is called. But if they are called after the session is persisted to the DB, a rollback is an issue as it will rollback the session persistence as well.
The PR is indeed fine. What need to be changed is the doc about how to use it, to advocate using a separate connection instead of the default one (which is used in your example)

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

by schmittjoh at 2011/09/15 02:57:34 -0700

There is no doc yet, but lets see what @fabpot thinks of all of this first.

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

by fabpot at 2011/09/15 04:57:57 -0700

Any benefits over using the PDO session storage?

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

by lsmith77 at 2011/09/15 05:00:50 -0700

cleaner code, potentially better support for niche RDBMS, centralized logging and finally afaik DoctrineDBAL has emulation for nested transactions.

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

by schmittjoh at 2011/09/15 05:11:00 -0700

The benefits (for me) are:

- logging queries
- better interoperability with existing build processes (migrations)
- better database interoperability
- re-using existing connection (I don't have the problem that Stof mentioned above)

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

by beberlei at 2011/09/15 06:18:22 -0700

The nested transactions is the problem here as @stof already said. If you reuse the default connection and use nested transactions that fail then this will make your session not save. That is why the docs should recommend you create a second connection for a dbal based session storage, even if it is using the same database. The PDO session storage would be a second connection besides DBAL aswell.

I like the migrations/schema hook though to create the table automatically through schema commands.

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

by fabpot at 2011/09/15 10:45:31 -0700

ok, looks good to me. Can you add some documentation about its usage (like the possible keys for options)? Is it possible to add some tests too?

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

by jdreesen at 2011/09/22 06:34:11 -0700

why did you close this?

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

by schmittjoh at 2011/09/30 06:26:12 -0700

I can't put more time into this PR, however I'm using it for some time already, and there shouldn't be any major issues as it is basically copy/paste from the PDO session.
2011-10-07 14:11:24 +02:00
Fabien Potencier
50c47aa687 merged branch stloyd/form_texttypes (PR #2343)
Commits
-------

8bd0e42 [Form] Use proper parent (text) for EmailType and TextareaType

Discussion
----------

[2.0][Form] Use proper parent (text) for EmailType and TextareaType

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-07 14:07:29 +02:00
Fabien Potencier
f22566ca19 merged branch stloyd/ScalarTransformer (PR #2341)
Commits
-------

95049ef [Form] Added type check to `ScalarToChoiceTransformer`

Discussion
----------

[2.0][Form] Added type check to ScalarToChoiceTransformer

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-07 14:06:24 +02:00
Fabien Potencier
4cdf6ac9f4 merged branch stloyd/FormUtil (PR #2340)
Commits
-------

18a83c6 [Form] Simplified a bit `FormUtil` and extended test coverage

Discussion
----------

[2.0][Form] Simplified a bit `FormUtil` and extended test coverage

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-07 14:05:47 +02:00
Joseph Bielawski
8bd0e42233 [Form] Use proper parent (text) for EmailType and TextareaType 2011-10-07 13:47:48 +02:00
stloyd
18a83c67f4 [Form] Simplified a bit FormUtil and extended test coverage 2011-10-07 12:04:26 +02:00
stloyd
95049ef902 [Form] Added type check to ScalarToChoiceTransformer 2011-10-07 12:01:07 +02:00
Fabien Potencier
89fd9653b4 merged branch Seldaek/trans_charset (PR #2339)
Commits
-------

5473d3b [Translation] Allow use of UTF-8 encoded catalogues into non-UTF-8 applications
deb6dea [Translation] Add failing tests to verify that UTF-8 lang files can't be used with another charset

Discussion
----------

Allow use of UTF-8 catalogues in non-UTF-8 applications

This is #2313 but targetting the master branch.

Bug fix: yes
Feature addition: ?:)
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -

The problem I'm having is that, while porting an existing app, we are using UTF-8 everywhere to have a migration path ready, but the current application and DB is still in ISO-8859-1, which means translations containing accented chars are broken.

Also, we didn't hit the issue yet since we don't use forms much, but I imagine we would have similar issues with core translations for the validator which are all UTF-8 encoded.

Note that I explicitly suppressed this conversion in case your application is setup as UTF-8, to make sure most people are not affected by any slow down this introduces.
2011-10-07 12:00:26 +02:00
Fabien Potencier
a4413b828b merged branch helmer/return_void (PR #2337)
Commits
-------

c4226bb Removed redundant "@return void"-s

Discussion
----------

Removed redundant "@return void"-s

.. as mandated by [symfony-docs](https://github.com/symfony/symfony-docs) [PR#754](https://github.com/symfony/symfony-docs/pull/754)
2011-10-07 11:59:30 +02:00
Fabien Potencier
aeb27ebebb merged branch stloyd/date_time_validator_tests (PR #2338)
Commits
-------

d7c9644 [Validator] Extend and fix DateValidator & TimeValidator tests

Discussion
----------

[2.0][Validator] Extend and fix DateValidator & TimeValidator tests

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-07 11:56:54 +02:00
Jordi Boggiano
5473d3b6c9 [Translation] Allow use of UTF-8 encoded catalogues into non-UTF-8 applications 2011-10-07 11:21:05 +02:00
Jordi Boggiano
deb6dea76d [Translation] Add failing tests to verify that UTF-8 lang files can't be used with another charset 2011-10-07 11:20:16 +02:00
Joseph Bielawski
d7c9644d29 [Validator] Extend and fix DateValidator & TimeValidator tests 2011-10-07 10:47:59 +02:00
Helmer Aaviksoo
c4226bb6dc Removed redundant "@return void"-s 2011-10-07 11:15:35 +03:00
Fabien Potencier
a74ae9d325 [HttpFoundation] made X_REWRITE_URL only available on Windows platforms 2011-10-07 08:20:12 +02:00
Fabien Potencier
0e852fe232 Merge branch '2.0'
* 2.0:
  [DoctrineBundle] fixed a unit test (detected thanks to PHP 3.6.0)
  [Form] Fixed lacking attributes in DateTimeType
2011-10-06 21:40:44 +02:00
Fabien Potencier
15f19e50fc [DoctrineBundle] fixed a unit test (detected thanks to PHP 3.6.0) 2011-10-06 21:40:38 +02:00
Fabien Potencier
3f567b8208 [FrameworkBundle] moved a parameter in the same file as the one where the service is defined for better consistency 2011-10-05 19:17:58 +02:00
Fabien Potencier
5fe18cad90 merged branch fivestar/fix-form-datetime-2_0 (PR #2326)
Commits
-------

828b18f [Form] Fixed lacking attributes in DateTimeType

Discussion
----------

[Form] Fixed lacking attributes in DateTimeType

Added invalid_message and invalid_message_parameters. (Moved from #2311)
2011-10-05 11:21:28 +02:00
Katsuhiro OGAWA
828b18f467 [Form] Fixed lacking attributes in DateTimeType 2011-10-05 17:57:43 +09:00
Fabien Potencier
69922c41a9 merged branch SongoQ/polish_translations (PR #2319)
Commits
-------

4909169 Typo, should be "znaków"

Discussion
----------

[FrameworkBundle] Polish validator translations - Typo, should be "znaków"
2011-10-04 16:20:42 +02:00
Fabien Potencier
79bea5677a merged branch yethee/ru_translations (PR #2318)
Commits
-------

9219cf9 [FrameworkBundle] Sync the Russian translations with the SizeLength constraint

Discussion
----------

[FrameworkBundle] Sync the Russian translations with the SizeLength const
2011-10-04 16:20:32 +02:00
Marcin Chylek
4909169ca4 Typo, should be "znaków" 2011-10-04 15:05:36 +02:00
Deni
9219cf9f7d [FrameworkBundle] Sync the Russian translations with the SizeLength constraint 2011-10-04 16:49:04 +04:00
Fabien Potencier
92420ad6c9 merged 2.0 2011-10-04 13:49:11 +02:00
Fabien Potencier
1f2e72d84a updated VERSION for 2.0.4 2011-10-04 13:47:14 +02:00
Fabien Potencier
408c913991 update CONTRIBUTORS for 2.0.4 2011-10-04 13:46:51 +02:00