Commit Graph

27863 Commits

Author SHA1 Message Date
Fabien Potencier
3902dc59e1 bug #20132 Use "more entropy" option for uniqid() (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20132).

Discussion
----------

Use "more entropy" option for uniqid()

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

As you can see in [the source code of the PHP uniqid() function](1c295d4a9a/ext/standard/uniqid.c (L68)) when you don't pass `true` as the second argument, PHP sleeps the application for 1 microsecond (`usleep(1)`)

Symfony uses `true` almost everywhere, but there are still some places (mostly in bundles) where this is not the case.

Commits
-------

4403e28 Use "more entropy" option for uniqid()
2016-10-03 08:22:08 -07:00
Javier Eguiluz
4403e28ab0 Use "more entropy" option for uniqid() 2016-10-03 08:22:03 -07:00
Javier Eguiluz
50a8c1f9d3 Add "more entropy" to every uniqid() call 2016-10-03 16:10:01 +02:00
Martin Hasoň
af84d23891 [Validator] Add Czech and Slovak translations for BIC 2016-10-03 09:43:29 +02:00
Fabien Potencier
669478db26 bug #20129 [TwigBridge] Fixed unknown controller method (ro0NL)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBridge] Fixed unknown controller method

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/20125#issuecomment-250980221
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

@fabpot can you have a look :) Im not sure this concerns BC.. but perhaps it makes sense moving this method as well.

Commits
-------

e45e80e fixed
2016-10-02 10:00:52 -07:00
Roland Franssen
e45e80e2e7 fixed 2016-10-02 16:48:27 +00:00
Fabien Potencier
f54cfd66c5 minor #20117 [HttpKernel] Parse bundle name+namespace at once (ro0NL)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpKernel] Parse bundle name+namespace at once

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

81b2922 parse bundle name+namespace at once
2016-10-02 08:58:55 -07:00
Fabien Potencier
80577f96bf bug #20122 [Validator] Reset constraint options (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Reset constraint options

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20106
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

I think it's good to reset the internal pointer of the options array if we depend on `key($options)`. I've added tests to clarify we intentionally check for the first key.

The current behavior actually differs for hhvm/php7 - https://3v4l.org/e6r6E

Commits
-------

4c6ddd4 reset constraint options
2016-10-02 08:50:33 -07:00
Roland Franssen
81b292280b parse bundle name+namespace at once 2016-10-02 08:41:41 +00:00
Roland Franssen
4c6ddd4737 reset constraint options 2016-10-01 21:36:38 +00:00
Fabien Potencier
d98eb7b5bb [Config] added ClassExistenceResource 2016-10-01 13:54:25 -07:00
Fabien Potencier
9362b8cbda minor #20120 [VarDumper] Fix merge (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Fix merge

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

f5703e5 [VarDumper] Fix merge
2016-10-01 11:01:06 -07:00
Nicolas Grekas
f5703e5feb [VarDumper] Fix merge 2016-10-01 18:19:11 +01:00
Fabien Potencier
c03fd80000 [TwigBundle] changed the runtime loader to return null if there is no match 2016-10-01 09:47:53 -07:00
Fabien Potencier
362a8ac01a feature #20093 Twig extensions refatoring to decouple definitions from implementations (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Twig extensions refatoring to decouple definitions from implementations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see Twigphp/twig#1913
| License       | MIT
| Doc PR        | not yet

This PR tries to use the new Twig runtime loader to the Twig bridge extensions.

Commits
-------

b515702 fixed circular reference in Twig Form integration
4b5e412 removed on indirection
c07fc58 [TwigBridge] decoupled Form extension definitions from its runtime
2016-10-01 09:32:03 -07:00
Fabien Potencier
b515702fc9 fixed circular reference in Twig Form integration 2016-10-01 09:08:34 -07:00
Fabien Potencier
5775236835 bug #20112 added checks for public services on compiler passes that use service ids and not references (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

added checks for public services on compiler passes that use service ids and not references

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

Commits
-------

