Commit Graph

17041 Commits

Author SHA1 Message Date
Fabien Potencier
b2e906ea41 minor #10726 [HttpFoundation] factorize out the way output buffers should be closed (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[HttpFoundation] factorize out the way output buffers should be closed

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

Closing output buffers was done in three different files, but not exactly the same way, with subtle differences.
This PR factorizes out the best way to do this in a new public static function of the Response class.

Commits
-------

469943c [HttpFoundation] factorize out the way output buffers should be closed
2014-04-18 22:33:23 +02:00
Fabien Potencier
3c42345293 fixed typo 2014-04-18 21:44:02 +02:00
Fabien Potencier
61d1e5f3c7 minor #10736 Update PackageInterface.php (ibasaw)
This PR was merged into the 2.5-dev branch.

Discussion
----------

Update PackageInterface.php

found a typo

Commits
-------

e043329 Update PackageInterface.php
2014-04-18 21:43:00 +02:00
ibasaw
e0433297b2 Update PackageInterface.php 2014-04-18 13:56:04 +02:00
Nicolas Grekas
469943cd1c [HttpFoundation] factorize out the way output buffers should be closed 2014-04-17 16:18:17 +00:00
Fabien Potencier
f72eb34fc4 fixed types in phpdocs 2014-04-16 12:36:34 +02:00
Fabien Potencier
2314328b16 Merge branch '2.4'
* 2.4:
  fixed types in phpdocs
  fixed types in phpdocs

Conflicts:
	src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
	src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
	src/Symfony/Component/Serializer/Encoder/JsonEncoder.php
	src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
	src/Symfony/Component/Validator/Mapping/ClassMetadata.php
	src/Symfony/Component/Validator/Mapping/ElementMetadata.php
	src/Symfony/Component/Validator/Mapping/MemberMetadata.php
	src/Symfony/Component/Validator/MetadataFactoryInterface.php
2014-04-16 12:36:21 +02:00
Fabien Potencier
0ecdda1770 fixed types in phpdocs 2014-04-16 12:34:42 +02:00
Fabien Potencier
d5bd9bdd68 Merge branch '2.3' into 2.4
* 2.3:
  fixed types in phpdocs

Conflicts:
	src/Symfony/Bridge/Twig/TwigEngine.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php
	src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
	src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php
	src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php
	src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php
	src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php
	src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
	src/Symfony/Component/Stopwatch/StopwatchEvent.php
	src/Symfony/Component/Templating/PhpEngine.php
