Commit Graph

25319 Commits

Author SHA1 Message Date
Fabien Potencier 0f8ff1583a marked method as being internal 2017-12-04 10:21:12 -08:00
Fabien Potencier 9524396712 bug #25236 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form][TwigBridge] Fix collision between view properties and form fields

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

This introduce a new Twig test function `rootform` that guarantee the right access to the `parent` property of the form view. The rest of the properties (`vars` and `children`) are not used at least inside Symfony repo.

I've chosen this solution because it doesn't [affect the design of the form view class/interface](https://github.com/symfony/symfony/pull/19492/files#diff-f60b55ea46e40b9c4475a1bd361f6940R168) and because [the problem happen only on Twig](fd98722d15/lib/Twig/Extension/Core.php (L1439-L1447)).

More details about the problem here:
* https://github.com/symfony/symfony/issues/24892
* https://github.com/symfony/symfony/pull/19492
* https://github.com/symfony/symfony/pull/23649#discussion_r129244236

_if this is approved_ we should update also:
* [`foundation_5_layout.html.twig`](336600857b/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig (L321-L326)) in `3.3` (done in https://github.com/symfony/symfony/pull/25305)
* [`bootstrap_4_layout.html.twig`](76d356f36a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig (L176)) in `3.4` (done in https://github.com/symfony/symfony/pull/25306)

Commits
-------

8505894988 Fix collision between view properties and form fields
2017-12-04 10:06:36 -08:00
Kuba Werłos 369075a282 Fix for missing whitespace control modifier in form layout 2017-12-04 13:08:37 +01:00
Fabien Potencier 6eedbb5660 minor #25271 [FrameworkBundle] Fix visibility of a test helper (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix visibility of a test helper

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

Commits
-------

23b5758198 [FrameworkBundle] Fix visibility of a test helper
2017-12-02 08:24:41 -08:00
Kévin Dunglas 23b5758198
[FrameworkBundle] Fix visibility of a test helper 2017-12-02 16:57:48 +01:00
Julien Falque c5af7fd938
Fix hidden currency element with Bootstrap 3 theme 2017-12-02 11:52:27 +01:00
Fabien Potencier de3a25a474 minor #25257 [link] clear the cache after linking (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #25257).

Discussion
----------

[link] clear the cache after linking

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

Clearing the cache after linking prevents fatal errors when a container already exists.

Commits
-------

05c3c81a20 [link] clear the cache after linking
2017-12-01 17:33:23 -08:00
Kévin Dunglas 05c3c81a20 [link] clear the cache after linking 2017-12-01 17:33:21 -08:00
Fabien Potencier 7f5aeb7475 bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[link] Prevent warnings when running link with 2.7

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

Prevent warnings when linking from 2.7 because some directories (like the Bridge/Propel1) don't contain `composer.json` files.

Commits
-------

3e7780cb90 [link] Prevent warnings when running link with 2.7
2017-12-01 17:32:35 -08:00
Kévin Dunglas 3e7780cb90
[link] Prevent warnings when running link with 2.7 2017-12-01 20:16:54 +01:00
Fabien Potencier 5a6e2d7993 bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] ExpressionValidator should use OBJECT_TO_STRING

…value in message

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24595
| License       | MIT
| Doc PR        | Will do.

Commits
-------

7dac528a86 [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-01 09:38:10 -08:00
Amrouche Hamza 7dac528a86
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message 2017-12-01 18:16:29 +01:00
Yonel Ceruto 8505894988 Fix collision between view properties and form fields 2017-11-30 23:33:59 -05:00
Fabien Potencier e2c608ae6b bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] AutExpireFlashBag should not clear new flashes

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

I feel like very happy ! :)
But don't worry I'm.

![img_2826](https://user-images.githubusercontent.com/3451634/33304006-99d44f38-d406-11e7-93f2-4dbc19891299.jpg)

Commits
-------

706201efe4 Test that it do not remove the new flashes when displaying the existing ones
7fe3fe8245 [HttpFoundation] AutExpireFlashBag should not clear new flashes
2017-11-28 17:55:34 -08:00
Samuel ROZE 706201efe4
Test that it do not remove the new flashes when displaying the existing ones 2017-11-28 08:49:55 +00:00
Amrouche Hamza 7fe3fe8245
[HttpFoundation] AutExpireFlashBag should not clear new flashes 2017-11-28 06:31:17 +01:00
Fabien Potencier e3e239ffb4 bug #25152 [Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType (issei-m)
This PR was squashed before being merged into the 2.7 branch (closes #25152).

Discussion
----------

[Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType

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

Currently `FileType` may depend on `Symfony\Component\HttpFoundation\File\File` regardless `http-foundation` has been installed or not.
It leads to occur the class-not-found error.
(Attached the screen capture, please see below and I provided the representation [here](https://github.com/issei-m/form-bug-representation/issues/1) for your information)

So I ensure `Symfony\Component\HttpFoundation\File\File` does exist, and if not, we don't specify any classes for this type.
While setting no specified class to `data_class` means making [property path behavior changed](7234bfd56a/src/Symfony/Component/Form/Form.php (L229-L231)),
[NativeRequestHandler](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/NativeRequestHandler.php) which is usually expected to be used in non-full-stack env handles a pure array like `$_FILES` holds, fully intended behavior AFAIK.

![image](https://user-images.githubusercontent.com/1135118/33216654-14706a56-d178-11e7-8e4b-c38c14ec7532.png)

Commits
-------

a264238e8a [Form] Don't rely on  if http-foundation isn't in FileType
2017-11-26 07:51:04 -08:00
Issei.M a264238e8a [Form] Don't rely on if http-foundation isn't in FileType 2017-11-26 07:51:00 -08:00
Robin Chalas 9107fb0afd bug #24987 [Console] Fix global console flag when used in chain (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix global console flag when used in chain

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

Because SymfonyCon is great we can create pull request in it ! (this was preparer in the plane and I can push it just right now ;))

Finished in the #SymfonyConHackday2017

Commits
-------

1f8db73 [Console] Fix global console flag when used in chain
2017-11-26 02:04:32 +01:00
Fabien Potencier abe6e92593 bug #25043 [Yaml] added ability for substitute aliases when mapping is on single line (Michał Strzelecki, xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] added ability for substitute aliases when mapping is on single line

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

Commits
-------

dd26c80aa9 substitute aliases in inline mappings
675a3fe7f6 added ability for substitute aliases when mapping in YAML is on single line
2017-11-23 06:55:53 -08:00
Nicolas Grekas a809ab27f6 bug #25102 [Form] Fixed ContextErrorException in FileType (chihiro-adachi)
This PR was squashed before being merged into the 2.7 branch (closes #25102).

Discussion
----------

[Form] Fixed ContextErrorException in FileType

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

Fixed an issue that ContextErrorException occurs when multiple is enabled.

Commits
-------

1b408e6 [Form] Fixed ContextErrorException in FileType
2017-11-23 11:40:42 +01:00
chihiro-adachi 1b408e692d [Form] Fixed ContextErrorException in FileType 2017-11-23 11:39:21 +01:00
Nicolas Grekas e2add8b7a3 bug #25130 [DI] Fix handling of inlined definitions by ContainerBuilder (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix handling of inlined definitions by ContainerBuilder

| 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        | -

Team work with @dunglas, debugging behat tests on Symfony 4:
now that everything is private, inlining happens quite often on Symfony 4.
This made us discover an old bug: inlining makes it possible to share the same definition instance to define a locally shared service (local to one service). This is handled properly in PhpDumper, but ContainerDumper is broken. Here is the fix.

Commits
-------

c9c18ac [DI] Fix handling of inlined definitions by ContainerBuilder
2017-11-23 11:29:16 +01:00
Nicolas Grekas c9c18ac7f3 [DI] Fix handling of inlined definitions by ContainerBuilder 2017-11-23 11:22:49 +01:00
Nicolas Grekas 9d68751431 Force phpunit-bridge update (bis) 2017-11-22 10:25:38 +01:00
Nicolas Grekas 6bd1011534 Force phpunit-bridge update 2017-11-22 09:54:48 +01:00
Nicolas Grekas d6b288a4ca minor #25085 Update github PR template (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Update github PR 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        | -

Now that branch 4.0 is out, and 3.4/4.0 are in bug fix only mode, let's update our template.

Commits
-------

4f63b3a Update github PR template
2017-11-22 09:37:09 +01:00
Nicolas Grekas 4f63b3ac28 Update github PR template 2017-11-22 09:34:48 +01:00
Nicolas Grekas efd9a5ae08 minor #25041 [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler` (issei-m)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler`

| Q             | A
| ------------- | ---
| Branch?       |2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | Not confirmed, but the changes are completely minor
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I guess the term "processor" had been used until [this PR comes](https://github.com/symfony/symfony/pull/7732), but hadn't been renamed properly at the time.
And I think "handler" sounds more relevant to me anyway.

Commits
-------

a35d4f8 [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler`
2017-11-21 10:54:12 +01:00
Nicolas Grekas 57a9e5ed72 minor #25058 Bump phpunit-bridge requirement to 3.4|4.0 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Bump phpunit-bridge requirement to 3.4|4.0

| 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        | -

The bridge 4.0 is already used because of the way simple-phpunit works.
This just make it more explicit and will be required when #25056 will be merged.

Commits
-------

1c1a540 Bump phpunit-bridge requirement to 3.4|4.0
2017-11-21 10:47:16 +01:00
Nicolas Grekas 1c1a540d2f Bump phpunit-bridge requirement to 3.4|4.0 2017-11-21 10:30:35 +01:00
Issei.M a35d4f88b3 [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler` 2017-11-21 10:08:49 +09:00
Nicolas Grekas abe3c96253 minor #24746 Add a link script to ease debugging Flex apps (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

Add a link script to ease debugging Flex apps

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

(Reopened because of mishandling in the previous PR)

It's painful to debug and patch Flex apps because `symfony/symfony` isn't installed by default (only components are) but PRs must be opened against the monolithic repository.

This tiny tool, inspired by `npm link`, scan the `vendor/` directory of the project, and replace `symfony/` dependencies by symlinks to the local clone of the `symfony/symfony` repositories.

Usage:

```
git clone git@github.com:symfony/symfony.git
cd symfony
./link /path/to/the/project
```

Commits
-------

381f5d1 Add a "link" script to ease debugging Flex apps
2017-11-20 22:26:00 +01:00
Kévin Dunglas 381f5d1bc5
Add a "link" script to ease debugging Flex apps 2017-11-20 22:18:44 +01:00
Nicolas Grekas f1b7921390 minor #25040 [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method (issei-m)
This PR was squashed before being merged into the 2.7 branch (closes #25040).

Discussion
----------

[Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | Not confirmed, but the changes are completely minor
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

faf5470 [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method
2017-11-20 18:59:32 +01:00
Issei.M faf5470fd5 [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method 2017-11-20 18:59:30 +01:00
Christian Flothmann dd26c80aa9 substitute aliases in inline mappings 2017-11-20 10:04:28 +01:00
Michał Strzelecki 675a3fe7f6 added ability for substitute aliases when mapping in YAML is on single line 2017-11-20 08:20:36 +01:00
Nicolas Grekas 4c5d9cf06b minor #25034 Remove function_exists(__phpunit_run_isolated_test) checks (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove function_exists(__phpunit_run_isolated_test) checks

| 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        | -

As now permitted by #25032

Commits
-------

a512217 Remove function_exists(__phpunit_run_isolated_test) checks
2017-11-19 21:01:54 +02:00
Nicolas Grekas a512217431 Remove function_exists(__phpunit_run_isolated_test) checks 2017-11-19 20:49:57 +02:00
Amrouche Hamza 1f8db731a0
[Console] Fix global console flag when used in chain 2017-11-18 15:50:49 +02:00
Fabien Potencier 86986b41b0 minor #24969 Replace array|\Traversable by iterable (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

Replace array|\Traversable by iterable

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Replace `array|\Traversable` by `iterable`, favoring pure API (or less mixed at least :)) and be clear whenever phpdoc is replaced.

https://secure.php.net/manual/en/language.types.iterable.php

Commits
-------

278088931b Replace array|\Traversable by iterable
2017-11-18 09:48:31 +02:00
Fabien Potencier 9447016979 minor #25008 [Console] Remove remaining dead code (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Remove remaining dead code

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

Since they are always re-thrown, no need to catch `\Error` instances at all.

Commits
-------

3822c07f65 [Console] Remove remaining dead code
2017-11-18 09:40:15 +02:00
Fabien Potencier c247717a9f minor #25009 [SecurityBundle] Fix syntax error in test (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Fix syntax error in test

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

Should make appveyor green.

Commits
-------

20f9b75857 [SecurityBundle] Fix syntax error in test
2017-11-18 09:38:33 +02:00
Robin Chalas 20f9b75857 [SecurityBundle] Fix syntax error in test 2017-11-17 15:26:00 +01:00
Christophe Coevoet 11d79cbb12 bug #24956 Fix ambiguous pattern (weltling)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix ambiguous pattern

[Validator][Constraints][UrlValidator] Fix domain name pattern.

| 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        |

`\pS` is a unicode character class, `\pS-\.` pretends to be a range which is not. This pattern fails with PCRE2.

Thanks.

Commits
-------

059f59a106 Fix ambiguous pattern
2017-11-17 14:57:47 +01:00
Robin Chalas 3822c07f65 [Console] Remove remaining dead code 2017-11-17 13:59:02 +01:00
Fabien Potencier c963178206 bumped Symfony version to 2.7.39 2017-11-17 07:26:23 +01:00
Fabien Potencier b95964ae88
Merge pull request #24997 from fabpot/release-2.7.38
released v2.7.38
2017-11-16 17:26:07 +01:00
Fabien Potencier 330c5e5577 updated VERSION for 2.7.38 2017-11-16 17:24:22 +01:00