Commit Graph

11763 Commits

Author SHA1 Message Date
Fabien Potencier
4860e7510b merged branch Tobion/patch-5 (PR #6061)
This PR was merged into the master branch.

Commits
-------

1b41ed0 removed unused variable

Discussion
----------

removed unused variable
2012-11-19 11:35:07 +01:00
Tobias Schultze
1b41ed0a79 removed unused variable 2012-11-19 10:05:27 +01:00
Fabien Potencier
b358748340 merged branch DenisGorbachev/patch-1 (PR #6046)
This PR was merged into the master branch.

Commits
-------

acbb393 Renamed variable for consistency

Discussion
----------

[SecurityBundle] Renamed variable for consistency

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: -
2012-11-19 08:44:16 +01:00
Fabien Potencier
7e88eccfb6 merged branch Tobion/is_object_instance_of (PR #6051)
This PR was merged into the master branch.

Commits
-------

966e7d6 [DI] removed unneeded is_object() calls

Discussion
----------

[DI] removed unneeded is_object() calls

I searched through all of symfony for occurences of the coding style `(is_object($value) && $value instanceof Object)` with a regex like `is_object\(\$[a-zA-z0-9]+\) && \$[a-zA-z0-9]+ instanceof `.
The `is_object` calls are not needed in this case. Only the DI component made such duplicate checks.
2012-11-19 08:41:20 +01:00
Fabien Potencier
5127492bac merged branch Tobion/patch-4 (PR #6058)
This PR was merged into the master branch.

Commits
-------

acf8a70 [Routing] fix Route recompilation when hostname changed

Discussion
----------

[Routing] fix Route recompilation when hostname changed
2012-11-19 08:10:34 +01:00
Tobias Schultze
acf8a70420 [Routing] fix Route recompilation when hostname changed 2012-11-19 01:12:13 +01:00
Tobias Schultze
966e7d6d12 [DI] removed unneeded is_object() calls 2012-11-18 21:27:35 +01:00
Denis Gorbachev
acbb39312c Renamed variable for consistency 2012-11-18 14:58:38 +04:00
Fabien Potencier
00d132a6d3 merged branch lanthaler/master (PR #6030)
This PR was squashed before being merged into the master branch (closes #6030).

Commits
-------

749dac1 Improve docBlock

Discussion
----------

Improve docBlock

This is just a minor change documenting the return type of `SerializerInterface::deserialize()`.
2012-11-17 18:07:16 +01:00
Markus Lanthaler
749dac1e38 Improve docBlock 2012-11-17 18:07:16 +01:00
Fabien Potencier
9c6497f3ea merged branch nomack84/fixed_docblocks (PR #6033)
This PR was merged into the master branch.

Commits
-------

644de74 Fix docblock in Doctrine Bridge

Discussion
----------

Fix docblocks in Doctrine Bridge
2012-11-17 18:06:24 +01:00
Fabien Potencier
5d1ce89416 merged branch pborreli/fix-travis (PR #6039)
This PR was merged into the master branch.

Commits
-------

9843d29 Fix PHP 5.4 segfault

Discussion
----------

Fix travis PHP 5.4 segfault

This is a well known issue :
https://bugs.php.net/bug.php?id=53976
https://bugs.php.net/bug.php?id=51091
2012-11-17 18:05:57 +01:00
Fabien Potencier
a5aed62082 merged branch pborreli/patch-3 (PR #6038)
This PR was merged into the master branch.

Commits
-------

a146156 Merge pull request #2 from Tobion/patch-2
38802ea remove logic that could not be triggered anyway
f7ea68f [Routing] Fixed undefined variable + typo

Discussion
----------

[Routing] Fixed typo + removed dead code

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

by Tobion at 2012-11-17T16:00:04Z

@pborreli: pborreli/symfony#2

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

by pborreli at 2012-11-17T16:02:08Z

@Tobion totally agree, tried to setup a phpunit test which could trigger this exception but couldn't ..
2012-11-17 18:05:35 +01:00
Pascal Borreli
a146156d36 Merge pull request #2 from Tobion/patch-2
remove logic that could not be triggered anyway
2012-11-17 08:02:32 -08:00
Tobias Schultze
38802ea32c remove logic that could not be triggered anyway
the regex by the compiler is always valid. even if it was invalid like '' it wasn't caught by the exception and would have given a php notice.
2012-11-17 16:58:52 +01:00
Pascal Borreli
9843d29585 Fix PHP 5.4 segfault 2012-11-17 15:28:39 +00:00
Pascal Borreli
f7ea68f70c [Routing] Fixed undefined variable + typo 2012-11-17 14:39:14 +00:00
Mario A. Alvarez Garcia
644de740c4 Fix docblock in Doctrine Bridge 2012-11-16 12:36:52 -05:00
Fabien Potencier
4ad1e14056 merged branch ruian/patch-2 (PR #6028)
This PR was merged into the master branch.

Commits
-------

83b37ff [DependencyInjection] Return self for add...

Discussion
----------

[DependencyInjection] Return self for add...

Bug fix: no
Forget fix: yes
Feature addition: no
Symfony2 tests pass: yes
License of the code: MIT

Return self instance when call an ADD something method.

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

by pborreli at 2012-11-16T13:24:45Z

Please fix PHPDoc accordingly

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

by ruian at 2012-11-16T13:38:41Z

@pborreli done.
2012-11-16 15:58:29 +01:00
Fabien Potencier
68ae207002 merged branch egeloen/password-type (PR #6007)
This PR was merged into the master branch.

Commits
-------

97f6a1b [Form] Update password type trimming to false

Discussion
----------

[Form] Update password trimming to false by default

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: -
License of the code: MIT
Documentation PR: ~

Hey!

Today, I realize that the password type is by default trimmed. IMHO, this is not the expected behavior. By default, the password type should not trim the input value.

Regards

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

by nomack84 at 2012-11-13T19:16:29Z

👍

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

by mvrhov at 2012-11-13T19:57:29Z

IMHO password and username fields should be trimmed. whitespace at the beginning and at the end of those fields are not wanted. At least I don't want to deal with a user support where WS on those fields is not trimmed.

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

by egeloen at 2012-11-13T20:08:08Z

@mvrhov I agree with you about username fields and other "text" fields but in case of a password field, if the end user specifies white space at the begin/end of his password, it should not be trimmed. It should simply let it as it is. I open this PR due to two customers who reports me this behavior.

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

by clemherreman at 2012-11-14T10:06:15Z

@mvrhov I agree, username shouldn't be trimmed, however password are kind of special. They should be used *"as is"*, as lots of users have wicked passwords.

Moreover, usually the password is asked twice, so if there are spaces, they are most likely wanted by the end user.

So 👍

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

by clemherreman at 2012-11-14T10:07:27Z

Also Travis status on this PR is **failed** because of an error when downloading the deps.

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

by geoffrey-brier at 2012-11-14T10:34:56Z

👍

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

by bschussek at 2012-11-14T15:01:43Z

Could you please add a test case to PasswordTypeTest?

Please also reference this PR in the test

(= add the comment `// https://github.com/symfony/symfony/pull/6007` before the test)

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

by egeloen at 2012-11-14T15:10:36Z

@bschussek I have updated the PR.

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

by bschussek at 2012-11-14T15:24:34Z

Thanks! Could you please squash the commits?

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

by egeloen at 2012-11-14T15:30:11Z

@bschussek Done.

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

by stloyd at 2012-11-14T15:39:47Z

Should this be noted in `UPGRADE` file ? (as this is change of actually BC break =))

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

by egeloen at 2012-11-15T22:59:45Z

@stloyd Where can I put it? In the [UPGRADE-2.2](https://github.com/symfony/symfony/blob/master/UPGRADE-2.2.md) file?

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

by stloyd at 2012-11-15T23:02:51Z

@egeloen IMO yes, according this will go to `master` (which is actual _dev_ branch for `2.2`)

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

by egeloen at 2012-11-16T13:54:04Z

@fabpot I have removed the comment & added an entry in the `UPGRADE-2.2` file.
2012-11-16 15:57:52 +01:00
Eric GELOEN
97f6a1b4d9 [Form] Update password type trimming to false 2012-11-16 14:51:56 +01:00
Julien 'ruian' Galenski
83b37ffb4d [DependencyInjection] Return self for add...
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
License of the code: MIT

Return self instance when call an ADD something method.
2012-11-16 14:35:03 +01:00
Fabien Potencier
e3f8d2db33 merged branch Tobion/collection-hostname (PR #6018)
This PR was squashed before being merged into the master branch (closes #6018).

Commits
-------

6334343 [Routing] removed getHostnamePattern from RouteCollection

Discussion
----------

[Routing] removed getHostnamePattern from RouteCollection

this method is not useful and can introduce inconsistencies when a sub-route has a different hostname, which already has a getter for the hostname
2012-11-15 19:30:36 +01:00
Tobias Schultze
6334343cda [Routing] removed getHostnamePattern from RouteCollection 2012-11-15 19:30:36 +01:00
Fabien Potencier
225e3e53d4 merged branch vicb/acceptheaderfix (PR #6003)
This PR was merged into the master branch.

Commits
-------

f4b630d [HttpFoundation] fix #6002

Discussion
----------

[HttpFoundation] fix #6002

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

by fabpot at 2012-11-13T17:02:45Z

Can you add a test?

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

by Tobion at 2012-11-13T17:04:23Z

hehe see #6004 there is also a test

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

by vicb at 2012-11-13T17:05:06Z

There is a test in the original PR, no need for 6004.

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

by vicb at 2012-11-13T17:05:20Z

Which is why is was failing btw

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

by Tobion at 2012-11-13T17:06:36Z

The test in 6002 did not fail for me without your patch.

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

by fabpot at 2012-11-14T12:47:46Z

@Tobion @vicb What do we do? Just revert #6002 or merge this PR?

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

by vicb at 2012-11-14T13:25:51Z

Merge. Go go go :)

----- Reply message -----
De : "Fabien Potencier" <notifications@github.com>
Pour : "symfony/symfony" <symfony@noreply.github.com>
Cc : "Victor Berchet" <victor@suumit.com>
Objet : [symfony] [HttpFoundation] fix #6002 (#6003)
Date : mer., nov. 14, 2012 13:47
@Tobion @vicb What do we do? Just revert #6002 or merge this PR?

&mdash;

Reply to this email directly or view it on GitHub.

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

by Tobion at 2012-11-14T13:31:22Z

@vicb can you explain what it fixes? As I said, your test does not cover something that would fail without the patch. So I don't see the bug.

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

by vicb at 2012-11-14T15:30:55Z

@Tobion php.net states: The `current()` function simply returns the value of the array element that's currently being pointed to by the internal pointer and `reset()` returns the value of the first array element.

I have no clue what the "element that's currently being pointed to by the internal pointer" in this method so `reset()` is probably what you want.

Validated ?

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

by Tobion at 2012-11-14T16:12:03Z

I agree `reset()` is more explicit here. But `current()` should work just as well in this case because the array pointer can only be at the first item when calling the method. Anyway, this is good to merge. I just hoped there was a unit test that ensures this on my machine. This is why I added the test in my patch. Maybe Fabien can just merge the second commit on #6004

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

by vicb at 2012-11-14T16:20:57Z

As explained in #6004, there is already a test from my first PR that made Travis go red.
2012-11-14 17:48:15 +01:00
Fabien Potencier
2c346cba07 merged branch fabpot/images (PR #6006)
This PR was merged into the master branch.

Commits
-------

9f1cd84 moved most static assets directly into the templates

Discussion
----------

moved most static assets directly into the templates

This has been done for several reasons:

 * for consistency with the way we already manage the WDT and the
   profiler icons;
 * it makes the Exception independent from the location of the assets
   (and from the asset() function)
 * this is the second step to make the WebProfiler useable outside the
   full-stack framework

see dbcd171dd3

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

by stof at 2012-11-13T17:52:39Z

the images blue_picto_more and blue_picto_less are also used in DoctrineBundle (and probably in JMSDebuggingBundle but I haven't checked). Could you submit a PR inlining the images too before removing them ?

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

by fabpot at 2012-11-13T18:02:18Z

Any image useful for other bundles should not be deleted. So, if DoctrineBundle is using the blue_pico_* images, I'm going to revert their deletion.

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

by schmittjoh at 2012-11-13T18:07:02Z

I'm using them in two bundles, JMSDebuggingBundle and JMSJobQueueBundle (same for the exception related templates).

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

by dlsniper at 2012-11-13T22:22:29Z

Wouldn't it be better to have the encoded icons in a separate CSS file as different classes/background images?

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

by fabpot at 2012-11-14T11:28:24Z

ok, I've reverted the removal of the images that might be useful in third-party bundles.
2012-11-14 13:48:11 +01:00
Fabien Potencier
9f1cd84844 moved most static assets directly into the templates
This has been done for several reasons:

 * for consistency with the way we already manage the WDT and the
   profiler icons;
 * it makes the Exception independent from the location of the assets
   (and from the asset() function)
 * this is the second step to make the WebProfiler useable outside the
   full-stack framework

see dbcd171dd3
2012-11-14 12:26:15 +01:00
Fabien Potencier
777aa5085d merged branch Tobion/hostname-serialize (PR #6008)
This PR was merged into the master branch.

Commits
-------

c865220 [Routing] fix missing hostname serialization in Route

Discussion
----------

[Routing] fix missing hostname serialization in Route
2012-11-14 07:11:14 +01:00
Tobias Schultze
c865220267 [Routing] fix missing hostname serialization in Route 2012-11-14 00:25:56 +01:00
Victor Berchet
f4b630d1e0 [HttpFoundation] fix #6002 2012-11-13 17:57:35 +01:00
Fabien Potencier
7bfe13c912 merged branch vicb/acceptheader (PR #6002)
This PR was merged into the master branch.

Commits
-------

395c004 [HttpFoundation] Fix AcceptHeader

Discussion
----------

[HttpFoundation] Fix AcceptHeader

The important lines are:

```php
<?php
-        return !empty($this->items) ? current($this->items) : null;
+        return !empty($this->items) ? $this->items[0] : null;
```

(and the corresponding test).

The commit has some code re-org to make reading tests easier (providers defined close the the corresponding test). This might be personal preferences only, let me know if it should be reverted.
2012-11-13 17:35:27 +01:00
Fabien Potencier
ecb963be27 Merge branch '2.1'
* 2.1:
  fixed comment. The parent ACL is not accessed in this method.
  [HttpFoundation] Make host & methods really case insensitive in the RequestMacther
  [Validator] fixed Ukrainian language code (closes #5972)
  Fixed case of php function
2012-11-13 17:29:48 +01:00
Fabien Potencier
2d488b79f2 Merge branch '2.0' into 2.1
* 2.0:
  fixed comment. The parent ACL is not accessed in this method.
  [HttpFoundation] Make host & methods really case insensitive in the RequestMacther
  [Validator] fixed Ukrainian language code (closes #5972)
  Fixed case of php function

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.uk.xliff
	src/Symfony/Component/HttpFoundation/RequestMatcher.php
2012-11-13 17:29:06 +01:00
Victor Berchet
395c00487c [HttpFoundation] Fix AcceptHeader 2012-11-13 17:18:54 +01:00
Fabien Potencier
b126664406 Merge branch '2.1'
* 2.1: (24 commits)
  forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3
  [Routing] removed irrelevant string cast in Route
  Fixed typo
  Make YamlFileLoader and XmlFileLoader file loading extensible
  [HttpKernel] fix typo
  Fixed singularization of "prices"
  [Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc.
  [HttpKernel] fixed Client when using StreamedResponses (closes #5370)
  fixed PDO session handler for Oracle (closes #5829)
  [HttpFoundation] fixed PDO session handler for Oracle (closes #5829)
  [Locale] removed a check that is done too early (and it is done twice anyways)
  Update src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf
  Adding new localized strings for farsi validation.
  [HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)
  [Form] Fixed forms not to be marked invalid if their children are already marked invalid
  [Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8
  added missing tests from previous merge
  [Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  Fix export-ignore on Windows
  Show correct class name InputArgument in error message
  ...

Conflicts:
	.travis.yml
	src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
2012-11-13 15:08:04 +01:00
Fabien Potencier
2fa9bd0b3f forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3 2012-11-13 15:04:20 +01:00
Fabien Potencier
83de4c2b02 merged branch fabpot/public-resources (PR #6000)
This PR was merged into the master branch.

Commits
-------

0159358 refactored CSS, images, templates included in the built-in bundles
812b9b1 replace _ in stylesheets (ids and classes) by - (should be consistent across the whole framework now)
983b2b5 uniformized styles
e0aab40 renamed sf-exceptionreset to sf-reset

Discussion
----------

Public resources refactoring

The first 3 commits are just cosmetic ones.

The last one refactors CSS, images, and templates included in the built-in bundles. Right now, everything is tied to the exception pages, but the code can be used standalone.

So, the goal is to make things more decoupled and more reusable across different bundles. That way, a bundle can provide pages that look like the other ones in Symfony without the need to duplicate code.

See the associated PR for the distribution bundle to see an example.

If you want to have a look at the last commit (not sure if it is worth it), you probably want to append ?w=1 to the URL to avoid too much whitespace noise.

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

by pborreli at 2012-11-13T09:38:00Z

congrats ! #6000

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

by fabpot at 2012-11-13T09:38:39Z

A simple usage example:

```jinja
{% extends "TwigBundle::layout.html.twig" %}

{% block body %}
    <div class="block">
        FOOBAR
    </div>
{% endblock %}
```
2012-11-13 14:20:12 +01:00
Fabien Potencier
d45a76b316 merged branch Inori/consistent-util-classes (PR #5879)
This PR was squashed before being merged into the master branch (closes #5879).

Commits
-------

07bd5c6 Make non-instantiable utils classes consistent with each other

Discussion
----------

Make non-instantiable utils classes consistent with each other

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

As per discussion in #5875 turned out that we don't have a consistent way to define non-instantiatable classes.

I don't like `final` as it removes flexibility with no visible gain.
I don't like `abstract` since it's not specifically clear what is meant by that. Is this class not complete? Should it be extended?
2012-11-13 13:58:15 +01:00
Roman Marintsenko
07bd5c6306 Make non-instantiable utils classes consistent with each other 2012-11-13 13:58:14 +01:00
Fabien Potencier
cb00411fc8 merged branch Jola/comment-fix (PR #5992)
This PR was merged into the 2.0 branch.

Commits
-------

b3a8efd fixed comment. The parent ACL is not accessed in this method.

Discussion
----------

fixed comment. The parent ACL is not accessed in this method.

Just fixed a comment on PermissionGrantingStrategy.
hasSufficientPermissions() is not accessing the parent ACL. That's done in isGranted().
2012-11-13 13:50:22 +01:00
Fabien Potencier
15fd24e46d merged branch Tobion/routing-phpdoc (PR #5994)
This PR was merged into the master branch.

Commits
-------

50e41d2 one space too much
5d9a36f small fix and enhancement
1e1cb13 [Routing] added more phpdoc and  replaced 'array of type' by 'Type[]'

Discussion
----------

[Routing] added more phpdoc and  replaced 'array of type' by 'Type[]'

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

by Tobion at 2012-11-12T17:03:01Z

@fabpot you should squash with your great merging tool ;)
2012-11-13 13:49:27 +01:00
Fabien Potencier
7b4a27893a merged branch Tobion/patch-2 (PR #5997)
This PR was merged into the 2.1 branch.

Commits
-------

7569ee2 [Routing] removed irrelevant string cast in Route

Discussion
----------

[Routing] removed irrelevant string cast in Route

Even if the passed key is an integer, casting to string won't make any difference in array keys (it remains an int key).
2012-11-13 13:49:04 +01:00
Fabien Potencier
0159358a08 refactored CSS, images, templates included in the built-in bundles
The goal is to make things more decoupled and more reusable across
different bundles.

There will be a PR for the distribution bundle too to simplify the code
based on this PR.
2012-11-13 10:20:48 +01:00
Fabien Potencier
812b9b1724 replace _ in stylesheets (ids and classes) by - (should be consistent across the whole framework now) 2012-11-12 18:32:01 +01:00
Fabien Potencier
983b2b5e2a uniformized styles 2012-11-12 18:19:16 +01:00
Fabien Potencier
e0aab4075f renamed sf-exceptionreset to sf-reset 2012-11-12 18:19:16 +01:00
Fabien Potencier
ff9051d19f [TwigBundle] fixed typo 2012-11-12 18:18:57 +01:00
Tobias Schultze
50e41d2c5c one space too much 2012-11-12 18:02:08 +01:00
Tobias Schultze
5d9a36fe42 small fix and enhancement 2012-11-12 18:00:02 +01:00
Tobias Schultze
7569ee2964 [Routing] removed irrelevant string cast in Route
Even if the passed key is an integer, casting to string won't make any difference in array keys (it remains an int key).
2012-11-12 17:54:27 +01:00