Commit Graph

28630 Commits

Author SHA1 Message Date
Nicolas Grekas
4ccf8bcf77 Merge branch '2.8' into 3.4
* 2.8:
  [Serializer] optims and cleanup
  fix accessing request values
  [Form] Add translations for Tagalog
2018-02-14 15:07:03 +01:00
Nicolas Grekas
80e63e4146 Merge branch '2.7' into 2.8
* 2.7:
  [Serializer] optims and cleanup
  [Form] Add translations for Tagalog
2018-02-14 14:58:24 +01:00
Nicolas Grekas
2bccaaa9d1 minor #26141 [Serializer] optims and cleanup (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #26141).

Discussion
----------

[Serializer] optims and cleanup

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

Tiny optimizations and small code cleanup. The opcode triggering is especially useful in the hot path (normalizers and encoders) because it's a recursive process.

Commits
-------

8ee8387 [Serializer] optims and cleanup
2018-02-14 14:56:38 +01:00
Kévin Dunglas
8ee83879eb [Serializer] optims and cleanup 2018-02-14 14:56:36 +01:00
Nicolas Grekas
6b51addbd2 minor #26165 do not mock the container builder in tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

do not mock the container builder in tests

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

777acfb do not mock the container builder in tests
2018-02-14 13:23:44 +01:00
Nyholm
14e2282513 Fixed broken tests 2018-02-14 13:01:49 +01:00
Nicolas Grekas
b4cdb19451 bug #26089 [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener

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

Commits
-------

