Commit Graph

31578 Commits

Author SHA1 Message Date
Malte Blättermann
3f7fd432df Fix Usage with anonymous classes
Replace forbidden characters in the the class names of Anonymous Classes in form of
"class@anonymous /symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php0x7f3f5f267ad5"

Wrapped in eval to avoid PHP parsing errors < 7
2017-06-13 10:47:59 +02:00
Christian Flothmann
fddd754c0a add back support for legacy constant values 2017-06-13 09:43:03 +02:00
Fabien Potencier
f1e2fbd486 minor #23101 [FormBuilderInterface] Fixed PHPdoc return references (Javan Eskander)
This PR was merged into the 2.7 branch.

Discussion
----------

[FormBuilderInterface] Fixed PHPdoc return references

| Q             | A
| ------------- | ---
| Branch?       | 2.7 and higher
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (phpdoc)
| License       | MIT

In a case where the method `createFormBuilder()` was used where the methods `add()` and `getForm()` were chained onto it, the final resulting object was no longer a FormBuilder object as the `add()` and `remove()` methods was using a return variable that didn't work.
Should reference `self` as interfaces do not have a `$this` object.

Commits
-------

2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface
2017-06-12 11:43:34 -07:00
Fabien Potencier
7fc255218e bug #23141 [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix keys resolution in ResolveParameterPlaceHoldersPass

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

Keys are resolved in 3.2, but we broke that when moving to AbstractRecursivePass.

Commits
-------