2014-04-16 12:34:31 +02:00
Fabien Potencier
e96b018805 fixed types in phpdocs 2014-04-16 12:30:19 +02:00
Fabien Potencier
339c0c8099 made {@inheritdoc} annotations consistent across the board 2014-04-16 10:09:16 +02:00
Fabien Potencier
24dde55feb made types consistent with those defined in Hack 2014-04-16 10:09:01 +02:00
Fabien Potencier
df3d543349 Merge branch '2.4'
* 2.4:
  made types consistent with those defined in Hack
  made {@inheritdoc} annotations consistent across the board
  made {@inheritdoc} annotations consistent across the board
  fixed types in phpdocs
  [Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
  made phpdoc types consistent with those defined in Hack
  Add support Thai translations
  [Validator] Add missing czech translations
  made types consistent with those defined in Hack
  removed extra/unsupported arguments
  [HttpKernel] fixed an error message
  [TwigBundle] removed undefined argument
  [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.

Conflicts:
	src/Symfony/Component/Console/Helper/TableHelper.php
	src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
	src/Symfony/Component/Form/FormError.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
	src/Symfony/Component/Process/ProcessPipes.php
	src/Symfony/Component/PropertyAccess/PropertyAccessor.php
	src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
	src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
	src/Symfony/Component/Translation/Dumper/FileDumper.php
	src/Symfony/Component/Validator/ConstraintViolation.php
	src/Symfony/Component/Validator/Constraints/EmailValidator.php
	src/Symfony/Component/Validator/ExecutionContextInterface.php
	src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php
2014-04-16 10:08:40 +02:00
Fabien Potencier
041cb7b103 made types consistent with those defined in Hack 2014-04-16 10:04:32 +02:00
Fabien Potencier
03f0c2de8a made {@inheritdoc} annotations consistent across the board 2014-04-16 10:03:46 +02:00
Fabien Potencier
29b6f6b3a0 Merge branch '2.3' into 2.4
* 2.3:
  made {@inheritdoc} annotations consistent across the board
  fixed types in phpdocs
  made phpdoc types consistent with those defined in Hack
  Add support Thai translations
  made types consistent with those defined in Hack
  removed extra/unsupported arguments
  [HttpKernel] fixed an error message
  [TwigBundle] removed undefined argument
  [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.

Conflicts:
	src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
	src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php
	src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
	src/Symfony/Component/Config/Definition/ReferenceDumper.php
	src/Symfony/Component/Console/Helper/DescriptorHelper.php
	src/Symfony/Component/Debug/ErrorHandler.php
	src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
	src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php
	src/Symfony/Component/HttpFoundation/Response.php
	src/Symfony/Component/HttpFoundation/StreamedResponse.php
	src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
	src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php
	src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php
	src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php
	src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
	src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
	src/Symfony/Component/Stopwatch/StopwatchPeriod.php
	src/Symfony/Component/Translation/TranslatorInterface.php
	src/Symfony/Component/Validator/ConstraintValidatorFactory.php
2014-04-16 10:02:57 +02:00
Fabien Potencier
d56ea768cc minor #10713 made {@inheritdoc} annotations consistent across the board (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

made {@inheritdoc} annotations consistent across the board

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

Commits
-------

810b9ed made {@inheritdoc} annotations consistent across the board
2014-04-16 09:04:52 +02:00
Fabien Potencier
810b9ed107 made {@inheritdoc} annotations consistent across the board 2014-04-16 09:04:20 +02:00
Fabien Potencier
a693545324 fixed types in phpdocs 2014-04-16 08:51:57 +02:00
Fabien Potencier
3ad7127a79 bug #10715 [Debug] Fixed ClassNotFoundFatalErrorHandler on windows. (lyrixx)
This PR was merged into the 2.4 branch.

Discussion
----------

[Debug] Fixed ClassNotFoundFatalErrorHandler on windows.

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

Because `$path` is `realpath`'ed. So we have to use `DIRECTORY_SEPARATOR`
instead of `/` because the default directory separator on windows is
`\`. And so the `str_replace` can not work and can lead to a fatal error
because class could already be loaded. For example, the `Response` class
in symfony full stack is in the `bootstrap.php.cache`.

ping @nicolas-grekas

Commits
-------

2ce8cd9 [Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
2014-04-15 21:39:09 +02:00
Grégoire Pineau
2ce8cd993e [Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
Because $path is realpath'ed. So we have to use DIRECTORY_SEPARATOR
instead of / because the default directory separator on windows is
\. And so the str_replace can not work and can lead to a fatal error
because class could already be loaded. For example, the Response class
in symfony full stack is in the bootstrap.php.cache.
2014-04-15 18:41:05 +02:00
Fabien Potencier
c2e134fbb9 minor #10701 Made types used by Symfony compatible with the ones of Hack (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Made types used by Symfony compatible with the ones of Hack

| 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

PHP supports several ways to express types: like Boolean/bool or integer/int. Hack only supports one of them, so this PR proposes to use the Hack type to make Symfony a bit more "compatible" with Hack (gradual upgrade ;)).

Commits
-------

3c9c10f made phpdoc types consistent with those defined in Hack
0555b7f made types consistent with those defined in Hack
2014-04-15 07:44:12 +02:00
Fabien Potencier
3c9c10f3a0 made phpdoc types consistent with those defined in Hack 2014-04-15 07:41:45 +02:00
Fabien Potencier
836bc10952 minor #10712 [Validator] Added missing czech translations (jskvara)
This PR was merged into the 2.4 branch.

Discussion
----------

[Validator] Added missing czech translations

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

Added czech translations for strings from image validator #10672

Commits
-------

995ec72 [Validator] Add missing czech translations
2014-04-15 07:29:28 +02:00
Fabien Potencier
5033e7ac3b minor #10708 Add support Thai translations (liverbool)
This PR was squashed before being merged into the 2.3 branch (closes #10708).

Discussion
----------

Add support Thai translations

Add [Thai](http://www.thai-language.com/) translations to:
+ Symfony/Component/Validator/Resources/translations/
+ Symfony/Component/Security/Resources/translations/

Commits
-------

4bc2951 Add support Thai translations
2014-04-15 07:28:39 +02:00
ツ Liverbool
4bc2951616 Add support Thai translations 2014-04-15 07:28:35 +02:00
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