Commit Graph

6668 Commits

Author SHA1 Message Date
Jeremy Mikola
83199aec00 [FrameworkBundle] Fix unintuitive merging behavior for assets_base_urls
See: 4061114562
2011-09-19 11:42:07 -04:00
Johannes M. Schmitt
4061114562 [FrameworkBundle] fixes unintuitive merging behavior 2011-09-16 17:09:10 +02:00
Fabien Potencier
83b69e6d8c [Translation] renamed a method 2011-09-16 13:27:17 +02:00
Fabien Potencier
bede42065e [Config] fixed FileResource usage of is_file (we must use file_exists here as the resource can be a file or a directory, reverts #2057) 2011-09-16 13:20:41 +02:00
Fabien Potencier
5526072dba [Translation] added support for more than one fallback locale 2011-09-15 08:19:52 +02:00
Fabien Potencier
3a4d1a6a22 merged 2.0 branch 2011-09-15 07:39:20 +02:00
Fabien Potencier
9ffd8ca99c [Translation] renamed hasStrict() to defines() 2011-09-14 22:49:04 +02:00
Fabien Potencier
79710edb8a [Translation] added a MessageCatalogue::hasStrict() method to check if a string has a translation (but without taking into account the fallback mechanism) 2011-09-14 22:31:14 +02:00
Fabien Potencier
c50a3a194d [Translation] fixed transchoice when used with a fallback 2011-09-14 22:31:09 +02:00
Fabien Potencier
c985ffaa99 [Translation] fixed message selector when the message is empty (closes #2144) 2011-09-14 22:04:39 +02:00
Fabien Potencier
55eaf4e0f5 merged branch danielholmes/master (PR #2031)
Commits
-------

777f876 [HttpFoundation] Added test that exposes error in session saving

Discussion
----------

[HttpFoundation] Added test that exposes error in session saving

Noticed this commit in the recent release:

https://github.com/symfony/symfony/commit/34a1b53

And noticed that the save in __destruct won't be fired if a manual save has been called. The testSavedOnDestructAfterManualSave test I've added fails on 2.0.1 but it passes with 2.0.0. An example:

$session->set('foo', 'value');
$session->__destruct(); // eventually called during shutdown, triggers a save
// During next request, $session->get('foo') returns 'value'

$session->set('foo', 'value');
$session->save();
$session->set('foo', 'newvalue');
$session->__destruct(); // eventually called during shutdown, however WON'T trigger save
// During next request, $session->get('foo') returns 'value'

In my eyes the save on destruction should still happen whether a save has been called manually or not - it's more predictable. But i can see arguments for the opposite as well.

If consensus is that this is a bug, I'm happy to provide a fix but wanted to get feedback on the 2 options:

 * Save optimisation can be reverted
 * Can make the save optimisation more intelligent so a write to storage is only done if something has changed. The best way to do this would be to close down the api and mark the session as invalid when an attribute is set for example, however all properties are currently protected and would need to be private, so it might break some people's extensions of session

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

by stof at 2011/09/04 02:13:52 -0700

@fabpot what about it ?
2011-09-14 20:55:06 +02:00
Fabien Potencier
27ba003e5e [HttpFoundation] changed the strategy introduced in a5ccda47b4 to fix functional tests and still allow to call save more than once for a Session 2011-09-14 20:54:45 +02:00
Fabien Potencier
28cc53130d merged branch e-butik/session-invalidation-2.0 (PR #2180)
Commits
-------

ff99d80 Changed the behavior of Session::regenerate to destroy the session when it invalidates it.

Discussion
----------

Changed the behavior of Session::regenerate to destroy the old session when invalidates it.

When invalidating a session, I've yet to find a reason for the storage not to destroy the old session.

If the intent of the method is to invalidate the session, there's no reason at all to keep the old session around in storage, since it's supposed to be invalid.

(New PR with changed base from #2176)
2011-09-14 19:57:15 +02:00
Magnus Nordlander
ff99d80a8e Changed the behavior of Session::regenerate to destroy the session when it invalidates it. 2011-09-14 19:52:25 +02:00
Fabien Potencier
532b0b6b59 merged branch jdreesen/trans-fix-1 (PR #2173)
Commits
-------

e98cbc3 fixed typo

Discussion
----------

Fixed typo in the hebrew translation file
2011-09-14 16:48:19 +02:00
Fabien Potencier
8fb1c620a6 merged branch e-butik/sv-validator-translation-2.0 (PR #2178)
Commits
-------

b15d80e Added missing translation for Swedish

Discussion
----------

Added missing translation for Swedish

A missing Swedish translation for "One or more of the given values is invalid" was added.

(New PR with changed base from #2177)
2011-09-14 16:29:31 +02:00
Magnus Nordlander
b15d80edc9 Added missing translation for Swedish 2011-09-14 16:24:18 +02:00
jdreesen
e98cbc3077 fixed typo 2011-09-14 11:59:16 +02:00
Fabien Potencier
c697b8fc1c merged branch aboks/classloader_test (PR #2154)
Commits
-------

a7b5c1c [Classloader] Fixed failing test on Windows

Discussion
----------

[Classloader] Fixed failing test on Windows
2011-09-14 10:45:09 +02:00
Fabien Potencier
c5e0c80a76 [HttpFoundation] made FileBinaryMimeTypeGuesser command configurable 2011-09-14 09:45:15 +02:00
Fabien Potencier
f9ecdfeb05 [FrameworkBundle] added sc parameters replacement in route requirements 2011-09-14 09:19:55 +02:00
Fabien Potencier
b5783dffe1 updated CHANGELOG for 2.1 2011-09-14 09:06:29 +02:00
Fabien Potencier
fabec37edc [FrameworkBundle] added tests for DIC parameters replacements in route defaults 2011-09-14 09:06:00 +02:00
Fabien Potencier
400159de4f [FrameworkBundle] made DIC placeholders replacement in route defaults only when the parameter exists in the container 2011-09-14 08:49:02 +02:00
Fabien Potencier
53b4cd8c9c [FrameworkBundle] made code more robust 2011-09-14 08:48:23 +02:00
Fabien Potencier
92d35c81c0 [FrameworkBundle] fixed CS and phpdoc 2011-09-14 08:47:38 +02:00
Fabien Potencier
8faf27864d merged branch mvrhov/route_dic_params (PR #1934)
Commits
-------

13b77bf Treat defaults enclosed between % as parameters from dic This allows as to define default like this

Discussion
----------

[Route] Treat defaults enclosed between % as parameters from dic

This allows as to define default like this

foo:
    pattern:  /{_locale}/login
    defaults:
        _controller: my_login_controller:loginAction
        _locale: %session.default_locale%

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

by lsmith77 at 2011/08/10 07:00:14 -0700

this is a bit of a BC break .. but in general it does address a huge need for being able to make routes more easily configurable.

also didnt check this, but we should make sure that this doesnt open any security issues.

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

by maoueh at 2011/08/10 08:31:18 -0700

Hi,

There is an issue pending for the same feature here #1718. Maybe this one could be linked to #1718 somehow.

Regards,
Matt

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

by fabpot at 2011/09/12 23:51:53 -0700

@lsmith77: Why is it a BC break?

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

by lsmith77 at 2011/09/13 00:04:46 -0700

well its only a BC break on the off chance that someone puts stuff enclosed in % in the defaults atm and does not expect them to be interpreted as parameters. not very likely. but at the least we might want to first check if the parameter exists before replacing it.

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

by mvrhov at 2011/09/13 23:28:48 -0700

So, do I check if parameter exists inside dic and throw a notice if not, or do I just fix the comment?
2011-09-14 08:42:27 +02:00
Fabien Potencier
73c8d2ba74 [Form] fixed error bubbling for Date and Time types when rendering as multiple choices (closes #2062) 2011-09-14 08:30:47 +02:00
Fabien Potencier
ea930e5255 merged branch excelwebzone/hebrew_translations (PR #2164)
Commits
-------

ce056d6  Updated hebrew translation for validators

Discussion
----------

Updated hebrew translation for validators

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

by stof at 2011/09/13 08:33:48 -0700

Could you add the trans-unit 41 in the 2.0 branch ?

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

by excelwebzone at 2011/09/13 18:49:33 -0700

just added https://github.com/symfony/symfony/pull/2170
2011-09-14 07:47:39 +02:00
Fabien Potencier
78c1d75c36 merged branch excelwebzone/2.0 (PR #2170)
Commits
-------

c05ef6c  Added trans-unit "41" (hebrew translation)

Discussion
----------

Added trans-unit "41" (hebrew translation)
2011-09-14 07:47:27 +02:00
excelwebzone
c05ef6ce99 Added trans-unit "41" (hebrew translation) 2011-09-13 18:47:49 -07:00
Fabien Potencier
27dcc187f6 bumped versions of Swiftmailer 2011-09-13 17:09:48 +02:00
Fabien Potencier
cfc202be93 bumped versions of Twig and Swiftmailer 2011-09-13 17:09:09 +02:00
excelwebzone
ce056d6b02 Updated hebrew translation for validators 2011-09-13 07:21:52 -07:00
Fabien Potencier
b3141b4b46 merged branch stealth35/typo_rb (PR #2161)
Commits
-------

1fc01fc [Translation] typo in ResourceBundleLoader

Discussion
----------

[Translation] typo in ResourceBundleLoader

e6e5146ccb (L1R33)
2011-09-13 13:30:23 +02:00
stealth35
1fc01fcd1f [Translation] typo in ResourceBundleLoader 2011-09-13 13:21:32 +02:00
Fabien Potencier
b016b04967 updated CHANGELOG for 2.1 2011-09-13 08:49:25 +02:00
Fabien Potencier
affb0cbca2 merged branch stealth35/trans_rb (PR #2136)
Commits
-------

e6e5146 [Translation] now support ResourceBundle

Discussion
----------

[2.1][Translation] now support ResourceBundle

support `.res` and `.dat` bundles

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

by marijn at 2011/09/08 08:59:39 -0700

There are a few references to `ressource`, I guess that is a typo...

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

by stealth35 at 2011/09/08 09:13:32 -0700

@marijn thank, done

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

by fabpot at 2011/09/11 00:42:37 -0700

Is it possible to add a dumper like we have for all other loaders?

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

by stof at 2011/09/11 03:46:39 -0700

Btw, you need to rebase your branch as it conflicts with master

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

by stealth35 at 2011/09/11 04:04:23 -0700

@fabpot it's more difficult (or the easy way it's to use `exec` with `derb`), I can create the text resources
@stof oki

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

by fabpot at 2011/09/11 23:52:19 -0700

@stealth35: Can you remove the `@api` tags? We will review what is included into the public API later on. thanks.

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

by stealth35 at 2011/09/12 04:18:07 -0700

@fabpot done
2011-09-13 08:49:05 +02:00
Fabien Potencier
26a65d61b1 updated CHANGELOG for 2.1 2011-09-13 08:48:32 +02:00
Fabien Potencier
51403530b9 merged branch stealth35/http_found_auth (PR #2029)
Commits
-------

aecfd0a [HttpFoundation] Support user and password in url

Discussion
----------

[HttpFoundation] Support user and password in url

Allow `http://user:password@test.com` for url request and `basic auth`

Added Methods for `Request`
  - `getUser`
  - `getPassword `

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

by stealth35 at 2011/08/26 07:52:57 -0700

@seldaek @stof thanks guys it's done

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

by stof at 2011/08/28 11:52:11 -0700

btw, you should rebase your branch on top of the upstream master branch as it conflicts

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

by stealth35 at 2011/08/28 13:15:55 -0700

@stof done

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

by stof at 2011/09/04 02:09:11 -0700

@stealth35 you made an error when rebasing: you merged the previous version of the branch instead of forcing the push, thus duplicating all commits in the PR (rebasing rewrites the history so it creates new commits). Could you clean your branch ?

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

by stealth35 at 2011/09/05 02:00:17 -0700

@stof 👍

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

by stealth35 at 2011/09/06 08:21:00 -0700

should be 2.0 ?

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

by fabpot at 2011/09/11 23:52:30 -0700

@stealth35: Can you remove the `@api` tags? We will review what is included into the public API later on. thanks.

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

by stealth35 at 2011/09/12 04:02:01 -0700

@fabpot done
2011-09-13 08:47:11 +02:00
Fabien Potencier
47b7860450 updated CHANGELOG for 2.1 2011-09-13 08:46:58 +02:00
Arnout Boks
a7b5c1c076 [Classloader] Fixed failing test on Windows 2011-09-12 13:21:31 +02:00
stealth35
e6e5146ccb [Translation] now support ResourceBundle 2011-09-12 13:17:14 +02:00
stealth35
aecfd0a891 [HttpFoundation] Support user and password in url 2011-09-12 13:01:04 +02:00
Fabien Potencier
c6663601ab merged branch snc/chmod-fixes-2.0 (PR #2143)
Commits
-------

3e2f1a4 Removed executable bits from all php files

Discussion
----------

[2.0] Removed executable bits from all PHP files
2011-09-09 18:01:40 +02:00
H. Westphal
3e2f1a4b13 Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Fabien Potencier
18d3dfe0bf merged branch snc/chmod-fixes (PR #2130)
Commits
-------

a0a97c6 Removed executable bits from all php files

Discussion
----------

Removed executable bits from all PHP files

Some files had a file mode of 755 and this PR changes them to 644. The reason behind this is that git always thinks that those files are changed when accessing the repository via a samba share on windows (tested with PhpStorm).

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

by fabpot at 2011/09/09 05:51:30 -0700

That was on my radar too. Can you do the same for the 2.0 branch?
2011-09-09 14:51:44 +02:00
Fabien Potencier
17f115104d merged branch chx/2.0 (PR #2141)
Commits
-------

24b80ae Removed a leftover use.

Discussion
----------

Removed a leftover use.

lsmith told me to put in this request instead.
2011-09-09 14:50:48 +02:00
Fabien Potencier
b99bb1e31b merged branch michelsalib/translation-command (PR #2051)
Commits
-------

ef322f6 -- add command that extracts translation messages from templates

Discussion
----------

[2.1] Extracting translation messages from templates

As seen here #1283 and here #2045, I push the command that extract translation from templates.

There are still a lot of new things here, but it seems more manageable.

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

by stof at 2011/09/04 02:04:40 -0700

@michelsalib Could you try to refactor the code to make it more flexible by moving the creating of the file to the dumpers to support other outputs (database...) ?

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

by michelsalib at 2011/09/04 02:35:50 -0700

You are right, I shall do it tonight.

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

by michelsalib at 2011/09/04 11:53:35 -0700

I just pushed a refactoring that should allow more flexibility. Dumpers are now responsive for writing the files. This way it is now possible to implement the DumperInterface that dump to a database and add it to the TranslationWriter.
I updated the tests accordingly.

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

by fabpot at 2011/09/05 23:27:27 -0700

To be consistent with other dumpers in the framework, the dumpers extending `FileDumper` should use `FileDumper` as a suffix like in `YmlFileDumper`.

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

by fabpot at 2011/09/05 23:41:12 -0700

A general note on PHPDoc: The first line of a phpdoc ends with a dot and starts with a present verb like in  `Extracts translation messages from template files.`

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

by michelsalib at 2011/09/06 01:23:31 -0700

I fixed most of the remarks. I just need to go through the phpdoc (in a few minutes).

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

by stloyd at 2011/09/06 01:28:55 -0700

@michelsalib you should use `git rebase` (see [docs](http://symfony.com/doc/current/contributing/code/patches.html#id1)) instead of `git merge`.

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

by michelsalib at 2011/09/06 01:31:06 -0700

@stloyd sorry. I will rebase (squash) everything when I am finished.

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

by kaiwa at 2011/09/06 01:31:18 -0700

Hey, it might be a little bit late, but may i ask a not code-related question?

Is it correct that the `--force` option only means to write the output to a file instead of writing it to stdout?

If so,

1. is it semantically correct? I mean... i'm not a native english speaker, but from unix programs i'm used to interpret a `--force` option as something like "overwrite", "ignore errors" or "suppress warnings". An option which is used in case of trouble most time. Feels confusing to me to be forced ;-) to use the `--force` option for simply writing to files.

2. does it makes sense to have a default behaviour instead of requiring the user to give either `--force` or `--dump-messages`? In which cases does the user wants to dump the messages to the console? Is it only for debugging / to review the messages?

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

by michelsalib at 2011/09/06 01:33:58 -0700

@kaiwa Your concerns seems perfectly right. Initially I just wanted to mimic the `doctrine:schema:update` command. But it can be changed.
@fabpot what do you think ?

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

by michelsalib at 2011/09/06 02:01:22 -0700

@stloyd I tried to do a `git rebase` and I am quite lost. I think I messed something when merge instead of rebase. How can I clean/squash my PR properly ?

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

by stloyd at 2011/09/06 02:11:29 -0700

@michelsalib for now just work as it is ;-) When I back from work I will try to help you to rebase it properly.

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

by michelsalib at 2011/09/06 02:12:17 -0700

@stloyd Thank you !

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

by stloyd at 2011/09/06 12:39:18 -0700

@michelsalib I was trying to rebase your code and revert it this _bad_ commit (merge), but without success.

IMO best way would be making _brand new_ branch based on symfony/master, and the `git cherry-pick` ([hint](http://ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch)) commits you need (almost all in this PR but without this one with merge), then you will need to apply again _by hand_ changes from commit fce24c7fa2 (this clean up you have done there).

I'm sorry I can't give you more help...

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

by michelsalib at 2011/09/07 09:41:36 -0700

@stloyd I finally succeed to fix this PR. Thanks to your help! I must admit the whole thing with `cherry-pick` command was quite epic.
@fabpot Don't be sorry, I am about to fix the PHPDoc. I shall squash right after.

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

by michelsalib at 2011/09/07 10:07:20 -0700

I just squashed and did a last polish of the code. You might want to read it again before merge.

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

by fabpot at 2011/09/07 11:40:48 -0700

 ok, code looks really good now. I think the only missing thing is some more unit tests (for the extractors for instance).

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

by michelsalib at 2011/09/07 12:18:59 -0700

Thanks, I'll look into it tomorrow.

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

by michelsalib at 2011/09/08 15:13:10 -0700

Hi,
I just added unit tests for both extractors (php and yaml).
Concerning the yaml extractor, the test is quite tricky because I need to mock the twig environment while returning a twig tree that contain a trans block and a trans filter. But it work fine with as little side effects as possible. Also I am not sure that the test should be in the TwigBundle.
IMO, the PR seems ready.

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

by stof at 2011/09/08 15:34:41 -0700

As the extractor is in bridge, the tests should be in the folder containing the tests for the bridge in tests/

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

by michelsalib at 2011/09/08 15:41:45 -0700

Thanks @stof, it is now fixed.

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

by michelsalib at 2011/09/09 00:48:47 -0700

thanks @stloyd, it is fixed now.

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

by michelsalib at 2011/09/09 01:25:24 -0700

Fixed again ;)
2011-09-09 11:17:04 +02:00
Karoly Negyesi
24b80aedf3 Removed a leftover use. 2011-09-09 02:13:17 -07:00