Commit Graph

19656 Commits

Author SHA1 Message Date
Fabien Potencier
c4dc0034e7 Merge branch '2.3' into 2.5
* 2.3:
  Updated generateSql tool
  Fix the implementation of deprecated Locale classes
  Fix phpdoc and coding standards
  Replace usages of the deprecated TypeTestCase by the new one
  Remove usages of deprecated constants
  Update functional tests to use the PSR NullLogger
  Make fabbot happy
  Clean up testing
  [DomCrawler] fixed bug #12143

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
	src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php
	src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php
	src/Symfony/Component/Console/Application.php
	src/Symfony/Component/DomCrawler/Crawler.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php
	src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
	src/Symfony/Component/Serializer/Encoder/EncoderInterface.php
	src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
	src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php
2014-12-30 10:03:46 +01:00
Fabien Potencier
4c5730c23b minor #13135 [2.7] Allow 3.0 requirements (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Allow 3.0 requirements

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

2.7 is going to provide almost the same interfaces as 3.0 but also a BC layer for previous releases.
This means that 2.7 is going to be mostly compatible with 3.0.
Lets continuously test this assumption and see when and were we break compat with 2.7 (and try to avoid it as much as possible to smoothen the transition to 3.0).

Commits
-------

b369bb6 [2.7] Allow 3.0 requirements
2014-12-30 09:56:10 +01:00
Fabien Potencier
85ae83d1d8 minor #13151 fix regression in form tests after pr #13027 (zulus)
This PR was merged into the 2.5 branch.

Discussion
----------

fix regression in form tests after pr #13027

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

Commits
-------

1121064 fix regression in form tests after pr #13027 | Q             | A | ------------- | --- | Bug fix?      | yes | New feature?  | no | BC breaks?    | no | Deprecations? | no | Tests pass?   | yes | Fixed tickets | - | License       | MIT | Doc PR        | -
2014-12-30 09:49:31 +01:00
Fabien Potencier
844741a192 minor #13165 Fix the implementation of deprecated Locale classes (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix the implementation of deprecated Locale classes

| 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

The ICU component does not exist anymore, but the BC layer was still referencing it.

Commits
-------

