Commit Graph

29600 Commits

Author SHA1 Message Date
Fabien Potencier
915cca84b6 feature #21533 [DI] Deprecate (un)setting pre-defined services (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Deprecate (un)setting pre-defined services

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

This PR is the subset of #19668 that fixes #19192: it deprecates (un)setting pre-defined services.
This opens the path to some optimizations in the dumped container in 4.0.

Commits
-------

fdb2140b81 [DI] Deprecate (un)setting pre-defined services
2017-02-12 12:52:54 +01:00
Fabien Potencier
50be214200 bug #21556 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap

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

Related to #21381 which disabled any cache at bootstrap.
Instead, this wires ArrayCache during bootstrapping, then swaps the cache provider for the real one.

Commits
-------

f90f53e915 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap
2017-02-12 12:49:46 +01:00
Daniel Espendiller
93ab0179f0 add docblocks for Twig url and path function to improve ide completion 2017-02-12 09:39:31 +01:00
Nicolas Grekas
f590c8d7ae bug #21584 [WebProfilerBundle] Readd Symfony version status in the toolbar (wouterj)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Readd Symfony version status in the toolbar

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

The Symfony version status (*"This Symfony version will no longer receive security fixes."* and the like) was no longer shown in the toolbar. This was removed in 9d89841e3a , but the commit description isn't that describing. I guess it's not done on purpose.

I think having this information is crucial for this feature to work: A yellow version doesn't mean anything specific, unless I see "This Symfony will only receive security fixes".

/cc @javiereguiluz

Commits
-------

d714c7e Readd Symfony version status in the toolbar
2017-02-11 12:37:09 +01:00
Nicolas Grekas
dc4d04676b minor #21586 spelling fixes (klemens)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #21586).

Discussion
----------

