Commit Graph

39888 Commits

Author SHA1 Message Date
Nicolas Grekas
4e4ebdece2 bug #30050 [Cache] fix pruning pdo cache for vendors that throw on execute (bendavies)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] fix pruning pdo cache for vendors that throw on execute

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

This additionally fixes pruning of the PdoAdapter when the table does not exist.
Similar to https://github.com/symfony/symfony/pull/29900 https://github.com/symfony/symfony/pull/30005 and f419851eb1

Commits
-------

14b9fa5234 fix pruning pdo cache for vendors that throw on execute
2019-02-01 11:22:08 +01:00
Ben Davies
14b9fa5234 fix pruning pdo cache for vendors that throw on execute 2019-01-31 15:08:08 +00:00
Nicolas Grekas
4f6541e4f5 Merge branch '3.4' into 4.2
* 3.4:
  [DI] Fix dumping Doctrine-like service graphs
  fix serialization workaround in CustomUserMessageAuthenticationException
  PHPUnit Bridge: Rollback to traditional array syntax.
  [Form] fix some docblocks and type checks
2019-01-30 18:51:38 +01:00
Nicolas Grekas
5b1948e6b7 bug #30046 [DI] Fix dumping Doctrine-like service graphs (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix dumping Doctrine-like service graphs

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

I'm unable to provide a reproducer for this, the required service reference graph is too crazy, but that does the job :)

Commits
-------

ed96830893 [DI] Fix dumping Doctrine-like service graphs
2019-01-30 18:48:51 +01:00
Nicolas Grekas
83bab56a38 minor #30041 PHPUnit Bridge: Rollback to traditional array syntax. (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

PHPUnit Bridge: Rollback to traditional array syntax.

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

I've used PHP CS Fixer to convert all short array expressions back to the traditional syntax understood by php 5.3. Unfortunately, I don't have a local php 5.3 setup anymore, so I hope I've caught all occurrences.

Commits
-------

8b330de7f7 PHPUnit Bridge: Rollback to traditional array syntax.
2019-01-30 18:19:24 +01:00
Nicolas Grekas
ed96830893 [DI] Fix dumping Doctrine-like service graphs 2019-01-30 18:15:16 +01:00
Nicolas Grekas
11dc73d367 minor #30044 [Security] Fix serialization workaround in CustomUserMessageAuthenticationException (renanbr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fix serialization workaround in CustomUserMessageAuthenticationException

| 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        | m/a

Commits
-------

542e9e29b9 fix serialization workaround in CustomUserMessageAuthenticationException
2019-01-30 17:17:49 +01:00
renanbr
542e9e29b9 fix serialization workaround in CustomUserMessageAuthenticationException 2019-01-30 16:28:03 +01:00
Alexander M. Turek
8b330de7f7 PHPUnit Bridge: Rollback to traditional array syntax. 2019-01-30 14:30:37 +01:00
Fabien Potencier
46edcee92a bug #30028 [Form] fix some docblocks and type checks (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix some docblocks and type checks

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

Commits
-------

ec0c37192b [Form] fix some docblocks and type checks
2019-01-30 13:38:07 +01:00
Nicolas Grekas
bc8656c573 Merge branch '3.4' into 4.2
* 3.4:
  Add missing `@internal` annotations
  Disable Twig in the profiler menu when Twig is not used
  Mark some/most implementations of Serializable as `@internal`
  [Config] ensure moving away from Serializable wont break cache:clear
  [VarDumper] dont implement Serializable in Stub
  [Config] fix compat with wrapping autoloaders
2019-01-30 12:44:30 +01:00
Nicolas Grekas
823a95d81e Add missing @internal annotations 2019-01-30 12:43:38 +01:00
Nicolas Grekas
82394d8a19 minor #30023 [Config] fix compat with wrapping autoloaders (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] fix compat with wrapping autoloaders

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

Registering this private method as autoloader works, until one wants to decorate autoloaders (like our DebugClassLoader does.)

Commits
-------

695d84be4c [Config] fix compat with wrapping autoloaders
2019-01-30 12:33:42 +01:00
Nicolas Grekas
fb43484f85 bug #30037 Disable Twig in the profiler menu when Twig is not used (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Disable Twig in the profiler menu when Twig is not used

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | #30033
| License       | MIT
| Doc PR        | -

