Commit Graph

13341 Commits

Author SHA1 Message Date
Fabien Potencier
380306717c merged branch trivago/webprofiler_redis_add_select (PR #7177)
This PR was squashed before being merged into the 2.1 branch (closes #7177).

Commits
-------

c82c754 RedisProfilerStorage wrong db-number/index-number selected

Discussion
----------

RedisProfilerStorage wrong db-number/index-number selected

bug: in the webprofiler the wrong database (0) is selected when storage should not go to index 0. on redis connect the default behaviour is to select index/database number 0, but it is necessary to select a special index/database.
see: http://rediscookbook.org/multiple_databases.html

[HttpKernel] [Profiler] [RedisProfilerStorage] added select for a db-number/db-index to dsn-patttern

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| Fixed tickets |
| License       | MIT

Usage with index/db-number = 7 :
```xml
<!-- config_dev.xml -->

<symfony:profiler only-exceptions="false" dsn="redis://127.0.0.1:6379/7" lifetime="3600" />

```

```yml
#config_dev.yml

framework:
...
    profiler:
    ...
        dsn: redis://127.0.0.1:6379/7

```

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

by fabpot at 2013-02-27T07:21:02Z

Can you also add some unit tests?

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

by JohnDoe007 at 2013-02-27T09:36:28Z

@fabpot the function getRedis() is currently not testable, I think. this means I have to do a bigger change to the class, add a public function initRedis() or something and move initialize code there to make the initialization process, where my change is, testable. is this ok to do it in that bugfix/pull request? or should I add this test change to master and only adding this small bugfix to the 2.1-branch?

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

by fabpot at 2013-03-06T16:47:37Z

Thanks, I've merged the fix. Can you work on the changes needed to allow the code to be testable (on the master branch)?
2013-03-06 17:50:58 +01:00
René Kerner
c82c754b8e RedisProfilerStorage wrong db-number/index-number selected 2013-03-06 17:50:58 +01:00
Fabien Potencier
446f56847b merged branch jfsimon/issue-7232-2.1 (PR #7236)
This PR was merged into the 2.1 branch.

Commits
-------

6681df0 [Console] fixed StringInput binding
6b98883 [Console] added string input test
32f1904 Revert "merged branch jfsimon/issue-6749 (PR #7220)"

Discussion
----------

[Console] fixes tests

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7231

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

by gigablah at 2013-03-02T13:25:10Z

Apparently 5b19c892cf broke the console shell. I was wondering why all commands executed through the shell in 2.2.0 were throwing "Too many arguments" exception.

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

by stof at 2013-03-02T13:27:09Z

@gigablah This is already fixed in the 2.2 branch as this PR has already been merged in 2.2 (but the revert is also needed in 2.1)

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

by gigablah at 2013-03-02T13:51:44Z

Ah, guess I'll have to wait for it to be pushed to the symfony/console repository then.
2013-03-06 17:40:53 +01:00
Fabien Potencier
dcb1441d23 [DependencyInjection] added a test for the previous merge (refs #7261) 2013-03-06 17:38:10 +01:00
Fabien Potencier
71cba81b89 merged branch chx/master (PR #7261)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7261).

Commits
-------

ff8c5ca Unset loading[$id] in ContainerBuilder on exception

Discussion
----------

Unset loading[$id] in ContainerBuilder on exception

This is the same functionality that Container provides.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

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

by vicb at 2013-03-04T22:43:07Z

could you add a unit test and use the standard PR header (symfony.com > doc > contributing). thanks.

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

by igorw at 2013-03-04T22:48:02Z

Can you add a test case? EDIT: I guess someone beat me to that comment. :)
2013-03-06 17:37:21 +01:00
chx
e86fefa709 Unset loading[$id] in ContainerBuilder on exception 2013-03-06 17:37:21 +01:00
Fabien Potencier
d0022e31d7 merged branch Tobion/deprecation-trigger (PR #7266)
This PR was merged into the 2.2 branch.

Commits
-------

c0687cd remove() should not use deprecated getParent() so it does not trigger deprecation internally
708c0d3 adjust routing tests to not use prefix in addCollection
6180c5b add test for uniqueness of resources
c0de07b added tests for addDefaults, addRequirements, addOptions
0a1cfcd adjust RouteCollectionTest for the addCollection change and refactor the tests to only skip the part that really needs the config component
ea694e4 added tests for remove() that wasnt covered yet and special route name
9e2bcb5 refactor interator test that was still assuming a tree
ceb9ab4 adjust tests to no use addPrefix with options
2b8bf6b adjusted tests to not use RouteCollection::getPrefix
acff735 [Routing] trigger deprecation warning for deprecated features that will be removed in 2.3

Discussion
----------

[2.2][Routing] Trigger deprecation and refactor tests to not use deprecated methods

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| License       | MIT

@fabpot please don't squash because it also added new tests
2013-03-06 17:23:04 +01:00
Fabien Potencier
5e3756fae0 merged branch mmuruev/patch-1 (PR #7278)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7278).

Commits
-------

0cf2656 Default validation message translation fix.

Discussion
----------

Default validation message translation fix.

Add 'validators' for $translationDomain. Detailed discussion https://github.com/fabpot/Silex/pull/641

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

by fabpot at 2013-03-06T08:17:43Z

ping @bschussek

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

by stof at 2013-03-06T08:43:53Z

@fabpot Using ``null`` as translation domain would make weird things in the Translator component. So this change is needed IMO to have a sensible default.

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

by bschussek at 2013-03-06T10:42:59Z

👍
2013-03-06 17:05:34 +01:00
Maksim Muruev
709518bafd Default validation message translation fix.
Add 'validators' for $translationDomain. Detailed discussion https://github.com/fabpot/Silex/pull/641
2013-03-06 17:05:34 +01:00
Tobias Schultze
c0687cd5fa remove() should not use deprecated getParent() so it does not trigger deprecation internally 2013-03-05 15:23:59 +01:00
Tobias Schultze
708c0d3ff9 adjust routing tests to not use prefix in addCollection 2013-03-05 15:23:58 +01:00
Tobias Schultze
6180c5b031 add test for uniqueness of resources 2013-03-05 15:23:57 +01:00
Tobias Schultze
c0de07b960 added tests for addDefaults, addRequirements, addOptions 2013-03-05 15:23:56 +01:00
Tobias Schultze
0a1cfcdb5f adjust RouteCollectionTest for the addCollection change and refactor the tests to only skip the part that really needs the config component 2013-03-05 15:23:56 +01:00
Tobias Schultze
ea694e445d added tests for remove() that wasnt covered yet and special route name 2013-03-05 15:23:55 +01:00
Tobias Schultze
9e2bcb5d9e refactor interator test that was still assuming a tree 2013-03-05 15:23:54 +01:00
Tobias Schultze
ceb9ab44a4 adjust tests to no use addPrefix with options 2013-03-05 15:23:53 +01:00
Tobias Schultze
2b8bf6beec adjusted tests to not use RouteCollection::getPrefix 2013-03-05 15:23:53 +01:00
Tobias Schultze
acff7356ce [Routing] trigger deprecation warning for deprecated features that will be removed in 2.3 2013-03-05 15:23:52 +01:00
Tobias Schultze
54c333dc25 [Routing] unify and fix the loader tests 2013-03-05 15:04:24 +01:00
Tobias Schultze
41ad9d8eb2 [Routing] make xml loader more tolerant
schemes and methods may also be delimited by whitespace, comma or pipe.
this eases migration as now schemes="GET|POST" also works
2013-03-05 15:01:56 +01:00
Kris Wallsmith
bb08247ece [ClassLoader] tweaked test 2013-03-03 08:31:27 -08:00
Kris Wallsmith
73bead7eb6 [ClassLoader] made DebugClassLoader idempotent 2013-03-02 11:24:53 -08:00
Dmitrii Chekaliuk
a4ec6772df [DomCrawler] Fix relative path handling in links
Added relative path canonicalization according to RFC 3986, section 5.2.4
2013-03-02 17:23:18 +02:00
Jean-François Simon
6681df0a12 [Console] fixed StringInput binding 2013-03-01 17:50:10 +01:00
Jean-François Simon
6b98883903 [Console] added string input test 2013-03-01 17:44:08 +01:00
Jean-François Simon
32f190481a Revert "merged branch jfsimon/issue-6749 (PR #7220)"
This reverts commit f52120bdd3, reversing
changes made to 66c2be30d0.
2013-03-01 17:42:51 +01:00
Fabien Potencier
49984b6fba merged branch pborreli/patch-6 (PR #7228)
This PR was merged into the 2.2 branch.

Commits
-------

c6c71bf Fixed trailing whitespace

Discussion
----------

Fixed trailing whitespace
2013-03-01 15:58:56 +01:00
Fabien Potencier
ff00f9856a merged branch jfsimon/console-tests-fix (PR #7232)
This PR was merged into the 2.2 branch.

Commits
-------

5bf2f71 [Console] added deprecation annotation
f95f8e2 [Console] added string input test
4b12118 Revert "merged branch jfsimon/issue-6749 (PR #7220)"

Discussion
----------

[Console] fixes tests

Previous `StringInputTest::testInputOptionWithGivenString` test was broken.
Trying make it pass broke the way `StringInput` is used in the console.

Two things to know abour the `StringInput` class in its actual state:
*  the second argument in the constructor is useless
*  the `bind` method **must** be called in order to access arguments/options

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
2013-03-01 15:57:26 +01:00
Jean-François Simon
5bf2f7110f [Console] added deprecation annotation 2013-03-01 15:42:44 +01:00
Jean-François Simon
f95f8e2a3b [Console] added string input test 2013-03-01 15:41:03 +01:00
Jean-François Simon
4b12118bc2 Revert "merged branch jfsimon/issue-6749 (PR #7220)"
This reverts commit f52120bdd3, reversing
changes made to 66c2be30d0.
2013-03-01 15:36:15 +01:00
Fabien Potencier
62baab5b36 fixed CS 2013-03-01 11:42:10 +01:00
Fabien Potencier
0e7b5fb3bb fixed CS 2013-03-01 11:39:52 +01:00
Pascal Borreli
c6c71bf826 Fixed trailing whitespace 2013-03-01 09:15:25 +00:00
Fabien Potencier
7d9688dc6d merged branch fzerorubigd/master (PR #7226)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7226).

Commits
-------

80aa012 Add persian translation to Components/Security

Discussion
----------

Add Persian (farsi) Translation to Component/Security

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | somehow :)
| BC breaks?    | no
| Tests pass?   | yes
| License       | MIT

Just add farsi translation to Component/Security
2013-03-01 10:02:55 +01:00
fzerorubigd
4e72983bb2 Add persian translation to Components/Security 2013-03-01 10:02:55 +01:00
Fabien Potencier
2d8f53eb25 bumped Symfony version to 2.2.1-DEV-DEV 2013-03-01 08:52:34 +01:00
Fabien Potencier
23c2be3d32 updated VERSION for 2.2.0 2013-03-01 07:52:29 +01:00
Fabien Potencier
4734354659 updated CHANGELOG for 2.2.0 2013-03-01 07:52:04 +01:00
Fabien Potencier
556ca0cfbd Merge branch '2.1' into 2.2
* 2.1:
  Options small typo
  [Console] fixed unparsed StringInput tokens
  [TwigBridge] fixed trans twig extractor
  [DomCrawler] fix handling of schemes by Link::getUri()
  [Console] Fixed comment
  [TwigBridge] fixed the translator extractor that were not trimming the text in trans tags (closes #7056)
  Fixed handling absent href attribute in base tag
  added a DebuClassLoader::findFile() method to make the wrapping less invasive
  fixed CHANGELOG
  bumped Symfony version to 2.1.9-DEV
  updated VERSION for 2.1.8
  updated CHANGELOG for 2.1.8
  StringInput resets the given options.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-03-01 07:43:14 +01:00
Fabien Potencier
08757db05e Merge branch '2.0' into 2.1
* 2.0:
  [Console] Fixed comment

Conflicts:
	src/Symfony/Component/Console/Output/OutputInterface.php
2013-03-01 07:42:22 +01:00
Fabien Potencier
1114f73ced merged branch yahuarkuntur/master (PR #7224)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7224).

Commits
-------

801a71f [Console] Options small typo

Discussion
----------

[Console] Fix small Options typo

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
2013-02-28 23:03:28 +01:00
Brian Debuire
e2ef708f1a Options small typo 2013-02-28 23:03:28 +01:00
Fabien Potencier
f52120bdd3 merged branch jfsimon/issue-6749 (PR #7220)
This PR was merged into the 2.1 branch.

Commits
-------

5b19c89 [Console] fixed unparsed StringInput tokens
635b1fc StringInput resets the given options.

Discussion
----------

[Console] fixes unparsed StringInput tokens

`StringInput` instances call `setToken` after constructor, `parse` method is called in constructor, so `StringInput` tokens where never parsed.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6749
2013-02-28 18:08:29 +01:00
Jean-François Simon
5b19c892cf [Console] fixed unparsed StringInput tokens 2013-02-28 17:44:20 +01:00
Fabien Potencier
ea5c7f1275 merged branch lmcd/mask-passwords (PR #6482)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6482).

Commits
-------

f3e227a Mask PHP_AUTH_PW header in profiler

Discussion
----------

Mask PHP_AUTH_PW header in profiler

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

by fabpot at 2012-12-27T17:39:26Z

Not sure about this one. Having public access to the web profiler in the production environment is really bad anyway. There is a ton of information that could help an attacker. So, just hiding this specific bit of information won't make it better.

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

by lmcd at 2012-12-27T18:04:45Z

A few scenarios are suggested here where a developer might want the profiler switched on in production: http://symfony.com/doc/current/book/internals.html

I'm talking specifically about someone gaining malicious access to the filesystem. Ripping database tables are somewhat ineffective at stealing user credentials, considering passwords are usually securely hashed nowadays. But the profiler database would have usernames/passwords just sitting there in plaintext.

I know there is lots of information there to aid an attacker, but so is there in most databases (IP addresses, useragents, names, email addresses etc) - but passwords are widely accepted as the *one* thing that should *never* just be stored in plaintext.
2013-02-28 15:46:40 +01:00
Lee McDermott
e92b76c5ff Mask PHP_AUTH_PW header in profiler 2013-02-28 15:46:39 +01:00
Fabien Potencier
bc79f27f70 merged branch kriswallsmith/2.2 (PR #6988)
This PR was merged into the 2.2 branch.

Commits
-------

da22926 [Validator] gracefully handle transChoice errors

Discussion
----------

[Validator] gracefully handle transChoice errors

This validator annotation was throwing an error for me:

```
/** @Assert\Length(min=6, minMessage="Must be 6 characters") */
```

To avoid this error in the current code I would need to provide a message template that accommodates the minimum length being 1, even though that's not the case.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

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

by kriswallsmith at 2013-02-25T19:41:51Z

ping @fabpot

Any thoughts on this change? Having to provide a transChoice template when you know what the pluralization is going to be is a pain in the neck.

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

by kriswallsmith at 2013-02-25T19:42:11Z

ping @bschussek too :)

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

by fabpot at 2013-02-25T19:57:08Z

I'm +1 for this change. What do you think @bschussek?

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

by vicb at 2013-02-26T10:44:33Z

Would this be a common enough use case to be pushed to the translator ?
2013-02-28 15:29:34 +01:00
Fabien Potencier
66c2be30d0 merged branch jfsimon/issue-6943 (PR #7206)
This PR was squashed before being merged into the 2.1 branch (closes #7206).

Commits
-------

bae83c7 [TwigBridge] fixed trans twig extractor

Discussion
----------

[TwigBridge] fixed trans twig extractor

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6943
2013-02-28 15:09:19 +01:00