6c0e6af [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
2018-02-14 12:53:54 +01:00
Christian Flothmann
777acfbac9 do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
Grégoire Pineau
6c0e6af47a [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener 2018-02-14 10:37:47 +01:00
Christian Flothmann
1fc5df683b fix accessing request values 2018-02-14 10:05:17 +01:00
Christophe Coevoet
34d27817d4 Avoid running the remove command without any packages
As the exit code of the command was not checked, the failure was not
breaking things, but it was still printing a confusing error message.
2018-02-13 18:35:53 +01:00
Mathieu Piot
cf4e95662e [TwigBridge] Apply some changes to support Bootstrap4-stable 2018-02-13 15:20:40 +01:00
Ergie Gonzaga
6d4e5e0d0a [Form] Add translations for Tagalog 2018-02-13 10:02:42 +01:00
Nicolas Grekas
bc21af22d7 Merge branch '3.4' into 4.0
* 3.4:
  Fix merge
2018-02-12 19:00:17 +01:00
Nicolas Grekas
01ccae828c Fix merge 2018-02-12 19:00:05 +01:00
Nicolas Grekas
f32a50d369 Merge branch '3.4' into 4.0
* 3.4:
  [Routing] Throw 405 instead of 404 when redirect is not possible
  [Process] fix test case
  Add security.tl.xlf to legacy directory
  [Security][Validator] Add translations for Tagalog
  fixed typo
  Typo fix in security component lithuanian translation.
  [TwigBundle][WebProfilerBundle] Fix JS collision
  [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 18:55:14 +01:00
Nicolas Grekas
45145a9f3a Merge branch '2.8' into 3.4
* 2.8:
  [Routing] Throw 405 instead of 404 when redirect is not possible
  [Process] fix test case
  Add security.tl.xlf to legacy directory
  [Security][Validator] Add translations for Tagalog
  fixed typo
  Typo fix in security component lithuanian translation.
  [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 18:55:00 +01:00
Nicolas Grekas
245dd72a4d Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Throw 405 instead of 404 when redirect is not possible
  [Process] fix test case
  Add security.tl.xlf to legacy directory
  [Security][Validator] Add translations for Tagalog
  fixed typo
  Typo fix in security component lithuanian translation.
  [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 18:44:58 +01:00
Fabien Potencier
aa3a04ad28 bug #26100 [Routing] Throw 405 instead of 404 when redirect is not possible (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Throw 405 instead of 404 when redirect is not possible

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

Finishes #25962.

Commits
-------

92842814f6 [Routing] Throw 405 instead of 404 when redirect is not possible
2018-02-12 18:42:00 +01:00
Nicolas Grekas
92842814f6 [Routing] Throw 405 instead of 404 when redirect is not possible 2018-02-12 17:45:29 +01:00
Nicolas Grekas
d317496b6b [Process] fix test case 2018-02-12 15:35:15 +01:00
Nicolas Grekas
45d288a4ae Add security.tl.xlf to legacy directory 2018-02-12 15:12:46 +01:00
ergiegonzaga
60abecafb9 [Security][Validator] Add translations for Tagalog 2018-02-12 13:32:32 +01:00
Fabien Potencier
267bf4c118 bug #26119 [TwigBundle][WebProfilerBundle] Fix JS collision (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle][WebProfilerBundle] Fix JS collision

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #25894
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

da39e01eb9 [TwigBundle][WebProfilerBundle] Fix JS collision
2018-02-12 08:07:49 +01:00
Fabien Potencier
2f7f9efbc6 fixed typo 2018-02-12 08:05:20 +01:00
Rokas Mikalkėnas
a0d8b04f7f Typo fix in security component lithuanian translation. 2018-02-12 08:03:35 +01:00
Fabien Potencier
0b08f37ed3 bug #26040 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder

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

Commits
-------

3a470c4ecf [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 07:54:20 +01:00
Nicolas Grekas
8be6e19236 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/PhpUnit] Fix tests by backporting #25997 to 3.4
2018-02-11 22:40:43 +01:00
Nicolas Grekas
9a9c0f6142 [Bridge/PhpUnit] Fix tests by backporting #25997 to 3.4 2018-02-11 22:40:17 +01:00
Nicolas Grekas
6f596c7696 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/PhpUnit] fix tests
2018-02-11 19:37:31 +01:00
Nicolas Grekas
edd507af78 [Bridge/PhpUnit] fix tests 2018-02-11 19:37:22 +01:00
Nicolas Grekas
f75730df46 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/PhpUnit] hotfix
2018-02-11 18:57:08 +01:00
Nicolas Grekas
292fb56c70 [Bridge/PhpUnit] hotfix 2018-02-11 18:56:58 +01:00
Nicolas Grekas
c422bac6b6 Merge branch '3.4' into 4.0
* 3.4:
  fix merge
2018-02-11 18:30:36 +01:00
Nicolas Grekas
c8c27e5434 fix merge 2018-02-11 18:30:10 +01:00
Nicolas Grekas
6e34963b3d Merge branch '3.4' into 4.0
* 3.4:
  [YAML] Issue #26065: leading spaces in YAML multi-line string literals
  [Bridge\PhpUnit] Exit as late as possible
  [Bridge\PhpUnit] Cleanup BC layer
  [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
  [Lock] Log already-locked errors as "notice" instead of "warning"
  add context to serialize and deserialize
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  [HttpKernel] don't try to wire Request argument with controller.service_arguments
  Make kernel build time optionally deterministic
  Use 0 for unlimited expiry
  [Routing] fix typo
  Bump default PHPUnit version from 6.3 to 6.5
  do not mock the container builder in tests
  [Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
2018-02-11 18:17:44 +01:00
Nicolas Grekas
8ed107d09c Merge branch '2.8' into 3.4
* 2.8:
  [Bridge\PhpUnit] Exit as late as possible
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  do not mock the container builder in tests
2018-02-11 18:15:12 +01:00
Nicolas Grekas
e490d663d6 Merge branch '2.7' into 2.8
* 2.7:
  [Bridge\PhpUnit] Exit as late as possible
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  do not mock the container builder in tests
2018-02-11 17:53:59 +01:00
Nicolas Grekas
fd1d6d1191 minor #26139 [Bridge\PhpUnit] Cleanup BC layer (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge\PhpUnit] Cleanup BC layer

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

Follow up of #26024

Commits
-------

c41681c [Bridge\PhpUnit] Cleanup BC layer
2018-02-11 16:32:58 +01:00
Nicolas Grekas
a23ce690ec bug #26067 [YAML] Issue #26065: leading spaces in YAML multi-line string literals (tamc)
This PR was squashed before being merged into the 3.4 branch (closes #26067).

Discussion
----------

[YAML] Issue #26065: leading spaces in YAML multi-line string literals

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

Doing this:

    Yaml::dump(
        ["text" => "  leading space in first line\nno leading space in last line\n"],
        2,
        4,
        Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK
    );

Will produce this:

    text: |
           leading space in first line
         no leading space in last line

Which is invalid YAML because when the first line has leading spaces it needs a [block indentation indicator](http://www.yaml.org/spec/1.2/spec.html#id2793979) like this:

    text: |4
          leading space in first line
        no leading space in last line

This pull requests contains a test and a patch.

Commits
-------

aa95663 [YAML] Issue #26065: leading spaces in YAML multi-line string literals
2018-02-11 16:00:49 +01:00
Thomas Counsell
aa956636ab [YAML] Issue #26065: leading spaces in YAML multi-line string literals 2018-02-11 16:00:48 +01:00
Nicolas Grekas
ec9a109b5d bug #26012 Exit as late as possible (greg0ire)
This PR was merged into the 2.7 branch.

Discussion
----------

Exit as late as possible

People might want to register other shutdown functions that should be
able to control the exit code themselves, without the deprecation error
handler taking over. The php manual says:

> If you call exit() within one registered shutdown function, processing
> will stop completely and no other registered shutdown functions will be
> called.

See https://secure.php.net/manual/en/function.register-shutdown-function.php

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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

97370a3 [Bridge\PhpUnit] Exit as late as possible
2018-02-11 16:00:08 +01:00
Grégoire Paris
97370a3dd9 [Bridge\PhpUnit] Exit as late as possible
People might want to register other shutdown functions that should be
able to control the exit code themselves, without the deprecation error
handler taking over. The php manual says:

> If you call exit() within one registered shutdown function, processing
> will stop completely and no other registered shutdown functions will be
> called.

See https://secure.php.net/manual/en/function.register-shutdown-function.php
2018-02-11 15:57:09 +01:00
Nicolas Grekas
404a9ab615 bug #26082 [Cache][WebProfiler][3.4] fix collecting cache stats with sub-requests + allow clearing calls (dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache][WebProfiler][3.4] fix collecting cache stats with sub-requests + allow clearing calls

| 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/issues/23820
| License       | MIT
| Doc PR        | -

This is a follow-up PR for https://github.com/symfony/symfony/pull/26080. It additionally adds the reset behavior for the `TraceableAdapter` back.

Commits
-------

132bba6 [Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
2018-02-11 15:42:07 +01:00
Nicolas Grekas
c41681cb80 [Bridge\PhpUnit] Cleanup BC layer 2018-02-11 15:27:55 +01:00
Nicolas Grekas
40fb8434d3 bug #26024 [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener (shieldo)
This PR was squashed before being merged into the 3.4 branch (closes #26024).

Discussion
----------

[PhpBridge] add PHPUnit 7 support to SymfonyTestsListener

| Q             | A
| ------------- | ---
| Branch?       | 3.4 up to 4.0 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #26017 <!-- #-prefixed issue number(s), if any -->
| License       | MIT

Add support for the new PHPUnit 7 major release to the PHP Bridge for PHPUnit.

I wasn't sure about making a second legacy class here, or the naming of that class - but it seems like something like this would be required. Can re-name if there's a better suggested approach.

Commits
-------

a175a25 [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
2018-02-11 12:38:33 +01:00
Douglas Greenshields
a175a25d97 [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener 2018-02-11 12:38:30 +01:00
Nicolas Grekas
4c0befc1bb bug #26020 [Lock] Log already-locked errors as "notice" instead of "warning" (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] Log already-locked errors as "notice" instead of "warning"

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

We add the ability to specify the log level we want in the lock component. That could be useful when parsing the logs.

![img_3186 heic](https://user-images.githubusercontent.com/3451634/35733664-8ed991dc-081e-11e8-89dd-9efff253e492.jpeg)

Commits
-------

2a74edb [Lock] Log already-locked errors as "notice" instead of "warning"
2018-02-11 12:30:17 +01:00
Amrouche Hamza
2a74edb0f9 [Lock] Log already-locked errors as "notice" instead of "warning" 2018-02-11 12:27:51 +01:00
andrey1s
6f8d5e263e add context to serialize and deserialize 2018-02-11 12:21:52 +01:00
Nicolas Grekas
d7b98f9ef7 minor #26110 Bump default PHPUnit version from 6.3 to 6.5 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Bump default PHPUnit version from 6.3 to 6.5

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

This PR bumps the default PHPUnit version for php ≥ 7.2 from the outdated 6.3 to the currently maintained version 6.5.

Commits
-------

aeffc5f Bump default PHPUnit version from 6.3 to 6.5
2018-02-11 12:08:12 +01:00
Nicolas Grekas
57197dbbfd bug #26127 Deterministic time in cache items for reproducible builds (lstrojny)
This PR was merged into the 3.4 branch.

Discussion
----------

Deterministic time in cache items for reproducible builds

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

Allows setting a deterministic time for cache entries. This can be used to seed builds with a deterministic timestamp for reproducibility.

Parent issue is symfony/symfony#25958

Commits
-------

b4259a6 Use 0 for unlimited expiry
2018-02-11 12:04:19 +01:00
Nicolas Grekas
eb53c7de53 bug #26128 Make kernel build time optionally deterministic (lstrojny)
This PR was merged into the 3.4 branch.

Discussion
----------

Make kernel build time optionally deterministic

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

As part of the effort to enable reproducible builds, this PR allows setting a deterministic build time for the dumped kernel. Parent issue is symfony/symfony#25958.

Commits
-------

48e8249 Make kernel build time optionally deterministic
2018-02-11 11:59:17 +01:00
Gaylord Poillon
37fbbca086 isCsrfTokenValid() replace string by ?string 2018-02-11 11:55:53 +01:00
Nicolas Grekas
65bab998e5 minor #26087 do not mock the container builder in tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

do not mock the container builder in tests

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

dab4222 do not mock the container builder in tests
2018-02-11 11:53:40 +01:00
Matthieu Napoli
e88e1ff494 Document explicitly that dotfiles and vcs files are ignored by default
This change makes it clear whether or not each of those two options are enabled by default.

Without this documentation one has to look into the code.
2018-02-11 11:02:34 +01:00
Tobias Schultze
09b9eb2395 [HttpKernel] don't try to wire Request argument with controller.service_arguments
This does not make sense as Request is not a service and it's already handled by RequestValueResolver.
2018-02-11 01:53:06 +01:00
Lars Strojny
48e8249da9 Make kernel build time optionally deterministic 2018-02-11 00:59:14 +01:00
Lars Strojny
b4259a6bf3 Use 0 for unlimited expiry 2018-02-10 17:05:54 +01:00
Nicolas Grekas
ed42760b41 [Routing] fix typo 2018-02-10 11:55:44 +01:00
Roland Franssen
da39e01eb9 [TwigBundle][WebProfilerBundle] Fix JS collision 2018-02-09 15:48:30 +01:00
Christian Flothmann
064acb6ac3 Merge branch '3.4' into 4.0
* 3.4:
  Env var maps to undefined constant.
  [SecurityBundle] Backport test
  [Security] fix merge of 2.7 into 2.8 + add test case
  backport regression test from 3.4
  do not mock the container builder or definitions
  fixed CS
  [TwigBundle] Register TwigBridge extensions first
  [WebProfilerBundle] Fix sub request link
  PhpDocExtractor::getTypes() throws fatal error when type omitted
  Fix misspelling variable
  use libsodium to run Argon2i related tests
  [DI] minor: use a strict comparision in setDecoratedService
  [HttpKernel] fix FC
  Follow-on to #25825: Fix edge case in getParameterOption.
  keep the context when validating forms
2018-02-09 15:25:12 +01:00
Christian Flothmann
05a045268f Merge branch '2.8' into 3.4
* 2.8:
  [SecurityBundle] Backport test
  [Security] fix merge of 2.7 into 2.8 + add test case
  backport regression test from 3.4
  Fix misspelling variable
  [DI] minor: use a strict comparision in setDecoratedService
  Follow-on to #25825: Fix edge case in getParameterOption.
  keep the context when validating forms
2018-02-09 15:10:47 +01:00
Christian Flothmann
641a46bcb6 Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Backport test
  Fix misspelling variable
  [DI] minor: use a strict comparision in setDecoratedService
  Follow-on to #25825: Fix edge case in getParameterOption.
  keep the context when validating forms
2018-02-09 14:57:28 +01:00
Robin Chalas
36e79f7c21 minor #26103 [PropertyInfo] backport regression test from 3.4 (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] backport regression test from 3.4

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

Commits
-------

a9ab167 backport regression test from 3.4
2018-02-09 14:09:13 +01:00
Nicolas Grekas
0c4b32c74b bug #26112 Env var maps to undefined constant. (dsmink)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #26112).

Discussion
----------

Env var maps to undefined constant.

When I try to use a constant as an environment variable, as described in the blog item,
I run into the following problem.

Env var "SOME_CONST" maps to undefined constant "App\\Util\\SomeClass::SOME_CONST".

The proposed solution works for me, however, I'm not sure if this is the best and conform Symfony standards.

Blog:
https://symfony.com/blog/new-in-symfony-3-4-advanced-environment-variables

| Q             | A
| ------------- | ---
| Branch?       | master for features / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | yes/no
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

bdf9efc Env var maps to undefined constant.
2018-02-09 14:01:40 +01:00
dsmink
bdf9efc78e Env var maps to undefined constant.
When I try to use a constant as an environment variable, as described in the blog item, 
I run into the following problem.

Env var "SOME_CONST" maps to undefined constant "App\\Util\\SomeClass::SOME_CONST".

The proposed solution works for me, however, I'm not sure if this is the best and conform Symfony standards.

Blog:
https://symfony.com/blog/new-in-symfony-3-4-advanced-environment-variables
2018-02-09 14:01:01 +01:00
Robin Chalas
d195a6f060 [SecurityBundle] Backport test 2018-02-09 13:55:03 +01:00
David Maicher
51d9008d68 [Security] fix merge of 2.7 into 2.8 + add test case 2018-02-09 13:42:37 +01:00
Alexander M. Turek
aeffc5fdff
Bump default PHPUnit version from 6.3 to 6.5
This PR bumps the default PHPUnit version for php ≥ 7.2 from the outdated 6.3 to the currently maintained version 6.5.
2018-02-09 13:00:05 +01:00
Christian Flothmann
a9ab167abf backport regression test from 3.4 2018-02-09 09:09:30 +01:00
Christian Flothmann
dab422287f do not mock the container builder in tests 2018-02-08 09:15:30 +01:00
David Maicher
132bba6d24 [Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls 2018-02-07 20:03:36 +01:00
Christian Flothmann
8bba882512 do not mock the container builder or definitions 2018-02-07 19:04:46 +01:00
Fabien Potencier
f7d9701cdf bug #25893 [Console] Fix hasParameterOption / getParameterOption when used with multiple flags (greg-1-anderson)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix hasParameterOption / getParameterOption when used with multiple flags

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (Fixes BC break in #24987)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25825
| License       | MIT
| Doc PR        | n/a

Proposed resolution to #25825:
- Back out #24987
- Fix getParameterOption for short options with values, e.g. `-edev`

Commits
-------

35f98e2089 Follow-on to #25825: Fix edge case in getParameterOption.
2018-02-07 07:09:50 +01:00
Fabien Potencier
39e88ed312 fixed CS 2018-02-07 06:34:13 +01:00
Fabien Potencier
abb913283e bug #25756 [TwigBundle] Register TwigBridge extensions first (fancyweb)
This PR was squashed before being merged into the 3.4 branch (closes #25756).

Discussion
----------

[TwigBundle] Register TwigBridge extensions first

| 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/issues/25610
| License       | MIT
| Doc PR        | -

The only extension that is really needed to display the current exception page is the `CodeExtension` so we could only prepend this one. However, prepending all of them seems safer to me in the long term.

Also I deeply looked into why this problem only appeared in 3.4 and found the reason. Before 3.4 it actually never reaches the `ExceptionController` for this kind of error because it cannot be resolved because it needs a twig instance in its constructor. This instance is directly taken from the container. Before 3.4 when an exception is thrown when you try to get a service from the container, the instance stored in the `$services` array is unset which is not the case in further versions. So in 3.4+, the `ExceptionController` can be resolved because the instance of twig is still in the container even after the initial exception.

It also means these kind of exceptions are displayed with bugs on all versions before 3.4 I guess. Actually it shows the message 2 times : one for the initial exception and the other one when it tries to resolve the `ExceptionController`.

Maybe another solution might be to use a dedicated twig instance with the right settings just for the exception page ?

Commits
-------

c8465ed97f [TwigBundle] Register TwigBridge extensions first
2018-02-07 06:32:49 +01:00
Thomas Calvet
c8465ed97f [TwigBundle] Register TwigBridge extensions first 2018-02-07 06:32:47 +01:00
Roland Franssen
8f0e47f636 [WebProfilerBundle] Fix sub request link 2018-02-07 06:25:55 +01:00
Fabien Potencier
d068954458 bug #25947 PhpDocExtractor::getTypes() throws fatal error when type omitted (Jared Farrish)
This PR was squashed before being merged into the 3.4 branch (closes #25947).

Discussion
----------

PhpDocExtractor::getTypes() throws fatal error when type omitted

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

When omitting a type in a `DocBlock` `Tag`, it will throw a fatal error due to the type being null with a call to `$tag->getType()`.

Commits
-------

54253ecfff PhpDocExtractor::getTypes() throws fatal error when type omitted
2018-02-07 06:16:39 +01:00
Jared Farrish
54253ecfff PhpDocExtractor::getTypes() throws fatal error when type omitted 2018-02-07 06:16:37 +01:00
Fabien Potencier
12447d972f bug #25940 [Form] keep the context when validating forms (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] keep the context when validating forms

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

Commits
-------

317da3bdf8 keep the context when validating forms
2018-02-07 06:08:29 +01:00
Nicolas Grekas
7ac5447f57 minor #26049 [DI] minor: use a strict comparison in setDecoratedService (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] minor: use a strict comparison in setDecoratedService

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

f167b50 [DI] minor: use a strict comparision in setDecoratedService
2018-02-06 11:19:30 +01:00
Gabriel Caruso
899ead2b66
Fix misspelling variable 2018-02-06 07:47:25 -02:00
Christian Flothmann
5f9471ef47 use libsodium to run Argon2i related tests 2018-02-06 09:09:00 +01:00
Kévin Dunglas
f167b505c4
[DI] minor: use a strict comparision in setDecoratedService 2018-02-05 08:51:24 +01:00
Nicolas Grekas
ae25291610 [HttpKernel] fix FC 2018-02-04 18:41:24 +01:00
Nicolas Grekas
767b028439 Merge branch '3.4' into 4.0
* 3.4:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
  [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
  [Config] Only using filemtime to check file freshness
2018-02-04 17:43:51 +01:00
Nicolas Grekas
5e094e8752 Merge branch '2.8' into 3.4
* 2.8:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 17:43:40 +01:00
Nicolas Grekas
c337bf6810 Merge branch '2.7' into 2.8
* 2.7:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 17:41:06 +01:00
Nicolas Grekas
3a470c4ecf [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder 2018-02-04 17:22:42 +01:00
Nicolas Grekas
478fbdc241 bug #25373 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #25373).

Discussion
----------

Use the PCRE_DOLLAR_ENDONLY modifier in route regexes

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

`UrlMatcher::match($pathinfo)` applies `rawurldecode()` to the `$pathinfo` before trying to match it against the routes.

If the URL contains a percent-encoded trailing newline (like in `/foo%0a`), the default PHP PCRE will still consider `#^/foo$#` a match, as the `$` metacharacter will also match *immediately before* the final character *if it is a newline*. This behavior can be changed by applying the [`PCRE_DOLLAR_ENDONLY` modifier](http://php.net/manual/en/reference.pcre.pattern.modifiers.php).

Without this change, URLs with trailing `%0a` lead to weird notices further down the road, for example when the `RedirectableUrlMatcher` or its equivalent in `PhpMatcherDumper` kick in, look at the last character (this time actually the newline), append a `/` and try to redirect to the resulting URL. Ultimately, PHP will complain with `Warning: Header may not contain more than a single header, new line detected` when sending the `Location` header.

Commits
-------

f713a3e Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 16:51:07 +01:00
Matthias Pigulla
f713a3e879 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes 2018-02-04 16:50:24 +01:00
Nicolas Grekas
cd56299c14 bug #24435 [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2 (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I recently let Europe's leading accessibility experts (Funkanu.se) review a site of mine, they gave me (among other) the feedback that errors should be a part of the label.

They said that it makes no sense for blind users to read label, read input and then read errors.

I know the implementation might look strange. But I wish something like this would be merged. That would be great for accessibility for all apps using Symfony.

We *could* also make sure it prints something like:

```
<label for=”name”>Name: <span class=”hidden”>Error message</span></label>
<input id=”name” type=”text”>
<span aria-hidden=”true”>Error message</span>
```

Commits
-------

a0b40f5 [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
2018-02-04 16:32:16 +01:00
Tobias Nyholm
a0b40f5c4a [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2 2018-02-04 16:29:22 +01:00
Nicolas Grekas
cb6c48cc36 minor #26031 [Config] Only using filemtime to check file freshness (dmifedorenko)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Only using filemtime to check file freshness

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

Commits
-------

52c9cb4 [Config] Only using filemtime to check file freshness
2018-02-04 15:53:45 +01:00
Nicolas Grekas
12c1a01ac0 fix merge 2018-02-04 15:28:36 +01:00
Nicolas Grekas
aa964e1c52 Merge branch '3.4' into 4.0
* 3.4:
  [PropertyInfo] Fix compat with recent phpdocumentor/type-resolver
2018-02-04 15:17:57 +01:00
Nicolas Grekas
ae96700c20 [PropertyInfo] Fix compat with recent phpdocumentor/type-resolver 2018-02-04 15:17:18 +01:00
Nicolas Grekas
2f587c3dce Merge branch '3.4' into 4.0
* 3.4:
  fix merge
2018-02-04 14:31:53 +01:00