Commit Graph

17265 Commits

Author SHA1 Message Date
jskvara
995ec7208d [Validator] Add missing czech translations 2014-04-15 00:10:03 +01:00
Fabien Potencier
eabfd0dcc4 bug #10700 Fixes various inconsistencies in the code (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixes various inconsistencies in the code

| 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

Commits
-------

4b7a275 removed extra/unsupported arguments
f4adfc4 [HttpKernel] fixed an error message
8aa322c [TwigBundle] removed undefined argument
2014-04-14 07:36:52 +02:00
Fabien Potencier
0555b7f2ab made types consistent with those defined in Hack 2014-04-13 20:00:14 +02:00
Fabien Potencier
4b7a275363 removed extra/unsupported arguments 2014-04-12 19:21:42 +02:00
Fabien Potencier
f4adfc4d79 [HttpKernel] fixed an error message 2014-04-12 19:21:42 +02:00
Fabien Potencier
8aa322ca72 [TwigBundle] removed undefined argument 2014-04-12 18:24:05 +02:00
Fabien Potencier
f50b2c59d5 bug #10697 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. (idn2104)
This PR was squashed before being merged into the 2.3 branch (closes #10697).

Discussion
----------

[Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.

[Translation] HHVM throws when an invalid ResourceBundle is constructed, while zend returns FALSE from the constructor. This patch makes IcuResFileLoader and IcuDatFileLoader compatible with HHVM.

The following tests now pass on HHVM:
https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php#L33
https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php#L54

| 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

Commits
-------

9bc08c0 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.
2014-04-12 17:24:40 +02:00
Ioan Negulescu
9bc08c0279 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. 2014-04-12 17:24:34 +02:00
Fabien Potencier
c875acf3a2 bumped Symfony version to 2.5.0 2014-04-12 16:58:29 +02:00
Fabien Potencier
2aea588ceb updated VERSION for 2.5.0-BETA1 2014-04-11 22:04:22 +02:00
Fabien Potencier
63086a01f4 updated CHANGELOG for 2.5.0-BETA1 2014-04-11 22:04:01 +02:00
Fabien Potencier
203a532257 fixed a test 2014-04-11 21:30:22 +02:00
Fabien Potencier
dd957bca47 fixed a test 2014-04-11 21:14:26 +02:00
Fabien Potencier
1251e136b4 Merge branch '2.4'
* 2.4:
  [Validator] Fix hack for nested Collection/All losing context
  [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
  [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
  [HttpKernel] Added the resource ID when printing a resource in the DataCollector
  [HttpFoundation] use insert or replace for sqlite session handler
  [HttpFoundation] use MERGE SQL for MS SQL Server session storage
  [HttpFoundation] fix PDO session handler under high concurrency

Conflicts:
	src/Symfony/Component/Validator/Tests/ExecutionContextTest.php
2014-04-11 20:34:16 +02:00
Fabien Potencier
55351677ca Merge branch '2.3' into 2.4
* 2.3:
  [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
  [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
  [HttpKernel] Added the resource ID when printing a resource in the DataCollector
  [HttpFoundation] use insert or replace for sqlite session handler
  [HttpFoundation] use MERGE SQL for MS SQL Server session storage
  [HttpFoundation] fix PDO session handler under high concurrency

Conflicts:
	src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
	src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php
2014-04-11 20:33:45 +02:00
Fabien Potencier
e81c872bc8 bug #10652 [HttpFoundation] fix PDO session handler under high concurrency (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fix PDO session handler under high concurrency

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8448 and http://trac.symfony-project.org/ticket/4777 (which was never really fixed as you can see here)
| License       | MIT

- The first commit fixes PDO session handler under high concurrency.
- The second commit uses MERGE SQL for MS SQL Server. Tested with http://sqlfiddle.com/#!6/66b6d/14
- The third commit uses INSERT OR REPLACE for sqlite session handler http://sqlfiddle.com/#!7/e6707/3

What I find rather bad with the class design is that it depends on the table definition, but it's not part of the class. Also it doesn't make use of open() and close() which could be used to make the database connection lazy instead of having is open all the time when not needed. Doctrine also only lazy connects, but we use PDO directly here.
Furthermore, the session handlers should not throw exceptions, from what I read, but return false when an error occurs. This is not followed in this class. Maybe @drak knows how php session management behaves when the session handlers return false?

Commits
-------

5c08e29 [HttpFoundation] use insert or replace for sqlite session handler
05ea19a [HttpFoundation] use MERGE SQL for MS SQL Server session storage
e58d7cf [HttpFoundation] fix PDO session handler under high concurrency
2014-04-11 20:29:09 +02:00
Fabien Potencier
a19eb9bcc6 bug #10690 [Validator] Fix hack for nested Collection/All losing context (GromNaN)
This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes #10690).

Discussion
----------

[Validator] Fix hack for nested Collection/All losing context

The PR https://github.com/silexphp/Silex/pull/943 highlighted [a hack in `ConstraintValidatorFactory`](d4ebbfd02d (diff-3a3e44a703775a35fbdd66850a43968dR48)).

The issue that is solved by this hack is that the context injected into the `ConstraintValidator` can change during the execution of the method `validate()` ; because the same instance of the validator is reused.

The hack was fixing this issue for the `Collection` constraint only. This patch fixes also the `All` constraint as it can be nested too (new test case found by @harrytruong).

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/silexphp/Silex/pull/943
| License       | MIT
| Doc PR        | no

Commits
-------

edfa6d5 [Validator] Fix hack for nested Collection/All losing context
2014-04-11 13:48:18 +02:00
Jérôme Tamarelle
edfa6d547d [Validator] Fix hack for nested Collection/All losing context 2014-04-11 13:48:13 +02:00
Fabien Potencier
241dc10245 bug #10669 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates (stloyd)
This PR was merged into the 2.3 branch.

Discussion
----------

[Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates

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

Commits
-------

eea9d24 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
2014-04-11 13:44:37 +02:00
Fabien Potencier
d290e79f63 minor #10691 [Config] Fix NodeBuilderTest::testNumericNodeCreation. (idn2104)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10691).

Discussion
----------

[Config] Fix NodeBuilderTest::testNumericNodeCreation.

[Config] Fixes a test failure, under both php and hhvm.

```
PHP Fatal error:  Class 'Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder' not found in /home/d/dev-fork/symfony-fork/src/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php on line 82
```

| 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

Commits
-------

022c4af [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
2014-04-11 13:41:47 +02:00
Ioan Negulescu
022c4af446 [Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias. 2014-04-11 13:41:46 +02:00
Fabien Potencier
a0f10d3bbf minor #10692 Fixed wrong typehint in documentation for XmlEncoder (csarrazi)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Fixed wrong typehint in documentation for XmlEncoder

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

Method documentation correction.
See https://github.com/symfony/symfony/pull/10668#discussion_r11477618

Commits
-------

f1a7361 Fixed wrong typehint in documentation for XmlEncoder
2014-04-11 13:38:57 +02:00
Charles Sarrazin
f1a7361aae Fixed wrong typehint in documentation for XmlEncoder 2014-04-11 10:02:41 +02:00
Joseph Bielawski
eea9d24719 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates 2014-04-11 08:45:03 +02:00
Fabien Potencier
78630533b8 minor #10688 [HttpKernel] Added the resource ID when printing a resource in the DataCollector (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Added the resource ID when printing a resource in the DataCollector

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

Commits
-------

01983a5 [HttpKernel] Added the resource ID when printing a resource in the DataCollector
2014-04-10 23:38:26 +02:00
Bernhard Schussek
01983a553a [HttpKernel] Added the resource ID when printing a resource in the DataCollector 2014-04-10 19:43:37 +02:00
Fabien Potencier
a45e464bc3 Merge branch '2.4'
* 2.4:
  Update MimeTypeExtensionGuesser.php
  [Validator] Add missing polish translations
  [Validator] Added missing strings from Image validator
  [Templating] PhpEngine should propagate charset to its helpers
  Fix ticket #10663 - Added setCharset method call to PHP templating engine.
  Changed the typehint of the EsiFragmentRenderer to the interface
  [Form] Improved test coverage of UrlType
  [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host
2014-04-10 15:01:02 +02:00
Fabien Potencier
144b58ccef Merge branch '2.3' into 2.4
* 2.3:
  Update MimeTypeExtensionGuesser.php
  [Templating] PhpEngine should propagate charset to its helpers
  Fix ticket #10663 - Added setCharset method call to PHP templating engine.
  Changed the typehint of the EsiFragmentRenderer to the interface
  [Form] Improved test coverage of UrlType
  [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host

Conflicts:
	src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php
	src/Symfony/Component/Templating/PhpEngine.php
2014-04-10 15:00:56 +02:00
Fabien Potencier
dbf7eeb10f bug #10686 Fixing Yaml Loader/Dumper to use underscores instead of dashes (WouterJ)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Fixing Yaml Loader/Dumper to use underscores instead of dashes

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

Commits
-------

9ba2861 Fixed Yaml loader/dumper to use underscores
2014-04-10 14:59:31 +02:00
Fabien Potencier
230b2dc2b7 minor #10685 Update MimeTypeExtensionGuesser.php (marktopper)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10685).

Discussion
----------

Update MimeTypeExtensionGuesser.php

Fixed bug for MimeType `image/x-ms-bmp`

Commits
-------

be0e362 Update MimeTypeExtensionGuesser.php
2014-04-10 14:53:45 +02:00
Mark Topper
be0e362116 Update MimeTypeExtensionGuesser.php
Fixed bug for MimeType `image/x-ms-bmp`
2014-04-10 14:53:44 +02:00
Fabien Potencier
882194f40d minor #10679 [Validator] Add missing polish translations (stloyd)
This PR was merged into the 2.4 branch.

Discussion
----------

[Validator] Add missing polish translations

| Q             | A
| ------------- | ---
| License       | MIT

Commits
-------

6e01405 [Validator] Add missing polish translations
2014-04-10 14:52:46 +02:00
WouterJ
9ba2861408 Fixed Yaml loader/dumper to use underscores 2014-04-10 14:44:40 +02:00
Joseph Bielawski
6e014050ca [Validator] Add missing polish translations 2014-04-10 09:02:51 +02:00
Fabien Potencier
b5ba7e109b minor #10668 [RFR] [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml (csarrazi)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[RFR] [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml

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

Instead of switching between SimpleXml and DOM Xml, we only use DOM Xml, in order to parse the source XML when decoding an XML string.

Commits
-------

db44f0f [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml
2014-04-10 04:23:19 +02:00
Fabien Potencier
e558eb198e minor #10672 [Validator] Added missing strings from Image validator (mayeco)
This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes #10672).

Discussion
----------

[Validator] Added missing strings from Image validator

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

Missing text in Validator component

Commits
-------

df37461 [Validator] Added missing strings from Image validator
2014-04-10 04:21:46 +02:00
Mario Young
df37461b99 [Validator] Added missing strings from Image validator 2014-04-10 04:21:46 +02:00
Fabien Potencier
5599eb0aae bug #10670 [Templating] PhpEngine should propagate charset to its helpers (stloyd)
This PR was merged into the 2.3 branch.

Discussion
----------

[Templating] PhpEngine should propagate charset to its helpers

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

Commits
-------

ed9e48b [Templating] PhpEngine should propagate charset to its helpers
2014-04-10 04:17:51 +02:00
Charles Sarrazin
db44f0fdd7 [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml 2014-04-10 02:57:01 +02:00
Joseph Bielawski
ed9e48b472 [Templating] PhpEngine should propagate charset to its helpers 2014-04-09 20:38:51 +02:00
Fabien Potencier
00e95982a5 bug #10665 [DependencyInjection] Fix ticket #10663 - Added setCharset method call to PHP templating engine (koku)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10665).

Discussion
----------

[DependencyInjection] Fix ticket #10663 - Added setCharset method call to PHP templating engine

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

Commits
-------

0bc79ca Fix ticket #10663 - Added setCharset method call to PHP templating engine.
2014-04-09 19:05:14 +02:00
Koen Kuipers
0bc79ca009 Fix ticket #10663 - Added setCharset method call to PHP templating engine. 2014-04-09 19:05:14 +02:00
Tobias Schultze
5c08e29b97 [HttpFoundation] use insert or replace for sqlite session handler 2014-04-09 16:14:23 +02:00
Fabien Potencier
93bfb68483 bug #10654 Changed the typehint of the EsiFragmentRenderer to the interface (stof)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10654).

Discussion
----------

Changed the typehint of the EsiFragmentRenderer to the interface

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

While it is true that passing a different core renderer implementation as inline strategy does not make any sense. Typehint the inline strategy here makes it much more complex to decorate the inline strategy (your decorator has to extend the class and overwrite all public methods instead of implementing the interface directly just to pass the typehint). And I have a valid use case for it (which is the reason why I submitted it now), or rather @lolautruche has one in EZPublish: https://github.com/ezsystems/ezpublish-kernel/pull/793

I don't know exactly whether this change should be considered as a bugfix (merged in the upcoming 2.3.13) or a new feature (merged in 2.5). I guess @lolautruche will like us if it goes its way to 2.3.x (EZPublish could bump its requirement to run on 2.3.13+ instead of 2.3.0+ and use a simpler code).

I remember suggesting the change in the initial PR btw, but it was rejecting sayign it does not make sense to use other strategies at that time.

Commits
-------

d1fca90 Changed the typehint of the EsiFragmentRenderer to the interface
2014-04-09 15:45:07 +02:00
Christophe Coevoet
d1fca907f9 Changed the typehint of the EsiFragmentRenderer to the interface 2014-04-09 15:45:02 +02:00
Fabien Potencier
648ce6a3d9 minor #10657 [TwigBundle] Fixed typo (pborreli)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[TwigBundle] Fixed typo

Commits
-------

46bb8b9 Fixed typo
2014-04-09 15:36:21 +02:00
Pascal Borreli
46bb8b99de Fixed typo 2014-04-09 09:13:16 +01:00
Fabien Potencier
4293d40fce minor #10647 [Form] Improved test coverage of UrlType (webmozart)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10647).

Discussion
----------

[Form] Improved test coverage of UrlType

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

Commits
-------

f3e172f [Form] Improved test coverage of UrlType
2014-04-09 05:11:37 +02:00
Bernhard Schussek
f3e172f6e5 [Form] Improved test coverage of UrlType 2014-04-09 05:11:36 +02:00
Fabien Potencier
9a95f520c9 bug #10649 [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host

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

As documented in http://php.net/manual/en/function.preg-replace.php, we have to use the `$` notation for replacing the backreference

>When working with a replacement pattern where a backreference is immediately followed by another number (i.e.: placing a literal number immediately after a matched pattern), you cannot use the familiar \\1 notation for your backreference. \\11, for example, would confuse preg_replace() since it does not know whether you want the \\1 backreference followed by a literal 1, or the \\11 backreference followed by nothing. In this case the solution is to use \${1}1. This creates an isolated $1 backreference, leaving the 1 as a literal.

Commits
-------

e946da3 [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host
2014-04-09 05:10:38 +02:00