Commit Graph

13236 Commits

Author SHA1 Message Date
Igor Wiedler
e0637fa9b7 [DependencyInjection] Add clone for resources which were introduced in 2.1 2013-02-07 23:54:50 +01:00
Fabien Potencier
648527355d Merge branch '2.0' into 2.1
* 2.0:
  [DependencyInjection] Allow frozen containers to be dumped to graphviz
  Add dot character `.` to legal mime subtype regular expression
  [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
2013-02-07 23:54:36 +01:00
Fabien Potencier
8c250bd9c5 merged branch igorw/graphviz-frozen-container-2.0 (PR #7017)
This PR was merged into the 2.0 branch.

Commits
-------

bd0ad92 [DependencyInjection] Allow frozen containers to be dumped to graphviz

Discussion
----------

[DependencyInjection] Allow frozen containers to be dumped to graphviz

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

This PR replaces #7010.
2013-02-07 23:54:18 +01:00
Fabien Potencier
85557619ba [Routing] fixed previous merge 2013-02-07 23:44:42 +01:00
Fabien Potencier
0f8d417fb1 merged branch canni/fix_traceable_matcher (PR #7009)
This PR was merged into the 2.2 branch.

Commits
-------

30b0c37 [Router] Fix TraceableUrlMatcher

Discussion
----------

[BugFix][Router] Fix TraceableUrlMatcher

TraceableUrlMatcher does not take care with new host route features

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6744
| License       | MIT
| Doc PR        | n/a
2013-02-07 23:44:24 +01:00
Igor Wiedler
bd0ad92559 [DependencyInjection] Allow frozen containers to be dumped to graphviz 2013-02-07 23:33:52 +01:00
Lee McDermott
bf9a483b3e CSS3, HTML5 cleanuos 2013-02-07 22:33:28 +00:00
Fabien Potencier
180699aa4f merged branch lmcd/abbr-fix (PR #7014)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7014).

Commits
-------

d043cb4 Fix style for abbr elements in toolbar

Discussion
----------

[WDT] Fix style for abbr elements in toolbar

Styling for `abbr` elements (e.g. dotted underline) weren't being applied unless you were viewing a profile.
2013-02-07 23:19:05 +01:00
Lee McDermott
61aadd6304 Fix style for abbr elements in toolbar 2013-02-07 23:19:05 +01:00
Fabien Potencier
0c63bbdb01 merged branch ludekstepan/fix-di-scope-nesting (PR #6119)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6119).

Commits
-------

3b9f763 [DI] Fix 'undefined index' error, when entering scope recursively

Discussion
----------

[DI] Fix 'undefined index' error, when entering scope recursively

Imagine two scopes:

```php
$container = new Container();
$container->addScope(new Scope('foo'));
$container->addScope(new Scope('bar', 'foo'));
```

Enter the same scope twice recursively:

```php
$container->enterScope('foo');
// not entering bar in between
$container->enterScope('foo');
// prints warning: undefined index: bar
// at Symfony/Component/DependencyInjection/Container.php:341
```

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

by fabpot at 2012-11-28T16:30:00Z

The problem exists, but the fix looks wrong to me. We should keep the scoped services even with nested scopes. Right now, and even after your patch, we loose some information.

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

by ludekstepan at 2012-11-28T16:38:05Z

I don't know how to fix properly, the patch above is just a workaround.

Without the patch, it's not possible to simply create a child scope of the "request" scope, because "enterScope" would fail upon every forward between "request" and nested "request" unless "bar" scope was entered prior to forward.

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

by stof at 2012-11-28T16:51:50Z

@fabpot why would it be wrong ? If the nested scope was not active when entering a subrequest, there is simply nothing to save

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

by stloyd at 2013-01-04T18:16:54Z

Any news about this one ? =)

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

by stof at 2013-01-04T18:22:58Z

@fabpot could you explain which info we are loosing ?
2013-02-07 23:17:35 +01:00
Ludek Stepan
83e95586e7 Fix 'undefined index' error, when entering scope recursively 2013-02-07 23:17:35 +01:00
Fabien Potencier
10ed567f60 merged branch adriensamson/issue-7011 (PR #7013)
This PR was merged into the 2.1 branch.

Commits
-------

3615e19 [Security] fixed session creation on login (closes #7011)

Discussion
----------

[Security] fixed session creation on login (closes #7011)

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

I fixed the test with UsernamePasswordToken (should start the session) and added a new test without token (should not start session).
2013-02-07 23:05:17 +01:00
Adrien Samson
3615e199d2 [Security] fixed session creation on login (closes #7011) 2013-02-07 21:22:30 +01:00
Dariusz Górecki
30b0c37b68 [Router] Fix TraceableUrlMatcher 2013-02-07 17:30:00 +00:00
Fabien Potencier
8df773201a Merge branch '2.2'
* 2.2:
  [HttpFoundation] fixed Request::create() method
  [HttpKernel] fixed the creation of the Profiler directory
  [HttpKernel] fixed the hinclude fragment renderer when the template is empty
  bumped Symfony version to 2.2.0-RC2-DEV
  [DependencyInjection] enhanced some error messages
  [FrameworkBundle] fixed typo
  fixed typo
  tweaked previous merge
  [Security] fixed interface implementation (closes #6974)
  Add "'property_path' => false" deprecation message for forms
  fixed CS
  Added BCrypt password encoder.
  updated VERSION for 2.2.0-RC1
  Removed underscores from test method names to be consistent with other components.
  [Security] fixed session creation when none is needed (closes #6917)
  [FrameworkBundle] removed obsolete comment (see 2e356c1)
  Micro-optimization
  [FrameworkBundle] removed extra whitespaces
  [Security] renamed Constraint namespace to Constraints for validator classes in order to be consistent with the whole current validator API.
  [FrameworkBundle] fixed wrong indentation on route debug output
2013-02-07 17:43:41 +01:00
Fabien Potencier
7a35cb7c3b merged branch romainneutron/file-binary-guesser (PR #7006)
This PR was merged into the 2.0 branch.

Commits
-------

a12744e Add dot character `.` to legal mime subtype regular expression

Discussion
----------

[HttpFoundation][2.0] Add dot character `.` to legal mime subtype regular expression

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

For example, the following mimetype (used for Microsoft powerpoints) is not recognized given the current regexp : `application/vnd.ms-powerpoint; charset=binary`
2013-02-07 17:36:12 +01:00
Fabien Potencier
f8cf1eb1a2 merged branch fabpot/fragment-fix (PR #6996)
This PR was merged into the 2.2 branch.

Commits
-------

5a2caa5 [HttpKernel] fixed the hinclude fragment renderer when the template is empty

Discussion
----------

[HttpKernel] fixed the hinclude fragment renderer when the template is empty

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

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

by lsmith77 at 2013-02-07T13:36:58Z

does it make sense to allow the template to be empty? i mean isnt this instead an error condition?

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

by fabpot at 2013-02-07T16:16:04Z

Why not? An empty template means and empty content, which you might want as this is just the fallback content displayed when the real content is not loaded yet.
2013-02-07 17:32:34 +01:00
Fabien Potencier
73aa7d128b replaced usage of the deprecated pattern routing key (replaced with path) 2013-02-07 17:29:53 +01:00
Romain Neutron
a12744e30e Add dot character . to legal mime subtype regular expression 2013-02-07 17:24:12 +01:00
Fabien Potencier
3c24f6e39a merged branch fabpot/request-creation-fix (PR #6995)
This PR was merged into the 2.2 branch.

Commits
-------

bc4a0e7 [HttpFoundation] fixed Request::create() method

Discussion
----------

[HttpFoundation] fixed Request::create() method

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

When creating a Request with Request::create(), some information can
come from the URI and the server variable. Until now, it was not clear
which information had precedence over the other and as a matter of fact,
this method was not consistent.

Now, information contained in the URI always take precedence over
information coming from the server array. That makes sense as the server
array is often copied from another existing Request object.

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

by vicb at 2013-02-07T14:42:15Z

You should add a note in the changelog
2013-02-07 16:27:14 +01:00
Fabien Potencier
bc4a0e751e [HttpFoundation] fixed Request::create() method
When creating a Request with Request::create(), some information can
come from the URI and the server variable. Until now, it was not clear
which information had precedence over the other and as a matter of fact,
this method was not consistent.

Now, information contained in the URI always take precedence over
information coming from the server array. That makes sense as the server
array is often copied from another existing Request object.
2013-02-07 16:26:12 +01:00
Fabien Potencier
4b30ae66d5 merged branch fabpot/request-uti-fix (PR #6966)
This PR was merged into the 2.0 branch.

Commits
-------

ddf4678 [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)

Discussion
----------

[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6923, #6936
| License       | MIT
| Doc PR        | n/a

This fixes the creation of a sub-request when the master request Request URI
is determined with specific server information.
2013-02-07 15:53:27 +01:00
Fabien Potencier
3d43bcc540 merged branch fabpot/better-exception-messages (PR #6994)
This PR was merged into the 2.2 branch.

Commits
-------

3053194 [DependencyInjection] enhanced some error messages

Discussion
----------

[DependencyInjection] enhanced some error messages

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a
2013-02-07 14:24:42 +01:00
Fabien Potencier
ed98a5164f Merge branch '2.1' into 2.2
* 2.1:
  [HttpKernel] fixed the creation of the Profiler directory
  [Security] fixed session creation when none is needed (closes #6917)
  [FrameworkBundle] removed obsolete comment (see 2e356c1)
2013-02-07 12:58:45 +01:00
Fabien Potencier
e50d33308a [HttpKernel] fixed the creation of the Profiler directory 2013-02-07 12:58:33 +01:00
Fabien Potencier
5a2caa5e85 [HttpKernel] fixed the hinclude fragment renderer when the template is empty 2013-02-07 12:09:58 +01:00
Fabien Potencier
3446cb219a bumped Symfony version to 2.2.0-RC2-DEV 2013-02-07 12:04:45 +01:00
Kris Wallsmith
da2292681f [Validator] gracefully handle transChoice errors 2013-02-06 12:54:30 -08:00
Fabien Potencier
3053194cd7 [DependencyInjection] enhanced some error messages 2013-02-06 16:38:36 +01:00
Fabien Potencier
1f68f40518 [FrameworkBundle] fixed typo 2013-02-05 15:39:35 +01:00
Fabien Potencier
5724ce1593 merged branch bamarni/patch-16 (PR #6975)
This PR was merged into the 2.2 branch.

Commits
-------

aff3485 fixed typo

Discussion
----------

fixed typo
2013-02-05 15:38:33 +01:00
Bilal Amarni
aff3485fa6 fixed typo 2013-02-05 15:29:37 +01:00
Fabien Potencier
d5fe378e54 tweaked previous merge 2013-02-05 15:17:02 +01:00
Fabien Potencier
6e9c235d62 merged branch michaelperrin/feature/deprecation-messages (PR #6973)
This PR was merged into the 2.2 branch.

Commits
-------

badb2b9 Add "'property_path' => false" deprecation message for forms

Discussion
----------

Add "'property_path' => false" deprecation message for forms
2013-02-05 15:16:26 +01:00
Fabien Potencier
0c20a5aee9 [Security] fixed interface implementation (closes #6974) 2013-02-05 15:08:32 +01:00
Fabien Potencier
eb2bcc5db9 merged branch henrikbjorn/time-collector (PR #6971)
This PR was merged into the master branch.

Commits
-------

bd0709c Use REQUEST_TIME_FLOAT if available.

Discussion
----------

Use REQUEST_TIME_FLOAT if available.

This will give a more correct initialization time when using the
DataCollectors without a KernelInterface implementation such as Silex.

`REQUEST_TIME_FLOAT` is available as of 5.4.0

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

by henrikbjorn at 2013-02-05T09:59:05Z

@fabpot Should be good now with passing test :)
2013-02-05 12:00:38 +01:00
Michaël Perrin
badb2b99b0 Add "'property_path' => false" deprecation message for forms 2013-02-05 11:48:57 +01:00
Fabien Potencier
9367a7cd8e fixed CS 2013-02-05 11:25:15 +01:00
Henrik Bjørnskov
bd0709c0b7 Use REQUEST_TIME_FLOAT if available.
This will give a more correct initialization time when using the
DataCollectors without a KernelInterface implementation such as Silex.
2013-02-05 10:58:14 +01:00
Fabien Potencier
aad2b63b0a merged branch TerjeBr/bcrypt-password-encoder-2 (PR #6808)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6808).

Commits
-------

0cb74a2 Added BCrypt password encoder.

Discussion
----------

Bcrypt password encoder

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5932
License of the code: MIT
Documentation PR: symfony/symfony-docs#1936

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

by TerjeBr at 2013-01-19T18:53:21Z

Finishing PR #5974

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

by jalliot at 2013-01-20T14:07:54Z

This looks very good! :)
But be careful to CS or this will not be merged.

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

by TerjeBr at 2013-01-20T14:17:35Z

I do not understand. What do you mean by "CS"?

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

by jalliot at 2013-01-20T14:20:33Z

[Coding standards](http://symfony.com/doc/current/contributing/code/standards.html).
You should run [PHP-CS-Fixer](https://github.com/fabpot/PHP-CS-Fixer) on your code to fix it.

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

by TerjeBr at 2013-01-20T14:47:23Z

The only thing php-cs-fixer.phar did was to realign some of the doc-block comments.
But thank you any way for pointing out the script to me.

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

by TerjeBr at 2013-01-20T15:52:07Z

Why does it look like @elnur added the commits? It was me.

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

by stof at 2013-01-20T16:32:12Z

@TerjeBr check your git configuration to be sure it uses your email address when committing

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

by TerjeBr at 2013-01-20T17:30:58Z

Now the commit is in my name.
But see what happens if I squash the commit wit git rebase ....

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

by TerjeBr at 2013-01-20T17:33:08Z

Now it looks like elnur added the commit.

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

by stof at 2013-01-26T15:57:59Z

@fabpot is there a chance to have this in 2.2 ?
2013-02-05 10:22:32 +01:00
Elnur Abdurrakhimov
9d089ef998 Added BCrypt password encoder. 2013-02-05 10:22:32 +01:00
Fabien Potencier
f40c137440 updated VERSION for 2.2.0-RC1 2013-02-05 08:31:53 +01:00
Fabien Potencier
60cf0aa181 merged branch jakzal/no-underscored-methods-in-tests-master (PR #6885)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6885).

Commits
-------

c5d15f8 [PropertyAccess] Removed underscores from test method names to be consistent with other components.

Discussion
----------

[PropertyAccess] Removed underscores from test method names

Removed underscores from test method names to be consistent with other components.

This was previously done in #6695, but was partly lost when merging with master (PropertyAccess component was created, so the location of tests has changed).

| Q              | A                                        |
|--------------|--------------------------------|
| Bug fix?          | no |
|New feature? | no |
|BC breaks?    | no |
|Deprecations? |	no |
|Tests pass? | yes |
|Fixed tickets | n/a |
|License | MIT |
|Doc PR | n/a |
2013-02-04 21:27:45 +01:00
Jakub Zalas
63f300613e Removed underscores from test method names to be consistent with other components.
It is more common to use fully camel-cased names for test methods. Only some of the test methods are called with underscore notation. To avoid confusion it is better to be consistent.
2013-02-04 21:27:45 +01:00
Fabien Potencier
be69ca1648 merged branch hhamon/user_password_constraints_namespace (PR #6960)
This PR was merged into the 2.2 branch.

Commits
-------

35b62ac [Security] renamed Constraint namespace to Constraints for validator classes in order to be consistent with the whole current validator API.

Discussion
----------

[Security] renamed Constraint namespace to Constraints for validator classes in order to be consistent with the whole current validator API.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes (for people already using the ``UserPassword`` constraint class in their code)
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2013-02-04 21:25:39 +01:00
Fabien Potencier
ddf4678dd6 [HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes #6923, closes #6936)
This fixes the creation of a sub-request when the master request Request URI
is determined with specific server information.
2013-02-04 19:34:49 +01:00
Fabien Potencier
3e2ff71b7c merged branch fabpot/avoid-session-creation (PR #6964)
This PR was merged into the 2.1 branch.

Commits
-------

8ca00c5 [Security] fixed session creation when none is needed (closes #6917)

Discussion
----------

[Security] fixed session creation when none is needed (closes #6917)

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

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

by drak at 2013-02-04T16:24:49Z

That looks good. Maybe we need a test for this logic to prevent any regression in the future?

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

by bendavies at 2013-02-04T16:30:38Z

Yep, this was exactly what i tried locally, but really wasn't familiar enough with it to be confident enough to submit it as a fix.

Works for me!

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

by bendavies at 2013-02-04T17:19:32Z

A few test failures which were added by the breaking PR #2414 in the first place.

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

by fabpot at 2013-02-04T18:00:31Z

I've fixed the tests which now really test that the session is not started.
2013-02-04 19:15:54 +01:00
Fabien Potencier
8ca00c598c [Security] fixed session creation when none is needed (closes #6917) 2013-02-04 18:59:58 +01:00
Fabien Potencier
09bbb68e9f [FrameworkBundle] removed obsolete comment (see 2e356c1) 2013-02-04 18:48:13 +01:00
Fabien Potencier
8a0492cf04 merged branch dlsniper/small-di-improvement (PR #6725)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6725).

Commits
-------

957b3af [DependencyInjection]Micro-optimization

Discussion
----------

[DependencyInjection]Micro-optimization

Bug fix: no
Feature addition: not really
Backwards compatibility break: no
Fixes the following tickets: ~
Todo: see below
License of the code: MIT
Documentation PR: ~

This adds a small micro-optimization to the container once it's dumped as PHP.

Even if the speed bump isn't that visible on the default Symfony2 Standard distribution, this doesn't break anything and it should be helpful when having a lot of parameters in the container.

I've did got better results with this applied but it would be helpful if others could confirm this to be true as well.

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

by fabpot at 2013-01-13T19:57:36Z

I'm -1 on this change. I really doubt that this has any significant perf improvement and it makes the code less clear. In fact, we rejected similar changes in the past.

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

by alexandresalome at 2013-01-13T20:32:54Z

This code is executed on compilation time, which means it's not executed in each request of production server.

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

by igorw at 2013-01-13T21:03:33Z

@alexandresalome no, this is changing the generated code that will be run on every request ;-). But I agree that it's probably not worth it. Unless there is a benchmark proving *significant* gains.

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

by dlsniper at 2013-01-13T21:05:52Z

@alexandresalome the code is execute at runtime since this changes the dumper part of it.
@fabpot I didn't knew about the changes like this but I from my recent experience with optimizing various applications this kind of change was always improving speed. Also, aside from the fact that this is a known trick, readability was taken into consideration, that's why I've added the change only in the dumper.

I've did a benchmark against a default container from Symfony2 and you can get it from here: https://gist.github.com/4526170

Feel free to close this if you want.

Note: Currently I'm trying to find and improve all the things related to speed in Symfony2, see the ticket here: symfony/symfony-standard#464 which started from this: https://groups.google.com/d/msg/symfony2/-gvguJqox3s/bjaA6Ks3EZoJ which was confirmed by the OP as well. This won't bring big performance increases, but it's a step forward imho.

Thanks!

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

by vicb at 2013-01-14T07:21:12Z

@dlsniper there seems to be a huge diff in your bench between isset and ake, any chance you have xdebug turned on ?

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

by dlsniper at 2013-01-14T08:03:35Z

@vicb no, both xhprof / xdebug where turned off. Also keep in mind that there's a ` E-5 ` so the performance impact is not that much in terms of microseconds, that's why I've said micro-optimization, but it is still there and I've had projects with more that 1.3k values in that array and the project was medium in size.

That's why I've said, someone else please test it as well and provided the benchmark, to prove that the ` isset + array_key_exists ` is faster that ` array_key_exists ` when the searched value is not null.

Also, the benchmark assumes that there are only 300 searches in the parameters array which might be more or less that usual numbers and it only retrieves the same parameter every time.

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

by vicb at 2013-01-14T08:08:57Z

@dlsniper I am not referring to absolute values but to the ratio that is high.

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

by mvrhov at 2013-01-14T08:29:12Z

isset is known to be a way faster than ake. BTW my work project which I consider relatively small has just shy of 1000 entries in parameters array

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

by vicb at 2013-01-14T09:29:59Z

@mvrhov you're right, isset is faster but [especially when xdebug is on](http://ilia.ws/archives/247-Performance-Analysis-of-isset-vs-array_key_exists.html) - 2.5x vs 10x.

I would generally 👎 micro-optims but this one is in a generated file so 👍
2013-02-04 13:46:32 +01:00