Commit Graph

25319 Commits

Author SHA1 Message Date
Fabien Potencier 59c272b312 bug #24036 [Form] Fix precision of MoneyToLocalizedStringTransformer's divisions and multiplications (Rubinum)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix precision of MoneyToLocalizedStringTransformer's divisions and multiplications

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

There is a [PHP Bug](https://bugs.php.net/bug.php?id=75004) with the accuracy of divisions and multiplications when `/=` and `*=` are used.
Here is the proof: https://3v4l.org/u1DkX
It would be better to use `bcmul()` and `bcdiv()` in the `MoneyToLocalizedStringTransformer.php` to prevent this bug.

Commits
-------

ab47c7878e Added improvement for accuracy in MoneyToLocalizedStringTransformer.
2017-09-29 09:36:28 -07:00
Fabien Potencier 5bbec9c722 bug #24367 PdoSessionHandler: fix advisory lock for pgsql (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

PdoSessionHandler: fix advisory lock for pgsql

when session.sid_bits per_character > 4 the session id can contain non-hex-characters which will be ignored by hexdec. this can potentially result in collisions on the lock key from different sessions, e.g. the session ids `aagh` and `aaij` would have the same pgsql lock because `hexdec('aagh') === hexdec('aaij')`

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24095
| License       | MIT
| Doc PR        |

Commits
-------

0f0a6e85e3 PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
2017-09-28 17:54:35 -07:00
Tobias Schultze 0f0a6e85e3 PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4 2017-09-28 20:22:10 +02:00
Fabien Potencier e4d9bfd245 minor #24353 [Validator] minor translation text fix (darnel)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] minor translation text fix

Update validators.cs.xlf - Fix czech translation for "This field was not expected"

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

This commit fixes grammatical issue for czech translation only.

Commits
-------

fbe7148000 Fix translation for "This field was not expected"
2017-09-28 06:20:28 -07:00
Fabien Potencier d178a9b2c5 bug #24243 HttpCache does not consider ESI resources in HEAD requests (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #24243).

Discussion
----------

HttpCache does not consider ESI resources in HEAD requests

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

Due to this shortcut:
3b42d8859e/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L634-L642)
... the `HttpCache` never looks at the response body for `HEAD` requests. This makes it completely miss ESI-related tweaks like computing the correct TTL, removing validation headers or updating the `Content-Length`.

From RFC2616 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4):

> The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.

Although it says "SHOULD", I think it can be misleading at best when HEAD requests do, for example, return different (greater) `s-maxage` values than a corresponding GET request.

Commits
-------

4dd0e53171 HttpCache does not consider ESI resources in HEAD requests
2017-09-28 05:20:58 -07:00
Matthias Pigulla 4dd0e53171 HttpCache does not consider ESI resources in HEAD requests 2017-09-28 05:20:56 -07:00
Christophe Coevoet 9ed6dd4391 minor #24351 [Routing] Enhance Route(Collection) docblocks (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Enhance Route(Collection) docblocks

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

5b4308e9e1 [Routing] Enhance Route(Collection) docblocks
2017-09-28 10:05:10 +02:00
darnel fbe7148000 Fix translation for "This field was not expected"
Update validators.cs.xlf - Fix czech translation for "This field was not expected"
2017-09-28 08:55:08 +02:00
Maxime Steinhausser 5b4308e9e1 [Routing] Enhance Route(Collection) docblocks 2017-09-27 23:22:30 +02:00
Tim Jabs ab47c7878e Added improvement for accuracy in MoneyToLocalizedStringTransformer. 2017-09-26 17:19:17 +02:00
Christophe Coevoet 7ea18247f5 minor #24328 Use correct verb form in the pull request template (pamil)
This PR was merged into the 2.7 branch.

Discussion
----------

Use correct verb form in the pull request template

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

When "forget" is used with a gerund, it refers to an action that has already happened.

Commits
-------

484e3fd3f2 Use correct verb form in the pull request template
2017-09-26 12:11:58 +02:00
Nicolas Grekas dd8cc88942 minor #24329 Removed unused private property in the ContextListener (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

