Commit Graph

40465 Commits

Author SHA1 Message Date
Christian Flothmann
a60d802619 do not validate non-submitted form fields in PATCH requests 2019-02-21 08:19:04 +01:00
Christian Flothmann
42e8f5e3a2 add option to render NumberType as type="number" 2019-02-21 08:09:42 +01:00
Przemysław Bogusz
51ed942ef5 Additional addons for the ghost 2019-02-21 00:39:50 +01:00
Matt Janssen
0c8d311657 Update usage example in ArrayInput doc block.
Make the ArrayInput doc block example more self-explanatory and less misleading. Show the common use case of having `command`, and replace the confusing `name` argument with something more arbitrary.
2019-02-20 16:12:06 -06:00
Robin Chalas
46461e91f9 [Console] Prevent ArgvInput::getFirstArgument() from returning an option value 2019-02-20 21:43:41 +01:00
Ralf Kühnel
0bd5dd84ef [Validator] Fixed duplicate UUID 2019-02-20 20:51:21 +01:00
Fabien Potencier
c6de2dc03e fixed CS 2019-02-20 15:47:01 +01:00
Jáchym Toušek
eab631fc45
[VarDumper] Implement DsCaster 2019-02-20 12:31:22 +01:00
Roland Franssen
9fb619ac62 [EventDispatcher] Fix unknown priority 2019-02-20 11:38:05 +01:00
Fabien Potencier
47d26f6f70 bug #30313 Avoid mutating the Finder when building the iterator (stof)
This PR was merged into the 3.4 branch.

Discussion
----------

Avoid mutating the Finder when building the iterator

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

When excluding dot files or vcs files (which is done by default), the Finder object was mutated each time `searchInDirectory` was called to register the extra exclusions. This leads to registering them multiple times when the method is called multiple times (which happens either because you have multiple directories in `->in()` or because you call `getIterator` multiple times, for instance because of using `hasResults` or `count`).

This mutation create bugs if the Finder object is reconfigured between the 2 calls to `getIterator` to disable some of these ignore rules, as they would already be registered in the other config properties. New tests have been added to reproduce these bugs and prevent regressions.

This mutation is now avoided by using a local array for the final configuration, preserving the user configuration.

Commits
-------

94989fe794 Avoid mutating the Finder when building the iterator
2019-02-20 11:26:20 +01:00
Christophe Coevoet
94989fe794 Avoid mutating the Finder when building the iterator 2019-02-20 10:38:23 +01:00
Christian Flothmann
5c7390006b feature #29887 [Form] Add input_format option to DateType and DateTimeType (fancyweb)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Add input_format option to DateType and DateTimeType

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/29883
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10882

Add a new option to specify the date format when using the `string` input type.

Commits
-------

c8240a0423 [Form] Add input_format option to DateType and DateTimeType
2019-02-20 08:48:20 +01:00
Christian Flothmann
c3cf08e238 minor #30230 [Form] undeprecate date formats in single_text widgets (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] undeprecate date formats in single_text widgets

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

Commits
-------

1a983d07db undeprecate date formats in single_text widgets
2019-02-20 08:44:41 +01:00
Nicolas Grekas
424773da1f bug #30294 [FrameworkBundle] Fix Descriptor throwing on non existent parent (GuilhemN)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] Fix Descriptor throwing on non existent parent

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/nelmio/NelmioApiDocBundle/issues/1470  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

The Descriptor throws an exception when it encounters a class having a non existent parent, see https://github.com/nelmio/NelmioApiDocBundle/issues/1470 for the record.

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

6b354cc304 Fix Descriptor throwing on non existent parent
2019-02-20 08:36:13 +01:00
Nicolas Grekas
df0fc5ee72 minor #30308 [Validator] Added missing translations pt_BR (felipyamorim)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Added missing translations pt_BR

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

Added missing translations.

Commits
-------

19ca344685 [Validator] Added missing translations pt_BR
2019-02-20 08:24:15 +01:00
Nicolas Grekas
31bfded9c7 minor #30309 [Validator] Add the missing translations for the Greek (el) locale (nikossvnk)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Greek (el) locale

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30158
| License       | MIT
| Doc PR        | n/a
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

7db66b3a30 [Validator] Add the missing translations for the Greek (el) locale
2019-02-20 08:23:13 +01:00
nikos.sotiropoulos
7db66b3a30 [Validator] Add the missing translations for the Greek (el) locale
closes #30158
2019-02-20 01:41:21 +02:00
Philipp Cordes
3a22cad29b Fix infinite recursion when passed an empty string 2019-02-19 23:14:55 +01:00
Nicolas Grekas
5fcd6b1d4e [VarDumper] add link to source next to class names 2019-02-19 22:52:41 +01:00
Nicolas Grekas
51b72f3284 [Form] Relax fixture 2019-02-19 19:43:50 +01:00
Nicolas Grekas
ccd4bbeb31 Merge branch '4.2'
* 4.2:
  [Form] Relax fixture
