Commit Graph

10422 Commits

Author SHA1 Message Date
Javier Eguiluz
36c5df4589 [SecurityBundle] Deprecate the normalization of the cookie names 2019-02-12 08:26:06 +01:00
Nicolas Grekas
3417a15d95 Merge branch '4.2'
* 4.2:
  Add missing `@internal` annotations
  Disable Twig in the profiler menu when Twig is not used
  Mark some/most implementations of Serializable as `@internal`
  [Config] ensure moving away from Serializable wont break cache:clear
  [VarDumper] dont implement Serializable in Stub
  [Config] fix compat with wrapping autoloaders
  [Messenger] fixed RabbitMQ arguments not passed as integer values
2019-01-30 12:44:59 +01:00
Nicolas Grekas
bc8656c573 Merge branch '3.4' into 4.2
* 3.4:
  Add missing `@internal` annotations
  Disable Twig in the profiler menu when Twig is not used
  Mark some/most implementations of Serializable as `@internal`
  [Config] ensure moving away from Serializable wont break cache:clear
  [VarDumper] dont implement Serializable in Stub
  [Config] fix compat with wrapping autoloaders
2019-01-30 12:44:30 +01:00
Javier Eguiluz
b47408179f Disable Twig in the profiler menu when Twig is not used 2019-01-30 11:27:26 +01:00
Nicolas Grekas
32aa969dff Merge branch '4.2'
* 4.2:
  [Routing] dont redirect routes with greedy trailing vars with no explicit slash
  skip native serialize among child and parent serializable objects
  [Routing] backport tests from 4.1
  [MonologBridge] Remove unused local variable
  Remove unreachable code
  Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
  Support use of hyphen in asset package name
  Fix format strings for deprecation notices
  Remove a harmless duplicate array key from VarDumper
  [VarDumper] Fixed search bar
  Remove gendered pronouns
  Replace gender by eye color in tests
  [Security] dont do nested calls to serialize()
2019-01-29 10:50:57 +01:00
Nicolas Grekas
adbdec838a Merge branch '4.1' into 4.2
* 4.1:
  [Routing] dont redirect routes with greedy trailing vars with no explicit slash
  skip native serialize among child and parent serializable objects
  [Routing] backport tests from 4.1
  [MonologBridge] Remove unused local variable
  Remove unreachable code
  Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
  Support use of hyphen in asset package name
  Remove gendered pronouns
  Replace gender by eye color in tests
  [Security] dont do nested calls to serialize()
2019-01-29 10:49:29 +01:00
Nicolas Grekas
78c23c7838 Merge branch '3.4' into 4.1
* 3.4:
  skip native serialize among child and parent serializable objects
  [Routing] backport tests from 4.1
  Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
  Support use of hyphen in asset package name
  Remove gendered pronouns
  Replace gender by eye color in tests
  [Security] dont do nested calls to serialize()
2019-01-29 10:21:38 +01:00
Anthony MARTIN
5c58b6e875 Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR 2019-01-28 15:09:38 +01:00
damaya
30b6a4f7bf Support use of hyphen in asset package name
| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes (Manual tests only)
| Fixed tickets | #28122
| License       | MIT
| Doc PR        | n/a

According to issue https://github.com/symfony/symfony-docs/pull/10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
```
framework:
    assets:
        packages:
            app-client-frontend:
                version: "%env(FRONTEND_VERSION)%"
                version_format: '%%2$s/dist/%%1$s'
                base_urls:
                  - "%env(FRONTEND_URL)%"
```
2019-01-28 15:09:19 +01:00
Fabien Potencier
5a8c06e961 minor #30000 [Mime] move add mime type guesser pass to the component (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mime] move add mime type guesser pass to the component

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

ba20bb2e7e move add mime type guesser pass to the component
2019-01-28 07:41:18 +01:00
Tyson Andre
2e00dfb0c8 Fix format strings for deprecation notices
The `%c` conversion specifier expects an integer
(the value of the byte to print)

Detected via static analysis
2019-01-27 18:11:39 -05:00
Christian Flothmann
ba20bb2e7e move add mime type guesser pass to the component 2019-01-27 12:43:19 +01:00
Christian Flothmann
aa354cef57 remove accidentally added changelog entries
The `help_html` option is neither part of the Twig bridge nor of the
FrameworkBundle. It is provided by the Form component.
2019-01-27 10:18:12 +01:00
Nicolas Grekas
d0effcd35c feature #28865 [Routing] allow using compiled matchers and generators without dumping PHP code (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] allow using compiled matchers and generators without dumping PHP code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #29590
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10790

This is a resurrection of #25909 to make matcher+generator dumpers output PHP arrays instead of PHP code.
Don't be fooled by the diff stats, it's mostly fixtures.

This PR should contribute to making the Routing component easier to use standalone.

On the way back from SFLive USA.

![image](https://user-images.githubusercontent.com/243674/46920076-784e1b80-cf9d-11e8-86e7-850fffb409de.png)

Commits
-------

f0a519ac7d [Routing] allow using compiled matchers and generators without dumping PHP code
2019-01-26 21:52:17 +01:00
Raphaëll Roussel
72180342b7 Replace gender by eye color in tests 2019-01-26 20:55:54 +01:00
Nicolas Grekas
5006be63c1 [Cache] deprecate all PSR-16 adapters, provide Psr16Cache instead 2019-01-25 18:46:02 +01:00
Nicolas Grekas
a6d2114277 feature #29958 introducing native php serialize() support for Messenger transport (weaverryan, xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

introducing native php serialize() support for Messenger transport

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes and no
| New feature?  | yes and no
| BC breaks?    | maybe (yes if we change the default)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29163
| License       | MIT
| Doc PR        | TODO!

Messenger currently uses the Serialize to serialize to JSON and then unserialize. This creates a lot of issues:

1) The default serializer requires you to have getter & setter method (or public properties) for them to be serialized. This makes it easy for data to disappear. I've seen several really smart people have this problem.

