Commit Graph

25868 Commits

Author SHA1 Message Date
Titouan Galopin
88ef89c8dc [FrameworkBundle][Serializer] Fix APC cache service name and deprecate old name 2016-04-19 08:52:34 +02:00
Kévin Dunglas
3a165e551d feature #17959 [Serializer] Harden the ObjectNormalizer (dunglas)
This PR was squashed before being merged into the 3.1-dev branch (closes #17959).

Discussion
----------

[Serializer] Harden the ObjectNormalizer

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

Transform `\TypeError`s to catchable serializer exceptions.

Follows #17738 and completes #17660.

Commits
-------

26a07fb [Serializer] Harden the ObjectNormalizer
2016-04-18 19:37:57 +02:00
Kévin Dunglas
26a07fb2ab [Serializer] Harden the ObjectNormalizer 2016-04-18 19:37:45 +02:00
Nicolas Grekas
2824db3da8 feature #18547 DX: better error message if factory class is empty (dbu)
This PR was merged into the 3.1-dev branch.

Discussion
----------

DX: better error message if factory class is empty

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

i was trying to debug this service configuration:

```xml
        <service id="repository.user" class="Doctrine\ORM\EntityRepository">
            <argument>%user_entity_class%</argument>
            <factory id="doctrine.orm.default_entity_manager" method="getRepository"/>
        </service>
```

Turns out i should have used `<factory service=...` instead of `<factory id=...` but the error message does not even tell which service is wrong. The same happens when only specifying the `method=` attribute. The current exception message tells:

    Cannot dump definition because of invalid class name ('')

With this change, the message at least tells the context, hopefully helping the developer debug the issue:

    Empty class for factory of service repository.user and no factory service specified

Commits
-------

0999326 better error message if factory class is empty
2016-04-18 14:53:30 +02:00
Nicolas Grekas
8aec0bba0d minor #18576 [Cache] Fix test tearDown (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Fix test tearDown

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

Commits
-------

9ca22e9 [Cache] Fix test tearDown
2016-04-18 14:52:26 +02:00
Nicolas Grekas
9ca22e9805 [Cache] Fix test tearDown 2016-04-18 13:57:20 +02:00
David Buchmann
09993265c2 better error message if factory class is empty 2016-04-18 11:26:57 +02:00
Nicolas Grekas
39df9e4f8b CS fixes 2016-04-17 18:02:30 +02:00
Nicolas Grekas
95afc677b6 bug #18571 [Cache] Minor tweaks (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Minor tweaks

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/php-cache/integration-tests/pull/51
| License       | MIT
| Doc PR        | -

Commits
-------

9dcbe34 [Cache] Minor tweaks
2016-04-17 16:50:41 +02:00
Nicolas Grekas
9dcbe3403c [Cache] Minor tweaks 2016-04-17 13:51:09 +02:00
Fabien Potencier
47cb0c3ec1 feature #18020 fix #17993 - Deprecated callable strings (hamza)
This PR was merged into the 3.1-dev branch.

Discussion
----------

fix #17993 - Deprecated callable strings

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

Is this ok ?

- [x] Rebase when  #18057 is merged

Commits
-------

191b495 fix #17993 - Deprecated callable strings
2016-04-15 12:08:13 +02:00
Fabien Potencier
cea9d862cc minor #18498 [FrameworkBundle] Use SymfonyStyle in AbstractConfigCommand (JhonnyL)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Use SymfonyStyle in AbstractConfigCommand

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

Before:
![screen shot 2016-04-10 at 18 12 56](https://cloud.githubusercontent.com/assets/1104667/14411548/ab040a32-ff4b-11e5-878d-7e6acb257750.png)
After:
![screen shot 2016-04-10 at 18 11 57](https://cloud.githubusercontent.com/assets/1104667/14411553/be16e022-ff4b-11e5-838e-5fa2ad46133b.png)

Commits
-------

30b44a8 [FrameworkBundle] Use SymfonyStyle in AbstractConfigCommand
2016-04-15 11:33:33 +02:00
Fabien Potencier
529d0fe230 feature #18487 [Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache

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

This would allow cache pool configuration as usual (see #17290) before injecting the resulting doctrine cache provider anywhere such an interface is required.

Commits
-------

5d256dd [Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache
2016-04-15 11:27:30 +02:00
Fabien Potencier
e4177a716e feature #18544 [FrameworkBundle] Fallback to default cache system in production for validation (tgalopin)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Fallback to default cache system in production for validation

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

This PR proposes a default fallback to filesystem cache for some services if the APC cache is not enabled in production. In other words, if the following part of `config_prod.yml` file is not uncommented, the filesystem will be used:

``` yaml
#framework:
#    validation:
#        cache: validator.mapping.cache.doctrine.apc
#    serializer:
#        cache: serializer.mapping.cache.doctrine.apc
#
# ... other services
```

Commits
-------

1a65595 [FrameworkBundle] Fallback to default cache system in production for validation
2016-04-15 11:26:35 +02:00
Fabien Potencier
8d6670bf80 minor #18529 [HttpKernel] Renamed the argument resolver tag (iltar)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[HttpKernel] Renamed the argument resolver tag

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

Changed as discussed several times: https://github.com/symfony/symfony/pull/18510#issuecomment-208778875, https://github.com/symfony/symfony-docs/pull/6422#issuecomment-208453616.

Commits
-------

cd10057 Renamed argument resolver tag, added test
2016-04-15 11:05:59 +02:00
Iltar van der Berg
cd100575d4 Renamed argument resolver tag, added test 2016-04-15 09:47:59 +02:00
hamza
191b4954c0 fix #17993 - Deprecated callable strings
ext
2016-04-15 07:55:48 +02:00
Nicolas Grekas
5d256ddaee [Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache 2016-04-14 15:55:05 +02:00
Titouan Galopin
1a65595218 [FrameworkBundle] Fallback to default cache system in production for validation 2016-04-14 14:52:43 +02:00
Fabien Potencier
d4799348ff feature #18416 [FrameworkBundle] Calls support for debug:container (JhonnyL)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Calls support for debug:container

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

* Show methods to be called after service initialization in `debug:container` command

Commits
-------

b2d1038 [FrameworkBundle] Calls support for debug:container
2016-04-14 13:58:12 +02:00
Fabien Potencier
1ee981fbb8 bug #18436 fix Autowiring tests of #18144 (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

fix Autowiring tests of #18144

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| Tests pass?   | yes
| Fixed issue | https://github.com/symfony/symfony/pull/18422#discussion_r58362092
| License       | MIT

Commits
-------

0cbf04a [DI] fix Autowiring tests of #18144
2016-04-14 13:54:39 +02:00
Nicolas Grekas
d2b5cb5f0e minor #18536 Fix the wrong method name given the corresponding interface (joelwurtz)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Fix the wrong method name given the corresponding interface

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

This a follow up of #17545 as i introduce bad methods name in the traits sorry :/

![](http://vomzi.com/wp-content/uploads/2016/02/sorry-gif-847.gif)

Commits
-------

231819e Fix the wrong method name given the corresponding interface
2016-04-14 11:05:59 +02:00
Joel Wurtz
231819e9ac Fix the wrong method name given the corresponding interface 2016-04-14 00:46:09 +02:00
Nicolas Grekas
cb0fe14df5 feature #18513 [Process] Turn getIterator() args to flags & add ITER_SKIP_OUT/ERR modes (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Process] Turn getIterator() args to flags & add ITER_SKIP_OUT/ERR modes

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

Targeted at 3.1

Commits
-------

428f12e [Process] Turn getIterator() args to flags & add ITER_SKIP_OUT/ERR modes
2016-04-13 15:01:25 +02:00
Jules Pietri
0cbf04a77e [DI] fix Autowiring tests of #18144 2016-04-13 08:43:21 +02:00
Nicolas Grekas
428f12e13b [Process] Turn getIterator() args to flags & add ITER_SKIP_OUT/ERR modes 2016-04-12 21:11:33 +02:00
Nicolas Grekas
f1d12a1c07 bug #18485 [Cache] Workaround krakjoe/apcu#170 (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Workaround krakjoe/apcu#170

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/krakjoe/apcu/issues/170
| License       | MIT
| Doc PR        | -

Commits
-------

98dce41 [Cache] Workaround krakjoe/apcu#170
2016-04-12 21:07:53 +02:00
Christian Flothmann
af9ec74edb Merge branch '3.0'
* 3.0: (24 commits)
  [Filesystem] Better error handling in remove()
  [DependencyInjection] Add coverage for invalid Expression in exportParameters
  [DependencyInjection] Add coverage for all invalid arguments in exportParameters
  anonymous services are always private
  [Form] FormValidator removed code related to removed  option
  [Console] Correct time formatting.
  [WebProfilerBundle] Fixed error from unset twig variable
  Force profiler toolbar svg display
  [DependencyInjection] Resolve aliases before removing abstract services + add tests
  Fix Dom Crawler select option with empty value
  Remove unnecessary option assignment
  fix tests (use non-deprecated options)
  remove unused variable
  mock the proper method
  [PropertyAccess] Fix regression
  [HttpFoundation] Improve phpdoc
  [Logging] Add support for firefox in ChromePhpHandler
  Windows 10 version check in just one line
  Detect CLI color support for Windows 10 build 10586
  [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
  ...
2016-04-12 20:27:47 +02:00
Christian Flothmann
e72d509012 Merge branch '2.8' into 3.0
* 2.8: (23 commits)
  [Filesystem] Better error handling in remove()
  [DependencyInjection] Add coverage for invalid Expression in exportParameters
  [DependencyInjection] Add coverage for all invalid arguments in exportParameters
  anonymous services are always private
  [Console] Correct time formatting.
  [WebProfilerBundle] Fixed error from unset twig variable
  Force profiler toolbar svg display
  [DependencyInjection] Resolve aliases before removing abstract services + add tests
  Fix Dom Crawler select option with empty value
  Remove unnecessary option assignment
  fix tests (use non-deprecated options)
  remove unused variable
  mock the proper method
  [PropertyAccess] Fix regression
  [HttpFoundation] Improve phpdoc
  [Logging] Add support for firefox in ChromePhpHandler
  Windows 10 version check in just one line
  Detect CLI color support for Windows 10 build 10586
  [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
  [EventDispatcher] Try first if the event is Stopped
  ...
2016-04-12 20:09:53 +02:00
Christian Flothmann
ed9c94c719 Merge branch '2.7' into 2.8
* 2.7:
  [Filesystem] Better error handling in remove()
  [DependencyInjection] Add coverage for invalid Expression in exportParameters
  [DependencyInjection] Add coverage for all invalid arguments in exportParameters
  anonymous services are always private
  [Console] Correct time formatting.
  [DependencyInjection] Resolve aliases before removing abstract services + add tests
  Fix Dom Crawler select option with empty value
  Remove unnecessary option assignment
  remove unused variable
  mock the proper method
  [PropertyAccess] Fix regression
2016-04-12 20:01:21 +02:00
Nicolas Grekas
689f27b397 bug #18491 [DependencyInjection] anonymous services are always private (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] anonymous services are always private

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

Commits
-------

0a469a4 anonymous services are always private
2016-04-12 17:22:47 +02:00
Nicolas Grekas
fd693e6997 Merge branch '2.3' into 2.7
* 2.3:
  [Filesystem] Better error handling in remove()
2016-04-12 17:21:00 +02:00
Nicolas Grekas
6401371c7e bug #18515 [Filesystem] Better error handling in remove() (nicolas-grekas)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18515).

Discussion
----------

[Filesystem] Better error handling in remove()

| Q             | A
| ------------- | ---
| Branch?       | master (to be moved on 2.3 when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18512
| License       | MIT
| Doc PR        | -

Commits
-------

b848ddb [Filesystem] Better error handling in remove()
2016-04-12 17:20:10 +02:00
Nicolas Grekas
b848ddb7f0 [Filesystem] Better error handling in remove() 2016-04-12 17:20:10 +02:00
Nicolas Grekas
98dce411e8 [Cache] Workaround krakjoe/apcu#170 2016-04-12 08:30:53 +02:00
Fabien Potencier
8bf49692b6 minor #18499 [DependencyInjection] Add coverage for invalid Expression in exportParameters (JhonnyL)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] Add coverage for invalid Expression in exportParameters

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

Commits
-------

1931b14 [DependencyInjection] Add coverage for invalid Expression in exportParameters
2016-04-11 05:50:45 -07:00
Fabien Potencier
3cd380da42 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] Add coverage for all invalid arguments in exportParameters
2016-04-11 05:48:18 -07:00
Fabien Potencier
302e1928b8 minor #18500 [DependencyInjection] Add coverage for all invalid arguments in exportParameters (JhonnyL)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Add coverage for all invalid arguments in exportParameters

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

Commits
-------

87c4f23 [DependencyInjection] Add coverage for all invalid arguments in exportParameters
2016-04-11 05:47:06 -07:00
Fabien Potencier
1ca8d1c741 minor #18493 [HttpKernel] update 4.0 upgrade file for the argument resolver (xabbuh)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[HttpKernel] update 4.0 upgrade file for the argument resolver

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

Commits
-------

5f0b0d4 update 4.0 upgrade file for the argument resolver
2016-04-11 05:45:50 -07:00
Fabien Potencier
a073a65918 minor #18495 [HttpKernel] some tweaks to the controller argument resolver (xabbuh)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[HttpKernel] some tweaks to the controller argument resolver

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

* update some docblocks

* remove the `LegacyArgumentResolver` class

* simplify the `TraceableControllerResolver`

Commits
-------

3519770 some tweaks to the controller argument resolver
2016-04-11 05:42:25 -07:00
JhonnyL
1931b14a60 [DependencyInjection] Add coverage for invalid Expression in exportParameters 2016-04-11 10:53:08 +02:00
Christian Flothmann
351977095f some tweaks to the controller argument resolver
* update some docblocks

* remove the `LegacyArgumentResolver` class

* simplify the `TraceableControllerResolver`
2016-04-11 10:32:34 +02:00
JhonnyL
87c4f23764 [DependencyInjection] Add coverage for all invalid arguments in exportParameters 2016-04-10 20:31:05 +02:00
JhonnyL
30b44a8864 [FrameworkBundle] Use SymfonyStyle in AbstractConfigCommand 2016-04-10 18:33:46 +02:00
Christian Flothmann
5f0b0d43c0 update 4.0 upgrade file for the argument resolver 2016-04-09 20:18:57 +02:00
Christian Flothmann
0a469a418f anonymous services are always private 2016-04-09 16:46:37 +02:00
Christian Flothmann
064aedf9e3 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] Resolve aliases before removing abstract services + add tests
  Fix Dom Crawler select option with empty value
  Remove unnecessary option assignment
  remove unused variable
  [PropertyAccess] Fix regression
2016-04-09 12:56:56 +02:00
Fabien Potencier
5ccbef17b5 bug #18081 [Form] FormValidator removed code related to removed cascade_validation option (peterrehm)
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes #18081).

Discussion
----------

[Form] FormValidator removed code related to removed `cascade_validation` option

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

Commits
-------

05fe6f9 [Form] FormValidator removed code related to removed  option
2016-04-07 17:44:59 +02:00
Peter Rehm
05fe6f9b07 [Form] FormValidator removed code related to removed option 2016-04-07 17:44:59 +02:00
Fabien Potencier
0b67fa3dd1 feature #18371 [FrameworkBundle] integrate the Cache component (xabbuh, nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] integrate the Cache component

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

Last commit is the diff with #17868.

Commits
-------

4152634 [FrameworkBundle] Add default pool & system adapter
714b916 [FrameworkBundle] Add & use Psr6CacheClearer
4740c5c [FrameworkBundle] use abstract cache.pool decoration and aliases
92b1a20 [FrameworkBundle] Fix and add tests for cache pool wiring
e44bfdc [FrameworkBundle] Add cache-pool tag and wiring
281eafa [FrameworkBundle] Integrate the Cache component
bc51fde [Cache] Normalize constructor arguments order
2016-04-07 17:36:32 +02:00