Commit Graph

32692 Commits

Author SHA1 Message Date
Fabien Potencier
2d330b2bb4 minor #24110 [Form] Add help description to debug:form command (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Add help description to debug:form command

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

I forgot to add this one in the introduction of the command.

Commits
-------

f8afe02a49 Add help description to debug:form command
2017-09-06 08:07:13 -07:00
Yonel Ceruto
f8afe02a49 Add help description to debug:form command 2017-09-06 08:10:51 -04:00
Fabien Potencier
a4a87ac3a3 minor #24106 [DependencyInjection] Don't use return on Assert::markTestSkipped (derrabus)
This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] Don't use return on Assert::markTestSkipped

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

Removed an unnecessary return statement. `Assert::markTestSkipped()` will always throw an exception, so there's no need for a return statement here. And even if that method had a return value: A unit test is not supposed to return anything.

Commits
-------

9cadeb8af2 Don't use return on Assert::markTestSkipped.
2017-09-05 18:21:35 -07:00
Alexander M. Turek
9cadeb8af2 Don't use return on Assert::markTestSkipped. 2017-09-05 22:39:38 +02:00
Fabien Potencier
3d799ddcdb feature #24093 [FrameworkBundle] be able to enable workflow support explicitly (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] be able to enable workflow support explicitly

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

Commits
-------