2) Related to the above, the forced getters/setters (and no required constructor args) force you to design your message classes around this.

It's not that the serializer is doing a bad job - it's just not the right use-case for it.

This PR proposes simply using `serialize()` and `unserialize()`. This is the behavior we want: we want to put objects to sleep and wake them back up.

I believe the original reason we did not do this was so that we could export "generic JSON", in case we wanted other workers (not our Symfony app) to consume the messages. But, that's an edge case, and could still be accomplished by creating your own serializer.

Btw, Laravel uses `serialize()` as does Enqueue for (un)serializing Event objects. We're making our life more difficult for no benefit.

Cheers!

Commits
-------

97e2e32af4 Changing default serializer in Messenger component to PhpSerializer
3111cef9a4 Update src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
4132bfebe7 updating CHANGELOGs and fixing tests
b4788e4808 introducing native php serialize() support for Messenger transport
2019-01-25 16:26:09 +01:00
Nicolas Grekas
0b99eaf553 Merge branch '4.2'
* 4.2:
  [Cache] fix create table at prepare time
  fix merge
2019-01-25 15:56:25 +01:00
Nicolas Grekas
82617b90e5 Merge branch '4.1' into 4.2
* 4.1:
  fix merge
2019-01-25 15:52:33 +01:00
Nicolas Grekas
151ee3ee18 fix merge 2019-01-25 15:52:25 +01:00
Nicolas Grekas
4edfbb5975 Merge branch '4.2'
* 4.2:
  [HttpFoundation] Check file exists before unlink
  [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
  [Cache] PDO-based cache pool table autocreation does not work
  [Translation] Concatenated translation messages
  [Form] ensure compatibility with older PHPUnit mocks
  [Serializer] Docblock about throwing exceptions on serializer
  [Cache] fix used variable name
  [Debug][ErrorHandler] Preserve our error handler when a logger set another one
  [Form] Changed UrlType input type to text when default_protocol is not null
  [Bugfix] MemcachedSessionHandler::close() must close connection
  Always pass $key to NullAdapter->createCacheItem
2019-01-25 15:35:46 +01:00
Nicolas Grekas
62c595a649 Merge branch '4.1' into 4.2
* 4.1:
  [HttpFoundation] Check file exists before unlink
  [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
  [Translation] Concatenated translation messages
  [Form] ensure compatibility with older PHPUnit mocks
  [Serializer] Docblock about throwing exceptions on serializer
  [Debug][ErrorHandler] Preserve our error handler when a logger set another one
  [Form] Changed UrlType input type to text when default_protocol is not null
  [Bugfix] MemcachedSessionHandler::close() must close connection
2019-01-25 15:35:16 +01:00
Nicolas Grekas
02fe23d064 Merge branch '3.4' into 4.1
* 3.4:
  [HttpFoundation] Check file exists before unlink
  [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
  [Translation] Concatenated translation messages
  [Form] ensure compatibility with older PHPUnit mocks
  [Serializer] Docblock about throwing exceptions on serializer
  [Debug][ErrorHandler] Preserve our error handler when a logger set another one
  [Form] Changed UrlType input type to text when default_protocol is not null
  [Bugfix] MemcachedSessionHandler::close() must close connection
2019-01-25 15:34:37 +01:00
Mathieu Piot
33f5f855d6 [Form][TwigBridge] Add help_html option 2019-01-25 11:36:18 +01:00
Nicolas Grekas
e3b010fe16 bug #29926 [Form] Changed UrlType input type to text when default_protocol is not null (MatTheCat)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Changed UrlType input type to text when default_protocol is not null

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

replaces #29691

Commits
-------

2791edf1fb [Form] Changed UrlType input type to text when default_protocol is not null
2019-01-25 11:08:56 +01:00
Christian Flothmann
0d9de7e7e3 [Form] ensure compatibility with older PHPUnit mocks 2019-01-25 10:38:07 +01:00
Nicolas Grekas
d8af8b6edd Merge branch '4.2'
* 4.2:
  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
  Avoid dots in generated class names.
  [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:40:22 +01:00
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
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
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
Ryan Weaver
b4788e4808 introducing native php serialize() support for Messenger transport 2019-01-22 15:44:32 -05: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
Christian Flothmann
b714419faf ensure compatibility with older PHPUnit mocks 2019-01-17 09:49:40 +01:00
Fabien Potencier
bdca5d999b tweaked code 2019-01-17 00:00:01 +01:00
Fabien Potencier
74ca91deaa [Mime] added the component 2019-01-16 23:56:01 +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
Fabien Potencier
44056b002a fixed CS 2019-01-16 20:07:26 +01:00
Fabien Potencier
d58b5c3b76 fixed CS 2019-01-16 19:35:49 +01:00
Fabien Potencier
572864b223 Merge branch '3.4' into 4.1
* 3.4:
  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 19:21:11 +01:00
Fabien Potencier
1429267f9c fixed short array CS in comments 2019-01-16 14:27:11 +01:00
Fabien Potencier
7ffd8d3e03 fixed CS on Form PHP templates 2019-01-16 12:03:13 +01:00
Fabien Potencier
33a001e460 switched array() to [] 2019-01-16 10:39:14 +01:00