-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Locale] fixed fallback locale #5641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ping @eriksencosta |
Relevant commit: cacc880 ping @manuelkiessling |
At your service. How can I help? |
See my PR comment. Can you please check my commit to see if these changes make sense? |
I can confirm that this PR is working. But I think the tests needs some more working, to better document the fix. Anyway, thanks @pkraeutli. |
Also add a docblock to stopwatch member variable. Remove docblock from private member
This PR was merged into the master branch. Commits ------- 74e2c5e Fix incorrect inheritdoc blocks Discussion ---------- Fix incorrect inheritdoc blocks Also add a docblock to stopwatch member variable.
This has been done for several reasons: * for consistency with the way we already manage the WDT icons; * it makes the WebProfiler independant from the location of the assets (and from the asset() function) * this is the very first step to make the WebProfiler useable outside the full-stack framework (more commits soon) There is still one asset() call though, which will be removed later on.
This PR was merged into the master branch. Commits ------- 61be89d [Console] [ProgressHelper] better percentage precision Discussion ---------- [Console] [ProgressHelper] better percentage precision With this code : ```php $progress = new ProgressHelper(); $progress->start($output, 50); $progress->display(); $progress->advance(); $progress->advance(); $progress->advance(); $progress->advance(); $progress->advance(); $progress->advance(); ``` The output was : ``` 0/50 [>---------------------------] 0% // float(0) 1/50 [>---------------------------] 0% // float(0) 2/50 [>---------------------------] 0% // float(0) 3/50 [==>-------------------------] 10% // float(0.1) 4/50 [==>-------------------------] 10% // float(0.1) 5/50 [==>-------------------------] 10% // float(0.1) 6/50 [==>-------------------------] 10% // float(0.1) ``` With this PR : ``` 0/50 [>---------------------------] 0% // float(0) 1/50 [>---------------------------] 2% // float(0.02) 2/50 [=>--------------------------] 4% // float(0.04) 3/50 [=>--------------------------] 6% // float(0.06) 4/50 [==>-------------------------] 8% // float(0.08) 5/50 [==>-------------------------] 10% // float(0.1) 6/50 [===>------------------------] 12% // float(0.12) ``` Tests are included. --------------------------------------------------------------------------- by sstok at 2012-10-13T09:22:22Z :+1:
…nformation into the profiler (closes symfony#5733)
The controllers are not relying on the DIC anymore and only Twig is used for rendering (instead of the Templating component). The Exception controller has not been updated yet as it relies on many external dependencies (and other bundles).
This makes the app global variable available also when accessing the Twig environment directly instead of using the TwigEngine.
This PR was merged into the master branch. Commits ------- d427522 [Validator] fixed German translation, see symfony#5675 Discussion ---------- [Validator] fixed German translation see symfony#5675
…the HttpKernel component (using composition now)
@@ -18,6 +18,8 @@ class LocaleTest extends LocaleTestCase | |||
{ | |||
public function testGetDisplayCountriesReturnsFullListForSubLocale() | |||
{ | |||
Locale::setDefault('de_CH'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved after the skip check. Otherwise, it will fail when the intl extension is not loaded (the stub implementation does not allow changing the locale).
Moved locale setting after check for intl extension
…fallback-locale-fix
This PR was merged into the master branch. Commits ------- 3d2a7db Fix a few namespaces to match file system. Discussion ---------- Cleanup Some Tests - tearDown and namespaces Tried to cleanup a few tests and fix a few test classes which weren't following PSR-0. Removed original `tearDown` changes. --- 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: ~ --------------------------------------------------------------------------- by pborreli at 2012-10-13T06:41:14Z from [PHPUnit documentation](http://www.phpunit.de/manual/current/en/fixtures.html#fixtures.more-setup-than-teardown) : >setUp() and tearDown() are nicely symmetrical in theory but not in practice. In practice, you only need to implement tearDown() if you have allocated external resources like files or sockets in setUp(). If your setUp() just creates plain PHP objects, you can generally ignore tearDown(). However, if you create many objects in your setUp(), you might want to unset() the variables pointing to those objects in your tearDown() so they can be garbage collected. The garbage collection of test case objects is not predictable. --------------------------------------------------------------------------- by fabpot at 2012-10-13T10:05:49Z All these tearDown methods are not needed and should be removed.
This PR was merged into the master branch. Commits ------- 63b480e [Console] fixed symfony#5316 Discussion ---------- [Console] [Enhancement] fixes symfony#5316 Bug fix: no Feature addition: yes Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: symfony#5316 --------------------------------------------------------------------------- by marfillaster at 2012-10-05T02:14:55Z I simplified the change. And the reason why tests for text help do not need changes is because in CommandTest, the commands are executed first which also merges app definition before invoking asText or asXml . While in ApplicationTest, commands are never run therefore app definition is not being merged. --------------------------------------------------------------------------- by stof at 2012-10-13T23:13:52Z @fabpot This looks ready to me. Anything left ?
) This PR was squashed before being merged into the master branch (closes symfony#5725). Commits ------- d6be69a [i5669][Console] Adding a note about the list command in the help command Discussion ---------- [i5669][Console] Adding a note about the list command in the help command In order to fix the issue symfony#5669. --------------------------------------------------------------------------- by gnugat at 2012-10-11T09:45:45Z This PR is ready for a first code review. --------------------------------------------------------------------------- by stof at 2012-10-13T22:25:15Z @fabpot 👍
This PR was merged into the master branch. Commits ------- b31ae34 [WebProfilerBundle] Remove the now unneeded BC var and fixed a typo d07ce03 [TwigBundle] Moved the registration of the app global to the environment Discussion ---------- [TwigBundle] Moved the registration of the app global to the environment This makes the app global variable available also when accessing the Twig environment directly instead of using the TwigEngine.
It looks like I messed up the commits in this PR while fixing the tests. Any suggestions on how I can clean this up? Or should I just close this one and create a new one? |
This PR was merged into the master branch. Commits ------- c902966 [DomCrawler] Added ability to set file as raw path to file field Discussion ---------- [2.2][DomCrawler] Added ability to set file as raw path to file field Bug fix: no Feature addition: yes Backwards compatibility break: no Symfony2 tests pass: yes License of the code: MIT For description see symfony#4674 (symfony#4674 (comment)) Related PRs: Behat/MinkBrowserKitDriver#1 https://github.com/Behat/MinkGoutteDriver/pull/7 FriendsOfPHP/Goutte#77 --------------------------------------------------------------------------- by stof at 2012-10-13T21:53:27Z @fabpot anything missing here ?
Moved locale setting after check for intl extension
…fallback-locale-fix
Yes that's how I ended up here. I'll just create a new PR. |
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5746). Commits ------- 96d87ad [Locale] fixed fallback locale Discussion ---------- [Locale] fixed fallback locale The `getFallbackLocale()` method in `Symfony\Component\Locale\Locale` did not return a fallback locale if the current locale (`Locale::getDefault()`) was a 5-char locale like de_CH. `LocaleTest` failed when the locale was set to de_CH before running (see changes in LocaleTest). (second attempt after messing up PR#5641) --------------------------------------------------------------------------- by eriksencosta at 2012-10-15T05:08:25Z Original PR: #5641.
The
getFallbackLocale()
method inSymfony\Component\Locale\Locale
did not return a fallback locale if the current locale (Locale::getDefault()
) was a 5-char locale like de_CH.LocaleTest
failed when the locale was set to de_CH before running (see changes in LocaleTest).