Commit Graph

30020 Commits

Author SHA1 Message Date
Vincent AUBERT
71c1b6f5bf fixes #21606 2017-06-14 19:36:27 +02:00
Nicolas Grekas
d7238c9d96 [VarDumper] fixes 2017-06-14 18:20:11 +02:00
Fabien Potencier
5bc4ef0224 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  SCA with Php Inspections (EA Extended): 2.7
  Remove deprecated each function
  Fixed PHPdoc return references in FormBuilderInterface
  [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
2017-06-13 17:55:24 -07:00
Fabien Potencier
78f028cc75 fixed CS 2017-06-13 17:54:13 -07:00
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
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
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
Grégoire Pineau
79bc4b017d [Workflow] Added more keywords in the composer.json 2017-06-12 13:49:55 +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
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
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
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
b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() 2017-06-07 09:57:32 +02: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
c29714479a Merge branch '2.8' into 3.2
* 2.8:
  [TwigBridge] Fix namespaced classes
  mix attr options between type-guess options and user options
2017-06-05 19:49:13 -07:00
Fabien Potencier
419556ff87 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBridge] Fix namespaced classes
  mix attr options between type-guess options and user options
2017-06-05 19:49:00 -07:00
Fabien Potencier
658236b344 bug #23073 [TwigBridge] Fix namespaced classes (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Fix namespaced classes

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- 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 | #23072 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

a1cdc2d46e [TwigBridge] Fix namespaced classes
2017-06-05 19:47:47 -07:00
Maxime Steinhausser
a1cdc2d46e [TwigBridge] Fix namespaced classes 2017-06-05 17:06:12 -07:00
Yonel Ceruto
7061bfbf3a show unique inherited roles 2017-06-05 14:17:49 -04:00
Nicolas Grekas
81a50571aa bug #23063 [Cache] Fix extensibility of TagAwareAdapter::TAGS_PREFIX (wucdbm)
This PR was submitted for the 3.3 branch but it was merged into the 3.2 branch instead (closes #23063).

Discussion
----------

[Cache] Fix extensibility of TagAwareAdapter::TAGS_PREFIX

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

It seems that when MemcachedAdapter is used with TagAwareAdapter, it fails to fetch items, even though I thoroughly tested fetching items with the exact same keys under the same namespace.

Edit: Just to clarify, `CacheItem::isHit()` always returned `false`. This is what I meant with the above.

Turns out the issue lies in `const TAGS_PREFIX = "\0tags\0";` for unknown to me reasons. Hardcoding that to `'__tags__'` in my project did the trick and I've been using it for a couple of days now and it seems fine.

The reason I had to completely copy/paste this file in my local project is `self::` instead of `static::` usage. I am not sure whether that is a mistake or is done on purpose, but in order to have this work for me I need to be able to override that constant. Going with static:: seems like a good solution to me, then I can set whatever prefix I need for the tags.

PS: Not exactly sure what to do with tests. Any help would be appreciated.

Commits
-------

405f64b [Cache] MemcachedAdapter not working with TagAwareAdapter
2017-06-05 12:44:54 +02:00
Martin Kirilov
405f64bb01 [Cache] MemcachedAdapter not working with TagAwareAdapter
It seems that when MemcachedAdapter is used with TagAwareAdapter, it fails to fetch items, even though I thoroughly tested fetching items with the exact same keys under the same namespace.

Turns out the issue lies in `const TAGS_PREFIX = "\0tags\0";` for unknown to me reasons. Hardcoding that to '__tags__' in my project did the trick and I've been using it for a couple of days now and it seems fine.

The reason I had to completely copy/paste this file in my local project is self:: instead of static:: usage. I am not sure whether that is a mistake or is done on purpose, but in order to have this work for me I need to be able to override that constant. Going with static:: seems like a good solution to me, then I can set whatever prefix I need for the tags.
2017-06-05 12:44:43 +02:00
Fabien Potencier
621b7698fb bug #22936 [Form] Mix attr option between guessed options and user options (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Mix attr option between guessed options and user options

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

Commits
-------

84f5de902d mix attr options between type-guess options and user options
2017-06-03 08:53:19 -07:00
Fabien Potencier
12f5636eae bug #22976 [DependencyInjection] Use more clear message when unused environment variables detected (voronkovich)
This PR was squashed before being merged into the 3.2 branch (closes #22976).

Discussion
----------

[DependencyInjection] Use more clear message when unused environment variables detected

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

Old error message:
```
Incompatible use of dynamic environment variables "DATABASE_URL", "MAILER_URL" found in parameters.
```

New error message:
```
Environment variables "DATABASE_URL", "MAILER_URL" are never used. Please, check your container's configuration.
```

Commits
-------

6dbdb1b750 [DependencyInjection] Use more clear message when unused environment variables detected
2017-06-03 08:50:21 -07:00
Oleg Voronkovich
6dbdb1b750 [DependencyInjection] Use more clear message when unused environment variables detected 2017-06-03 08:50:11 -07:00
Nicolas Grekas
7078cdfb5c bug #23045 [Cache] fix Redis scheme detection (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] fix Redis scheme detection

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

Commits
-------

61685c7 [Cache] fix Redis scheme detection
2017-06-03 10:40:33 +02:00
Nicolas Grekas
3e92637635 minor #23048 [Form][FrameworkBundle] Remove non-existing arg for data_collector.form (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Form][FrameworkBundle] Remove non-existing arg for data_collector.form

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- see comment below -->
| Bug fix?      | no
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

479895f [Form][FrameworkBundle] Remove non-existing arg for data_collector.form
2017-06-03 10:32:43 +02:00
Maxime Steinhausser
479895f667 [Form][FrameworkBundle] Remove non-existing arg for data_collector.form 2017-06-03 10:06:02 +02:00
Christian Flothmann
61685c7106 [Cache] fix Redis scheme detection 2017-06-03 09:31:39 +02:00
Nicolas Grekas
89c3f5cccb Merge branch '2.8' into 3.2
* 2.8:
  typo
  CS: adjust chaining indentation
2017-06-02 16:37:52 +02:00
Nicolas Grekas
0057459882 Merge branch '2.7' into 2.8
* 2.7:
  CS: adjust chaining indentation
2017-06-02 16:36:56 +02:00
Nicolas Grekas
1542925d8d minor #22986 CS: adjust chaining indentation (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: adjust chaining indentation

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

Commits
-------

8c3c0fe CS: adjust chaining indentation
2017-06-02 16:34:38 +02:00