Removed unused private property in the ContextListener

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23882#discussion_r141007315
| License       | MIT
| Doc PR        | ~

The context property is unused, the local variable (constructor argument) is only concatenated to a string inside (session key).

Commits
-------

6522c05 Removed unused private property
2017-09-26 12:07:11 +02:00
Iltar van der Berg 6522c05876 Removed unused private property 2017-09-26 12:02:43 +02:00
Nicolas Grekas b90ce05c24 minor #24316 Added null as explicit return type (?TokenInterface) (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

Added null as explicit return type (?TokenInterface)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23882#discussion_r140704737
| License       | MIT
| Doc PR        | ~

This fixes the returntype in the `ContextListener` so it can be merged upwards.

/cc @chalasr

Commits
-------

1ba4dd9 Added null as explicit return type (?TokenInterface)
2017-09-26 12:00:14 +02:00
Kamil Kokot 484e3fd3f2 Use correct verb form in the pull request template
When "forget" is used with a gerund, it refers to an action that has already happened.
2017-09-26 11:35:56 +02:00
Nicolas Grekas 3128cfd723 minor #24317 Use PHP_MAXPATHLEN in Filesystem.php (edoger)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #24317).

Discussion
----------

Use PHP_MAXPATHLEN in Filesystem.php

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

Relative to the use of fixed values, I think the use of PHP_MAXPATHLEN will be more robust.

Commits
-------

7a47559 Use PHP_MAXPATHLEN in Filesystem.
2017-09-26 11:21:42 +02:00
Qingshan Luo 7a475595e2 Use PHP_MAXPATHLEN in Filesystem. 2017-09-26 11:21:42 +02:00
Nicolas Grekas 4129fd2a83 bug #24304 [FrameworkBundle] Fix Routing\DelegatingLoader (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix Routing\DelegatingLoader

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

Spotted while reviewing: the default controller is not always a string, so parsing should only be done conditionally.

Commits
-------

a69c1b2 [FrameworkBundle] Fix Routing\DelegatingLoader
2017-09-25 11:27:18 +02:00
Iltar van der Berg 1ba4dd9b44 Added null as explicit return type (?TokenInterface) 2017-09-25 09:46:32 +02:00
Nicolas Grekas a69c1b2ae1 [FrameworkBundle] Fix Routing\DelegatingLoader 2017-09-24 15:55:14 +02:00
Robin Chalas a40c94d8e3 bug #24219 [Console] Preserving line breaks between sentences according to the exception message (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Preserving line breaks between sentences according to the exception message

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

Commits
-------

e2d4904 Render all line breaks according to the exception message
2017-09-20 15:00:12 +02:00
Yonel Ceruto e2d4904a84 Render all line breaks according to the exception message 2017-09-19 16:27:25 -04:00
Maxime Steinhausser 139398faf7 minor #24258 [Form] Fix phpdoc (hason)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix phpdoc

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

Commits
-------

f13081d12c [Form] Fix phpdoc
2017-09-19 19:12:22 +02:00
Martin Hasoň f13081d12c [Form] Fix phpdoc 2017-09-19 13:52:15 +02:00
Maxime Steinhausser a6f01a38eb minor #24249 [DI] remove confusing code (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] remove confusing code

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

This code is a no-op. I guess the intention was to resolve a parametrized alias target, yet this never worked and we don't want to make it work.

Commits
-------

3da645efed [DI] remove confusing code
2017-09-18 19:54:25 +02:00
Maxime Steinhausser c3518b59ef bug #23722 [Form] Fixed GroupSequence with "constraints" option (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed GroupSequence with "constraints" option

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

Commits
-------

e39e7a4fa9 [Form] Fixed GroupSequence with "constraints" option
2017-09-18 19:51:43 +02:00
Nicolas Grekas 3da645efed [DI] remove confusing code 2017-09-18 17:50:14 +02:00
HeahDude e39e7a4fa9 [Form] Fixed GroupSequence with "constraints" option 2017-09-18 17:33:18 +02:00
Nicolas Grekas 2bf56296bf minor #24230 [Validator] Clarify UUID validator behavior (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #24230).

Discussion
----------