Commits
-------

b47408179f Disable Twig in the profiler menu when Twig is not used
2019-01-30 12:31:21 +01:00
Nicolas Grekas
591c805ccd bug #30026 [VarDumper] dont implement Serializable in Stub (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] dont implement Serializable in Stub

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

`Serializable` is really really broken...

Commits
-------

73070d7d32 [VarDumper] dont implement Serializable in Stub
2019-01-30 12:22:50 +01:00
Nicolas Grekas
fb2f57da5e minor #30035 Mark some/most implementations of Serializable as @internal (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Mark some/most implementations of Serializable as `@internal`

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

There are more usages of `Serializable` in the code base, but the remaining are unfortunately exposed as part of interfaces.

All these places are IMHO already considered internal, this just makes it explicit.

Will ease moving away from `Serializable`.

Commits
-------

7b9d73d891 Mark some/most implementations of Serializable as `@internal`
2019-01-30 12:21:16 +01:00
Nicolas Grekas
c7937c9749 bug #30034 [Config] ensure moving away from Serializable wont break cache:clear (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] ensure moving away from Serializable wont break cache:clear

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

When a resource implementation moves away from `Serializable`, the `cache:clear` command currently fails with `Warning: Class Symfony\Component\Config\Resource\ClassExistenceResource has no unserializer`. This change makes it ignore the failure, which is fine.

Commits
-------

