Commit Graph

35643 Commits

Author SHA1 Message Date
Grégoire Pineau
4d075da934 [FrameworkBundle] HttpCache is not longer abstract 2018-03-15 10:35:06 +01:00
Fabien Potencier
985ef53b51 minor #26508 Update Client.php (jrean)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #26508).

Discussion
----------

Update Client.php

Docblock.

Commits
-------

5d7b13110b Update Client.php
2018-03-13 09:46:25 -05:00
Jean Ragouin
5d7b13110b Update Client.php 2018-03-13 09:46:24 -05:00
Fabien Potencier
822483b9bf bug #26482 [PhpUnitBridge] Ability to use different composer.json file (amcastror)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #26482).

Discussion
----------

[PhpUnitBridge] Ability to use different composer.json file

Hi, I have a project where I use a different composer.json via environment variable. Look [here](https://getcomposer.org/doc/03-cli.md#composer). Because of this, $root gets set to "/" and everything fails.

Hope this helps.

| Q             | A
| ------------- | ---
| Branch?       | master for features / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | I'll add if this is useful.
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs

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

77e643d0ba [PhpUnitBridge] Ability to use different composer.json file
2018-03-13 07:34:33 -05:00
amcastror
77e643d0ba [PhpUnitBridge] Ability to use different composer.json file 2018-03-13 07:34:32 -05:00
Fabien Potencier
8f4a0b61c5 bug #26443 [Fix][3.4][HttpFoundation] Fix the updating of timestamp in the MemcachedSessionHandler (Alessandro Loffredo)
This PR was merged into the 3.4 branch.

Discussion
----------

[Fix][3.4][HttpFoundation] Fix the updating of timestamp in the MemcachedSessionHandler

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

Conditions: Symfony 3.4, PHP7 and sessions handled over memcache.

Apparently `memcached::touch()` returns `false` on a subsequent call with the same parameters. Since `updateTimestamp` is used in `AbstractSessionHandler::write()`

```
public function write($sessionId, $data)
    {
        if (\PHP_VERSION_ID < 70000 && $this->prefetchData) {
            $readData = $this->prefetchData;
            $this->prefetchData = null;

            if ($readData === $data) {
                return $this->updateTimestamp($sessionId, $data);
            }
        }
...
```

the result is that `write()` will return `false` on **any subsequent request within the same second** causing the following error:

```
HP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ContextErrorException: Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in Unknown:0
Stack trace:
#0 [internal function]: Symfony\Component\Debug\ErrorHandler->handleError(2, 'session_write_c...', 'Unknown', 0, NULL)
#1 [internal function]: session_write_close()
#2 {main}
  thrown in Unknown on line 0
```

Can be reproduced on `symfony/skeleton:3.4` adding the following code to `public/index.php` and performing two consecutive requests:
```
$session = $kernel->getContainer()->get('session');
$session->set("foo", "bar");
```

Commits
-------

d007469877 fix the updating of timestamp in the MemcachedSessionHandler
2018-03-13 07:32:20 -05:00
Fabien Potencier
957588a12e minor #26496 [DomCrawler] FormField: remove a useless return statement (dunglas)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #26496).

Discussion
----------

[DomCrawler] FormField: remove a useless return statement

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| 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 files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

6ca8b4beeb [DomCrawler] FormField: remove an useless return statement
2018-03-13 07:30:05 -05:00
Kévin Dunglas
6ca8b4beeb [DomCrawler] FormField: remove an useless return statement 2018-03-13 07:30:05 -05:00
Fabien Potencier
ebfcab3759 minor #26421 [Config] Add characters to the regex (DavidPrevot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Add characters to the regex

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

Commits
-------

dff88d44be [Config] Add characters to the regex
2018-03-13 07:27:50 -05:00
Fabien Potencier
f77db05895 bug #26400 [Config] ReflectionClassResource check abstract class (andrey1s)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] ReflectionClassResource check abstract class

generate Signature
update hash methods `ServiceSubscriberInterface::getSubscribedServices` and `EventSubscriberInterface::getSubscribedEvents` if the class is not abstract

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26459, #26501
| License       | MIT

Commits
-------

e85151483c [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
2018-03-13 07:22:24 -05:00
Fabien Potencier
ffd088a38f bug #26433 [DomCrawler] extract(): fix a bug when the attribute list is empty (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] extract(): fix a bug when the attribute list is empty

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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 files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

028c9f2366 [DomCrawler] extract(): fix a bug when the attribute list is empty
2018-03-13 07:19:21 -05:00
andrey1s
e85151483c [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface 2018-03-12 22:05:25 +01:00
Fabien Potencier
59f3081175 minor #26487 [DI] Remove dead dumper check (ro0NL)
This PR was merged into the 4.0 branch.

Discussion
----------

[DI] Remove dead dumper check

| Q             | A
| ------------- | ---
| Branch?       | 4.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| 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 -->

A container is always compiled when dumped.

Commits
-------

6a5f071bff [DI] Remove dead dumper check
2018-03-11 13:23:24 -05:00
Fabien Potencier
2655496eba bug #26041 Display the Welcome Page when there is no homepage defined (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #26041).

Discussion
----------

Display the Welcome Page when there is no homepage defined

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

In 3.4 we added a trick to display the Welcome Page when the user browses `/` and there are no routes defined. However, when using the `website-skeleton` (which is what most newcomers use ... and they are the ones that mostly need the "Welcome Page") the premise about *"no routes are defined"* is never true and the Welcome Page is never shown (see https://github.com/symfony/symfony-docs/issues/9178 for one of the multiple error reports we've received).

So, I propose to make this change to always define the "Welcome Page" as the fallback:

* If no routes are defined for `/`, the Welcome Page is displayed.
* If there is a route defined for `/`, this code will never be executed because it's the last condition of the routing matcher.

Commits
-------

5b0d9340d7 Display the Welcome Page when there is no homepage defined
2018-03-11 13:19:37 -05:00
Javier Eguiluz
5b0d9340d7 Display the Welcome Page when there is no homepage defined 2018-03-11 13:19:35 -05:00
Roland Franssen
6a5f071bff [DI] Remove dead dumper check 2018-03-11 17:41:28 +01:00
Fabien Potencier
9f4459fe65 minor #26469 Make KernelInterface docblock more fit for bundle-less environment (ostrolucky)
This PR was merged into the 4.0 branch.

Discussion
----------

Make KernelInterface docblock more fit for bundle-less environment

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

Commits
-------

e8df759f21 Make KernelInterface docblock more fit for bundle-less environment
2018-03-10 17:01:28 -06:00
Gabriel Ostrolucký
e8df759f21 Make KernelInterface docblock more fit for bundle-less environment 2018-03-10 23:35:42 +01:00
Fabien Potencier
b0bbdefbdb Merge branch '2.7' into 2.8
* 2.7:
  Php Inspections (EA Ultimate): address some of one-time used local variables
  [Intl] Load locale aliases to support alias fallbacks
  [CssSelector] Fix CSS identifiers parsing - they can start with dash
2018-03-10 12:19:36 -06:00
Fabien Potencier
ed63ab6254 minor #26480 [minor] SCA with Php Inspections (EA Ultimate) (kalessil)
This PR was merged into the 2.7 branch.

Discussion
----------

[minor] SCA with Php Inspections (EA Ultimate)

| 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

Addressed some cases with one-time used local variables and repetitive calls.

Commits
-------

f16d99ecfa Php Inspections (EA Ultimate): address some of one-time used local variables
2018-03-10 12:18:23 -06:00
Fabien Potencier
5757a8538d Merge branch '2.7' into 2.8
* 2.7:
  bumped Symfony version to 2.7.44
  updated VERSION for 2.7.43
  update CONTRIBUTORS for 2.7.43
  updated CHANGELOG for 2.7.43
2018-03-10 12:17:19 -06:00
Vladimir Reznichenko
f16d99ecfa Php Inspections (EA Ultimate): address some of one-time used local variables 2018-03-10 10:27:05 +01:00
Jakub Zalas
c202a373c3
bug #26452 [Intl] Load locale aliases to support alias fallbacks (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #26452).

Discussion
----------

[Intl] Load locale aliases to support alias fallbacks

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

For example, `zh_TW` is an alias to `zh_Hant_TW`. Without aliases,` zh_TW` would fall back to `zh` (which is incorrect). With aliases loaded, `zh_TW` will fall back properly to `zh_Hant_TW`.

Judging by git history this has never worked.

```php
\Locale::setDefault('zh'); dump(Intl::getRegionBundle()->getCountryName('AD'));
\Locale::setDefault('zh_TW'); dump(Intl::getRegionBundle()->getCountryName('AD'));
\Locale::setDefault('zh_Hant_TW'); dump(Intl::getRegionBundle()->getCountryName('AD'));
```

Before:

```
"安道尔"
"安道尔"
"安道爾"
```

After:

```
"安道尔"
"安道爾"
"安道爾"
```

All tests are passing, including those from the `intl-data` group.

Commits
-------

1debf79430 [Intl] Load locale aliases to support alias fallbacks
2018-03-09 11:28:42 +00:00
Jakub Zalas
1debf79430
[Intl] Load locale aliases to support alias fallbacks 2018-03-09 11:28:20 +00:00
Lukas Kahwe Smith
0beb64a77c
fix regression when extending the Container class without a constructor
regression introduced in c026ec63e3 (diff-f7b23d463cba27ac5e4cb677f2be7623R985)
2018-03-08 10:22:06 +01:00
Christophe Coevoet
76c1251202 bug #26450 [CssSelector] Fix CSS identifiers parsing - they can start with dash (jakubkulhan)
This PR was merged into the 2.7 branch.

Discussion
----------

[CssSelector] Fix CSS identifiers parsing - they can start with dash

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

Vendor prefixes use `-` (dash) at the start of CSS identifiers.

Commits
-------

16e86bc0c0 [CssSelector] Fix CSS identifiers parsing - they can start with dash
2018-03-08 10:10:30 +01:00
Jakub Kulhan
16e86bc0c0 [CssSelector] Fix CSS identifiers parsing - they can start with dash 2018-03-08 09:22:32 +01:00
Alessandro Loffredo
d007469877 fix the updating of timestamp in the MemcachedSessionHandler 2018-03-07 14:52:09 +01:00
Kévin Dunglas
028c9f2366
[DomCrawler] extract(): fix a bug when the attribute list is empty 2018-03-06 23:27:05 +01:00
Robin Chalas
07cccd53df minor #26424 [SecurityBundle] Make extra character non mandatory in regex (DavidPrevot)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Make extra character non mandatory in regex

The extra character was introduced in 5f9471e, and breaks the testsuite
in native php 7.2.

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

Commits
-------

44b4fc8 [SecurityBundle] Make extra character non mandatory in regex
2018-03-06 10:27:07 +01:00
David Prévot
44b4fc8db5 [SecurityBundle] Make extra character non mandatory in regex
The extra character was introduced in 5f9471e, and breaks the testsuite
in native php 7.2.
2018-03-05 22:53:32 -10:00
David Prévot
dff88d44be [Config] Add characters to the regex
This allow paths containing ~ and + (as used in version number in Debian
for example) to be used while running the testsuite.
2018-03-05 16:10:46 -10:00
Fabien Potencier
c83784cf2f bumped Symfony version to 4.0.7 2018-03-05 14:43:55 -08:00
Fabien Potencier
8b709247e9
Merge pull request #26418 from fabpot/release-4.0.6
released v4.0.6
2018-03-05 14:27:26 -08:00
Fabien Potencier
33b0481618 updated VERSION for 4.0.6 2018-03-05 14:27:01 -08:00
Fabien Potencier
571e6b19a4 updated CHANGELOG for 4.0.6 2018-03-05 14:26:58 -08:00
Fabien Potencier
d6fd5798ea bumped Symfony version to 3.4.7 2018-03-05 14:26:20 -08:00
Fabien Potencier
874d4d6597
Merge pull request #26416 from fabpot/release-3.4.6
released v3.4.6
2018-03-05 12:02:01 -08:00
Fabien Potencier
932c275e65 updated VERSION for 3.4.6 2018-03-05 11:41:07 -08:00
Fabien Potencier
b010f4ffee updated CHANGELOG for 3.4.6 2018-03-05 11:40:57 -08:00
Fabien Potencier
6e80476d64 bumped Symfony version to 2.8.37 2018-03-05 11:40:00 -08:00
Fabien Potencier
4fdb16d12e
Merge pull request #26415 from fabpot/release-2.8.36
released v2.8.36
2018-03-05 11:06:36 -08:00
Fabien Potencier
af393d7663 updated VERSION for 2.8.36 2018-03-05 11:06:26 -08:00
Fabien Potencier
7fc8041bcb updated CHANGELOG for 2.8.36 2018-03-05 11:06:21 -08:00
Fabien Potencier
1616d368d9 bumped Symfony version to 2.7.44 2018-03-05 11:05:22 -08:00
Fabien Potencier
8aba37dddc
Merge pull request #26414 from fabpot/release-2.7.43
released v2.7.43
2018-03-05 10:32:10 -08:00
Fabien Potencier
4d96c086a0 updated VERSION for 2.7.43 2018-03-05 10:32:00 -08:00
Fabien Potencier
4683c3f960 update CONTRIBUTORS for 2.7.43 2018-03-05 10:31:59 -08:00
Fabien Potencier
dc39913835 updated CHANGELOG for 2.7.43 2018-03-05 10:31:53 -08:00
Fabien Potencier
fa8455aba6 Merge branch '3.4' into 4.0
* 3.4:
  Improve the documentation of `Finder::exclude()`
  [DI] Skip resource tracking if disabled
  [WebProfilerBundle] fix wrong variable for profiler counting ajax requests
2018-03-05 10:28:26 -08:00