2019-02-19 19:42:38 +01:00
Nicolas Grekas
822867d7d5 [Form] Relax fixture 2019-02-19 19:41:56 +01:00
Nicolas Grekas
374c8b0063 Merge branch '4.2'
* 4.2:
  [Console] Fix command testing with missing inputs
  [Validator] Sync no/nb translation files
  [Translation] Added a script to display the status of translations
  [Validator] Added missing translations for Norwegian (\"no\") locale #30179
  [Security\Guard] bump lowest version of security-core
  [TwigBridge] Fix test
  Remove unnecessary ProgressBar stdout writes (fixes flickering)
  [Validator] improve translations for albanian ("sq") locale
  [VarDumper] fix serializing Stub instances
  [Validator] Added missing use statement for UnexpectedTypeException
  Don't resolve the Deprecation error handler mode until a deprecation is triggered
  bug #30245 fix lost namespace in eval (fizzka)
  fix lost namespace in eval
  [Twig] removed usage of non-namespaced classes
  added missing dot
  Update validators.lt.xlf
  #30172 Add the missing validation translations for the Luxembourgish …
  [Debug][ErrorHandler] Preserve next error handler
2019-02-19 19:29:52 +01:00
Nicolas Grekas
890c2ac9f5 Merge branch '3.4' into 4.2
* 3.4:
  [Console] Fix command testing with missing inputs
  [Validator] Sync no/nb translation files
  [Translation] Added a script to display the status of translations
  [Validator] Added missing translations for Norwegian (\"no\") locale #30179
  [Security\Guard] bump lowest version of security-core
2019-02-19 19:28:05 +01:00
Felipy Amorim
19ca344685
[Validator] Added missing translations pt_BR
| Q | A |
|--|--|
| Branch? | 3.4 |
| Bug fix? |no|
|New feature?	|no|
|BC breaks?	|no|
|Deprecations?	|no|
|Tests pass?	|yes|
|Fixed tickets	|#30182|
|License	|MIT|

Added missing translations.
2019-02-19 14:53:11 -03:00
Nicolas Grekas
87a223b333 minor #30305 [Form] Fix describing closures (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Fix describing closures

| 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

Fixes Form' TextDescriptorTest broken after #30295

Commits
-------

005e75cbab [Form] Fix describing closures
2019-02-19 16:47:43 +01:00
Robin Chalas
005e75cbab [Form] Fix describing closures 2019-02-19 15:40:04 +01:00
Robin Chalas
3d4c5ddba7 bug #30271 [Console] Fix command testing with missing user inputs (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix command testing with missing user inputs

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

Fixes the remaining cases where test execution hangs using `CommandTester`.

Commits
-------

ac4e9b0b26 [Console] Fix command testing with missing inputs
2019-02-19 14:37:40 +01:00
Nicolas Grekas
5909a47664 minor #30296 [VarDumper] link paths in stack traces to IDE (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] link paths in stack traces to IDE

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

`./test.php:8` and `./test.php:11` can now be clicked:

![image](https://user-images.githubusercontent.com/243674/52971041-466b1c80-33b6-11e9-9bc1-0e55dc115f63.png)

Commits
-------

6672ac3f43 [VarDumper] link paths in stack traces to IDE
2019-02-19 14:25:47 +01:00
Nicolas Grekas
e7430f4633 minor #30295 [VarDumper] dump Closures' parameters once: in their signatures (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] dump Closures' parameters once: in their signatures

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

Now that closures are dumped with their signature, dumping parameters is noisy duplicate info.

Commits
-------

f3659b684e [VarDumper] dump Closures' parameters once: in their signatures
2019-02-19 14:25:06 +01:00
Nicolas Grekas
6672ac3f43 [VarDumper] link paths in stack traces to IDE 2019-02-18 19:48:10 +01:00
Robin Chalas
ac4e9b0b26 [Console] Fix command testing with missing inputs 2019-02-18 19:44:35 +01:00
Nicolas Grekas
f3659b684e [VarDumper] dump Closures' parameters once: in their signatures 2019-02-18 19:32:59 +01:00
Thomas Calvet
c8240a0423 [Form] Add input_format option to DateType and DateTimeType 2019-02-18 19:19:29 +01:00
Guilhem Niot
6b354cc304 Fix Descriptor throwing on non existent parent 2019-02-18 17:11:20 +01:00
Fabien Potencier
491204400b minor #30292 [Validator] Sync Norwegian translation files (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Sync Norwegian translation files

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 travis green

Commits
-------

f2af0801c4 [Validator] Sync no/nb translation files
2019-02-18 15:49:05 +01:00
Robin Chalas
f2af0801c4 [Validator] Sync no/nb translation files 2019-02-18 15:33:02 +01:00
Fabien Potencier
1f829eca87 minor #30237 [Translation] Added a script to display the status of translations (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #30237).

Discussion
----------

[Translation] Added a script to display the status of translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This is the script I used to get the missing translations for each locale. I think it could come in handy for Symfony to always keep translations in sync.

Commits
-------

5ca7dedaaa [Translation] Added a script to display the status of translations
2019-02-18 13:35:36 +01:00
Javier Eguiluz
5ca7dedaaa [Translation] Added a script to display the status of translations 2019-02-18 13:35:29 +01:00
Fabien Potencier
3315c8e71f minor #30284 [Validator] Added missing translations for Norwegian ("no") locale #30179 (caalholm)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #30284).

Discussion
----------

[Validator] Added missing translations for Norwegian ("no") locale #30179

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

Commits
-------

c8dcc5b8e6 [Validator] Added missing translations for Norwegian (\"no\") locale #30179
2019-02-18 13:33:06 +01:00
caalholm
c8dcc5b8e6 [Validator] Added missing translations for Norwegian (\"no\") locale #30179 2019-02-18 13:32:58 +01:00
Robin Chalas
e69855e906 minor #30282 [Security\Guard] bump lowest version of security-core (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security\Guard] bump lowest version of security-core

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

Forgotten in #30006 so that `PostAuthenticationGuardToken` can call `AbstractToken::doSerialize()`.

Commits
-------

93cfd5b2a0 [Security\Guard] bump lowest version of security-core
2019-02-18 10:29:27 +01:00
Fabien Potencier
caa2579e0a Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] Fix test
  Remove unnecessary ProgressBar stdout writes (fixes flickering)
  [Validator] improve translations for albanian ("sq") locale
  [VarDumper] fix serializing Stub instances
  Don't resolve the Deprecation error handler mode until a deprecation is triggered
  bug #30245 fix lost namespace in eval (fizzka)
  [Twig] removed usage of non-namespaced classes
  added missing dot
  Update validators.lt.xlf
  #30172 Add the missing validation translations for the Luxembourgish …
  [Debug][ErrorHandler] Preserve next error handler
2019-02-18 07:49:49 +01:00
Fabien Potencier
ede6c9d6b0 minor #30279 [TwigBridge] Fix test (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Fix test

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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
-------

ad752b1a48 [TwigBridge] Fix test
2019-02-18 07:42:23 +01:00
Fabien Potencier
d962a74206 minor #30276 [Validator] improve translations for albanian ("sq") locale (Eno Mullaraj)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] improve translations for albanian ("sq") locale

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

While reviewing the changes announced in the "A Week of Symfony #633" post I found that there was room for improvement in the Validation component translations as they were defined earlier in 2012 and were never revisited.

All the translations have been reviewed and some of them were updated with the following improvements:
* overall translation message consistency
* fix singular expression messages
* fix grammatical errors
* use albanian form of expression
* restore, as lexical gap, the "locale" translation

Commits
-------

5cac9ad97d [Validator] improve translations for albanian ("sq") locale
2019-02-18 07:41:39 +01:00
Nicolas Grekas
93cfd5b2a0 [Security\Guard] bump lowest version of security-core 2019-02-17 23:00:14 +01:00
Fabien Potencier
488e9e5c13 bug #30278 Remove unnecessary ProgressBar stdout writes (fixes flickering) (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove unnecessary ProgressBar stdout writes (fixes flickering)

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

Currently ProgressBar flickers when writing a lot.

![ezgif-4-ad817e1834](https://user-images.githubusercontent.com/496233/38173299-44482400-35bc-11e8-88b6-83b480d55905.gif)

This patch fixes it and it's buttery smooth now.

Additionally, this improves performance by 60%. Test code
```php
$maxSteps = 1000000;
$progressBar = new ProgressBar(new ConsoleOutput(), $maxSteps);
for ($i=0; $i<= $maxSteps; $i++) {
    $progressBar->advance();
}
```

Commits
-------

3fbcb965d0 Remove unnecessary ProgressBar stdout writes (fixes flickering)
2019-02-17 22:58:58 +01:00
Robin Chalas
ad752b1a48 [TwigBridge] Fix test 2019-02-17 19:45:33 +01:00
Gabriel Ostrolucký
3fbcb965d0
Remove unnecessary ProgressBar stdout writes (fixes flickering) 2019-02-17 18:48:00 +01:00
Nicolas Grekas
98693beca4 feature #30051 Drop \Serializable implementations (renanbr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Drop \Serializable implementations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes, it removes `\Serializable` interface from many classes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This PR replaces [Serializable](https://secure.php.net/serializable) implementations with [__sleep() and __wakeup()](http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep).

Changes touch these components:

- Config
- DependencyInjection
- Form
- HttpKernel
- Validator

Commits
-------

f8bf9738f0 Drop \Serializable
2019-02-17 15:02:01 +01:00