Commit Graph

40107 Commits

Author SHA1 Message Date
Nicolas Grekas 61bf16c71d Merge branch '4.1' into 4.2
* 4.1:
  Bump phpunit bridge cache id
  [appveyor] fix create-project phpunit
  Fix HttpKernel Debug requirement
  Fix heredoc
  use final annotation to allow mocking the class
  synchronise the form builder docblock
  Grammar fix in exception message
  fix tests
  forward the parse error to the calling code
  [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
  ensure compatibility with older PHPUnit mocks
  [Security] Do not mix usage of password_*() functions and sodium_*() ones
2019-01-24 22:39:51 +01:00
Nicolas Grekas aff17e2cc4 Merge branch '3.4' into 4.1
* 3.4:
  Bump phpunit bridge cache id
  [appveyor] fix create-project phpunit
  Fix HttpKernel Debug requirement
  Fix heredoc
  use final annotation to allow mocking the class
  synchronise the form builder docblock
  Grammar fix in exception message
  fix tests
  forward the parse error to the calling code
  [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
  ensure compatibility with older PHPUnit mocks
  [Security] Do not mix usage of password_*() functions and sodium_*() ones
2019-01-24 22:39:39 +01:00
Nicolas Grekas ebed00f65c Bump phpunit bridge cache id 2019-01-24 22:33:33 +01:00
Nicolas Grekas aad0c58d6c [appveyor] fix create-project phpunit 2019-01-24 22:26:46 +01:00
Nicolas Grekas 68d84d11a1 bug #29920 [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends

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

Currently, when there is no comment for a tag and another tag after, the detection does not work. Example :
```php
/**
 * @final
 *
 * @author John
 */
class A {

}
```

AFAIK, those tags must not be in a specific order. That's why we should try to support more cases because we might miss things to report.

Also I do not understand why the regex is not the same for the classes and methods detection. I fixed that too.

I added a lot of cases in the "extends from final class" test and an easy way to add more when needed. Adding them everywhere might be overkill and useless. WDYT ?

I'm considering this as bug fix.

Commits
-------

c3b670a908 [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
2019-01-24 22:19:05 +01:00
Thomas Calvet b979fff6b8 [Debug][ErrorHandler] Preserve our error handler when a logger set another one 2019-01-24 21:41:57 +01:00
Nicolas Grekas 14d458d0dc feature #29850 [FrameworkBundle] xliff-version option to translation update command (andrewwro)
This PR was squashed before being merged into the 4.3-dev branch (closes #29850).

Discussion
----------

[FrameworkBundle] xliff-version option to translation update command

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 and src/**/CHANGELOG.md files -->
| Tests pass?   | no    <!-- please add some, will be required by reviewers -->
| License       | MIT

New 'version' option added to xliff translation update command. Currently xliff version is hardcoded to 1.2.

Commits
-------

4ec28bd45d [FrameworkBundle] xliff-version option to translation update command
2019-01-24 21:08:18 +01:00
Andrzej 4ec28bd45d [FrameworkBundle] xliff-version option to translation update command 2019-01-24 21:08:11 +01:00
Christian Flothmann 3111cef9a4
Update src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
Co-Authored-By: weaverryan <weaverryan+github@gmail.com>
2019-01-24 12:03:31 -08:00
Nicolas Grekas 6c7d03431c [Mime] fix adding extensions when creating a MimeTypes instance 2019-01-24 19:14:26 +01:00
Nicolas Grekas f0a519ac7d [Routing] allow using compiled matchers and generators without dumping PHP code 2019-01-23 16:21:00 +01:00
Ryan Weaver 4132bfebe7 updating CHANGELOGs and fixing tests 2019-01-23 10:01:36 -05:00
Joost van Driel 0eb071b9f8 Added support for deprecating an alias 2019-01-23 15:43:53 +01:00
Fabien Potencier ccf6223c7a minor #29964 [HttpKernel] Fix HttpKernel Debug requirement (jvasseur)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix HttpKernel Debug requirement

| 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 `LoggerDataCollector` is using the `SilencedErrorContext` class that doesn't exists before Symfony 3.2

Commits
-------

69feb49c0d Fix HttpKernel Debug requirement
2019-01-23 15:15:26 +01:00
Jérôme Vasseur 69feb49c0d Fix HttpKernel Debug requirement 2019-01-23 14:37:11 +01:00
Fabien Potencier 0c323028d2 minor #29954 [Form] synchronise the form builder docblock (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] synchronise the form builder docblock

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

419d3db86c synchronise the form builder docblock
2019-01-23 14:02:34 +01:00
Fabien Potencier d760c27909 minor #29960 Fix heredoc (Stadly)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix heredoc

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

A heredoc was erroneously a nowdoc.

Commits
-------

15f5f69b1d Fix heredoc
2019-01-23 13:58:53 +01:00
Robin Chalas 47b739cba2 minor #29955 [Security] use final annotation to allow mocking the class (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] use final annotation to allow mocking the class

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

When the class was initially marked as `final`, it did only contain constants. Since #24337 the `Security` class also contains useful shortcut methods so allowing developers to mock the class in tests looks reasonable to me.

Commits
-------

1da00db247 use final annotation to allow mocking the class
2019-01-23 12:22:36 +01:00
Stadly 15f5f69b1d Fix heredoc 2019-01-23 09:53:40 +01:00
Ryan Weaver b4788e4808 introducing native php serialize() support for Messenger transport 2019-01-22 15:44:32 -05:00
Christian Flothmann 1da00db247 use final annotation to allow mocking the class 2019-01-22 15:51:10 +01:00
Christian Flothmann 419d3db86c synchronise the form builder docblock 2019-01-22 15:49:00 +01:00
Fabien Potencier a9f8ca57af minor #29942 [HttpFoundation] Add missing changelog/upgrade notes (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpFoundation] Add missing changelog/upgrade notes

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

Commits
-------

a44f19c5f1 [HttpFoundation] Add missing changelog/upgrade notes
2019-01-21 15:47:50 +01:00
Fabien Potencier aca3d2c90d minor #29868 Grammar fix in exception message (michaelKaefer)
This PR was merged into the 3.4 branch.

Discussion
----------

Grammar fix in exception message

According to https://en.wiktionary.org/wiki/whitespace and https://english.stackexchange.com/questions/25368/what-is-the-plural-form-of-whitespace valid sentences would be:
- Whitespace is ...
- Whitespaces are ...
- Whitespace characters are ...

But this is not correct:
- Whitespace are ...

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

Commits
-------

6e279a006b Grammar fix in exception message
2019-01-21 15:45:47 +01:00
Michael Käfer 6e279a006b Grammar fix in exception message
According to https://en.wiktionary.org/wiki/whitespace and https://english.stackexchange.com/questions/25368/what-is-the-plural-form-of-whitespace valid sentences would be:
- Whitespace is ...
- Whitespaces are ...
- Whitespace characters are ...

But this is not correct:
- Whitespace are ...
2019-01-21 14:02:53 +01:00
Robin Chalas a44f19c5f1 [HttpFoundation] Add missing changelog/upgrade notes 2019-01-20 19:14:21 +01:00
Fabien Potencier 5e9373bf18 minor #29937 [DependencyInjection] fix tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] fix tests

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

My changes in #29928 broke the test suite.

Commits
-------

4db0a6e099 fix tests
2019-01-20 14:03:26 +01:00
Christian Flothmann 4db0a6e099 fix tests 2019-01-20 09:34:00 +01:00
Fabien Potencier 333b544d8b minor #29928 [DependencyInjection] forward the parse error to the calling code (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] forward the parse error to the calling code

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

This change does not fully solve the linked issue, but improves the exception a bit by providing a bit more context.

The error page will no start like this:

![bildschirmfoto 2019-01-18 um 12 28 14](https://user-images.githubusercontent.com/1957048/51384558-f7af3600-1b1c-11e9-9744-a40c41c821ce.png)

Commits
-------

c5c2d31fef forward the parse error to the calling code
2019-01-20 09:19:46 +01:00
Christian Flothmann c5c2d31fef forward the parse error to the calling code 2019-01-20 09:08:17 +01:00
Fabien Potencier 5564d73854 bug #29922 Avoid dots in generated class names (derrabus)
This PR was merged into the 4.2 branch.

Discussion
----------

Avoid dots in generated class names

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

This PR removes dots from class names containers generated out of anonymous kernel classes.

Commits
-------

52c80e6cf2 Avoid dots in generated class names.
2019-01-20 08:24:41 +01:00
Alexander M. Turek 52c80e6cf2 Avoid dots in generated class names. 2019-01-19 17:51:40 +01:00
Robin Chalas b972d15d52 bug #29863 [Security] Do not mix password_*() API with libsodium one (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Do not mix password_*() API with libsodium one

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

Argon2IPasswordEncoder uses native `password_hash()` and `password_verify()` functions if the current PHP installation embeds Argon2 support (>=7.2, compiled `--with-password-argon2`).
Otherwise, it fallbacks to the libsodium extension.

This was fine at time the encoder was introduced, but meanwhile libsodium changed the algorithm used by `sodium_crypto_pwhash_str()` which is now argon2id, that goes outside of the scope of the encoder which was designed to deal with `argon2i` only.
Nothing we can do as databases may already contain passwords hashed with argon2id, the encoder must keep validating those.

However, the PHP installation may change as time goes by, and could suddenly embed the Argon2 core integration. In this case, the encoder would use the `password_verify()` function which would fail in case the password was not hashed using argon2i.
This PR prevents it by detecting that argon2id was used, avoiding usage of `password_verify()`.

See https://github.com/jedisct1/libsodium-php/issues/194 and https://github.com/symfony/symfony/issues/28093 for references.
Patch cannot be tested as it is platform dependent.

Side note: I'm currently working on a new implementation for 4.3 that will properly supports argon2id (which has been added to the PHP core sodium integration in 7.3) and argon2i, distinctively.

Commits
-------

d6cfde94b4 [Security] Do not mix usage of password_*() functions and sodium_*() ones
2019-01-18 19:41:49 +01:00
Mathieu Lechat 2791edf1fb [Form] Changed UrlType input type to text when default_protocol is not null 2019-01-18 10:39:23 +01:00
Thomas Calvet c3b670a908 [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends 2019-01-17 18:28:22 +01:00
Fabien Potencier e231edd5dc minor #29914 ensure compatibility with older PHPUnit mocks (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

ensure compatibility with older PHPUnit mocks

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

Commits
-------

b714419faf ensure compatibility with older PHPUnit mocks
2019-01-17 14:52:57 +01:00
Christian Flothmann b714419faf ensure compatibility with older PHPUnit mocks 2019-01-17 09:49:40 +01:00
Fabien Potencier db6784bb09 feature #29896 [Mime] Add the component (fabpot)
This PR was squashed before being merged into the 4.3-dev branch (closes #29896).

Discussion
----------

[Mime] Add the component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #28832 #21985 makes #15460 trivial
| License       | MIT
| Doc PR        | symfony/symfony-docs#10886

This has been on my todo-list for X years :)

Commits
-------

bdca5d999b tweaked code
5268389191 [Mime] added freedesktop as a source for mime types
74ca91deaa [Mime] added the component
d7ee0ecc49 [HttpFoundation] updated File code
2019-01-17 07:58:40 +01:00
Christian Flothmann 89ff331865 deprecate some options for single_text widgets 2019-01-17 00:04:01 +01:00
Fabien Potencier bdca5d999b tweaked code 2019-01-17 00:00:01 +01:00
Fabien Potencier 5268389191 [Mime] added freedesktop as a source for mime types 2019-01-16 23:56:01 +01:00
Fabien Potencier 74ca91deaa [Mime] added the component 2019-01-16 23:56:01 +01:00
Fabien Potencier d7ee0ecc49 [HttpFoundation] updated File code 2019-01-16 23:56:01 +01:00
Fabien Potencier 5aa0967f9f fixed CS 2019-01-16 23:37:52 +01:00
Fabien Potencier 18b9e45f4a fixed CS 2019-01-16 22:53:45 +01:00
Fabien Potencier 51a359c079 Merge branch '4.2' into short-array-master
* 4.2:
  fixed CS
  fixed CS
  fixed tests
  fixed CS
  fixed CS
  fixed CS
  fixed short array CS in comments
  fixed CS in ExpressionLanguage fixtures
  fixed CS in generated files
  fixed CS on generated container files
  fixed CS on Form PHP templates
  fixed CS on YAML fixtures
  fixed fixtures
  switched array() to []
2019-01-16 22:53:39 +01:00
Fabien Potencier e03db43894 fixed CS 2019-01-16 22:31:25 +01:00
Fabien Potencier d2098d7e5d fixed CS 2019-01-16 21:35:37 +01:00
Fabien Potencier c0323bd24b Merge branch '4.1' into 4.2
* 4.1:
  fixed tests
  fixed CS
  fixed CS
  fixed CS
  fixed short array CS in comments
  fixed CS in ExpressionLanguage fixtures
  fixed CS in generated files
  fixed CS on generated container files
  fixed CS on Form PHP templates
  fixed CS on YAML fixtures
  fixed fixtures
  switched array() to []
2019-01-16 21:31:39 +01:00
Fabien Potencier de3fb2ca84 fixed tests 2019-01-16 21:06:39 +01:00