eaa506f562 be able to enable workflow support explicitly
2017-09-05 12:26:40 -07:00
Fabien Potencier
77b6cc629b feature #24064 [TwigBridge] Show Twig's loader paths on debug:twig command (yceruto)
This PR was squashed before being merged into the 3.4 branch (closes #24064).

Discussion
----------

[TwigBridge] Show Twig's loader paths on debug:twig command

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

`bin/console debug:twig`:
![twig-loader-paths](https://user-images.githubusercontent.com/2028198/29986784-ee5a4094-8f32-11e7-86c8-c78183630221.png
)

This information is not displayed anywhere ATM and it should be important to know:
 * The Twig's namespaces availables
 * The Twig's paths availables
 * The order that templates will be loaded ( regarding its namespace -> LOAD PRIORITY ! )

So it should help us to debug any issue related to circular templates reference, invalid namespaces, unsuccessful attempt to override a template, etc.

WDYT?

Commits
-------

3fdcb40df3 [TwigBridge] Show Twig's loader paths on debug:twig command
2017-09-05 11:55:04 -07:00
Yonel Ceruto
3fdcb40df3 [TwigBridge] Show Twig's loader paths on debug:twig command 2017-09-05 11:55:03 -07:00
Fabien Potencier
a819038090 bug #24041 [ExpressionLanguage] throws an exception on calling uncallable method (fmata)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] throws an exception on calling uncallable method

| 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

When we evaluate an expression, if a callable is incorrect (not exists or not accessible) a warning is printed.
This PR handles this case and throws a \RuntimeException when `is_callable()` returns `false` :

```php
$el = new ExpressionLanguage();
$el->evaluate('foo.myfunction()', array('foo' => new \stdClass()));
```

**Before:**
`Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'stdClass' does not have a method 'myfunction' in /home/.../src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php on line 84`

**After:**
`Fatal error: Uncaught RuntimeException: Unable to call method "myfunction" of object "stdClass". in /home/.../src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php:81`

Commits
-------

c8b65aeb8b [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-05 11:48:18 -07:00
Fabien Potencier
c0b4e564db feature #23978 [Cache] Use options from Memcached DSN (Bukashk0zzz)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Use options from Memcached DSN

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

This PR allows to pass options in cache config.
Example:
```yaml
framework:
    cache:
        app: cache.adapter.memcached
        default_memcached_provider: 'memcached://%env(MEMCACHE_HOST)%?socket_recv_size=1&socket_send_size=2'
```

Commits
-------

5798dd6bec [Cache] Use options from Memcached DSN
2017-09-05 11:44:31 -07:00
Fabien Potencier
4f02e91592 minor #24103 [FrameworkBundle] Fix Di config to allow for more private services (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix Di config to allow for more private services

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

This PR is a prelude to #23822:
- allow cache pool clearers to be private by using IGNORE_ON_UNINITIALIZED_REFERENCE, allowing much more sane logic in the related passes
- allow templating helpers to be private by using a service locator
- replace an inline def by a reference in workflow's config (ping @lyrixx @Nyholm)
- fix the Stopwatch alias, which is public in 3.4, but private in 3.3
- remove direct access to `->get('fragment.handler')` in tests so that the service could be made private

Commits
-------

76c42175b9 [FrameworkBundle] Fix Di config to allow for more private services
2017-09-05 11:43:18 -07:00
Fabien Potencier
fd568acd15 bug #24096 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args

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

Commits
-------

2ba5005830 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
2017-09-05 11:37:50 -07:00
Fabien Potencier
a964f37a87 minor #24102 Create directories recursively in the PHPUnit bridge (stof)
This PR was merged into the 3.3 branch.

Discussion
----------

Create directories recursively in the PHPUnit bridge

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

If the target directory is also missing its parent directory, we need to perform a recursive creation, otherwise we get weird failures later.

Commits
-------

0caeeff48a Create directories recursively in the PHPUnit bridge
2017-09-05 11:31:49 -07:00
Nicolas Grekas
76c42175b9 [FrameworkBundle] Fix Di config to allow for more private services 2017-09-05 18:47:43 +02:00
Christophe Coevoet
0caeeff48a Create directories recursively in the PHPUnit bridge 2017-09-05 13:23:06 +02:00
Nicolas Grekas
703a84c18c minor #24081 [Dotenv] Add a BC break note (voronkovich)
This PR was squashed before being merged into the 3.3 branch (closes #24081).

Discussion
----------

[Dotenv] Add a BC break note

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

Commits
-------

66621cc [Dotenv] Add a BC break note
2017-09-05 09:59:34 +02:00
Oleg Voronkovich
66621cc559 [Dotenv] Add a BC break note 2017-09-05 09:59:31 +02:00
Denis Golubovskiy
5798dd6bec
[Cache] Use options from Memcached DSN 2017-09-05 09:16:07 +03:00
Robin Chalas
2ba5005830 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args 2017-09-04 22:36:37 +02:00
Nicolas Grekas
aad90faa93 bug #24030 [VarDumper] Improve microseconds support in date caster (maidmaid)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Improve microseconds support in date caster

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

This PR adds the microseconds in ``period`` virtual property and in tooltip overview.

Before:
![](https://user-images.githubusercontent.com/4578773/29843773-58a2e212-8d0d-11e7-9053-3eb1cf933e3b.png)

After:
![](https://user-images.githubusercontent.com/4578773/29843774-58bd8342-8d0d-11e7-8d83-40835c89313c.png)

And fixes interval caster:

```php
dump((new DateTime('00:00:00'))->diff(new DateTime('00:00:00.123')));

// before
DateInterval {
  interval: + 00:00:00.0.123
}

// after
DateInterval {
  interval: + 00:00:00.123
}
```

Commits
-------

479b5d6 Improve microseconds support in date caster
2017-09-04 20:03:48 +02:00
Nicolas Grekas
c9bee848c5 bug #24025 Use new configuration depreciation method (sanpii, chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

Use new configuration depreciation method

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

In keeping with #22382

Commits
-------

4a62cc6 Do not trigger deprecation if node has not been explicitly filled
012e381 Use new configuration node depreciation method
2017-09-04 19:59:34 +02:00
Nicolas Grekas
86c3a50915 feature #24075 Implemented PruneableInterface on TagAwareAdapter (Toflar)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #24075).

Discussion
----------

Implemented PruneableInterface on TagAwareAdapter

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | See comment on https://github.com/symfony/symfony/pull/23451
| License       | MIT
| Doc PR        | Added a comment on https://github.com/symfony/symfony-docs/pull/8209

The `ChainAdapter` already delegates the `prune()` calls. The `TagAwareAdapter` is a wrapping adapter too and should delegate the `prune()` calls just the same.

Commits
-------

b635b62 Implemented PruneableInterface on TagAwareAdapter
2017-09-04 19:57:22 +02:00
Yanick Witschi
b635b62463 Implemented PruneableInterface on TagAwareAdapter 2017-09-04 19:57:22 +02:00
Nicolas Grekas
61966df131 [DI] There are no initialized-only refs to undeclared services 2017-09-04 19:49:50 +02:00
Nicolas Grekas
cf35e0c104 minor #24079 [3.4][DI] Inline trivial services (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4][DI] Inline trivial services

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

Unless I missed something, 3.4 also can have trivial services inlined.
And calls to factory methods also can be inlined btw, isn't it @stof?

Commits
-------

2a7f86f [3.4][DI] Inline trivial services
2017-09-04 19:20:42 +02:00
Nicolas Grekas
2a7f86f85b [3.4][DI] Inline trivial services 2017-09-04 19:14:45 +02:00
Nicolas Grekas
80c0ec1cfd Merge branch '3.3' into 3.4
* 3.3:
  [DI] Minor fix in dumped code
  #24046 added check for ext-dom to XmlUtil::loadFile
2017-09-04 19:13:19 +02:00
Robin Chalas
4a62cc6668 Do not trigger deprecation if node has not been explicitly filled 2017-09-04 19:00:50 +02:00
Dany Maillard
479b5d639a Improve microseconds support in date caster 2017-09-04 18:34:31 +02:00
Fabien Potencier
28e7a1377d Merge branch '2.8' into 3.3
* 2.8:
  #24046 added check for ext-dom to XmlUtil::loadFile
2017-09-04 09:28:07 -07:00
Fabien Potencier
5d2af1ef4c Merge remote-tracking branch 'origin/2.7' into 2.8
* origin/2.7:
  #24046 added check for ext-dom to XmlUtil::loadFile
2017-09-04 09:26:37 -07:00
Fabien Potencier
1a24a1013e minor #24092 sync upgrade file for Symfony 4.0 between branches (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

sync upgrade file for Symfony 4.0 between branches

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

5c030dd240 sync upgrade file for Symfony 4.0 between branches
2017-09-04 09:25:46 -07:00
Fabien Potencier
2eee9e0073 bug #24082 [DI] Minor fix in dumped code (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Minor fix in dumped code

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

This check is useless, and leads to a potential BC break (a non-shared service overridden by calling `$container->set(...)` - unlikely yes).

Commits
-------

263b95e1d1 [DI] Minor fix in dumped code
2017-09-04 08:49:40 -07:00
Christian Flothmann
5c030dd240 sync upgrade file for Symfony 4.0 between branches 2017-09-04 17:30:54 +02:00
Christian Flothmann
eaa506f562 be able to enable workflow support explicitly 2017-09-04 16:36:30 +02:00
Christian Flothmann
1be23c2a86 [Yaml] add inline parser context initializer
Calling the parser to initialize some internal context does not look
like a good idea. Additionally, this change allows to not accept null
values in `Inline::parse()` in 3.4 anymore.
2017-09-04 15:18:59 +02:00
Sanpi
012e381e16
Use new configuration node depreciation method 2017-09-04 09:46:57 +02:00
Nicolas Grekas
d87858ef11 bug #24083 Fix ability to deprecate a config node (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix ability to deprecate a config node

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | not yet released
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22382
| License       | MIT
| Doc PR        | n/a

Unlocks #24025

Commits
-------

fc91869 Fix ability to deprecate a config node
2017-09-04 09:42:35 +02:00
Robin Chalas
fc91869376 Fix ability to deprecate a config node 2017-09-03 21:32:08 +02:00
Nicolas Grekas
263b95e1d1 [DI] Minor fix in dumped code 2017-09-03 20:01:57 +02:00
Fabien Potencier
b80d8c8917 minor #24074 Fix deprecations regarding core commands registered as services (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix deprecations regarding core commands registered as services

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23624#discussion_r131979501
| License       | MIT
| Doc PR        | n/a

Current deprecation messages can be confusing (see fixed ticket), this improves them and adds a bunch of missing CHANGELOG/UPGRADE entries on the same topic

Commits
-------

4659975944 Fix deprecations regarding core commands registered as services
2017-09-03 08:42:17 -07:00
Robin Chalas
b2e1415cab feature #21414 [Console] Display file and line on Exception (arno14)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Display file and line on Exception

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

When an exception occured:
If you have not set a verbose mode when running the command, you don't have information about the file and the line on which the exception occured.
So you must run a second time the command but the exception may not occured this time (if based on some databases datas which have changed) and it's a waste of time if you process is very long and the exception occured at the end.

The feature #21003 solve the problem if you are in a standard Symfony edition, if you leave the default settings and if you are in dev mode

Commits
-------

484d278 [Console] Display file and line on Exception
2017-09-03 17:31:40 +02:00
Arnaud
484d278f50 [Console] Display file and line on Exception 2017-09-03 17:13:41 +02:00
Nicolas Grekas
c7e61f2333 Merge branch '3.3' into 3.4
* 3.3:
  Fix race condition in tests between cache and lock
  Improved how links are displayed in exception messages
2017-09-03 16:49:34 +02:00
Nicolas Grekas
cbd6b8e288 feature #24068 [HttpKernel] Deprecate EnvParametersResource (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #24068).

Discussion
----------

[HttpKernel] Deprecate EnvParametersResource

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

See #24067

Commits
-------

76ea6df [HttpKernel] Deprecate EnvParametersResource
2017-09-03 16:48:11 +02:00
Roland Franssen
76ea6dfd33 [HttpKernel] Deprecate EnvParametersResource 2017-09-03 16:48:09 +02:00
Robin Chalas
4659975944 Fix deprecations regarding core commands registered as services 2017-09-03 16:43:38 +02:00
Robin Chalas
99e95c3d2d Fix BC break in console.command.ids parameter 2017-09-03 16:34:48 +02:00
Fabien Potencier
7c5142804f feature #22542 [Lock] Check TTL expiration in lock acquisition (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #22542).

Discussion
----------

[Lock] Check TTL expiration in lock acquisition

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

This PR improve lock acquisition by throwing exception when the TTL is expired during the lock process.

Commits
-------

f74ef35778 [Lock] Check TTL expiration in lock acquisition
2017-09-03 07:31:46 -07:00
Jérémy Derussé
f74ef35778 [Lock] Check TTL expiration in lock acquisition 2017-09-03 07:31:45 -07:00
Nicolas Grekas
c4ecb9c75d minor #23958 [Lock] Fix race condition in tests between cache and lock component (jderusse)
This PR was submitted for the 3.4 branch but it was merged into the 3.3 branch instead (closes #23958).

Discussion
----------

[Lock] Fix race condition in tests between cache and lock component

| 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 trying to fix
* [x] php 5.5 in testSaveWithDifferentResources "Failed asserting that false is true"
* [x] php 5.5 in testSaveWithDifferentKeysOnSameResources "The store shouldn't save the second key"

Workflow:
* [x] find a reproducer
* [x] fix memcached tests => #23969
* [x] fix redis tests => this PR

Commits
-------

26948cf Fix race condition in tests between cache and lock
2017-09-03 16:06:51 +02:00