Commit Graph

47188 Commits

Author SHA1 Message Date
Fabien Potencier
c146de141b feature #34880 [Twig][Form] Twig theme for Foundation 6 (Lyssal)
This PR was squashed before being merged into the 5.1-dev branch (closes #34880).

Discussion
----------

[Twig][Form] Twig theme for Foundation 6

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | -

Hi,

I propose a form theme for Foundation 6. This layout stylizes buttons, percent / money widgets and permits switch inputs adding a 'switch-input' attribute (as for https://symfony.com/blog/new-in-symfony-4-4-bootstrap-custom-switches).

![Foundation_6](https://user-images.githubusercontent.com/10855303/70390292-184cdc80-19ca-11ea-8ad8-090358dd9e35.png)

```php
public function buildForm(FormBuilderInterface $builder, array $options): void
{
    $builder
        // ...
        ->add('checkbox-switch', Type\CheckboxType::class, [
            'attr' => [
                'class' => 'switch-input',
            ],
        ])
    ;
}
```

Commits
-------

e47a134db0 [Twig][Form] Twig theme for Foundation 6
2020-01-10 09:11:20 +01:00
Rémi Leclerc
e47a134db0 [Twig][Form] Twig theme for Foundation 6 2020-01-10 09:11:14 +01:00
Fabien Potencier
d1e31a4fe0 bug #35151 [DI] deferred exceptions in ResolveParameterPlaceHoldersPass (Islam93)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] deferred exceptions in ResolveParameterPlaceHoldersPass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #30428
| License       | MIT
| Doc PR        | n/a

fixes case #30428
implemented as in AutowiringPass

Commits
-------

b3a2173c8e [DI] deferred exceptions in ResolveParameterPlaceHoldersPass
2020-01-10 09:08:19 +01:00
Fabien Potencier
cc64b028b6 feature #35281 [FrameworkBundle] Configure RequestContext through router config (benji07)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Configure RequestContext through router config

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35229  <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

- [ ] PR on symfony/symfony-docs

Commits
-------

6658900703 [FrameworkBundle] Configure RequestContext through router config
2020-01-10 09:06:12 +01:00
Fabien Potencier
b0e11e80bc bug #35290 [Filesystem][FilesystemCommonTrait] Use a dedicated directory when there are no namespace (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem][FilesystemCommonTrait] Use a dedicated directory when there are no namespace

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This PR fixes the following edge case:
- you use a namespaced filesystem adapter with root dir `/foo` and namespace `a`: all files are written in `/foo/a` (eg: it will write `/foo/a/b/file`)
- you use another filesystem adapter with the same root dir but without namespace and you clear it.
- it will fail because it will try to delete the `/foo/a/b` directory (see https://github.com/symfony/symfony/pull/33921 new `scanHashDir()` method - `a` is a possible dir value (see `getFile()`) so we look for it).

The simple solution (suggested by @nicolas-grekas) is to put the "empty namespace" in a dedicated directory.

Bonus: that will fix the tests that currently always fail on AppVeyor. The file in the namespace `a` is a leftover from a previous test. Without this patch, I have the same fail on my Mac. I did not look why it currently passes on travis.

Commits
-------

eaa767bebd [Filesystem][FilesystemCommonTrait] Use a dedicated directory when there are no namespace
2020-01-10 09:04:21 +01:00
Fabien Potencier
c192a0c2fb minor #35288 [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35035
| License       | MIT
| Doc PR        | -

The test uses heredoc for the expected part. Expected line returns are `"\n"` because that's how they are written in the source code file.
However, on Windows, the console outputs `"\r\n"` (`PHP_EOL`) for new lines.
`"qqq:\r\n"` does not contain `"qqq:\n"`.

I'm still wondering why this test is not *always* failing...

Commits
-------

474f3bef08 [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor
2020-01-10 09:03:47 +01:00
Thomas Calvet
474f3bef08 [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor 2020-01-10 08:52:48 +01:00
Benjamin Lévêque
6658900703 [FrameworkBundle] Configure RequestContext through router config 2020-01-10 08:44:52 +01:00
Ryan Weaver
a6aa9781eb Adding better output to secrets:decrypt-to-local command 2020-01-09 20:22:51 -05:00
Robin Chalas
a3a9a0e30a [SecurityBundle] Fix collecting traceable listeners info using anonymous: lazy 2020-01-09 22:59:13 +01:00
Thomas Calvet
eaa767bebd [Filesystem][FilesystemCommonTrait] Use a dedicated directory when there are no namespace 2020-01-09 22:41:08 +01:00
Javier Spagnoletti
452f92540b [Workflow] Fix configuration node reference for "initial_marking" 2020-01-09 17:48:41 -03:00
Nicolas Grekas
84de1a35d2 bug #35099 [FrameworkBundle] Do not throw exception on value generate key (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Do not throw exception on value generate key

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

When using env variable instead of key files and creating a new Secret, the check in `generateKeys` (called by the command `SecretsSetCommand`) prevents generating a secret.

reproducer:

```
$ rm config/secrets/prod/prod.decrypt.private.php
$ export SYMFONY_DECRYPTION_SECRET=XXX
$ ./bin/console secret:set FOO

In SodiumVault.php line 50:

  Cannot generate keys when a decryption key has been provided while instantiating the vault.

```

This PR converts the exception in a warning message.

Commits
-------

2f608b4dfa Do not throw exception on valut generate key
2020-01-09 15:20:34 +01:00
Nicolas Grekas
2787024e34 bug #35278 [EventDispatcher] expand listener in place (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[EventDispatcher] expand listener in place

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35259
| License       | MIT
| Doc PR        |

Commits
-------

f5d407318d expand listener in place
2020-01-09 15:01:40 +01:00
Nicolas Grekas
5c37ab016c Merge branch '5.0'
* 5.0:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:39:49 +01:00
Nicolas Grekas
6d10f8891e Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:38:26 +01:00
Nicolas Grekas
415761ef4d Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:38:20 +01:00
Nicolas Grekas
68b96fa024 Merge branch '3.4' into 4.3
* 3.4:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:38:14 +01:00
Nicolas Grekas
416f0abf99 [PhpUnitBridge] fix compat with older versions of composer 2020-01-09 14:36:09 +01:00
Nicolas Grekas
1299336de5 fix tests 2020-01-09 14:25:29 +01:00
Christian Flothmann
f5d407318d expand listener in place 2020-01-09 14:17:05 +01:00
Nicolas Grekas
e7f2a1afaa Merge branch '5.0'
* 5.0:
  fix tests
2020-01-09 13:59:39 +01:00
Nicolas Grekas
85cf2ee0ca Merge branch '4.4' into 5.0
* 4.4:
  fix tests
2020-01-09 13:59:02 +01:00
Nicolas Grekas
29f5b180d9 Merge branch '4.3' into 4.4
* 4.3:
  fix tests
2020-01-09 13:57:53 +01:00
Nicolas Grekas
56877e7186 Merge branch '3.4' into 4.3
* 3.4:
  fix tests
2020-01-09 13:45:17 +01:00
Nicolas Grekas
d24df0d441 fix tests 2020-01-09 13:44:20 +01:00
Nicolas Grekas
9476574453 Merge branch '5.0'
* 5.0:
  fix deps
  Relax transient test
2020-01-09 13:39:32 +01:00
Nicolas Grekas
bf47b7d960 Merge branch '4.4' into 5.0
* 4.4:
  fix deps
  Relax transient test
2020-01-09 13:38:56 +01:00
Nicolas Grekas
f06e5ccb84 Merge branch '4.3' into 4.4
* 4.3:
  fix deps
  Relax transient test
2020-01-09 13:35:03 +01:00
Nicolas Grekas
4ee84b3915 fix deps 2020-01-09 13:29:25 +01:00
Nicolas Grekas
cc2246e916 Merge branch '3.4' into 4.3
* 3.4:
  Relax transient test
2020-01-09 13:15:56 +01:00
Nicolas Grekas
0497fd9d31 Relax transient test 2020-01-09 13:09:28 +01:00
Nicolas Grekas
80cc6bda60 Merge branch '5.0'
* 5.0:
  Added more tests for WebProfilerBundle
2020-01-09 13:01:00 +01:00
Nicolas Grekas
0c6f88e43a Merge branch '4.4' into 5.0
* 4.4:
  Added more tests for WebProfilerBundle
2020-01-09 13:00:51 +01:00
Nicolas Grekas
2a3de1a6d1 Merge branch '4.3' into 4.4
* 4.3:
  Added more tests for WebProfilerBundle
2020-01-09 12:59:40 +01:00
Nicolas Grekas
0c47116813 Merge branch '3.4' into 4.3
* 3.4:
  Added more tests for WebProfilerBundle
2020-01-09 12:56:22 +01:00
Nicolas Grekas
347f7cf3ef minor #31522 Added more tests for WebProfilerBundle (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Added more tests for WebProfilerBundle

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        | -

Thanks to @jpauli Code Coverage info about Symfony (http://cov.jpauli.tech/) I found that WebProfiler's controllers are pretty badly covered:

![image](https://user-images.githubusercontent.com/73419/57919817-ec390500-7899-11e9-81b7-763a0b35d0ec.png)

This PR focuses on testing the main controller class:

![image](https://user-images.githubusercontent.com/73419/57919877-04108900-789a-11e9-8a93-3466b672d873.png)

Commits
-------

2f7a820edd Added more tests for WebProfilerBundle
2020-01-09 12:44:37 +01:00
Javier Eguiluz
2f7a820edd Added more tests for WebProfilerBundle 2020-01-09 12:43:54 +01:00
Nicolas Grekas
e0c1f4da32 Merge branch '5.0'
* 5.0:
  [String] add test case for wordwrap method
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
  [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:56:45 +01:00
Nicolas Grekas
3b3cbb925c minor #35236 [String] add test case for wordwrap method (mgamal92)
This PR was submitted for the master branch but it was squashed and merged into the 5.0 branch instead.

Discussion
----------

[String] add test case for wordwrap method

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

Just test case for ```wordwrap``` method

Commits
-------

c314598df9 [String] add test case for wordwrap method
2020-01-09 10:55:35 +01:00
Mohamed Gamal
c314598df9 [String] add test case for wordwrap method 2020-01-09 10:55:26 +01:00
Nicolas Grekas
8031b864c3 Merge branch '4.4' into 5.0
* 4.4:
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
  [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:53:06 +01:00
Nicolas Grekas
62c4608e17 bug #35269 [HttpKernel][FileLocator] Fix deprecation message (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel][FileLocator] Fix deprecation message

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Ref https://github.com/symfony/symfony/pull/34886

`$deprecatedPath` is the foreach value so it only works if the last element triggers the deprecation, otherwise the value is wrong.

Commits
-------

18ce8399d2 [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:50:57 +01:00
Nicolas Grekas
e587194d89 Merge branch '4.3' into 4.4
* 4.3:
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
2020-01-09 10:50:08 +01:00
Nicolas Grekas
4228906e96 Merge branch '3.4' into 4.3
* 3.4:
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
2020-01-09 10:48:33 +01:00
Nicolas Grekas
0716c200a6 minor #35265 [Process] - update @throws phpdoc (Benhssaein Youssef)
This PR was merged into the 4.3 branch.

Discussion
----------

[Process] - update @throws phpdoc

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | no
| License       | MIT
| Doc PR        |

Update PHPDoc throws Exceptions on https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Process/Process.php

Commits
-------

2be7029b70 [Process] - update @throws phpdoc
2020-01-09 10:39:14 +01:00
Benhssaein Youssef
2be7029b70 [Process] - update @throws phpdoc 2020-01-09 10:39:05 +01:00
Nicolas Grekas
7e3d89983c minor #35274 [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource (plozmun)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PHPUnitBridge] file_get_contents() expects parameter 3 to be resource

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

file_get_contents 3rd parameter (context) expects resource or NULL to ignore them

Commits
-------

a28a42187c [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
2020-01-09 10:21:19 +01:00
Pablo Lozano
a28a42187c [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource 2020-01-09 10:21:13 +01:00
Nicolas Grekas
c3c8e2c806 bug #35254 [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails (mpdude)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Some commands executed by the `simple-phpunit` script are not checked for success. For example [here](https://travis-ci.org/twigphp/Twig/jobs/634110681), Composer fails with the message

```
  [InvalidArgumentException]
  Could not find package phpunit/phpunit with version 7.5.* in a version inst
  allable using your PHP version 7.0.25.
```

Yet, the `simple-phpunit` script happily continues, going over failing `chdir()`, `file_get_contents()` and `include()` calls and eventually returns a successful `0` exit code. So CI tests look OK when in fact PHPUnit was not even downloaded.

Commits
-------

576e18561f [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
2020-01-09 10:20:23 +01:00