spelling fixes

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

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
patch contains some spelling fixes ( just in comments ) as found by a bot ( https://github.com/ka7/misspell_fixer ). Any upcoming License changes (e.g. GPL2 to GPL3+) are hereby granted.

Commits
-------

6ccc479 spelling fixes
2017-02-11 12:34:45 +01:00
klemens
6ccc479d72 spelling fixes 2017-02-11 12:34:45 +01:00
Nicolas Grekas
f6744d64d9 bug #21557 [VarDumper] Improve dump of AMQP* Object (lyrixx)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Improve dump of AMQP* Object

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

---

The release of https://github.com/pdezwart/php-amqp/ 1.7.0alpha1
changed internally the handling of AMQP* object. So now when dumping
using var_dump(), many information are available. So many information
are displayed twice. This commit fixes this issue and keeps displaying basic
information for older versions of the lib.

Reference:

* https://pecl.php.net/package-info.php?package=amqp&version=1.7.0alpha1
* https://github.com/pdezwart/php-amqp/commit/314afbc (and next commits)

---

![screenshot4](https://cloud.githubusercontent.com/assets/408368/22700884/53ad5f68-ed5c-11e6-986b-bfdf91640060.png)

![screenshot5](https://cloud.githubusercontent.com/assets/408368/22700890/580353c4-ed5c-11e6-8fc8-c101115b7001.png)

Commits
-------

c553352 [VarDumper] Improve dump of AMQP* Object
2017-02-11 12:33:03 +01:00
WouterJ
d714c7e054 Readd Symfony version status in the toolbar 2017-02-11 11:32:11 +01:00
Fabien Potencier
f376080b4b bug #21579 [Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry (csarrazi)
This PR was submitted for the 3.1 branch but it was merged into the 3.2 branch instead (closes #21579).

Discussion
----------

[Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry

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

This ticket should fix #21577, which was introduced by commit 6641b79d58

LdapUserProvider should not throw an exception if the uid key does not exist in the entry.

Commits
-------

ee4d9a70c1 [Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry
2017-02-11 09:51:37 +01:00
Charles Sarrazin
ee4d9a70c1 [Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry 2017-02-11 09:51:37 +01:00
Nicolas Grekas
5a388042bb feature #21194 [Yaml] Add tags support (GuilhemN)
This PR was squashed before being merged into the 3.3-dev branch (closes #21194).

Discussion
----------

[Yaml] Add tags support

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

This PR adds custom tags support to the Yaml component.
Symfony tags (`!!binary`, `!str`, etc.) are still managed in the parser to have a lighter diff but we'll be able to convert them later if we want to.

The primary addition of this PR is the `TagInterface`:
```php
interface TagInterface
{
    public function construct(mixed $value): mixed;
}
```

It can be used to register custom tags. An example that could be used to convert [the syntax `=iterator`](https://github.com/symfony/symfony/pull/20907#issuecomment-270728216) to a tag:
```php
final class IteratorTag implements TagInterface
{
    public function construct(mixed $value): mixed
    {
        return new IteratorArgument($value);
    }
}

$parser = new Parser(['iterator' => new IteratorTag()]);
```

If you think this is too complex, @nicolas-grekas [proposed an alternative](https://github.com/symfony/symfony/issues/21185#issuecomment-271074840) to my proposal externalizing this support by introducing a new class `TaggedValue`.

Commits
-------

4744107 [Yaml] Add tags support
2017-02-10 15:54:52 +01:00
Guilhem N
47441070e4 [Yaml] Add tags support 2017-02-10 15:48:44 +01:00
Fabien Potencier
10c3fc2081 feature #21460 [DI] ContainerBuilder::compile() can optionally resolve env vars in parameter bag (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] ContainerBuilder::compile() can optionally resolve env vars in parameter bag

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

Here is a new feature allowing one to do `$container->compile(true)` and get the env vars resolved using the current env.

Commits
-------

a3fd512271 [DI] ContainerBuilder::compile() can optionally resolve env vars in parameter bag
2017-02-09 18:52:03 +01:00
Nicolas Grekas
a3fd512271 [DI] ContainerBuilder::compile() can optionally resolve env vars in parameter bag 2017-02-09 16:17:33 +01:00
Fabien Potencier
c43b85e0c6 feature #21572 [Finder] Add double-star matching to Glob::toRegex() (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Finder] Add double-star matching to Glob::toRegex()

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

Adds ant-style `/**/` matching to `Glob::toRegex()`.

Commits
-------

8b28afa0f6 [Finder] Add double-star matching to Glob::toRegex()
2017-02-09 11:22:35 +01:00
Christian Flothmann
c3702c2d8f make sure that null can be the invalid value 2017-02-09 08:12:50 +01:00
Nicolas Grekas
8b28afa0f6 [Finder] Add double-star matching to Glob::toRegex() 2017-02-08 23:54:13 +01:00
Fabien Potencier
bcd897cfd4 feature #21265 [DI] Implement PSR-11 (greg0ire)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Implement PSR-11

TODO:

- [x] wait for a stable version of the psr/container package;
- [x] ~~deprecate instanciating ServiceNotFoundException directly, or using any of its methods directly;~~ not relevant anymore
- [x] act on the outcome of https://github.com/php-fig/container/issues/8 (solved in https://github.com/php-fig/container/issues/9) ;
- [x] ~~solve the mandatory NotFoundExceptionInterface on non-existing service
problem (with a flag ?);~~ non-issue, see comments below
- [x] provide meta-package psr/container-implementation if all problems can
be solved.

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| BC breaks?    | not at the moment
| Tests pass?   | didn't pass before pushing, or even starting to code, will see Travis
| License       | MIT
| Doc PR        | TODO

This PR is a first attempt at implementing PSR-11, or at least trying to get closer to it.
Delegate lookup is optional, and thus not implemented for now.

Commits
-------

bde0efd01c Implement PSR-11
2017-02-08 16:52:20 +01:00
Fabien Potencier
3193331855 feature #21474 [Process] Accept command line arrays and per-run env vars, fixing signaling and escaping (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Process] Accept command line arrays and per-run env vars, fixing signaling and escaping

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #12488, #11972, #10025, #11335, #5759, #5030, #19993, #10486
| License       | MIT
| Doc PR        | -

I think I found a way to fix this network of issues once for all.
Of all the linked ones, only the last two are still open: the remaining were closed in dead ends.

Instead of trying to make `ProcessUtil::escapeArgument` work correctly on Windows - which is impossible as discussed in #21347 - this PR deprecates it in favor of a more powerful approach.

Depending on the use case:

- when a simple command should be run, `Process` now accepts an array of arguments (the "binary" being the first arg). Making this the responsibility of `Process` (instead of `ProcessBuilder`) gives two benefits:
  - escape becomes an internal detail that doesn't leak - thus can't be misused ([see here](https://github.com/symfony/symfony/pull/21347#issuecomment-274051370))
  - since we know we're running a single command, we can prefix it automatically by "exec" - thus fixing a long standing issue with signaling

```php
        $p = new Process(array('php', '-r', 'echo 123;'));
        echo $p->getCommandLine();
        // displays on Linux:
        // exec 'php' '-r' 'echo 123;'
```

- when a shell expression is required, passing a string is still allowed. To make it easy and look-like sql prepared statements, env vars can be used when running the command. Since the shell is OS-specific (think Windows vs Linux) - this PR assumes no portability, so one should just use each shell's specific syntax.

From the fixtures:
```php
        $env = array('FOO' => 'Foo', 'BAR' => 'Bar');
        $cmd = '\\' === DIRECTORY_SEPARATOR ? 'echo !FOO! !BAR! !BAZ!' : 'echo $FOO $BAR $BAZ';
        $p = new Process($cmd, null, $env);
        $p->run(null, array('BAR' => 'baR', 'BAZ' => 'baZ'));

        $this->assertSame('Foo baR baZ', rtrim($p->getOutput()));
        $this->assertSame($env, $p->getEnv());
```

Commits
-------

330b61fecb [Process] Accept command line arrays and per-run env vars, fixing signaling and escaping
2017-02-08 16:45:40 +01:00
Fabien Potencier
2697ceecf7 minor #21561 [DI] Refacto / cleanup / minor fixes (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Refacto / cleanup / minor fixes

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

An almost neutral refacto touching only new things in master - unlocking some next steps.

- renames "autowire method" to "autowire call"
- renames `GetterProxyInterface` to `InheritanceProxyInterface`
- moves some helpers in a new internal `InheritanceProxyHelper`
- some other minor things

Commits
-------

ad5b5b5d93 [DI] Refacto / cleanup / minor fixes
2017-02-08 16:44:35 +01:00
Nicolas Grekas
ad5b5b5d93 [DI] Refacto / cleanup / minor fixes 2017-02-08 13:32:07 +01:00
Grégoire Pineau
c553352d69 [VarDumper] Improve dump of AMQP* Object
The release of https://github.com/pdezwart/php-amqp/ 1.7.0alpha1
changed internally the handlings of AMQP* object. So now when dumping
using var_dump(), many information are availables. So many information
are displayed twice. This commit fixes this issue and keeps displaying basic
information for older version of the lib.

Reference:

* https://pecl.php.net/package-info.php?package=amqp&version=1.7.0alpha1
* https://github.com/pdezwart/php-amqp/commit/314afbc (and next commits)
2017-02-08 11:21:49 +01:00
Nicolas Grekas
81ad336a8a bug #21552 [FrameworkBundle] Fix annotations cache folder path (akeeman)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #21552).

Discussion
----------

[FrameworkBundle] Fix annotations cache folder path

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

The argument at index 2 sets a cache path as it extends the file system adapter by default since e59f0e0fd7, where it did set the version before that. This change now results in annotation cache folders showing up in the project root (because of the overwritten cache root folder).
Because cache.annotations has a parent now, this line is not needed anymore and fixes the problem.

Commits
-------

8e5cfa7 Fix annotations cache folder path
2017-02-07 21:48:38 +01:00
Arjan Keeman
8e5cfa7e0a Fix annotations cache folder path
Argument 2 sets a cache path since e59f0e0fd7
2017-02-07 21:48:38 +01:00
Nicolas Grekas
f90f53e915 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap 2017-02-07 17:17:32 +01:00
Nicolas Grekas
a960c761d1 [Config][DI] Add ComposerResource to track runtime + vendors 2017-02-07 15:42:58 +01:00
Nicolas Grekas
c346f2a8aa bug #21542 [VarDumper] Fixed dumping of terminated generator (lyrixx)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fixed dumping of terminated generator

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

Commits
-------

c5094a0 [VarDumper] Fixed dumping of terminated generator
2017-02-06 17:43:45 +01:00
Nicolas Grekas
7f79a50e53 bug #21292 Ignore missing 'debug.file_link_formatter' service in Debug bundle (core23)
This PR was merged into the 3.2 branch.

Discussion
----------

Ignore missing 'debug.file_link_formatter' service in Debug bundle

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

The new `HtmlDumper` requires the `debug.file_link_formatter` service which isn't available in older versions of the `DebugBundle`

Commits
-------

2201fbe Ignore missing 'debug.file_link_formatter' service in Debug bundle
2017-02-06 17:40:48 +01:00
core23
2201fbe28b Ignore missing 'debug.file_link_formatter' service in Debug bundle 2017-02-06 17:33:05 +01:00
Grégoire Pineau
c5094a05a4 [VarDumper] Fixed dumping of terminated generator 2017-02-06 16:04:49 +01:00
Fabien Potencier
bff782c2af bumped Symfony version to 3.2.4 2017-02-06 14:33:41 +01:00
Fabien Potencier
6306409b38 Merge pull request #21544 from fabpot/release-3.2.3
released v3.2.3
2017-02-06 14:15:43 +01:00
Fabien Potencier
d66d98eeb7 updated VERSION for 3.2.3 2017-02-06 14:15:19 +01:00
Fabien Potencier
563a86356c updated CHANGELOG for 3.2.3 2017-02-06 14:15:13 +01:00
Fabien Potencier
013e4053f7 bumped Symfony version to 2.8.18 2017-02-06 14:13:46 +01:00
Fabien Potencier
c423a13a03 Merge pull request #21543 from fabpot/release-2.8.17
released v2.8.17
2017-02-06 13:47:48 +01:00
Fabien Potencier
4ddbaecea6 updated VERSION for 2.8.17 2017-02-06 13:47:36 +01:00
Fabien Potencier
1f5ebab161 updated CHANGELOG for 2.8.17 2017-02-06 13:47:30 +01:00
Fabien Potencier
554b1a748f Merge branch '3.2'
* 3.2:
  [Form] fixed tests
2017-02-06 13:27:36 +01:00
Fabien Potencier
6516a20e11 Merge branch '2.8' into 3.2
* 2.8:
  [Form] fixed tests
2017-02-06 13:27:26 +01:00
Fabien Potencier
9650b50436 [Form] fixed tests 2017-02-06 13:27:13 +01:00
Fabien Potencier
d3673a83ae bumped Symfony version to 2.7.25 2017-02-06 13:22:53 +01:00
Fabien Potencier
8a9cc9b76f Merge pull request #21541 from fabpot/release-2.7.24
released v2.7.24
2017-02-06 13:06:15 +01:00
Fabien Potencier
6fce88bde3 updated VERSION for 2.7.24 2017-02-06 13:06:02 +01:00
Fabien Potencier
1585dce6b6 update CONTRIBUTORS for 2.7.24 2017-02-06 13:05:55 +01:00
Fabien Potencier
91270b2572 updated CHANGELOG for 2.7.24 2017-02-06 13:05:50 +01:00
Fabien Potencier
6ccdcdc330 Merge branch '3.2'
* 3.2:
  Remove 3.1 from PR template
  fixed test name
  [Cache] Fix class exists checks in PhpArrayAdapter
  Casting TableCell value to string.
  [FrameworkBundle] fixed custom domain for translations in php templates
  [Form] Fixed DateType format option
  [Config] Fix checking cache for non existing meta file
2017-02-06 13:04:42 +01:00
Fabien Potencier
cfc6bafed2 Merge branch '2.8' into 3.2
* 2.8:
  Remove 3.1 from PR template
  fixed test name
  Casting TableCell value to string.
  [FrameworkBundle] fixed custom domain for translations in php templates
  [Form] Fixed DateType format option
  [Config] Fix checking cache for non existing meta file
2017-02-06 13:04:21 +01:00
Fabien Potencier
47a8b4dc58 Merge branch '2.7' into 2.8
* 2.7:
  Remove 3.1 from PR template
  fixed test name
  Casting TableCell value to string.
  [FrameworkBundle] fixed custom domain for translations in php templates
  [Form] Fixed DateType format option
2017-02-06 13:04:06 +01:00
Roland Franssen
fdb2140b81 [DI] Deprecate (un)setting pre-defined services 2017-02-05 11:30:27 +01:00