9d3180a7e2 [Config] ensure moving away from Serializable wont break cache:clear
2019-01-30 12:20:19 +01:00
Javier Eguiluz
b47408179f Disable Twig in the profiler menu when Twig is not used 2019-01-30 11:27:26 +01:00
Nicolas Grekas
7b9d73d891 Mark some/most implementations of Serializable as @internal 2019-01-30 10:03:33 +01:00
Nicolas Grekas
9d3180a7e2 [Config] ensure moving away from Serializable wont break cache:clear 2019-01-30 09:47:57 +01:00
Christian Flothmann
ec0c37192b [Form] fix some docblocks and type checks 2019-01-30 09:09:50 +01:00
Nicolas Grekas
73070d7d32 [VarDumper] dont implement Serializable in Stub 2019-01-29 17:19:17 +01:00
Nicolas Grekas
695d84be4c [Config] fix compat with wrapping autoloaders 2019-01-29 16:40:56 +01:00
Nicolas Grekas
50a0bda031 bug #29532 [Messenger] fixed RabbitMQ arguments not passed as integer values (thePanz)
This PR was submitted for the 4.1 branch but it was merged into the 4.2 branch instead (closes #29532).

Discussion
----------

[Messenger] fixed RabbitMQ arguments not passed as integer values

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

RabbitMQ expects some arguments to be passed as integer values.
Make sure to cast those after parsing the DSN

\cc @thomaskonrad

Commits
-------

f19c035aaa [Messenger] fixed RabbitMQ arguments not passed as integer values
2019-01-29 13:42:30 +01:00
Emanuele Panzeri
f19c035aaa [Messenger] fixed RabbitMQ arguments not passed as integer values 2019-01-29 13:42:22 +01:00
Nicolas Grekas
48e5df87a3 [Cache] fix connecting using socket with phpredis 2019-01-29 11:14:57 +01:00
Nicolas Grekas
fac1052038 Merge branch '4.1' into 4.2
* 4.1:
  [HttpKernel] fix nested calls to serialize when using DataCollector
2019-01-29 11:04:11 +01:00
Nicolas Grekas
b7f1fe2a48 Merge branch '3.4' into 4.1
* 3.4:
  [HttpKernel] fix nested calls to serialize when using DataCollector
2019-01-29 11:03:57 +01:00
Nicolas Grekas
3cfb558f03 [HttpKernel] fix nested calls to serialize when using DataCollector 2019-01-29 11:03:44 +01:00
Nicolas Grekas
adbdec838a Merge branch '4.1' into 4.2
* 4.1:
  [Routing] dont redirect routes with greedy trailing vars with no explicit slash
  skip native serialize among child and parent serializable objects
  [Routing] backport tests from 4.1
  [MonologBridge] Remove unused local variable
  Remove unreachable code
  Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
  Support use of hyphen in asset package name
  Remove gendered pronouns
  Replace gender by eye color in tests
  [Security] dont do nested calls to serialize()
2019-01-29 10:49:29 +01:00
Nicolas Grekas
05071a443a bug #30013 [Routing] dont redirect routes with greedy trailing vars with no explicit slash (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] dont redirect routes with greedy trailing vars with no explicit slash

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

From the linked issue:

> The current logic is the following:
> - when a route is declared with a trailing slash, the trimmed-slash url is redirected to the one with the slash
> - when a route is declared with *no* trailing slash, the slashed url is redirected to the trimmed-slash one
>
> That includes routes with slash-greedy requirements: when the same greedy requirement matches both the slashed and the trimmed-slash URLs, only one of them is considered the canonical one and a redirection happens.
>
> We could fine tune this logic and make an exception when a trailing slash-greedy requirement is declared with no explicit trailing slash after it. (ie disable any redirections for `/foo/{.*}` but keep it for `/foo/{.*}/`. That would mean `/foo/bar` and `/foo/bar/` wouldn't trigger the redirection for route `/foo/{.*}`, breaking the "not-semantics" property of trailing slashes for catch-all routes. Which might be legit afterall.

This PR implements this fine tuning, as that's the most BC behavior (and thus the correct one).
See #30012 for `testGreedyTrailingRequirement` in action on 3.4 as a proof.

Commits
-------

2bb8890bbb [Routing] dont redirect routes with greedy trailing vars with no explicit slash
2019-01-29 10:44:13 +01:00
Nicolas Grekas
2bb8890bbb [Routing] dont redirect routes with greedy trailing vars with no explicit slash 2019-01-29 10:39:33 +01:00
Nicolas Grekas
78c23c7838 Merge branch '3.4' into 4.1
* 3.4:
  skip native serialize among child and parent serializable objects
  [Routing] backport tests from 4.1
  Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
  Support use of hyphen in asset package name
  Remove gendered pronouns
  Replace gender by eye color in tests
  [Security] dont do nested calls to serialize()
2019-01-29 10:21:38 +01:00
Nicolas Grekas
b4357d734b bug #30006 [Security] don't do nested calls to serialize() (nicolas-grekas, Renan)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] don't do nested calls to serialize()

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

The problem (originally reported as `Symfony\Component\Security\Core\Authentication\Token\AbstractToken` issue), may occur also in classes extending `Symfony\Component\Security\Core\Exception\AuthenticationException`

Tasks:

- [x] Skip native serializer (workaround itself)
- [x] Token test
- [x] Exception test

Commits
-------

10256fc4fd skip native serialize among child and parent serializable objects
41000f1de0 [Security] dont do nested calls to serialize()
2019-01-29 10:07:09 +01:00
Nicolas Grekas
957b47726a minor #30012 [Routing] backport tests from 4.1 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] backport tests from 4.1

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

c2e0f9701d [Routing] backport tests from 4.1
2019-01-29 10:06:41 +01:00
Renan
10256fc4fd skip native serialize among child and parent serializable objects 2019-01-29 10:04:09 +01:00
Nicolas Grekas
c2e0f9701d [Routing] backport tests from 4.1 2019-01-29 09:47:12 +01:00
Fabien Potencier
c95fdbd074 bug #30007 [FrameworkBundle] Support use of hyphen in asset package name (damaya, XuruDragon)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Support use of hyphen in asset package name

This PR is a continuity of #28128

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

According to issue https://github.com/symfony/symfony-docs/pull/10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
```yaml
framework:
    assets:
        packages:
            app-client-frontend:
                version: "%env(FRONTEND_VERSION)%"
                version_format: '%%2$s/dist/%%1$s'
                base_urls:
                  - "%env(FRONTEND_URL)%"
```

Commits
-------

5c58b6e875 Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
30b6a4f7bf Support use of hyphen in asset package name
2019-01-29 06:58:16 +01:00
Fabien Potencier
55ffdf99b8 minor #30009 [MonologBridge] Remove unused local variable (samnela)
This PR was merged into the 4.1 branch.

Discussion
----------

[MonologBridge] Remove unused local variable

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

5580473740 [MonologBridge] Remove unused local variable
2019-01-29 06:54:33 +01:00
Samuel NELA
5580473740 [MonologBridge] Remove unused local variable 2019-01-28 21:24:44 +01:00
Nicolas Grekas
6b611d53b4 minor #30002 Remove a harmless duplicate array key from VarDumper (TysonAndre)
This PR was merged into the 4.2 branch.

Discussion
----------

Remove a harmless duplicate array key from VarDumper

This has the same field order as the original code.

Detected via static analysis - The `type` is also the first element of the array. This change preserves the key order of the resulting array.

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes (harmless)
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | N/A
| Fixed tickets |
| License       | MIT
| Doc PR        |

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

1cd30acc2a Remove a harmless duplicate array key from VarDumper
2019-01-28 19:04:41 +01:00
Nicolas Grekas
fceb2a2de4 minor #30003 Remove unreachable code (TysonAndre)
This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #30003).

Discussion
----------

Remove unreachable code

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | (unreachable)
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | n/a (unreachable)    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

The try/finally block will either return or throw.
Additionally, $socket was never defined.

Detected via static analysis

Commits
-------

2fb8f49146 Remove unreachable code
2019-01-28 19:04:02 +01:00
Tyson Andre
2fb8f49146 Remove unreachable code
The try/finally block will either return or throw.
Additionally, $socket was never defined.

Detected via static analysis
2019-01-28 19:03:55 +01:00
Nicolas Grekas
9bf53cd0c9 bug #30004 Fix format strings for deprecation notices (TysonAndre)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix format strings for deprecation notices

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   |
| Fixed tickets |
| License       | MIT
| Doc PR        |

The `%c` conversion specifier expects an integer
(the value of the byte to print). To produce a literal `%`, `%%` should be used.

Detected via static analysis

Commits
-------

2e00dfb0c8 Fix format strings for deprecation notices
2019-01-28 19:02:28 +01:00
Anthony MARTIN
5c58b6e875 Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR 2019-01-28 15:09:38 +01:00
damaya
30b6a4f7bf Support use of hyphen in asset package name
| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes (Manual tests only)
| Fixed tickets | #28122
| License       | MIT
| Doc PR        | n/a

According to issue https://github.com/symfony/symfony-docs/pull/10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
```
framework:
    assets:
        packages:
            app-client-frontend:
                version: "%env(FRONTEND_VERSION)%"
                version_format: '%%2$s/dist/%%1$s'
                base_urls:
                  - "%env(FRONTEND_URL)%"
```
2019-01-28 15:09:19 +01:00
Tyson Andre
2e00dfb0c8 Fix format strings for deprecation notices
The `%c` conversion specifier expects an integer
(the value of the byte to print)

Detected via static analysis
2019-01-27 18:11:39 -05:00
Tyson Andre
1cd30acc2a Remove a harmless duplicate array key from VarDumper
This has the same field order as the original code.

Detected via static analysis.
2019-01-27 17:40:41 -05:00
Nicolas Grekas
7db3e25efe bug #29984 [VarDumper] Fixed search bar (ro0NL)
This PR was squashed before being merged into the 4.2 branch (closes #29984).

Discussion
----------

[VarDumper] Fixed search bar

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| 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 -->

Continuation of #28854, replaces #29176

initial:

![image](https://user-images.githubusercontent.com/1047696/51747953-3c9e1400-20ab-11e9-913d-d60bd59ee2d9.png)

ctrl f:

![image](https://user-images.githubusercontent.com/1047696/51747973-4b84c680-20ab-11e9-8d07-e6128822fbb2.png)

scroll:

![image](https://user-images.githubusercontent.com/1047696/51747984-550e2e80-20ab-11e9-8b54-b24109d2280a.png)

tested in chrome+ff

cc @ogizanagi

ref https://caniuse.com/#feat=css-sticky

Commits
-------

99d2893b78 [VarDumper] Fixed search bar
2019-01-27 14:54:50 +01:00
Roland Franssen
99d2893b78 [VarDumper] Fixed search bar 2019-01-27 14:54:44 +01:00