82fa942 added checks for public services on compiler passes that use service id and not references
2016-10-01 09:00:52 -07:00
Fabien Potencier
4b5e412d2c removed on indirection 2016-10-01 08:45:27 -07:00
Fabien Potencier
c07fc58771 [TwigBridge] decoupled Form extension definitions from its runtime 2016-10-01 08:45:27 -07:00
Fabien Potencier
8de92ab32d fixed Twig version 2016-10-01 08:45:01 -07:00
Fabien Potencier
52284246a3 minor #20115 [Config] avoid loaded non-needed class in prod (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Config] avoid loaded non-needed class in prod

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

16489d6 [HttpKernel] avoid loading a class that's not-needed when doing HTTP
8371b50 [Config] avoid loaded non-needed class in prod
2016-10-01 08:43:47 -07:00
Fabien Potencier
82fa9422aa added checks for public services on compiler passes that use service id and not references 2016-10-01 08:40:13 -07:00
Fabien Potencier
a1d0136289 Merge branch '3.1'
* 3.1:
  added checks for public services on compiler passes that use service id and not references
2016-10-01 08:39:18 -07:00
Fabien Potencier
c4debe8c1c Merge branch '2.8' into 3.1
* 2.8:
  added checks for public services on compiler passes that use service id and not references
2016-10-01 08:39:13 -07:00
Fabien Potencier
b14c8e750b Merge branch '2.7' into 2.8
* 2.7:
  added checks for public services on compiler passes that use service id and not references
2016-10-01 08:39:05 -07:00
Fabien Potencier
8bfb8f2368 bug #20116 fixed AddConstraintValidatorsPass config (fabpot)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20116).

Discussion
----------

fixed AddConstraintValidatorsPass config

| 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        | n/a

Commits
-------

996c1ee added checks for public services on compiler passes that use service id and not references
2016-10-01 08:38:16 -07:00
Fabien Potencier
996c1ee3cb added checks for public services on compiler passes that use service id and not references 2016-10-01 08:38:16 -07:00
Fabien Potencier
ee114d64f9 bug #20116 fixed AddConstraintValidatorsPass config (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

fixed AddConstraintValidatorsPass config

| 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        | n/a

Commits
-------

65131e2 added checks for public services on compiler passes that use service id and not references
2016-10-01 08:24:54 -07:00
Fabien Potencier
65131e2cbf added checks for public services on compiler passes that use service id and not references 2016-10-01 08:06:30 -07:00
Fabien Potencier
cb52d42634 fixed tests 2016-10-01 07:22:03 -07:00
Fabien Potencier
6399ffa32b Merge branch '3.1'
* 3.1:
  [TwigBundle] added missing dependencies for tests
  fixed CS
  adding missing dep
  [TwigBundle] Adjust CacheWarmingTest for TemplateCacheWarmer introduced in 2.8
  [TwigBundle] Fix CacheWarmingTest are order dependent
  Revert "bug #20080 [Form] compound forms without children should be considered rendered implicitly (backbone87)"
  [2.7][VarDumper] Fix PHP 7.1 compat
  [2.8][VarDumper] Fix PHP 7.1 compat
  silent file operation to avoid open basedir issues
  Fix #19943 Make sure to process each interface metadata only once
  #17580 compound forms without children should be considered rendered implicitly
2016-10-01 07:21:27 -07:00
Fabien Potencier
0a56032f3f Merge branch '2.8' into 3.1
* 2.8:
  [TwigBundle] added missing dependencies for tests
  fixed CS
  [TwigBundle] Adjust CacheWarmingTest for TemplateCacheWarmer introduced in 2.8
  [TwigBundle] Fix CacheWarmingTest are order dependent
  Revert "bug #20080 [Form] compound forms without children should be considered rendered implicitly (backbone87)"
  Fix #19943 Make sure to process each interface metadata only once
  #17580 compound forms without children should be considered rendered implicitly
2016-10-01 07:19:21 -07:00
Fabien Potencier
997e6d7a0b Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] added missing dependencies for tests
  fixed CS
  Fix #19943 Make sure to process each interface metadata only once
