Commit Graph

4016 Commits

Author SHA1 Message Date
Christian Flothmann
87c1d19e72 add back possibility to use form themes without translations 2019-06-11 11:05:48 +02:00
Alexandre Segura
ff5517e554 Add missing rendering of form help block. 2019-06-10 10:21:04 +02:00
Nicolas Grekas
48093f4a13 Fix reporting unsilenced deprecations from insulated tests 2019-06-09 16:27:26 +02:00
Christian Flothmann
37efa4bb8c fix handling nested embeddables 2019-06-08 11:24:26 +02:00
Franco Traversaro
35e6df6bac [Doctrine Bridge] Check field type before adding Length constraint 2019-06-06 09:45:42 +02:00
Christian Flothmann
adfa1ef3ce do not process private properties from parent class 2019-06-04 10:43:25 +02:00
Christian Flothmann
56fe02512c don't add embedded properties to wrapping class metadata 2019-06-03 15:22:45 +02:00
Nicolas Grekas
d4a9e7e639 [TwigBridge] suggest Translation Component when TranslationExtension is used 2019-06-01 09:11:44 +02:00
Christian Flothmann
a3555fc49c do not enable validator auto mapping by default 2019-05-30 21:25:18 +02:00
Nicolas Grekas
0da213711c Merge branch '4.2' into 4.3
* 4.2:
  Use willReturn() instead of will(returnValue()).
2019-05-30 18:10:05 +02:00
Nicolas Grekas
06c655251c Merge branch '3.4' into 4.2
* 3.4:
  Use willReturn() instead of will(returnValue()).