9251a2143d [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
2017-06-12 08:25:47 -07:00
Fabien Potencier
c0486f667d minor #23142 [Workflow] Added more keywords in the composer.json (lyrixx)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Added more keywords in the composer.json

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

Commits
-------

79bc4b017d [Workflow] Added more keywords in the composer.json
2017-06-12 07:57:37 -07:00
Fabien Potencier
6852b105c4 bug #23145 Fix the conditional definition of the SymfonyTestsListener (stof)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix the conditional definition of the SymfonyTestsListener

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

This is a continuation of the attempts at fixing the PHPUnit 5 compatibility layer for the listener.
The signature mismatch error still happened when using the PHPUnit PHAR instead of a source install (hint: people using `simple-phpunit` are using a source install).

It looks like the class definition gets loaded by PHP before executing the code placed above it (and so the early return breaks). Putting the code inside a `else` instead works fine (the class definition probably cannot bubble up).

The known difference between the PHAR and a source install is that the source install relies on autoloading while the PHAR loads all PHPUnit classes through `require_once` eagerly (and so the parent class already exists when using the Symfony file).

@jpauli is it an expected behavior that early returns before class definitions don't work consistently ?

Regarding the patch itself, an alternative would be to move the PHPUnit 6+ implementation to a dedicated class instead, and use a `class_alias` for the else clause too. But I don't think it is worth it.

Commits
-------

0ec8b1c1ff Fix the conditional definition of the SymfonyTestsListener
2017-06-12 07:56:08 -07:00
Christophe Coevoet
0ec8b1c1ff Fix the conditional definition of the SymfonyTestsListener 2017-06-12 15:35:45 +02:00
Grégoire Pineau
79bc4b017d [Workflow] Added more keywords in the composer.json 2017-06-12 13:49:55 +02:00
Nicolas Grekas
9251a2143d [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass 2017-06-12 12:11:53 +02:00
Fabien Potencier
0dbba7bf4f minor #22931 SCA with Php Inspections (EA Extended): 2.7 (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #22931).

Discussion
----------

SCA with Php Inspections (EA Extended): 2.7

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

Static Code Analysis with Php Inspections (EA Extended): dead code and control flow tweaks.

Commits
-------

598ae56cc9 SCA with Php Inspections (EA Extended): 2.7
2017-06-10 17:25:34 -07:00
Vladimir Reznichenko
598ae56cc9 SCA with Php Inspections (EA Extended): 2.7 2017-06-10 17:25:31 -07:00
Fabien Potencier
9e2f394bf3 minor #23120 Remove deprecated each function (pierredup)
This PR was squashed before being merged into the 2.7 branch (closes #23120).

Discussion
----------

Remove deprecated each function

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

Replace the `each()` function which is deprecated in PHP 7.2 (https://wiki.php.net/rfc/deprecations_php_7_2#each)

Commits
-------

232caad876 Remove deprecated each function
2017-06-10 07:57:49 -07:00
Pierre du Plessis
232caad876 Remove deprecated each function 2017-06-10 07:57:48 -07:00
Fabien Potencier
d024c82b48 minor #23117 [EventDispatcher] Remove dead code in WrappedListener (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[EventDispatcher] Remove dead code in WrappedListener

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

The static `$cloner` property is unused since ab716c64de

Commits
-------

8b7de02413 [EventDispatcher] Remove dead code in WrappedListener
2017-06-09 08:14:08 -07:00
Fabien Potencier
e1bc7a80c8 minor #23118 [SecurityBundle] Fix non-dumped voters in profiler (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Fix non-dumped voters in profiler

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

As a bugfix since it was just forgot.

__before__
![before](https://image.prntscr.com/image/PvGuQeNmRFCBpYJTuHbjcg.png)
__after__
![after](https://image.prntscr.com/image/3Q-AuYq5SyKmC5RmQ6EErQ.png)

Commits
-------

c1fa308c0a Fix non-dumped voters in security panel
2017-06-09 08:13:05 -07:00
Robin Chalas
8b7de02413 [EventDispatcher] Remove dead code in WrappedListener 2017-06-09 16:53:08 +02:00
Robin Chalas
c1fa308c0a Fix non-dumped voters in security panel 2017-06-09 14:05:05 +02:00
Fabien Potencier
40beab4a41 bug #23091 [Cache] ApcuAdapter::isSupported() should return true when apc.enable_cli=Off (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] ApcuAdapter::isSupported() should return true when apc.enable_cli=Off

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

By being sensitive to apc.enable_cli, CLI cache warmup is broken when the setting is set to off because a PhpFilesAdapter will be warmed up by the CLI, whereas the Web mode will look at the FilesystemAdapter pools, which will be empty.

Commits
-------

aadf263db4 [Cache] APCu isSupported() should return true when apc.enable_cli=Off
2017-06-08 17:26:56 -07:00
Fabien Potencier
311cc8ab24 bug #22953 #22839 - changed debug toolbar dump section to relative and use full window width (mkurzeja)
This PR was merged into the 2.8 branch.

Discussion
----------

#22839 - changed debug toolbar dump section to relative and use full window width

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

My approach to fix #22839 - instead of adding min-width I have switched the section to fill the full available width:
![zrzut ekranu 2017-05-30 o 10 18 25](https://cloud.githubusercontent.com/assets/1044032/26574462/bf80b6dc-4521-11e7-96cc-bec0de075329.png)

Commits
-------

65297de3aa #22839 - changed debug toolbar dump section to relative and use full window width
2017-06-08 17:14:12 -07:00
Fabien Potencier
0c17767dd5 bug #23086 [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()

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

On slow file systems (eg on Windows), I noticed that writing files without doing any changes just kills perf.
Limiting the depth also helps when the symfony/cache component is used (because it can store thousands of files in its cache pool directory structure, and iterating there is also a waste of *fs* time).
I choose the max depth by looking at where existing apps put their files and added one level more just in case.

Commits
-------

b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
2017-06-08 17:11:05 -07:00
Fabien Potencier
b376eca7cc bug #23090 [SecurityBundle] Made 2 service aliases private (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Made 2 service aliases private

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

We missed making them private :(
Is it too late to fix that?

Commits
-------

4442c636c8 [SecurityBundle] Made 2 service aliases private
2017-06-08 17:09:06 -07:00
Fabien Potencier
bd0603d959 bug #23108 [Yaml] Remove line number in deprecation notices (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] Remove line number in deprecation notices

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

While moving an app to 3.3, I noticed that my deprecation log is full of deprecation notices that differ only by some line number, but don't tell which file is concerned.
This makes the line number useless, and just prevents aggregation.

![capture du 2017-06-08 16-29-31](https://user-images.githubusercontent.com/243674/26933795-dd123476-4c67-11e7-8cf3-406bedab9130.png)

Commits
-------

f82b6185a4 [Yaml] Remove line number in deprecation notices
2017-06-08 17:05:58 -07:00
Fabien Potencier
895b123413 Merge branch '2.7' into 2.8
* 2.7:
  bumped Symfony version to 2.7.30
  Cache ipCheck
  updated VERSION for 2.7.29
  update CONTRIBUTORS for 2.7.29
  updated CHANGELOG for 2.7.29
  show unique inherited roles
2017-06-08 16:53:01 -07:00
Fabien Potencier
589f2b1a6c bug #23098 Cache ipCheck (2.7) (gonzalovilaseca)
This PR was merged into the 2.7 branch.

Discussion
----------

Cache ipCheck (2.7)

In our app we use trusted proxies. Using Blackfire we found `IpUtils::checkIp` was being called 454 times taking 3.15ms.
Caching the result saves those 3ms.

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

Commits
-------

bcb80569cb Cache ipCheck
2017-06-08 16:52:20 -07:00
Nicolas Grekas
f82b6185a4 [Yaml] Remove line number in deprecation notices 2017-06-08 18:22:33 +02:00
Jáchym Toušek
8a4d4eb563 [Security] Fix annotation 2017-06-08 15:38:34 +02:00
Nicolas Grekas
aadf263db4 [Cache] APCu isSupported() should return true when apc.enable_cli=Off 2017-06-08 13:47:25 +02:00
Javan Eskander
2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface 2017-06-08 17:18:54 +10:00
tsufeki
45b961de2e [PropertyAccess] Do not silence TypeErrors from client code. 2017-06-07 23:00:20 +02:00
Fabien Potencier
e8497bb57d bumped Symfony version to 2.8.23 2017-06-07 13:30:46 -07:00
Fabien Potencier
2404550f13 Merge pull request #23099 from fabpot/release-2.8.22
released v2.8.22
2017-06-07 13:12:45 -07:00
Fabien Potencier
0d52ccb5ff updated VERSION for 2.8.22 2017-06-07 13:12:31 -07:00
Fabien Potencier
a9f289abbc updated CHANGELOG for 2.8.22 2017-06-07 13:12:24 -07:00
Fabien Potencier
ccb6543839 bumped Symfony version to 2.7.30 2017-06-07 13:11:41 -07:00
Gonzalo Vilaseca
bcb80569cb Cache ipCheck 2017-06-07 20:32:30 +01:00
Fabien Potencier
102f930e70 Merge pull request #23096 from fabpot/release-2.7.29
released v2.7.29
2017-06-07 11:50:53 -07:00
Fabien Potencier
c713d69827 updated VERSION for 2.7.29 2017-06-07 11:50:32 -07:00
Fabien Potencier
fc56c4ed8c update CONTRIBUTORS for 2.7.29 2017-06-07 11:50:25 -07:00
Fabien Potencier
5d13f0dfac updated CHANGELOG for 2.7.29 2017-06-07 11:49:46 -07:00
Nicolas Grekas
4442c636c8 [SecurityBundle] Made 2 service aliases private 2017-06-07 12:41:51 +02:00
Nicolas Grekas
b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() 2017-06-07 09:57:32 +02:00
Fabien Potencier
99573dc45b bug #23082 [MonologBridge] Do not silence errors in ServerLogHandler::formatRecord (lyrixx)
This PR was merged into the 3.3 branch.

Discussion
----------

[MonologBridge] Do not silence errors in ServerLogHandler::formatRecord

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

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

f1edfa7ec2 [MonologBridge] Do not silence errors in ServerLogHandler::formatRecord
2017-06-06 08:24:58 -07:00
Grégoire Pineau
f1edfa7ec2 [MonologBridge] Do not silence errors in ServerLogHandler::formatRecord 2017-06-06 17:10:52 +02:00
Fabien Potencier
100695978a bug #23007 [HttpKernel][Debug] Fix missing trace on deprecations collected during bootstrapping & silenced errors (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel][Debug] Fix missing trace on deprecations collected during bootstrapping & silenced errors

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22958 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

|Before|After|
|--|--|
|<img width="1086" alt="screenshot 2017-06-01 a 10 12 07" src="https://cloud.githubusercontent.com/assets/2211145/26670940/feb51b52-46b3-11e7-806f-e23e2eb248c1.PNG">|<img width="1094" alt="screenshot 2017-06-01 a 10 13 39" src="https://cloud.githubusercontent.com/assets/2211145/26670941/feb8bd66-46b3-11e7-8e54-cc4959487b7a.PNG">|

(failures unrelated or deps=high fixed when merged in upper branches)

Commits
-------

21ef065594 [HttpKernel][Debug] Fix missing trace on deprecations collected during bootstrapping & silenced errors
2017-06-06 07:51:55 -07:00
Fabien Potencier
62cbfdd2e2 bug #23069 [SecurityBundle] Show unique Inherited roles in profile panel (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Show unique Inherited roles in profile panel

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

When more than one assigned role reaches the same inherited role then it's duplicated in the "Inherited roles" list.

The changes in the test case show the unexpected result before fix it:

```console
There was 1 failure:

1) Symfony\Bundle\SecurityBundle\Tests\DataCollector\SecurityDataCollectorTest::testCollectAuthenticationTokenAndRoles with data set #4 (array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'))
Failed asserting that Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
    2 => 'ROLE_USER'
) is identical to Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
)
```

Commits
-------

7061bfbf3a show unique inherited roles
2017-06-06 07:50:26 -07:00
Fabien Potencier
f322107d64 bumped Symfony version to 3.3.3 2017-06-05 21:14:06 -07:00
Fabien Potencier
82bd7c0392 Merge pull request #23078 from fabpot/release-3.3.2
released v3.3.2
2017-06-05 21:00:14 -07:00
Fabien Potencier
adf3a020e0 updated VERSION for 3.3.2 2017-06-05 20:59:58 -07:00
Fabien Potencier
c1a6455965 updated CHANGELOG for 3.3.2 2017-06-05 20:59:50 -07:00
Nicolas Grekas
7769179e0f Merge branch '3.2' into 3.3
* 3.2:
  [TwigBridge] Fix namespaced classes
  [Cache] MemcachedAdapter not working with TagAwareAdapter
  [DependencyInjection] Use more clear message when unused environment variables detected
  mix attr options between type-guess options and user options
2017-06-06 05:13:52 +02:00