[Validator] Clarify UUID validator behavior

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24209
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

TLDR; after some investigation this is now a doc update.

This fixes the variant detection of a UUID, in strict validation, as described by https://tools.ietf.org/html/rfc4122#section-4.1.1

Tested variant UUID's taken from [ramsey/uuid](https://github.com/ramsey/uuid/blob/master/tests/UuidTest.php#L506). I cannot produce an invalid variant UUID anymore, as i believe by now anything would be variant 3 (future reserved).

/cc @backbone87

Commits
-------

cde5a47 [Validator] Clarify UUID validator behavior
2017-09-18 16:27:31 +02:00
Roland Franssen cde5a47e8f [Validator] Clarify UUID validator behavior 2017-09-18 16:27:30 +02:00
Fabien Potencier 3b42d8859e bug #22321 [Filesystem] Fixed makePathRelative (ausi)
This PR was squashed before being merged into the 2.7 branch (closes #22321).

Discussion
----------

[Filesystem] Fixed makePathRelative

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

Updating to Symfony 3.2.7 @agoat noticed a bug with `Filesystem::makePathRelative()` in contao/core-bundle#751:

- In Symfony 3.2.6 `makePathRelative('aa/cc', 'bb/cc')` returned correctly `../../aa/cc`
- In Symfony 3.2.7 the same method call returns `./`

I think this issue was introduced with #22133.

While working on the fix I noticed some other issues too:

- An unnecessary if construct that did nothing, fc745f45949fdb8d5aa590618ec73537721f99b4
- Missing normalization of `./` path segments, 15982d4b083723555cfa149368eaaae9609d0e22
- `../` got ignored at the beginning of relative paths, 9586e880d69f613b10e23dd53cea877e622b221a
- The documentation of the method only allowed absolute paths, but there are already unit tests ([FilesystemTest.php:1097](ab93feae3f/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php (L1097))) that test the behavior of relative paths, cec473eeb099c074b5883e7187f74663402f9d87

This pull request fixes all these issues and adds tests for them.

Commits
-------

2bc11505f4 [Filesystem] Fixed makePathRelative
2017-09-17 08:14:54 -07:00
Martin Auswöger 2bc11505f4 [Filesystem] Fixed makePathRelative 2017-09-17 08:14:49 -07:00
Fabien Potencier b973ecf8ee minor #24215 CS: recover no_break_comment (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: recover no_break_comment

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

rule was excluded in #24123, yet without any information about it
it was not excluded in original form of given PR, it's not part of any commitlog nor any comment, title claims to touch only other rules.

this rule shall not be excluded, it's part of PSR and is applied for most places.
I added missing ones.

Commits
-------

4e9d1600ee CS: recover no_break_comment
2017-09-15 09:58:02 -07:00
Dariusz 4e9d1600ee CS: recover no_break_comment 2017-09-15 12:36:22 +02:00
Nicolas Grekas 800f306589 minor #24123 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction (SpacePossum)
This PR was squashed before being merged into the 2.7 branch (closes #24123).

Discussion
----------

[CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction

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

Hi all and congratulations on the 1 billion of downloads! awesome :D

This is a courtesy call (or PR) from the PHP-CS-Fixer community.
As always I don't expect this PR to be merged nor do I've any strong feelings about why not.

The goal of this PR is to determine if the following new rules should be added to the Symfony ruleset by default. If so `fabbot.io` will (at some point) start reporting violations of these rules.
Please be aware that if the rules are accepted but this PR is not, any new PR's might contain a part of the fixes as proposed in this PR as fabbot.io will suggest to the authors of the new PR's to update the CS, consequently this might create noise.

Here are the rules:

```
    'no_unneeded_curly_braces' => true,
    'no_unneeded_final_method' => true,
    'semicolon_after_instruction' => true,
    'yoda_style' => true,
```

The first three are done in the first commit.
The `yoda_style` in the last.

I know the `yoda`-style fixing has a long history about it and some people have strong opinions on it. Please consider two things before commenting about Yoda
- this PR is not meant to determine the Symfony code style, I'm sure Symfony has other channels for these kind of discussions
- if you don't like Yoda style, please consider heading over to https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2446 and review my PR. If it gets merged you'll have a free tool to change all Yoda expressions in your code to non-Yoda (you can do it around as well as you can see in both PR's).

Thank you for your time!

Commits
-------

3e90138 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
2017-09-15 11:46:59 +02:00
SpacePossum 3e90138214 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction 2017-09-15 11:46:57 +02:00
Jáchym Toušek d4f6039dcd
[HttpFoundation] Fix file upload multiple with no files 2017-09-14 14:29:10 +02:00
Fabien Potencier 5bf241aa8e bug #23473 [Filesystem] mirror - fix copying content with same name as source/target. (gitlost)
This PR was squashed before being merged into the 2.7 branch (closes #23473).

Discussion
----------

[Filesystem] mirror - fix copying content with same name as source/target.

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

Uses `substr()` and lengths in `Filesystem::mirror()` rather than `str_replace()` to avoid multiple replacements.

Commits
-------

b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target.
2017-09-13 09:02:25 -07:00
gitlost b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target. 2017-09-13 09:02:23 -07:00
Grégoire Pineau 256055218e [Intl] Fixed support of Locale::getFallback 2017-09-13 12:20:09 +02:00
Nicolas Grekas cd8374586b minor #24163 .php_cs.dist - simplify config (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

.php_cs.dist - simplify config

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

dropped configuration is already part of `@Symfony` ruleset

Commits
-------

4ea681e .php_cs.dist - simplify config
2017-09-12 08:56:20 +02:00
Fabien Potencier fc30d5b0cf bug #24162 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces

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

Commits
-------

10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-11 15:35:04 -07:00
Dariusz 4ea681e7d1 .php_cs.dist - simplify config 2017-09-12 00:23:36 +02:00
Fabien Potencier 10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces 2017-09-11 13:58:31 -07:00
Fabien Potencier 687ad65d82 minor #24149 [CS] Apply phpdoc_annotation_without_dot (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

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

Rule was manually applied here : https://github.com/symfony/symfony/pull/19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49436 [CS] Apply phpdoc_annotation_without_dot
2017-09-11 13:37:54 -07:00
Dariusz 7a97b49436 [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -07:00
Fabien Potencier bcfe152113 bug #24141 [DomCrawler] Fix conversion to int on GetPhpFiles (MaraBlaga)
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] Fix conversion to int on GetPhpFiles

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

We've encountered that when using the DomCrawler with the UploadedFile, everything gets converted into strings. We've addressed the issue, and made sure that the attributes in the UploadedFile respects their type.

The code below demonstrates the problem.

```<?php
require 'vendor/autoload.php';
require 'app/AppKernel.php';
$crawler = new \Symfony\Component\DomCrawler\Crawler(
    '<form method="post"><input type="file" name="image"/></form>',
    'http://www.example.com'
);
$form = $crawler->filter('form')->form();
$form['image'] = new \Symfony\Component\HttpFoundation\File\UploadedFile(
    'path/to/file',
    'foo',
    'text/plain',
    100
);

$client = new \Symfony\Bundle\FrameworkBundle\Client(new AppKernel('test', true));
$crawler = $client->submit($form);

var_dump($client->getRequest()->files->get('image')->getClientSize());  //returns string, not int
echo 'Done.' . PHP_EOL;

Commits
-------

122da5add5 [DomCrawler] Fix conversion to int on GetPhpFiles
2017-09-11 08:48:47 -07:00
Mara Blaga 122da5add5 [DomCrawler] Fix conversion to int on GetPhpFiles 2017-09-11 15:10:51 +01:00
Fabien Potencier 47871c995f bug #23853 Filtering empty uuids in ORMQueryBuilderLoader. (mlazovla)
This PR was merged into the 2.7 branch.

Discussion
----------

Filtering empty uuids in ORMQueryBuilderLoader.

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

Commits
-------

27e8cd289c Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 05:33:33 -07:00
Fabien Potencier 7793b797af Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
This reverts commit d74144fc0b, reversing
changes made to 2b79f48405.
2017-09-08 18:12:06 -07:00