eb0637f Fix the implementation of deprecated Locale classes
2014-12-30 09:48:31 +01:00
Joshua Thijssen
f239920342 Updated generateSql tool 2014-12-30 09:47:24 +01:00
Fabien Potencier
7c2c228d0e feature #13157 [Security] Updated ACL generateSql.php (jaytaph)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Updated ACL generateSql.php

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| Fixed tickets | [#13156]
| License       | MIT
| Doc PR        | N/A

Even though I don't think it will break BC, changing the schema SQL files might possibly cause issues since they change some of the namings (capital ID instead of lowercase, and implicitly using UNSIGNED INTs etc). In that case, the 7c5d0d3 commit could be cherry-picked from this PR.

Commits
-------

d7e1858 Updated the SQL data generated from the generateSql tool
7c5d0d3 Updated generateSql tool
2014-12-30 09:47:04 +01:00
Fabien Potencier
be979330f8 minor #13162 Fix phpdoc and coding standards (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix phpdoc and coding standards

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

This removes the unused use statements which were not catched by PHP-CS-Fixer because of string occurences. It also fixes some invalid phpdoc (scalar is not recognized as a valid type for instance).

This is complementary to https://github.com/symfony/symfony/pull/13134

Commits
-------

8cc3f6a Fix phpdoc and coding standards
2014-12-30 09:33:34 +01:00
Fabien Potencier
e0a8441f21 minor #13161 Remove usages of deprecated constants (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Remove usages of deprecated constants

| 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

This removes the usage of deprecated constants in our code.

I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060 (warnings are triggered in this PR because of these usages)

Commits
-------

6c00c22 Remove usages of deprecated constants
2014-12-30 09:31:19 +01:00
Fabien Potencier
803c916111 minor #13159 Update functional tests to use the PSR NullLogger (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Update functional tests to use the PSR NullLogger

| 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

This avoids using the deprecated NullLogger in tests.

I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060 (tests are failing in this PR currently because of that)

Commits
-------

30cff26 Update functional tests to use the PSR NullLogger
2014-12-30 09:28:51 +01:00
Fabien Potencier
e766363218 minor #13160 Replace usages of the deprecated TypeTestCase by the new one (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Replace usages of the deprecated TypeTestCase by the new one

| 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

I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060

Commits
-------

e6fa0ea Replace usages of the deprecated TypeTestCase by the new one
2014-12-30 09:27:17 +01:00
Fabien Potencier
0ae592d3d8 minor #13158 Fix grammar (nurikabe)
This PR was submitted for the 2.7 branch but it was merged into the 2.6 branch instead (closes #13158).

Discussion
----------

Fix grammar

Commits
-------

3073541 Fix grammar
2014-12-30 09:24:50 +01:00
Evan Owens
3073541eb2 Fix grammar 2014-12-30 09:24:50 +01:00
Christophe Coevoet
eb0637f675 Fix the implementation of deprecated Locale classes
The ICU component does not exist anymore.
2014-12-30 09:06:31 +01:00
Christophe Coevoet
8cc3f6aad4 Fix phpdoc and coding standards
This removes the unused use statements which were not catched by
PHP-CS-Fixer because of string occurences. It also fixes some invalid
phpdoc (scalar is not recognized as a valid type for instance).
2014-12-29 23:41:34 +01:00
Christophe Coevoet
e6fa0ea4e1 Replace usages of the deprecated TypeTestCase by the new one 2014-12-29 22:21:04 +01:00
Christophe Coevoet
6c00c226c2 Remove usages of deprecated constants 2014-12-29 22:18:50 +01:00
Christophe Coevoet
30cff2605e Update functional tests to use the PSR NullLogger
This avoids using the deprecated NullLogger in tests.
2014-12-29 21:47:13 +01:00
Joshua Thijssen
d7e18589e3 Updated the SQL data generated from the generateSql tool 2014-12-29 16:36:06 +01:00
Joshua Thijssen
7c5d0d32e0 Updated generateSql tool 2014-12-29 16:35:40 +01:00
Edvinas Klovas
10df5d16c1 Currently if you want to use inline bootstrap form rendering, this is usually
enough:

1. Using bootstrap_3_layout.html.twig
2. Rendering form with `{{ form(form, { 'attr': {'class': 'form-inline'} }) }}`

Form rendering breaks for buttons as the buttons are rendered in a separate
<div> element without any attributes (this is coming from
form_div_layout.html.twig which has this block hard-coded). The rest of the
elements render with <div class="form-group"> which make them compatible with
form-inline attribute in the form (`<form class="form-inline">`).

The problem makes buttons render on new lines for inline forms. Extending
button_row in bootstrap_3_layout.html.twig template fixes this.

Signed-off-by: Edvinas Klovas <edvinas@pnd.io>
2014-12-29 15:30:03 +02:00
Dawid Pakuła
112106476c fix regression in form tests after pr #13027
| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2014-12-29 14:07:34 +01:00
Fabien Potencier
7dee89b7fc feature #13129 [Yaml] Removed the ability to parse a file in Yaml::parse() (saro0h)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[Yaml] Removed the ability to parse a file in Yaml::parse()

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

Commits
-------

e1c19f8 [Yaml] Removed the ability to parse a file in Yaml::parse()
2014-12-29 12:31:16 +01:00
Fabien Potencier
90378ab900 minor #12843 [Form] Add further timezone tests for date type (McSimp)
This PR was merged into the 2.6 branch.

Discussion
----------

[Form] Add further timezone tests for date type

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no (failing tests added)
| Fixed tickets | Adds tests for bug in #12808
| License       | MIT
| Doc PR        | ~

#12404 removed the timezone options from DateType and TimeType, however the tests don't cover all cases and there was a bug introduced as per #12808.

This PR adds tests for the expected behaviour but will not fix the bug.

Unfortunately, it seems that the tests are being skipped in the form component on Travis (and have been for a year) - probably due to the ICU version being changed.

Commits
-------

f919793 [Form] Add further timezone tests for date type
2014-12-29 12:27:57 +01:00
Fabien Potencier
d0d4482466 bug #12911 Fix wrong DateTransformer timezone param for non-UTC configuration (Soullivaneuh)
This PR was merged into the 2.6 branch.

Discussion
----------

Fix wrong DateTransformer timezone param for non-UTC configuration

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

This PR is a fix of a little mistake on PR #12404.

Thanks @mvrhov for the clue! 👍

Pass 'UTC' param cause issue on single_text date type, `null` should be passed to get the default php timezone.

Don't know how to add test for #12808 issue, do someone know how to "change" properly timezone during tests? Where can I do this?

Thanks.

Commits
-------

0104f15 Fix wrong DateTransformer timezone param for non-UTC configuration. #12808
2014-12-29 12:23:42 +01:00
Fabien Potencier
f2601868bf feature #13105 [FrameworkBundle] added a test router for the built-in web server (fabpot)
This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #13105).

Discussion
----------

[FrameworkBundle] added a test router for the built-in web server

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

#9995 describes a very valid use case.

Not sure if this should be merged into 2.7 only... now that I think about it, probably :)

Commits
-------

77e27b7 [FrameworkBundle] added a test router for the buil-in web server
2014-12-29 12:17:32 +01:00
Fabien Potencier
77e27b7628 [FrameworkBundle] added a test router for the buil-in web server 2014-12-29 12:17:32 +01:00
Fabien Potencier
0469ea82b1 bug #13145 [DomCrawler] Fix behaviour with <base> tag (dkop, WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fix behaviour with <base> tag

Finishes https://github.com/symfony/symfony/issues/12283

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

Commits
-------

91447e8 Make fabbot happy
1d35e48 Clean up testing
61f22d7 [DomCrawler] fixed bug #12143
2014-12-29 11:43:29 +01:00
WouterJ
91447e881a Make fabbot happy 2014-12-29 11:04:02 +01:00
WouterJ
1d35e48755 Clean up testing 2014-12-29 11:03:52 +01:00
Fabien Potencier
d1a97da846 No global state for isolated tests and other fixes 2014-12-29 11:03:03 +01:00
Fabien Potencier
286b65d676 Merge branch '2.3' into 2.5
* 2.3:
  No global state for isolated tests and other fixes
  [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment
  [Debug] fix checkip6
  [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port
  Update the note about origins of the CssSelector component.
  Use the correct cssselect library name in docblocks.
2014-12-29 11:02:13 +01:00
Fabien Potencier
459b8b6f92 minor #13144 No global state for isolated tests and other fixes (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

No global state for isolated tests and other fixes

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

By default, phpunit preserves global state for isolated processes. This made the tests break on my laptop.
Other tweaks included.
In branch 2.5, `src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php` also misses the `@preserveGlobalState disabled` annotation. Please add it when merging

Commits
-------

750f3a6 No global state for isolated tests and other fixes
2014-12-29 11:01:53 +01:00
Nicolas Grekas
750f3a62f7 No global state for isolated tests and other fixes 2014-12-29 10:34:09 +01:00
Fabien Potencier
8637a1f471 bug #13027 fix #10054 - form data collector with dynamic fields (zulus)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #13027).

Discussion
----------

fix #10054 - form data collector with dynamic fields

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

This simple patch will fix webprofiler bug with collection field.

Commits
-------

cffb64f fix #10054 - form data collector with dynamic fields
2014-12-29 09:51:57 +01:00
Dawid Pakuła
cffb64fd93 fix #10054 - form data collector with dynamic fields
| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10054
| License       | MIT
| Doc PR        | -
2014-12-29 09:51:56 +01:00
Fabien Potencier
4cc4e8a257 bug #13141 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment

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

The default escaping strategy was set on the Twig Engine and not the Twig Environment. That's a problem under some circumstances (like what #11773 describes), but it's also much better to set everything on the Twig  Environment directly.

Commits
-------

91b24e8 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment
2014-12-29 09:40:20 +01:00
Fabien Potencier
91b24e8f92 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment 2014-12-29 09:39:08 +01:00
Fabien Potencier
55feca6958 bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head...

| 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

On symfony.com, we have errors related to IP addresses in the `X-Forwarded-For` HTTP header that have a port. If that happens (I have no ideas what is doing that), the page crashes with an error like `inet_pton(): Unrecognized address 187.65.229.211:63479` (which comes from IpUtils::checkIpv6()). This fixes the root cause by removing the port.

#12572 is solving the consequence and I propose to also merge it.

Commits
-------

60ad382 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port
2014-12-29 09:20:51 +01:00
Fabien Potencier
ff079dd41e bug #12572 [HttpFoundation] fix checkip6 (Neime)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #12572).

Discussion
----------

[HttpFoundation] fix checkip6

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

I have this error ContextErrorException: Warning: inet_pton(): Unrecognized address X.X.X.X:X
in IpUtils.php line 110

X.X.X.X:X is detected as a ipv6 because HTTP_X_FORWARDED_FOR have a port.

Commits
-------

1da0ba4 [Debug] fix checkip6
2014-12-29 09:16:17 +01:00
Neime
1da0ba4150 [Debug] fix checkip6 2014-12-29 09:16:16 +01:00
Fabien Potencier
60ad382684 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port 2014-12-29 09:12:40 +01:00
Saro0h
e1c19f8941 [Yaml] Removed the ability to parse a file in Yaml::parse() 2014-12-28 18:25:05 +01:00
Saro0h
b552b1b182 [FrameworkBundle] Removed the deprecated RouterApacheDumperCommand 2014-12-28 18:19:42 +01:00
Nicolas Grekas
b369bb6eed [2.7] Allow 3.0 requirements 2014-12-27 12:44:51 +01:00
Fabien Potencier
f68b7c7d9d minor #13132 [CssSelector] Use the correct cssselect library name in docblocks. (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] Use the correct cssselect library name in docblocks.

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

As suggested in #11894, the original python library is called [cssselect](https://github.com/SimonSapin/cssselect), not cssselector.

I also updated the README, as the cssselect was extracted as an independent library and it's no longer part of lxml.

Commits
-------

55f0d9e Update the note about origins of the CssSelector component.
1997b12 Use the correct cssselect library name in docblocks.
2014-12-27 04:31:18 +01:00
Jakub Zalas
55f0d9ed0b Update the note about origins of the CssSelector component.
The last rewrite is based on the cssselect which is no longer part of lxml, but was extracted as an independent library.
2014-12-26 23:33:10 +01:00
Jakub Zalas
1997b12f51 Use the correct cssselect library name in docblocks.
The original python library is called cssselect, not cssselector.
2014-12-26 23:22:03 +01:00
Saro0h
e93b571ab5 [HttpKernel] Removed deprecated ErrorHandler and ExceptionHandler classes 2014-12-26 19:26:05 +01:00
Saro0h
c6b049f4e0 [Form] Removed deprecated form_enctype() 2014-12-26 19:00:47 +01:00
Saro0h
dfb97068ee [Console] Removed DialogHelper, ProgressHelper and TableHelper 2014-12-26 14:45:27 +01:00