Commit Graph

33054 Commits

Author SHA1 Message Date
Christian Flothmann
893df5804e deprecate relative paths in makePathRelative() 2017-09-18 10:06:42 +02:00
Nicolas Grekas
12bb22c4eb minor #24231 [DebugBundle] Fix the var-dumper requirement in composer.json (skalpa)
This PR was merged into the 3.4 branch.

Discussion
----------

[DebugBundle] Fix the var-dumper requirement in composer.json

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

The v3.4 of the debug bundle calls `VarCloner::setMinDepth()` and thus requires v3.4+ of the var-dumper component. However, the composer file has not been updated in 30cd70d.

I upped the var-dumper requirement to `~3.4|~4.0`.

Commits
-------

d761a76 Require v3.4+ of the var-dumper component
2017-09-18 09:44:12 +02:00
Roland Franssen
081c1e4f81 [WebProfiler] Fix z-index for pinned AJAX block 2017-09-17 18:42:13 +02:00
Fabien Potencier
3b42d8859e bug #22321 [Filesystem] Fixed makePathRelative (ausi)
This PR was squashed before being merged into the 2.7 branch (closes #22321).

Discussion
----------

[Filesystem] Fixed makePathRelative

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

Updating to Symfony 3.2.7 @agoat noticed a bug with `Filesystem::makePathRelative()` in contao/core-bundle#751:

- In Symfony 3.2.6 `makePathRelative('aa/cc', 'bb/cc')` returned correctly `../../aa/cc`
- In Symfony 3.2.7 the same method call returns `./`

I think this issue was introduced with #22133.

While working on the fix I noticed some other issues too:

- An unnecessary if construct that did nothing, fc745f45949fdb8d5aa590618ec73537721f99b4
- Missing normalization of `./` path segments, 15982d4b083723555cfa149368eaaae9609d0e22
- `../` got ignored at the beginning of relative paths, 9586e880d69f613b10e23dd53cea877e622b221a
- The documentation of the method only allowed absolute paths, but there are already unit tests ([FilesystemTest.php:1097](ab93feae3f/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php (L1097))) that test the behavior of relative paths, cec473eeb099c074b5883e7187f74663402f9d87

This pull request fixes all these issues and adds tests for them.

Commits
-------

2bc11505f4 [Filesystem] Fixed makePathRelative
2017-09-17 08:14:54 -07:00
Martin Auswöger
2bc11505f4 [Filesystem] Fixed makePathRelative 2017-09-17 08:14:49 -07:00
Fabien Potencier
857ae7a4f6 bug #24234 [DI] Fix decorated service merge in ResolveInstanceofConditionalsPass (dunglas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix decorated service merge in ResolveInstanceofConditionalsPass

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | api-platform/api-platform#414, symfony/symfony#24229
| License       | MIT
| Doc PR        | n/a

Follows #24229. It's [the patch](https://github.com/symfony/symfony/pull/24229#issuecomment-329972812) proposed by @nicolas-grekas + a test.

Commits
-------

2a30908bcd [DI] Fix decorated service merge in ResolveInstanceofConditionalsPass
2017-09-17 08:02:32 -07:00
Robin Chalas
f049dd0fba bug #24203 [Security] Preserve URI fragment in HttpUtils::generateUri() (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[Security] Preserve URI fragment in HttpUtils::generateUri()

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23675
| License       | MIT
| Doc PR        | n/a

Commits
-------

4dd2e3e Preserve URI fragment in HttpUtils::generateUri()
2017-09-17 15:45:14 +02:00
Nicolas Grekas
c4159b12c7 Merge branch '3.3' into 3.4
* 3.3:
  CS fixes
2017-09-17 12:10:45 +02:00
Nicolas Grekas
d94b9ac308 CS fixes 2017-09-17 12:10:12 +02:00
Vladimir Tsykun
c388b25cbb [WebProfilerBundle] Added missing link to profile token 2017-09-17 09:12:04 +03:00
Kévin Dunglas
2a30908bcd
[DI] Fix decorated service merge in ResolveInstanceofConditionalsPass 2017-09-16 20:21:20 +02:00
Nicolas Grekas
dce1eb95ff [Bridge\Doctrine] Add "DoctrineType::reset()" method 2017-09-16 18:00:00 +02:00
Pascal Luna
d761a7614a Require v3.4+ of the var-dumper component 2017-09-16 14:21:39 +01:00
Maxime Steinhausser
9208244e1f feature #23648 [Form] Add input + regions options to TimezoneType (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Add input  + regions options to TimezoneType

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/8223

I want to use `\DateTimeZone` as a model format, with only european timezones in the form available. Hence the new options.

Commits
-------

183307b741 [Form] Add input  + regions options to TimezoneType
2017-09-16 12:26:42 +02:00
Nicolas Grekas
b0c5cf0d9d [Serializer] Add local cache to normalizers 2017-09-16 12:19:29 +02:00
Roland Franssen
183307b741 [Form] Add input + regions options to TimezoneType 2017-09-16 10:56:09 +02:00
Fabien Potencier
40a3466268 Merge branch '3.3' into 3.4
* 3.3:
  CS: recover no_break_comment
  [DI] Fix non-instantiables auto-discovery
2017-09-15 10:11:35 -07:00
Fabien Potencier
e48617b467 Merge branch '2.8' into 3.3
* 2.8:
  CS: recover no_break_comment
2017-09-15 10:08:21 -07:00
Fabien Potencier
6edfa4b2df Merge branch '2.7' into 2.8
* 2.7:
  CS: recover no_break_comment
2017-09-15 09:59:28 -07:00
Fabien Potencier
b973ecf8ee minor #24215 CS: recover no_break_comment (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: recover no_break_comment

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

rule was excluded in #24123, yet without any information about it
it was not excluded in original form of given PR, it's not part of any commitlog nor any comment, title claims to touch only other rules.

this rule shall not be excluded, it's part of PSR and is applied for most places.
I added missing ones.

Commits
-------

4e9d1600ee CS: recover no_break_comment
2017-09-15 09:58:02 -07:00
Maxime Steinhausser
b7492045f3 feature #24185 [Form] Display general forms information on debug:form (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Display general forms information on debug:form

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

![debug-form-defaults](https://user-images.githubusercontent.com/2028198/30436620-998103ca-993a-11e7-9873-31f042327374.png)

When we run `bin/console debug:form` (without argument) all possible Form Component information is displayed.

Commits
-------

12d1a7f810 Display form defaults on debug:form
2017-09-15 18:33:15 +02:00
GDIBass
15fd863112 Updated Test name and exception name to be more accurate 2017-09-15 09:32:24 -07:00
Yonel Ceruto
12d1a7f810 Display form defaults on debug:form 2017-09-15 18:14:52 +02:00
Maxime Steinhausser
c7e84ccfee feature #23747 [Serializer][FrameworkBundle] Add a DateInterval normalizer (Lctrs)
This PR was squashed before being merged into the 3.4 branch (closes #23747).

Discussion
----------

[Serializer][FrameworkBundle] Add a DateInterval normalizer

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

Could be useful for API needing to submit a duration.

Most code have been adapted from @MisatoTremor's DateInterval form type. Credits to him.

Commits
-------

6185cb1991 [Serializer][FrameworkBundle] Add a DateInterval normalizer
2017-09-15 18:08:41 +02:00
Jérôme Parmentier
6185cb1991 [Serializer][FrameworkBundle] Add a DateInterval normalizer 2017-09-15 18:08:37 +02:00
Nicolas Grekas
46811fdd01 bug #24199 [DI] Fix non-instantiables auto-discovery (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix non-instantiables auto-discovery

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

Commits
-------

8b7c7c1 [DI] Fix non-instantiables auto-discovery
2017-09-15 15:18:29 +02:00
Robin Chalas
4dd2e3e837 Preserve URI fragment in HttpUtils::generateUri() 2017-09-15 15:18:09 +02:00
Nicolas Grekas
e3fa71c9f5 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
2017-09-15 12:58:45 +02:00
Nicolas Grekas
cdb53266b3 fix merge 2017-09-15 12:58:39 +02:00
Dariusz
4e9d1600ee CS: recover no_break_comment 2017-09-15 12:36:22 +02:00
Nicolas Grekas
4b31b47f08 Merge branch '3.3' into 3.4
* 3.3:
  [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
  [Filesystem] mirror - fix copying content with same name as source/target.
  Removed unnecessary getDefinition() call.
  .php_cs.dist - simplify config
  [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-15 12:12:22 +02:00
Nicolas Grekas
ebbcb7b1be Merge branch '2.8' into 3.3
* 2.8:
  [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
  [Filesystem] mirror - fix copying content with same name as source/target.
  .php_cs.dist - simplify config
  [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-15 12:08:59 +02:00
Nicolas Grekas
6f924755a6 Merge branch '2.7' into 2.8
* 2.7:
  [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
2017-09-15 11:59:38 +02:00
Nicolas Grekas
800f306589 minor #24123 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction (SpacePossum)
This PR was squashed before being merged into the 2.7 branch (closes #24123).

Discussion
----------

[CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction

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

Hi all and congratulations on the 1 billion of downloads! awesome :D

This is a courtesy call (or PR) from the PHP-CS-Fixer community.
As always I don't expect this PR to be merged nor do I've any strong feelings about why not.

The goal of this PR is to determine if the following new rules should be added to the Symfony ruleset by default. If so `fabbot.io` will (at some point) start reporting violations of these rules.
Please be aware that if the rules are accepted but this PR is not, any new PR's might contain a part of the fixes as proposed in this PR as fabbot.io will suggest to the authors of the new PR's to update the CS, consequently this might create noise.

Here are the rules:

```
    'no_unneeded_curly_braces' => true,
    'no_unneeded_final_method' => true,
    'semicolon_after_instruction' => true,
    'yoda_style' => true,
```

The first three are done in the first commit.
The `yoda_style` in the last.

I know the `yoda`-style fixing has a long history about it and some people have strong opinions on it. Please consider two things before commenting about Yoda
- this PR is not meant to determine the Symfony code style, I'm sure Symfony has other channels for these kind of discussions
- if you don't like Yoda style, please consider heading over to https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2446 and review my PR. If it gets merged you'll have a free tool to change all Yoda expressions in your code to non-Yoda (you can do it around as well as you can see in both PR's).

Thank you for your time!

Commits
-------

3e90138 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
2017-09-15 11:46:59 +02:00
SpacePossum
3e90138214 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction 2017-09-15 11:46:57 +02:00
Nicolas Grekas
1e4d4ef888 Merge branch '2.7' into 2.8
* 2.7:
  [Filesystem] mirror - fix copying content with same name as source/target.
  .php_cs.dist - simplify config
  [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-15 11:26:12 +02:00
Nicolas Grekas
816ad889b1 feature #24193 [FrameworkBundle] Reset stopwatch between requests (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Reset stopwatch between requests

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

Follow-up to #24155. This PR ensures that the stopwatch is reset between requests.

Commits
-------

7c3bdd9 Reset stopwatch.
2017-09-15 10:38:28 +02:00
Fabien Potencier
20be9fe2fe feature #24160 [HttpKernel] Deprecate bundle inheritance (fabpot)
This PR was squashed before being merged into the 3.4 branch (closes #24160).

Discussion
----------

[HttpKernel] Deprecate bundle inheritance

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

Commits
-------

89893c1204 [HttpKernel] deprecated bundle inheritance
ee9f4c3dad fixed CS
2017-09-15 00:29:19 -07:00
Fabien Potencier
89893c1204 [HttpKernel] deprecated bundle inheritance 2017-09-14 20:39:22 -07:00
Fabien Potencier
ee9f4c3dad fixed CS 2017-09-14 19:10:51 -07:00
Fabien Potencier
70bfb50e70 feature #24155 [FrameworkBundle][HttpKernel] Add DI tag for resettable services (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Add DI tag for resettable services

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

This PR uses #24033 to introduce a DI tag for resettable services.

TODO after merge:
* Add an interface, make the "method" attribute optional and enable autoconfiguration.
* Consider adding a config option to enable/disable this feature.
* Configure leaking services of the core bundles as resettable.

Commits
-------

d9a6b76dbd A DI tag for resettable services.
2017-09-14 13:35:56 -07:00
Alexander M. Turek
d9a6b76dbd A DI tag for resettable services. 2017-09-14 22:28:48 +02:00
Jáchym Toušek
d4f6039dcd
[HttpFoundation] Fix file upload multiple with no files 2017-09-14 14:29:10 +02:00
Alexander M. Turek
7c3bdd9139 Reset stopwatch. 2017-09-14 11:29:18 +02:00
Nicolas Grekas
8b7c7c179b [DI] Fix non-instantiables auto-discovery 2017-09-14 10:50:29 +02:00
Christian Flothmann
10ce932504 [PhpUnitBridge] do not require an error context
The error context argument of an error handler is deprecated as of PHP
7.2. Requiring it in the error handler of the SymfonyTestsListenerTrait
will make error handlers fail that are executed when running PHPUnit
tests and forward the error handling to the previously registered error
handler.
2017-09-13 20:51:11 +02:00
Fabien Potencier
30e3b6d27e feature #23625 Feature #23583 Add current and fallback locales in WDT / Profiler (nemoneph)
This PR was merged into the 3.4 branch.

Discussion
----------

Feature #23583  Add current and fallback locales in WDT / Profiler

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

The goal of this PR is to add informations about the locale and the fallback locales in the translation WDT panel / and profiler

Commits
-------

98a8a6c735 Feature #23583  Add current and fallback locales in WDT / Profiler
2017-09-13 09:05:29 -07:00
Fabien Potencier
5bf241aa8e bug #23473 [Filesystem] mirror - fix copying content with same name as source/target. (gitlost)
This PR was squashed before being merged into the 2.7 branch (closes #23473).

Discussion
----------

[Filesystem] mirror - fix copying content with same name as source/target.

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

Uses `substr()` and lengths in `Filesystem::mirror()` rather than `str_replace()` to avoid multiple replacements.

Commits
-------

b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target.
2017-09-13 09:02:25 -07:00
gitlost
b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target. 2017-09-13 09:02:23 -07:00
Fabien Potencier
0256e5981c minor #24186 [EventDispatcher] Removed unnecessary getDefinition() call from RegisterListenersPass (derrabus)
This PR was merged into the 3.3 branch.

Discussion
----------

[EventDispatcher] Removed unnecessary getDefinition() call from RegisterListenersPass

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

In `RegisterListenersPass`, the definition of each tagged listener service is pulled from the builder although it is never used. This PR removes the line of code where this happens.

Commits
-------

d1f7024e14 Removed unnecessary getDefinition() call.
2017-09-13 07:16:15 -07:00