2019-05-30 18:06:08 +02:00
Alexander M. Turek
4fb67df612 Use willReturn() instead of will(returnValue()). 2019-05-30 17:47:52 +02:00
Grégoire Paris
3a88f11662
Use a more appropriate group when deprecating mode
The deprecation comes from a vendor: the phpunit bridge itself, so it's
either the direct or the indirect group. And since only the end user is
supposed to set the group, then this is supposed to be a direct
deprecation.
2019-05-30 10:57:55 +02:00
Nicolas Grekas
3a508e3258 Updated "experimental" annotations for 4.3 2019-05-28 13:49:01 +02:00
Nicolas Grekas
2ba8b8f15e [Bridge\Twig] lazy load TranslatorTrait 2019-05-28 11:03:44 +02:00
Nicolas Grekas
cfeb5bee07 fix tests 2019-05-28 09:50:59 +02:00
Nicolas Grekas
0a640c53cb Reference individual contracts packages 2019-05-27 10:16:38 +02:00
Nicolas Grekas
c67632cd23 Don't reference symfony/security 2019-05-23 14:32:47 +02:00
Konstantin Myakshin
c4eca27149 Throws UnrecoverableMessageHandlingException when passed invalid entity manager name for Doctrine middlewares 2019-05-21 09:09:55 +03:00
Nicolas Grekas
2ecad3ffa9 Merge branch '4.2' into 4.3
* 4.2:
  minor: add some test in the ldap component
  [Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
  [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
  fixed a phpdoc
  [Debug] Wrap call to require_once in a try/catch
  prevent deprecation when filesize matches error code
  [PropertyInfo] Add missing documentation link in Readme
  Use the current working dir as default first arg in 'link' binary
  Respect parent class contract in ContainerAwareDoctrineEventManager
  [Validator] Add the missing translations for the Danish ("da") locale
  [PropertyAccess] Add missing property to PropertyAccessor
  [Cache] fix saving unrelated keys in recursive callback calls
  [Serializer] Fix denormalization of object with variadic constructor typed argument
  Allow set 'None' on samesite cookie flag
  Making cache rebuild correctly with MessageSubscriberInterface return values
  Fix finding parent definition
2019-05-20 18:16:12 +02:00
Nicolas Grekas
48258fc12e Merge branch '3.4' into 4.2
* 3.4:
  minor: add some test in the ldap component
  [Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
  [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
  fixed a phpdoc
  [Debug] Wrap call to require_once in a try/catch
  [PropertyInfo] Add missing documentation link in Readme
  Use the current working dir as default first arg in 'link' binary
  Respect parent class contract in ContainerAwareDoctrineEventManager
  [Validator] Add the missing translations for the Danish ("da") locale
  [Serializer] Fix denormalization of object with variadic constructor typed argument
  Allow set 'None' on samesite cookie flag
2019-05-20 18:15:26 +02:00
André R
e3739b1289 [Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
When using factories it's common best practice to use interface as class name, especially in cases
where you know impl can differ. Before this fix ProxyManager did not allow these to be lazy.

In our case this has lead several to hard to debug issues on classes we need to mark as lazyi
and often a need to add lazy on decorators if there are any or other workarounds.
As we have had this issue, and still have on both 2.8 and 3.4 this is opened against 2.8.
2019-05-20 13:02:42 +02:00
Fabien Potencier
365a390e6e bug #31335 [Doctrine] Respect parent class contract in ContainerAwareEventManager (Koc)
This PR was merged into the 3.4 branch.

Discussion
----------

[Doctrine] Respect parent class contract in ContainerAwareEventManager

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

According to method signature of [original EventManager](https://github.com/doctrine/event-manager/blob/master/lib/Doctrine/Common/EventManager.php#L50) `getListeners` method should return array of initialized objects but now it returns array of strings of listener service names.

Commits
-------

42d62721fd Respect parent class contract in ContainerAwareDoctrineEventManager
2019-05-18 18:38:29 +02:00
Konstantin Myakshin
42d62721fd Respect parent class contract in ContainerAwareDoctrineEventManager 2019-05-15 21:39:23 +03:00
Kévin Dunglas
4598235192
[Doctrine][PropertyInfo] Detect if the ID is writeable 2019-05-12 22:41:45 +02:00
Fabien Potencier
e75ed98979 Merge branch '4.2' into 4.3
* 4.2:
  removed deprecated usage of some Twig features
2019-05-10 09:13:57 +02:00
Fabien Potencier
74afcd6777 removed deprecated usage of some Twig features 2019-05-10 08:54:47 +02:00
Nicolas Grekas
10da2310da [Doctrine\Bridge] fix tests 2019-05-09 15:22:32 +02:00
Fabien Potencier
07b9af2eff fixed compat with older versions of PHP 2019-05-08 15:47:25 +02:00
Dmitry Simushev
74a0be3e0b [Bridge/PhpUnit] Extract all the code but shebang from bin/simple-phpunit
The change allow `simple-phpunit` to be included without
`#!/usr/bin/env php` string outputted.

Also it's the first step to fix #27035 (the second one is to change
phpunit bridge recipe).
2019-05-05 21:47:39 +03:00
Nicolas Grekas
c315767b69 bug #31382 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refacto (l-vo)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refacto

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

During the refactoring for #29211 , it seems a little bug was introduced. When using runInSeparateProcess, deprecation message isn't unserialized anymore.

Commits
-------

f522729527 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refactoring
2019-05-05 18:12:56 +02:00
Laurent VOULLEMIER
f522729527 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refactoring
(when using runInSeparateProcess)
2019-05-04 20:28:21 +02:00
Christian Flothmann
d99da56f8e fix conflict resolution 2019-05-01 19:50:42 +02:00
Fabien Potencier
90326e67d5 Merge branch '4.2'
* 4.2:
  Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
  [Workflow] Fixed dumping when many transition with same name exist
  relax assertions in tests
  fix ConsoleFormatter - call to a member function format() on string
  Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
  [Validator] Translate messages into Japanese
  Fix Thai translation in validators.th.xlf
  [FramworkBundle] mark any env vars found in the ide setting as used
2019-05-01 10:40:02 +02:00
Fabien Potencier
ecdfa80bf4 Merge branch '3.4' into 4.2
* 3.4:
  Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
  [Workflow] Fixed dumping when many transition with same name exist
  fix ConsoleFormatter - call to a member function format() on string
2019-05-01 10:36:31 +02:00
Fabien Potencier
e0b5fb2aa3 bug #31326 fix ConsoleFormatter - call to a member function format() on string (keksa)
This PR was merged into the 3.4 branch.

Discussion
----------

fix ConsoleFormatter - call to a member function format() on string

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

The ConsoleFormatter crashes when there is not a DateTime object in `$record['datetime']`. As this parameter is not documented anywhere (i.e. `FormatterInterface` does not say it must be a DateTime object), I think the proper fix is to check if there is DateTimeInterface object and only call the `format` method then.

We use a custom LogProcessor (https://symfony.com/doc/current/logging/processors.html) to add some extra data and format the DateTime in the `$record['datetime']`. We need to format the DateTime in the processor, because we use `JsonFormatter` in prod environment and it does not support changing the date format. We use `ConsoleFormatter` only in dev environment and as the processor is called before the formatter, we get the crash.

There were no tests whatsoever for `ConsoleFormatter`, so I've added a basic one, that passes before and after, and another one that tests the crash (failed before, passed after).

There is a theoretical BC break, as someone could have sent an object with a `format` method to the formatter and it would have worked, but I'm not sure if it's considered BC break by Symfony, please let me know, if it is.

Commits
-------

648832823f fix ConsoleFormatter - call to a member function format() on string
2019-05-01 08:30:15 +02:00
Christian Flothmann
7c9dffe2e5 Merge branch '3.4' into 4.2
* 3.4:
  relax assertions in tests
  [Validator] Translate messages into Japanese
  Fix Thai translation in validators.th.xlf
  [FramworkBundle] mark any env vars found in the ide setting as used
2019-05-01 07:55:04 +02:00
Christian Flothmann
9a9134f4e4 do not choke on not existing mapping field 2019-05-01 07:27:43 +02:00
Christian Flothmann
730df0860c relax assertions in tests 2019-04-30 14:26:26 +02:00
Ondrej Exner
648832823f
fix ConsoleFormatter - call to a member function format() on string 2019-04-30 10:19:16 +02:00
Roland Franssen
ebe6179eb6 [Form] Remove default option grouping in TimezoneType 2019-04-29 10:29:58 +02:00
Samuel ROZE
bf765c0d32 Rephrase Doctrine Bridge changelog 2019-04-28 16:16:24 +01:00
Samuel ROZE
67e1709205 feature #31061 [BridgeDoctrineMessenger] Doctrine ping connection middleware (insidestyles)
This PR was squashed before being merged into the 4.3-dev branch (closes #31061).

Discussion
----------

[BridgeDoctrineMessenger] Doctrine ping connection middleware

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

- Check and reconnect if mysql has gone away:

        <service id="messenger.middleware.doctrine_ping_connection" class="Symfony\Bridge\Doctrine\Messenger\DoctrinePingConnectionMiddleware" public="false">
            <argument type="service" id="doctrine" />
        </service>

- Close and save opened connections (not active worker):

        <service id="messenger.middleware.doctrine_close_connection" class="Symfony\Bridge\Doctrine\Messenger\DoctrineCloseConnectionMiddleware" public="false">
            <argument type="service" id="doctrine" />
        </service>

Commits
-------

6fd9f6a859 [BridgeDoctrineMessenger] Doctrine ping connection middleware
2019-04-28 16:15:24 +01:00
insidestyles
6fd9f6a859 [BridgeDoctrineMessenger] Doctrine ping connection middleware 2019-04-28 16:15:12 +01:00
Fabien Potencier
e9aaaafbbb Merge branch '4.2'
* 4.2:
  [TwigBridge] Require twig ^1.40|^2.9
  [Serializer] Fix tests
  Use the apply tag instead of the filter tag
  Updated some translation files
  [Translator] Preserve default domain when extracting strings from php files
2019-04-28 08:09:58 +01:00
Fabien Potencier
454574b0a3 Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] Require twig ^1.40|^2.9
  [Serializer] Fix tests
  Use the apply tag instead of the filter tag
  Updated some translation files
  [Translator] Preserve default domain when extracting strings from php files
2019-04-28 08:09:27 +01:00
Robin Chalas
0e29e392f2 [TwigBridge] Require twig ^1.40|^2.9 2019-04-28 00:12:08 +02:00
Angel Fernando Quiroz Campos
9c76b29d14 [TwigBridge] bootstrap4 file_widget: allow setting label attributes declared in label_attr 2019-04-27 15:30:58 +01:00
Robin Chalas
27d10a658d Merge branch '4.2'
* 4.2:
  Fix url matcher edge cases with trailing slash
  [Form] Fix author tag + exception messages
  [TwigBridge] Fix deprecation on twig 2.9
  Fix left-associative ternary deprecation warnings for PHP 7.4
  [Validator] Fixed imprecise translations
  [Validator] Add Dutch translations
  [Security] Cleanup "Digest nonce has expired." translation
  Intercept redirections only for HTML format
  [PhpUnitBridge] fix reading phpunit.xml on bootstrap
  resolve class name parameters
  Fix name and phpdoc of ContainerBuilder::removeBindings
  [Intl] Update the ICU data to 64.2
2019-04-27 14:01:28 +02:00
Robin Chalas
7947b269ec Merge branch '3.4' into 4.2
* 3.4:
  [Form] Fix author tag + exception messages
  [TwigBridge] Fix deprecation on twig 2.9
  [Validator] Fixed imprecise translations
  [Validator] Add Dutch translations
  Intercept redirections only for HTML format
  Fix name and phpdoc of ContainerBuilder::removeBindings
  [Intl] Update the ICU data to 64.2
2019-04-27 13:48:17 +02:00
Robin Chalas
ac8256ba9c [TwigBridge] Fix deprecation on twig 2.9 2019-04-27 00:25:38 +02:00
Nicolas Grekas
1d55f800e4 [PhpUnitBridge] fix reading phpunit.xml on bootstrap 2019-04-23 16:37:24 +02:00
Fabien Potencier
7e56ef1a3d bug #31085 [DoctrineBridge] Unique mapping setting is optional (ksaveras)
This PR was squashed before being merged into the 4.3-dev branch (closes #31085).

Discussion
----------

[DoctrineBridge] Unique mapping setting is optional

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

```sh
Executed script cache:clear  [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!   // Clearing the cache for the dev environment with debug
!!   // true
!!
!!
In DoctrineLoader.php line 71:

  [ErrorException]
  Notice: Undefined index: unique

Exception trace:
 () at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/doctrine-bridge/Validator/DoctrineLoader.php:71
 Symfony\Bridge\Doctrine\Validator\DoctrineLoader->loadClassMetadata() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/validator/Mapping/Loader/LoaderChain.php:54
 Symfony\Component\Validator\Mapping\Loader\LoaderChain->loadClassMetadata() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php:105
 Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory->getMetadataFor() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php:63
 Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer->doWarmUp() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php:51
 Symfony\Bundle\FrameworkBundle\CacheWarmer\AbstractPhpFileCacheWarmer->warmUp() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:96
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:194
 Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:129
 Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Application.php:930
 Symfony\Component\Console\Application->doRunCommand() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Console/Application.php:87
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Console/Application.php:73
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /home/ksaveras/Projects/mokytojas.local/bin/console:40

cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

./bin/console ca:cl
```

Commits
-------

fde4dc9922 [DoctrineBridge] Unique mapping setting is optional
2019-04-22 11:07:11 +02:00
Ksaveras Šakys
fde4dc9922 [DoctrineBridge] Unique mapping setting is optional 2019-04-22 11:07:01 +02:00
Grégoire Paris
6c3c199b4e
Treat undefined env var as strict mode
An undefined SYMFONY_DEPRECATION_HELPER environment variable translates
to false, and that was previously interpreted as 0, which means strict
mode.
This restores backwards compatibility with the previous behavior, which
got broken in 1c73f9cfed .
2019-04-18 22:11:24 +02:00
Nicolas Grekas
899985e1d5 Merge branch '4.2'
* 4.2:
  [DI] Check service IDs are valid
2019-04-16 13:20:43 +02:00
Nicolas Grekas
3fd01abf11 Merge branch '3.4' into 4.2
* 3.4:
  [DI] Check service IDs are valid
2019-04-16 13:19:53 +02:00
Nicolas Grekas
d2fb589392 [DI] Check service IDs are valid 2019-04-16 13:13:42 +02:00
Nicolas Grekas
d140648929 Merge branch '4.2'
* 4.2:
  Prevent destructors with side-effects from being unserialized
2019-04-16 11:37:27 +02:00
Nicolas Grekas
4b18b32133 Merge branch '3.4' into 4.2
* 3.4:
  Prevent destructors with side-effects from being unserialized
2019-04-16 11:36:45 +02:00
Nicolas Grekas
d77e445697 security #cve-2019-10912 [Cache][PHPUnit Bridge] Prevent destructors with side-effects from being unserialized (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache][PHPUnit Bridge] Prevent destructors with side-effects from being unserialized

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

Reported for `FilesystemCommonTrait` at https://www.intigriti.com/company/submission/CfDJ8Pja6NZvkpNCmx5vVyiGSn7yW8c1j4H0-cnAhIk6fbstOMm028X-XD1kmSuQkGB2n0cRyyVrA2yAiLN_I0EVilaKVLSiSa0UXZJGfN1h85vmk5c2dBBpu619r1YQEIjcXA

Commits
-------

4fb9752816 Prevent destructors with side-effects from being unserialized
2019-04-16 11:03:16 +02:00
Nicolas Grekas
278a7ece35 Merge branch '4.2'
* 4.2:
  bumped Symfony version to 4.2.7
  updated VERSION for 4.2.6
  updated CHANGELOG for 4.2.6
  bumped Symfony version to 3.4.26
  updated VERSION for 3.4.25
  update CONTRIBUTORS for 3.4.25
  updated CHANGELOG for 3.4.25
  Workaround for \DateInterval::createFromDateString()
  [DoctrineBridge] [DX] Update exception text in ManagerRegistry::resetService to avoid confusion.
  Missing Lithuanian translations added to validator component.
2019-04-16 09:33:54 +02:00
Amrouche Hamza
9ade232533 [DoctrineBridge] [DX] Update exception text in ManagerRegistry::resetService to avoid confusion. 2019-04-15 11:42:18 +02:00
Nicolas Grekas
08577f4398 [PhpUnitBridge] fix PHP 5.5 support 2019-04-12 17:26:05 +02:00
Nicolas Grekas
770c7ddec4 [PhpUnitBridge] CS fix 2019-04-12 16:49:44 +02:00
Amrouche Hamza
b34738bba6
[PhpUnitBridge] ClockMock does not mock gmdate() 2019-04-12 16:09:30 +02:00
Nicolas Grekas
2f73c2f66b fix 2019-04-12 15:55:35 +02:00
Nicolas Grekas
0cf183375a Merge branch '4.2'
* 4.2:
  [TwigBridge] fix tests
  [FrameworkBundle] Fix Controller deprecated when using composer --optimized
2019-04-12 15:50:47 +02:00
Nicolas Grekas
1d02ef2ccb Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] fix tests
2019-04-12 15:50:35 +02:00
Nicolas Grekas
b11585e31f [PhpUnitBridge] fixes 2019-04-12 15:46:34 +02:00
Nicolas Grekas
33c6681585 [TwigBridge] fix tests 2019-04-12 15:39:20 +02:00
Grégoire Paris
1c73f9cfed
[PhpUnitBridge] Url encoded deprecations helper config 2019-04-11 23:10:50 +02:00
Fabien Potencier
9d3c86fdb6 Merge branch '4.2'
* 4.2:
  [serializer] validate that the specified callbacks and max_depth_handler are actually callable
  [Serializer] Respect ignored attributes in cache key of normalizer
  fix resetting the COLUMN environment variable
  Fix TestRunner compatibility to PhpUnit 8
  Fix dark themed componnents
  prevent mixup of the object to populate
2019-04-08 16:11:46 +02:00
Christian Flothmann
ec41d76624 Merge branch '3.4' into 4.2
* 3.4:
  [Serializer] Respect ignored attributes in cache key of normalizer
  fix resetting the COLUMN environment variable
  Fix TestRunner compatibility to PhpUnit 8
  prevent mixup of the object to populate
2019-04-08 13:36:05 +02:00
Alexander Schranz
a0c66a399d Fix TestRunner compatibility to PhpUnit 8 2019-04-08 09:56:31 +02:00
Christian Flothmann
44eb7a0485 fix backwards compatibility breaks 2019-04-07 23:31:58 +02:00
Christian Flothmann
2efd7b2149 Merge branch '4.2'
* 4.2:
  fix tests
  fix PHPUnit 4.8 compatibility
  [Debug] Fixed error handling when an error is already handled when another error is already handled (5)
  sync validator translations
2019-04-07 21:49:19 +02:00
Christian Flothmann
27df966705 fix tests 2019-04-07 21:30:26 +02:00
Jules Pietri
a234c8913e [DoctrineBridge] Deprecated using IdReader when optimization is not possible 2019-04-07 15:30:06 +02:00
Fabien Potencier
3df05e0877 feature #30962 [DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader (HeahDude)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- 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        | ~

#EUFOSSA

Big thanks to @stof for the help with writing the test!

## Description
It happens that the `IdReader` is created by the `DoctrineType` and cached for each entity class case.
But the type already resolves whether or not it should use it, only when we can optimize query thanks to a single id field when defining the `choice_value` option: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php#L188.

This PR is a first step to optimize the choice loading process.

Commits
-------

287c39b9ea [DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader
2019-04-07 12:26:36 +02:00
Jules Pietri
287c39b9ea [DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader 2019-04-07 12:14:41 +02:00
Nicolas Grekas
4447f87c2e Merge branch '4.2'
* 4.2:
  fix translating file validation error message
  [Validator] Add missing Hungarian translations
  Improving deprecation message of the Twig templates directory src/Resources/views
  [3.4] [Validator] Add missing french validation translations.
  [Validator] Only traverse arrays that are cascaded into
  Handle case where no translations were found
  [Validator] Translate unique collection message to Hungarian
  fix tests
  Run test in separate process
  Use a class name that does not actually exist
  [Profiler] Fix dark theme elements color
  fix horizontal spacing of inlined Bootstrap forms
  [Translator] Warm up the translations cache in dev
  turn failed file uploads into form errors
2019-04-07 11:58:10 +02:00
Nicolas Grekas
ecb52bc9f1 Merge branch '3.4' into 4.2
* 3.4:
  fix translating file validation error message
  [Validator] Add missing Hungarian translations
  [3.4] [Validator] Add missing french validation translations.
  [Validator] Only traverse arrays that are cascaded into
  Handle case where no translations were found
  [Validator] Translate unique collection message to Hungarian
  fix tests
  Run test in separate process
  Use a class name that does not actually exist
  fix horizontal spacing of inlined Bootstrap forms
  [Translator] Warm up the translations cache in dev
  turn failed file uploads into form errors
2019-04-07 11:56:43 +02:00
Valentin
388d8f548c [Routing] UrlHelper to get absolute URL for a path 2019-04-07 11:24:57 +02:00
Yonel Ceruto
89a00b315d Improving deprecation message of the Twig templates directory src/Resources/views 2019-04-07 10:37:45 +02:00
Fabien Potencier
e5f14b7d28 feature #30908 [Workflow] Added workflow_transition_blockers twig function (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Added workflow_transition_blockers twig function

| 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-docs/pull/11268
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11268

EUFOSSA

---

also related to https://github.com/symfony/symfony/issues/26689

I'm not a big fan of the current name. What should I pick?

cc @javiereguiluz

Commits
-------

a2f99757f1 [Workflow] Added workflow_transition_blockers twig function
2019-04-06 20:23:30 +02:00
Fabien Potencier
4c78e60ad5 feature #30893 Add "input" option to NumberType (fancyweb, Bernhard Schussek)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add "input" option to NumberType

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

This PR replaces #24793 in (partially) fixing how Doctrine's DECIMAL type is handled by the Form component.

Previously, DECIMAL was mapped to the regular NumberType. That confuses Doctrine's change detection, depending on the DB platform.

Examples:

| DB | DB value | Doctrine entity before submit | Form input | Doctrine entity after submit
| --- | --- | --- | --- | ---
| SQLite | 8.000 | '8' | 8 | 8
| SQLite | 8.123 | '8.123' | 8.123 | 8.123
| PostgreSQL | 8.000 | '8.000' | 8 | 8
| PostgreSQL | 8.123 | '8.123' | 8.123 | 8.123

The value in the Doctrine entity changes before and after submit. Hence Doctrine believes an update is necessary.

This PR introduces an `input` option to NumberType (similar to DateType), that can be set to `'number'` (default) or `'string'`. If set to `'string'`, the conversion is as follows:

| DB | DB value | Doctrine entity before submit | Form input | Doctrine entity after submit
| --- | --- | --- | --- | ---
| SQLite | 8.000 | **'8'** | 8 | **'8.000'**
| SQLite | 8.123 | '8.123' | 8.123 | '8.123'
| PostgreSQL | 8.000 | '8.000' | 8 | '8.000'
| PostgreSQL | 8.123 | '8.123' | 8.123 | '8.123'

You see that this does not completely solve this issue for SQLite. However, @Ocramius and I agree that this is something to be fixed by Doctrine, since Doctrine is providing the database abstraction.

That fix should be done in the SqlitePlatform object in Doctrine as part of another PR and should be backwards compatible with the current Doctrine version (i.e. opt in via configuration).

Compared to #24793, this PR does not introduce a new type but instead makes the NumberType more flexible. Also, this PR does not introduce the `force_full_scale` option since that should be solved by Doctrine as described above.

Commits
-------

3f25734647 Added new option "input" to NumberType
fb2b37a8f3 add force_full_scale option to handle all cases
40f25121c3 [DoctrineBridge] Add decimal form type
2019-04-06 20:17:43 +02:00
dFayet
8a9c2c86ef [Profiler] Fix dark theme elements color 2019-04-06 20:06:03 +02:00
Christophe Coevoet
07d90f987e Move doctrine/collections to an optional dep in doctrine-bridge
The EntityType does not need to convert the array to a collection if
the project does not care about using doctrine/collections. So this
can become an optional dependency.
2019-04-06 20:02:40 +02:00
Christian Flothmann
7113a53e19 fix horizontal spacing of inlined Bootstrap forms 2019-04-06 19:28:56 +02:00
Grégoire Pineau
a2f99757f1 [Workflow] Added workflow_transition_blockers twig function 2019-04-06 19:16:15 +02:00
Bernhard Schussek
3f25734647 Added new option "input" to NumberType 2019-04-06 16:48:06 +02:00
Fabien Potencier
f527acfac7 Merge branch '4.2'
* 4.2: (45 commits)
  [Form] various minor fixes
  Ensure the parent process is always killed
  bugfix: the terminal state was wrong and not reseted
  [Console] Fix inconsistent result for choice questions in non-interactive mode
  Define null return type for Constraint::getDefaultOption()
  [Routing] Fix: annotation loader ignores method's default values
  [HttpKernel] Fix DebugHandlersListener constructor docblock
  Skip Glob brace test when GLOB_BRACE is unavailable
  bumped Symfony version to 4.2.6
  updated VERSION for 4.2.5
  updated CHANGELOG for 4.2.5
  bumped Symfony version to 3.4.25
  updated VERSION for 3.4.24
  update CONTRIBUTORS for 3.4.24
  updated CHANGELOG for 3.4.24
  [EventDispatcher] cleanup
  fix testIgnoredAttributesInContext
  Re-generate icu 64.1 data
  Improve PHPdoc / IDE autocomplete for config tree builder
  [Bridge][Twig] DebugCommand - fix escaping and filter
  ...
2019-04-06 16:04:46 +02:00
Thomas Calvet
fb2b37a8f3 add force_full_scale option to handle all cases 2019-04-06 15:35:03 +02:00
Thomas Calvet
40f25121c3 [DoctrineBridge] Add decimal form type 2019-04-06 15:35:03 +02:00
Fabien Potencier
5e61b75893 [Twig] removed TemplatedEmail::template() 2019-04-03 20:45:56 +02:00
Nicolas Grekas
4fb9752816 Prevent destructors with side-effects from being unserialized 2019-04-02 17:51:53 +02:00
Yonel Ceruto
05e2e1e088 Add template file link 2019-04-01 18:40:03 -04:00
SpacePossum
b7120c5e49 [Bridge][Twig] DebugCommand - fix escaping and filter 2019-04-01 10:18:15 +02:00
Fabien Potencier
6bc2ae4018 feature #30320 [Form][TwigBridge] Add row_attr to form theme (alexander-schranz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30320).

Discussion
----------

[Form][TwigBridge] Add row_attr to form theme

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | waiting for confirmation to implement
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Currently you need to copy the whole form_row block if you just want to add a class to the form_row div. Instead we could introduce a `row_attr` which can then simple be set the following in the theme e.g.:

```twig
{% block form_row %}
    {% set row_attr = { class: 'form__field' } %}
    {{ parent() }}
{% endblock %}
```

or in php:

```
$builder->add('test', TextType::class, ['row_attr' => ['class' => 'form__field']]);
```

Commits
-------

7ab1b00e02 [Form][TwigBridge] Add row_attr to form theme
2019-03-31 13:48:32 +02:00
Alexander Schranz
7ab1b00e02 [Form][TwigBridge] Add row_attr to form theme 2019-03-31 13:48:18 +02:00
Fabien Potencier
7554cf6f1d feature #27735 [Validator][DoctrineBridge][FWBundle] Automatic data validation (dunglas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator][DoctrineBridge][FWBundle] Automatic data validation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes<!-- 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 | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11132

This feature automatically adds some validation constraints by inferring existing metadata. To do so, it uses the PropertyInfo component and Doctrine metadata, but it has been designed to be easily extendable.

Example:

```php
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class Dummy
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    public $id;

    /**
     * @ORM\Column(nullable=true)
     */
    public $columnNullable;

    /**
     * @ORM\Column(length=20)
     */
    public $columnLength;

    /**
     * @ORM\Column(unique=true)
     */
    public $columnUnique;
}

$manager = $this->managerRegistry->getManager();
$manager->getRepository(Dummy::class);

$firstOne = new Dummy();
$firstOne->columnUnique = 'unique';
$firstOne->columnLength = '0';

$manager->persist($firstOne);
$manager->flush();

$dummy = new Dummy();
$dummy->columnNullable = 1; // type mistmatch
$dummy->columnLength = '012345678901234567890'; // too long
$dummy->columnUnique = 'unique'; // not unique

$res = $this->validator->validate($dummy);
dump((string) $res);

/*
Object(App\Entity\Dummy).columnUnique:\n
    This value is already used. (code 23bd9dbf-6b9b-41cd-a99e-4844bcf3077f)\n
Object(App\Entity\Dummy).columnLength:\n
    This value is too long. It should have 20 characters or less. (code d94b19cc-114f-4f44-9cc4-4138e80a87b9)\n
Object(App\Entity\Dummy).id:\n
    This value should not be null. (code ad32d13f-c3d4-423b-909a-857b961eb720)\n
Object(App\Entity\Dummy).columnNullable:\n
    This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```

It also works for DTOs:

```php

class MyDto
{
    /** @var string */
    public $name;
}

$dto = new MyDto();
$dto->name = 1; // type error

dump($validator->validate($dto));

/*
Object(MyDto).name:\n
    This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```

Supported constraints currently are:

* `@NotNull` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@Type` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@UniqueEntity` (using Doctrine's `unique` metadata)
* `@Length` (using Doctrine's `length` metadata)

Many users don't understand that the Doctrine mapping doesn't validate anything (it's just a hint for the schema generator). It leads to usability and security issues (that are not entirely fixed by this PR!!).
Even the ones who add constraints often omit important ones like `@Length`, or `@Type` (important when building web APIs).
This PR aims to improve things a bit, and ease the development process in RAD and when prototyping. It provides an upgrade path to use proper validation constraints.

I plan to make it opt-in, disabled by default, but enabled in the default Flex recipe. (= off by default when using components, on by default when using the full stack framework)

TODO:

* [x] Add configuration flags
* [x] Move the Doctrine-related DI logic from the extension to DoctrineBundle: doctrine/DoctrineBundle#831
* [x] Commit the tests

Commits
-------

2d64e703c2 [Validator][DoctrineBridge][FWBundle] Automatic data validation
2019-03-31 13:41:16 +02:00
SpacePossum
7bdb06641d [Bridge][Twig] DebugCommand - fix escaping and filter 2019-03-31 13:33:18 +02:00
Christian Flothmann
578d842bcd fix tests 2019-03-27 10:09:36 +01:00
Fabien Potencier
0c9d684d0a [Mime] added BodyRendererInterface 2019-03-27 08:07:59 +01:00
Fabien Potencier
f5386ffb2a [Mime] fixed serialization of Message instances 2019-03-27 07:58:31 +01:00
Christian Flothmann
dccf1ee354 fix PHP 5.3 compatibility 2019-03-26 21:16:42 +01:00
Grégoire Pineau
4d58beb7c8 [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore 2019-03-22 15:53:11 +01:00
Fabien Potencier
522594a69d Merge branch '4.2'
* 4.2:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Fix case when multiple loaders are providing paths for the same namespace
  Check if Client exists when test.client does not exist, to provide clearer exception message
  throw TypeErrors to prepare for type hints in 5.0
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Form] Added ResetInterface to CachingFactoryDecorator
  Remove deprecated usage
  [Tests] fixed compatbility of assertEquals(): void
  Fixed usage of TranslatorInterface in form extension (fixes #30591)
  [Intl][4.2] Fix test
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  Fix DebugCommand when chain loader is involved
  [Form] Fixed some phpdocs
2019-03-22 09:16:47 +01:00
Fabien Potencier
7e5dfcff7b Merge branch '3.4' into 4.2
* 3.4:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Check if Client exists when test.client does not exist, to provide clearer exception message
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Tests] fixed compatbility of assertEquals(): void
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  [Form] Fixed some phpdocs
2019-03-22 09:16:34 +01:00
Fabien Potencier
606b8af8ec [Phpunit] fixed support for PHP 5.3 2019-03-22 09:11:54 +01:00
Fabien Potencier
7e30c971ab fixed CS 2019-03-22 07:07:54 +01:00
Kévin Dunglas
2d64e703c2
[Validator][DoctrineBridge][FWBundle] Automatic data validation 2019-03-21 13:05:54 +01:00
Yonel Ceruto
393d7280e5 Fix case when multiple loaders are providing paths for the same namespace 2019-03-20 11:45:54 -04:00
Fabien Potencier
1479a26a0b feature #28920 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN

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

PR green and ready. From UPGRADE files:

 EventDispatcher
---------------

 * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated

HttpKernel
----------

 * Renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent`
 * Renamed `FilterControllerEvent` to `ControllerEvent`
 * Renamed `FilterResponseEvent` to `ResponseEvent`
 * Renamed `GetResponseEvent` to `RequestEvent`
 * Renamed `GetResponseForControllerResultEvent` to `ViewEvent`
 * Renamed `GetResponseForExceptionEvent` to `ExceptionEvent`
 * Renamed `PostResponseEvent` to `TerminateEvent`

Security
---------

 * The `ListenerInterface` is deprecated, turn your listeners into callables instead.
 * The `Firewall::handleRequest()` method is deprecated, use `Firewall::callListeners()` instead.

Commits
-------

75369dabb8 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN
2019-03-20 13:34:13 +01:00
Fabien Potencier
2de59a1362 bug #30440 [TwigBridge] Fix DebugCommand when chain loader is involved (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

[TwigBridge] Fix DebugCommand when chain loader is involved

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

Better diff: https://github.com/symfony/symfony/pull/30440/files?utf8=%E2%9C%93&diff=unified&w=1

Commits
-------

f647b4a29d Fix DebugCommand when chain loader is involved
2019-03-20 09:06:40 +01:00
Christian Flothmann
f18751bd98 throw TypeErrors to prepare for type hints in 5.0 2019-03-19 22:07:50 +01:00
Kévin Dunglas
224c891e10 [FrameworkBundle] Deprecate the Templating component integration 2019-03-19 18:23:24 +01:00
Fabien Potencier
6fa4d2b0cf feature #28330 [MonologBridge] Add monolog processors adding route and command info (trakos)
This PR was squashed before being merged into the 4.3-dev branch (closes #28330).

Discussion
----------

[MonologBridge] Add monolog processors adding route and command info

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

This PR adds two simple processors that add context to every log entry.

RouteProcessor adds routing information:
`app.INFO: Some log text {"someContext":"ctx"} {"route":{"controller":"App\\Controller\\SomeController::number","route":"index","route_params":[]}`

ConsoleCommandProcessors adds current command information:
`app.INFO: Some log text {"someContext":"ctx"} {"command":{"name":"app:some-command","arguments":{"command":"app:some-command","some-argument":10}}}`

For ConsoleCommandProcessor I've decided against including command options by default, because there's a lot of default ones:
`"options":{"help":false,"quiet":false,"verbose":false,"version":false,"ansi":false,"no-ansi":false,"no-interaction":false,"env":"dev","no-debug":false}`. This behavior can be changed with a constructor argument.

Commits
-------

669f6b2726 [MonologBridge] Add monolog processors adding route and command info
2019-03-17 08:08:51 +01:00
Piotr Stankowski
669f6b2726 [MonologBridge] Add monolog processors adding route and command info 2019-03-17 08:08:42 +01:00
Fabien Potencier
cbb0b81ebd feature #30339 [Monolog] Disable DebugLogger in CLI (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Monolog] Disable DebugLogger in CLI

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   |
| Fixed tickets | #30333 https://github.com/symfony/monolog-bundle/issues/165 #25876
| License       | MIT
| Doc PR        |

<details>
<summary>Considering this code:</summary>

```php
namespace App\Command;

use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class LeakCommand extends Command
{
    protected static $defaultName = 'leak';

    private $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;

        parent::__construct();
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $reportedAt = time();
        while (true) {
            $this->logger->info('Hello');

            if (time() - $reportedAt >= 1) {
                $output->writeln(sprintf('%dMb', memory_get_usage() / 1024 / 1024));
                $reportedAt = time();
            }
        }
    }
}
```

</details>

Without the patch
```
>…/dev/labs/symfony/website-skeleton(monolog %) bin/console leak
7Mb
28Mb
51Mb
76Mb
97Mb
````

With the patch
```
>…/dev/labs/symfony/website-skeleton(monolog %) bin/console leak
6Mb
6Mb
6Mb
6Mb
```

Commits
-------

17533da49c [Monolog] Disable DebugLogger in CLI
2019-03-17 07:59:53 +01:00
Nicolas Grekas
75369dabb8 [EventDispatcher] swap arguments of dispatch() to allow registering events by FQCN 2019-03-14 08:32:46 +01:00
Yonel Ceruto
f647b4a29d Fix DebugCommand when chain loader is involved 2019-03-12 11:49:41 -04:00
Nicolas Grekas
c17a5b25b5 [TwigBridge] remove deprecation triggered when using Twig 2.7 2019-03-10 18:07:42 +01:00
Nicolas Grekas
bed7694132 Merge branch '4.2'
* 4.2: (27 commits)
  cs fix
  cs fix
  [PHPUnit-Bridge] override some environment variables
  [TwigBridge] Remove use spaceless tag
  Upgrade zookeeper ext
  [translation] Update defaut format from yml to yaml
  Change default log level for output streams
  update docblock to match the actual behavior
  Don't resolve the Deprecation error handler mode until a deprecation is triggered
  compatibility with phpunit8
  Make 'headers' key optional for encoded messages
  [Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods
  Fix undefined variable fromConstructor when passing context to getTypes
  Added translations for chineese language.
  Allow 3rd argument to be null
  Remove whitespace (tab on blank line)
  [Monolog] Really reset logger when calling logger::reset()
  [Form] Fixes debug:form appears many times as type extensions configured with new getExtendedTypes method
  Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
  Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
  ...
2019-03-10 11:14:34 +01:00
Nicolas Grekas
a5951cef91 Merge branch '3.4' into 4.2
* 3.4:
  cs fix
  cs fix
  [PHPUnit-Bridge] override some environment variables
  [TwigBridge] Remove use spaceless tag
  [translation] Update defaut format from yml to yaml
  Change default log level for output streams
  update docblock to match the actual behavior
  compatibility with phpunit8
  [Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods
  Added translations for chineese language.
2019-03-10 11:08:12 +01:00
Nicolas Grekas
42626744b2 bug #30496 [PHPUnit-Bridge] override some Composer environment variables (nicoweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PHPUnit-Bridge] override some Composer environment variables

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

Override `COMPOSER_VENDOR_DIR` and `COMPOSER_BIN_DIR` with their default values in PHPUnit Bridge: #30467

Commits
-------

628502645e [PHPUnit-Bridge] override some environment variables
2019-03-10 10:59:01 +01:00
nicoweb
628502645e [PHPUnit-Bridge] override some environment variables 2019-03-10 10:48:28 +01:00
Nicolas Grekas
2ee178b5c5 [TwigBridge] Remove use spaceless tag 2019-03-10 10:14:34 +01:00
Emmanuel BORGES
f3a5b74dfd Don't resolve the Deprecation error handler mode until a deprecation is triggered 2019-03-08 18:11:28 +01:00
Oskar Stark
53c5f41f37 [Form] Allow to disable and customize PercentType symbol 2019-03-05 11:00:13 +01:00
Ken Stanley
9aeaea06fc Add ‘symbol’ option to PercentType 2019-03-05 09:34:20 +01:00
Fabien Potencier
a07627ea9a fixed tests 2019-03-02 15:55:10 +01:00
Fabien Potencier
ee787d17b4 [Mime] added classes for generating MIME messages 2019-03-02 15:10:47 +01:00
Grégoire Pineau
08a20ee0ba [Monolog] Really reset logger when calling logger::reset() 2019-02-28 18:49:31 +01:00
Fabien Potencier
d2e9a7051f feature #22048 [Security] deprecate the Role and SwitchUserRole classes (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Security] deprecate the Role and SwitchUserRole classes

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

In #20801, we deprecated the `RoleInterface`. The next logical step would be to also deprecate the `Role` class. However, we currently have the `SwitchUserRole` class (a sub-class of `Role`) that acts as an indicator to check whether or not the authenticated user switched to another user.

This PR proposes an alternative solution to the usage of the special `SwitchUserRole` class by storing the original token inside the `UsernamePasswordToken`. This PR is not complete, but rather acts as a proof of concept of how we could get rid of the `Role` and the `SwitchUserRole` classes.

Please share your opinions whether you think this is a valid approach and I will be happy to finalise the PR.

Commits
-------

d7aaa615b9 deprecate the Role and SwitchUserRole classes
2019-02-25 17:04:33 +01:00
Grégoire Pineau
17533da49c [Monolog] Disable DebugLogger in CLI 2019-02-24 14:22:28 +01:00
Nicolas Grekas
3969948cbc Merge branch '4.2'
* 4.2:
  fix merge
2019-02-23 16:42:19 +01:00
Nicolas Grekas
5b23a2b257 fix merge 2019-02-23 16:42:05 +01:00
Nicolas Grekas
a0c566504c Merge branch '4.2'
* 4.2: (26 commits)
  Apply php-cs-fixer rule for array_key_exists()
  [Cache] fix warming up cache.system and apcu
  [Security] Change FormAuthenticator if condition
  handles multi-byte characters in autocomplete
  speed up tests running them without debug flag
  [Translations] added missing Croatian validators
  Fix getItems() performance issue with RedisCluster (php-redis)
  [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
  IntegerType: reject submitted non-integer numbers
  be keen to newcomers
  [HttpKernel] Fix possible infinite loop of exceptions
  fixed CS
  [Validator] Added missing translations for Afrikaans
  do not validate non-submitted form fields in PATCH requests
  Update usage example in ArrayInput doc block.
  [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
  [Validator] Fixed duplicate UUID
  fixed CS
  [EventDispatcher] Fix unknown priority
  Avoid mutating the Finder when building the iterator
  ...
2019-02-23 16:22:31 +01:00
Nicolas Grekas
87f3c36d60 Merge branch '3.4' into 4.2
* 3.4: (24 commits)
  Apply php-cs-fixer rule for array_key_exists()
  [Security] Change FormAuthenticator if condition
  handles multi-byte characters in autocomplete
  speed up tests running them without debug flag
  [Translations] added missing Croatian validators
  Fix getItems() performance issue with RedisCluster (php-redis)
  [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
  IntegerType: reject submitted non-integer numbers
  be keen to newcomers
  [HttpKernel] Fix possible infinite loop of exceptions
  fixed CS
  [Validator] Added missing translations for Afrikaans
  do not validate non-submitted form fields in PATCH requests
  Update usage example in ArrayInput doc block.
  [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
  [Validator] Fixed duplicate UUID
  fixed CS
  [EventDispatcher] Fix unknown priority
  Avoid mutating the Finder when building the iterator
  [Validator] Add the missing translations for the Greek (el) locale
  ...
2019-02-23 16:17:42 +01:00
Nicolas Grekas
b0a3208588 Apply php-cs-fixer rule for array_key_exists() 2019-02-23 16:06:07 +01:00
Fabien Potencier
e9a2c3d753 feature #30345 [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler

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

see also https://github.com/symfony/monolog-bundle/pull/297

from that:
![image](https://user-images.githubusercontent.com/408368/53246085-f63ed380-36af-11e9-9bff-2e42f8af141c.png)

to that:
![image](https://user-images.githubusercontent.com/408368/53246115-0787e000-36b0-11e9-93ef-e47ed058adbf.png)

with some configuration:

```yaml
diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml
index b1998da..66ae2db 100644
--- a/config/packages/dev/monolog.yaml
+++ b/config/packages/dev/monolog.yaml
@@ -17,3 +17,6 @@ monolog:
             type: console
             process_psr_3_messages: false
             channels: ["!event", "!doctrine", "!console"]
+            console_formater_options:
+                format: "%%datetime%% %%start_tag%%%%level_name%%%%end_tag%% <comment>[%%channel%%]</> %%message%%%%context%%\n"
+                multiline: false
```

Commits
-------

5e494db04c [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler
2019-02-23 11:19:35 +01:00
Christian Flothmann
057d177378 rename parent_form() to form_parent()
We got some feedback on the blog post that form_parent() would be better
for consistency with all the existing form_*() functions. I think that
user has a point about that.
2019-02-23 10:52:13 +01:00
Christian Flothmann
d7aaa615b9 deprecate the Role and SwitchUserRole classes 2019-02-23 00:57:00 +01:00
Oskar Stark
c008ee046a be keen to newcomers 2019-02-22 15:44:53 +01:00
Grégoire Pineau
5e494db04c [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler 2019-02-22 14:32:09 +01:00
Fabien Potencier
6207f19317 feature #30267 [Form] add option to render NumberType as type="number" (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] add option to render NumberType as type="number"

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

Commits
-------

42e8f5e3a2 add option to render NumberType as type="number"
2019-02-21 09:19:09 +01:00
Christian Flothmann
42e8f5e3a2 add option to render NumberType as type="number" 2019-02-21 08:09:42 +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