2016-10-01 07:18:53 -07:00
Fabien Potencier
470dc3e36f [TwigBundle] added missing dependencies for tests 2016-10-01 07:16:30 -07:00
Fabien Potencier
16489d65c6 [HttpKernel] avoid loading a class that's not-needed when doing HTTP 2016-09-30 22:32:43 -07:00
Fabien Potencier
8371b50860 [Config] avoid loaded non-needed class in prod 2016-09-30 22:24:10 -07:00
Jordan Deitch
746dab31f1 casting setPublic() arg to bool 2016-09-30 15:53:07 -04:00
Fabien Potencier
e20cd8ae9f fixed CS 2016-09-30 12:35:09 -07:00
Fabien Potencier
c1c42a52bc bug #20078 Fix #19943 Make sure to process each interface metadata only once (lemoinem)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix #19943 Make sure to process each interface metadata only once

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

Here is the fix for #19943, If you have `InterfaceA <- InterfaceB <- Class` with a constraint on a method defined on `InterfaceA`, the constraint and its eventual violations are currently validated and reported twice.

Copy from https://github.com/symfony/symfony/issues/19943#issuecomment-250238529:
As far as I can see, the problem seems to arise in [`LazyLoadingMetadataFactory`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php#L117-L123):

[`ReflectionClass::getInterfaces()`](http://php.net/manual/en/reflectionclass.getinterfaces.php) returns both interfaces implemented directly and through inheritance (either through another interface or through a parent class). In the end, the following process occurs:

1. `PriceInterface` is parsed and its `NotBlank` constraint on `value` is loaded
2. `VariablePriceInterface` is parsed and inherits `PriceInterface`'s constraints (which is OK).
3. `ProductPrice` is parsed and inherits both `PriceInterface` and `VariablePriceInterface`'s  constraints, which leads to a duplicated `NotBlank` constraint, one from each Interface.

The Best Way ™️ would be to be able to extract the list of interfaces implemented by a class directly only. However, the process seems a bit intricate... I will start working on it and prepare a PR to that effect. However, if any of you has a better idea, I'm all hears...

TODO:
- [x] Regression tests to make sure the bug doesn't reappear

Commits
-------

2f9b65a Fix #19943 Make sure to process each interface metadata only once
2016-09-30 12:33:15 -07:00
Fabien Potencier
418944bb50 fixed definition 2016-09-30 11:46:09 -07:00
Fabien Potencier
df3a485a86 reverted unneeded code 2016-09-30 11:45:21 -07:00
Fabien Potencier
46f69885e9 fixed tests 2016-09-30 11:40:57 -07:00
Fabien Potencier
f2ed5fc71b feature #20094 added Twig runtimes for "critical" Twig extensions (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

added Twig runtimes for "critical" Twig extensions

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

This PR converts some Twig extensions to use a separate runtime. It also contains some optimizations to not load extensions when the associated component is not installed.

Commits
-------

c541804 fixed tests
812fbb4 decoupled the Twig HttpKernelExtension runtime from the extension
79efb4c [TwigBundle] removed ExpressionLanguage Twig extension when the ExpressionLanguage component is not available
3d4ad0b [TwigBundle] removed Stopwatch Twig extension when the Stopwatch component is not available
d0792e4 [TwigBundle] removed YAML Twig extension when the YAML component is not available
2016-09-30 11:39:02 -07:00
Fabien Potencier
8da0c5ada7 feature #20097 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes (fixing this is easy by adding doctrine/annotations explicitly)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15748 partially
| License       | MIT
| Doc PR        | n/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Doctrine annotations library from the list.

Commits
-------

c2d8356 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle
2016-09-30 11:37:17 -07:00
Fabien Potencier
c541804ee7 fixed tests 2016-09-30 11:15:51 -07:00
Fabien Potencier
812fbb444f decoupled the Twig HttpKernelExtension runtime from the extension 2016-09-30 11:15:51 -07:00
Fabien Potencier
79efb4c841 [TwigBundle] removed ExpressionLanguage Twig extension when the ExpressionLanguage component is not available 2016-09-30 11:15:51 -07:00
Fabien Potencier
3d4ad0b084 [TwigBundle] removed Stopwatch Twig extension when the Stopwatch component is not available 2016-09-30 11:15:51 -07:00
Fabien Potencier
d0792e454e [TwigBundle] removed YAML Twig extension when the YAML component is not available 2016-09-30 11:15:51 -07:00
Fabien Potencier
bab7ef91ae adding missing dep 2016-09-30 11:05:33 -07:00