Commit Graph

7367 Commits

Author SHA1 Message Date
Ryan Weaver
2270a4da5a [Bridge][Doctrine] Adding a catch for when a developer uses the EntityType with multiple=false but on a "hasMany" relationship
Without this, the exception is eventually thrown in EntityChoiceList::getIdentifierValues() with a very a message that doesn't really suit the real error: "Entities passed to the choice field must be managed"
2011-10-10 08:26:22 -05:00
Fabien Potencier
beda03ba96 updated all HttpKernel event listeners to implement EventSubscriberInterface 2011-10-10 14:54:49 +02:00
Fabien Potencier
38fb43c5f5 [FrameworkBundle] fixed wrong class name 2011-10-10 14:41:48 +02:00
Fabien Potencier
7a89d34872 [HttpKernel] made RouterListener implement EventSubscriberInterface 2011-10-10 14:30:15 +02:00
Fabien Potencier
4539e5c554 moved configuration of the default HTTP and HTTPS ports from RouterListener to RequestContext 2011-10-10 13:24:45 +02:00
Fabien Potencier
658722b2eb moved some logic from HttpKernel to Routing (make it reusable) 2011-10-10 13:07:36 +02:00
Fabien Potencier
8f15794274 moved LocaleListener and RouterListener to the HttpKernel component 2011-10-10 13:03:55 +02:00
Tigran Azatyan
249164d9b2 fixed typos 2011-10-10 14:44:40 +06:00
Tigran Azatyan
f4b78051fc Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hy.xliff via GitHub 2011-10-10 14:42:02 +06:00
Tigran Azatyan
4cc1ed004c Edited src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hy.xliff via GitHub 2011-10-10 14:29:06 +06:00
Tigran Azatyan
6a23e5fabf fixed typos 2011-10-10 14:27:36 +06:00
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
Lukas Kahwe Smith
d3f137b9c1 cosmetic tweak 2011-10-09 16:09:22 +02:00
Lukas Kahwe Smith
28778834c7 anything in front of ;q= is part of the mime type, anything after may be ignored
see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
2011-10-09 12:58:45 +02:00
Tigran Azatyan
5b9d92ae62 Fixed some errors 2011-10-09 16:45:31 +06:00
Fabien Potencier
d233c44e98 merged branch ioalessio/2.0 (PR #2363)
Commits
-------

dd0d6fd fixing italian messages

Discussion
----------

italian messages

"bug fix" for branch 2.0
2011-10-09 08:39:22 +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
Alessio
dd0d6fd15b fixing italian messages 2011-10-09 02:40:44 +03: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
Johannes Schmitt
1b577277ec removed unused use statements 2011-10-08 07:09:31 +02:00
Johannes Schmitt
fd67c784dd updated implementation to re-use the existing build() method 2011-10-08 07:07:38 +02:00
Johannes Schmitt
59e2e97055 improves extensibility between bundles 2011-10-07 21:41:07 +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