Commit Graph

29726 Commits

Author SHA1 Message Date
David Buchmann
2c5f8797b8 add missing changelog for deprecated strict attribute 2017-02-18 18:21:29 +01:00
Nicolas Grekas
33bae93a44 Merge branch '2.7' into 2.8
* 2.7:
  Update to PHPUnit namespaces
  remove translation data collector when not usable
2017-02-18 18:06:33 +01:00
Fabien Potencier
aff30bf8b0 minor #21659 Fix typo in process error message (kelunik)
This PR was submitted for the 3.1 branch but it was merged into the 3.2 branch instead (closes #21659).

Discussion
----------

Fix typo in process error message

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

Commits
-------

ec4a9a054b Fix typo in process error message
2017-02-18 08:32:28 -08:00
Niklas Keller
ec4a9a054b Fix typo in process error message 2017-02-18 08:32:28 -08:00
Fabien Potencier
d7e8aec54e feature #21578 [Translation] Added a lint:xliff command for XLIFF files (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21578).

Discussion
----------

[Translation] Added a lint:xliff command for XLIFF files

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

It works exactly the same as the `lint:yaml` command:

### Lint a single file
![single-file](https://cloud.githubusercontent.com/assets/73419/22821214/6b459454-ef7a-11e6-9320-029c22ab8803.png)

### Lint a bundle

![bundle](https://cloud.githubusercontent.com/assets/73419/22821215/6c2c0196-ef7a-11e6-9de0-a1816eede9b3.png)

### Get the result in JSON

![json](https://cloud.githubusercontent.com/assets/73419/22829844/bacaa68e-efa4-11e6-9341-0c3d4821c5c7.png)

Commits
-------

7609e440ff [Translation] Added a lint:xliff command for XLIFF files
2017-02-18 08:27:04 -08:00
Javier Eguiluz
7609e440ff [Translation] Added a lint:xliff command for XLIFF files 2017-02-18 08:27:02 -08:00
Fabien Potencier
5a6850b654 feature #21635 added support for glob loaders in Config (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

added support for glob loaders in Config

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

In #21270, we added the possibility to use glob patterns to import (not load) config files, but it was restricted to the container. The same feature could be useful (and I actually have a use case) for the routing.

So, this PR moves the logic to the Config component. It also adds a new `GlobFileLoader` class that allows to load glob patterns (not just import them as in #21270).

Last, but not least, the new glob file loader is registered in both the routing and the container default loaders.

Here is a simple, but powerful example, using the Symfony micro kernel (actually, this is a snippet from the Kernel used in Symfony Flex :)):

```php
<?php

namespace Symfony\Flex;

use Symfony\Component\HttpKernel\Kernel as BaseKernel;

class Kernel extends BaseKernel
{
    use MicroKernelTrait;

    const CONFIG_EXTS = '.{php,xml,yaml,yml}';

    // ...

    protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
    {
        $confDir = dirname($this->getRootDir()).'/etc';
        $loader->import($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob');
        $loader->import($confDir.'/packages/'.$this->getEnvironment().'/**/*'.self::CONFIG_EXTS, 'glob');
        $loader->import($confDir.'/container'.self::CONFIG_EXTS, 'glob');
    }

    protected function configureRoutes(RouteCollectionBuilder $routes)
    {
        $confDir = dirname($this->getRootDir()).'/etc';
        $routes->import($confDir.'/routing/*'.self::CONFIG_EXTS, '/', 'glob');
        $routes->import($confDir.'/routing/'.$this->getEnvironment().'/**/*'.self::CONFIG_EXTS, '/', 'glob');
        $routes->import($confDir.'/routing'.self::CONFIG_EXTS, '/', 'glob');
    }
}
```

Commits
-------

025585d5e8 added support for glob loaders in Config
2017-02-18 08:22:04 -08:00
Fabien Potencier
025585d5e8 added support for glob loaders in Config 2017-02-18 08:06:39 -08:00
Fabien Potencier
c9684ad31f minor #21564 Update to PHPUnit namespaces (peterrehm)
This PR was squashed before being merged into the 2.7 branch (closes #21564).

Discussion
----------

Update to PHPUnit namespaces

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

Replaces #21540

@nicolas-grekas Is the update of the cache-id like this sufficient? Do we maybe have to specifiy 4.8.35 in simple-phpunit?

Commits
-------

ddd2dff9b2 Update to PHPUnit namespaces
2017-02-18 08:02:55 -08:00
Peter Rehm
ddd2dff9b2 Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
Nicolas Grekas
6f578ee514 [DI] Bug in autowiring collisions detection 2017-02-18 12:32:57 +01:00
Nicolas Grekas
8c6ad5bfdc feature #21654 [PropertyInfo] Use iterators for PropertyInfoExtractor (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[PropertyInfo] Use iterators for PropertyInfoExtractor

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

Most of the time, when using the cache, the property info extractors are not used: the new iterator feature looks perfect to prevent their instantiation.

Commits
-------

38523a9 [PropertyInfo] Use iterators for PropertyInfoExtractor
2017-02-18 09:12:57 +01:00
Nicolas Grekas
aaa4376ddb feature #21655 [PropertyInfo] Make classes final (GuilhemN)
This PR was squashed before being merged into the 3.3-dev branch (closes #21655).

Discussion
----------

[PropertyInfo] Make classes final

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

The classes of the PropertyInfo component do not provide extension points, so imo it's better to make them final in 4.0.

Commits
-------

313fec9 [PropertyInfo] Make classes final
2017-02-18 09:10:32 +01:00
Guilhem N
313fec952f [PropertyInfo] Make classes final 2017-02-18 09:10:28 +01:00
Nicolas Grekas
d08ba63798 Fix ResolveDefinitionInheritancePass 2017-02-17 23:34:15 +01:00
Guilhem N
38523a9736
[PropertyInfo] Use iterators for PropertyInfoExtractor 2017-02-17 20:38:32 +01:00
Fabien Potencier
d47571f5ec feature #21530 [DependencyInjection] Add "instanceof" section for local interface-defined configs (nicolas-grekas, dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Add "instanceof" section for local interface-defined configs

| 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 is a direction follow up of #21357 on which we're working together with @dunglas. From the description posted there:

There is some work being done to include features of [DunglasActionBundle](https://github.com/dunglas/DunglasActionBundle) in the core of Symfony. The goal of all those PRs is to improve the developper experience of the framework, allow to develop faster while preserving all benefits of using Symfony (strictness, modularity, extensibility...) and make it easier to learn for newcomers.

This PR implements the tagging feature of ActionBundle in a more generic way. It will help to get rid of `AppBundle` in the the standard edition and to register automatically some classes including commands.

Here is an example of config (that can be embedded in the standard edition) to enable those features:

```yaml
# config/services.yml
services:
    _defaults:
        autowire: ['get*', 'set*'] # Enable constructor, getter and setter autowiring for all services defined in this file

    _instanceof:
        Symfony\Component\Console\Command: # Add the console.command tag to all services defined in this file having this type
            tags: ['console.command']
            # Set tags but also other settings like "public", "autowire" or "shared" here

        Twig_ExtensionInterface:
            tags: ['twig.extension']

        Symfony\Component\EventDispatcher\EventSubscriberInterface:
            tags: ['kernel.event_subscriber']

    App\: # Register all classes in the src/Controller directory as services
        psr4: ../src/{Controller,Command,Twig,EventSubscriber}
```

It's part of our 0 config initiative: controllers and commands will be automatically registered as services and "autowired", allowing the user to create and inject new services without having to write a single line of YAML or XML.
When refactoring changes are also automatically updated and don't require to update config files. It's a big win for rapid application development and prototyping.

Of course, this is fully compatible with the actual way of defining services and it's possible to switch (or mix) approaches very easily. It's even possible to start prototyping using 0config features then switch to explicit services definitions when the project becomes mature.

Commits
-------

773eca7794 [DependencyInjection] Tests + refacto for "instanceof" definitions
2fb601983f [DependencyInjection] Add "instanceof" section for local interface-defined configs
2017-02-17 10:45:15 -08:00
Kévin Dunglas
773eca7794 [DependencyInjection] Tests + refacto for "instanceof" definitions 2017-02-17 19:36:36 +01:00
Nicolas Grekas
2fb601983f [DependencyInjection] Add "instanceof" section for local interface-defined configs 2017-02-17 19:36:34 +01:00
Christian Schmidt
87ffaf2b77 Bump version number 2017-02-17 19:13:16 +01:00
Fabien Potencier
7259d4e649 feature #21643 [Yaml] deprecate parsing mappings without keys (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Yaml] deprecate parsing mappings without keys

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

Commits
-------

c02dca3483 [Yaml] deprecate parsing mappings without keys
2017-02-17 08:15:48 -08:00
Fabien Potencier
9d2bbc6dbe bug #21637 [FrameworkBundle] remove translation data collector when not usable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove translation data collector when not usable

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

Commits
-------

303bb73971 remove translation data collector when not usable
2017-02-17 08:12:20 -08:00
Fabien Potencier
2fee5bc0cc minor #21645 Minor typo fix messsagesData -> messagesData (jverdeyen)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #21645).

Discussion
----------

Minor typo fix messsagesData -> messagesData

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

Commits
-------

7efb4f0bd1 Minor typo fix messsagesData -> messagesData
2017-02-17 08:10:57 -08:00
Joeri Verdeyen
7efb4f0bd1 Minor typo fix messsagesData -> messagesData 2017-02-17 08:10:57 -08:00
Christian Flothmann
c02dca3483 [Yaml] deprecate parsing mappings without keys 2017-02-17 16:52:41 +01:00
Christophe Coevoet
0a3cd973ae Merge branch '3.2'
* 3.2:
  consistently parse omitted keys as the colon
  bumped Symfony version to 3.2.5
  updated VERSION for 3.2.4
  update CONTRIBUTORS for 3.2.4
  updated CHANGELOG for 3.2.4
2017-02-17 12:56:33 +01:00
Christophe Coevoet
6ea510f7b4 bug #21647 [Yaml] consistently parse omitted keys as the colon (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Yaml] consistently parse omitted keys as the colon

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

Before the changes made in #20335, an empty mapping key was parsed as `:`. This behaviour is not correct according to the spec, but we should keep the parser behaviour consistent to not break backward compatibility (I will deprecate it in a different PR on `master`).

Commits
-------

e2ebecc0cb consistently parse omitted keys as the colon
2017-02-17 12:55:10 +01:00
Christian Flothmann
e2ebecc0cb consistently parse omitted keys as the colon 2017-02-17 11:55:39 +01:00
Nicolas Grekas
444b37d575 bug #21639 [DI] Set getter edges as lazy (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Set getter edges as lazy

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

Fixes tests

Commits
-------

279f6a2 [DI] Set getter edges as lazy
2017-02-17 07:19:49 +01:00
Fabien Potencier
fb8abdc9fc bumped Symfony version to 3.2.5 2017-02-16 16:56:16 -08:00
Fabien Potencier
141569be5b Merge pull request #21640 from fabpot/release-3.2.4
released v3.2.4
2017-02-16 16:00:43 -08:00
Fabien Potencier
d6e241da8f updated VERSION for 3.2.4 2017-02-16 15:59:56 -08:00
Fabien Potencier
2a3f237685 update CONTRIBUTORS for 3.2.4 2017-02-16 15:59:54 -08:00
Fabien Potencier
cbb0328b51 updated CHANGELOG for 3.2.4 2017-02-16 15:59:47 -08:00
Fabien Potencier
d7aec48fa8 Merge branch '3.2'
* 3.2:
  Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
  Static code analysis with Php Inspections (EA Extended)
  [VarDumper] Added missing persistent stream cast
  remove unused translation file
  reverted usage of isNan
2017-02-16 14:50:29 -08:00
Fabien Potencier
ea12123bcf Merge branch '2.8' into 3.2
* 2.8:
  Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
  Static code analysis with Php Inspections (EA Extended)
  [VarDumper] Added missing persistent stream cast
2017-02-16 14:46:52 -08:00
Fabien Potencier
f53672f82b Merge branch '2.7' into 2.8
* 2.7:
  Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
  Static code analysis with Php Inspections (EA Extended)
  [VarDumper] Added missing persistent stream cast
2017-02-16 14:43:37 -08:00
Nicolas Grekas
279f6a2512 [DI] Set getter edges as lazy 2017-02-16 23:39:11 +01:00
Fabien Potencier
68d6415955 Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
This reverts commit 3441b1586f, reversing
changes made to d1f4cb27fd.
2017-02-16 14:39:07 -08:00
Fabien Potencier
a5c099c829 minor #21537 Static code analysis with Php Inspections (EA Extended) (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #21537).

Discussion
----------

Static code analysis with Php Inspections (EA Extended)

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

- Unnecessary proxy methods and methods duplicating  parents ones removed;
- Type casings instead of PHP4 functions;
- Usage of copy instead of file combining file get/put contents;
- One time use variables cleaned up;
- Superfluous functions calls in loop termination conditions fixed;

Commits
-------

3feeca74d0 Static code analysis with Php Inspections (EA Extended)
2017-02-16 14:27:03 -08:00
Vladimir Reznichenko
3feeca74d0 Static code analysis with Php Inspections (EA Extended) 2017-02-16 14:26:15 -08:00
Christian Flothmann
303bb73971 remove translation data collector when not usable 2017-02-16 23:20:46 +01:00
Fabien Potencier
8f65fc7ec1 minor #21636 fixed test (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

fixed test

Commits
-------

2d67c0653e fixed test
2017-02-16 13:52:43 -08:00
Fabien Potencier
2d67c0653e fixed test 2017-02-16 13:29:17 -08:00
Fabien Potencier
38490dac21 bug #21634 [VarDumper] Added missing persistent stream cast (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Added missing persistent stream cast

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

cab9f7eb8f [VarDumper] Added missing persistent stream cast
2017-02-16 11:29:17 -08:00
Grégoire Pineau
cab9f7eb8f [VarDumper] Added missing persistent stream cast 2017-02-16 18:03:48 +01:00
Fabien Potencier
1639edbb19 minor #21633 [Security] remove unused translation file (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Security] remove unused translation file

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

With Symfony 3, translation files have been moved to the Security Core
component.

Commits
-------

ea0c1cd6e7 remove unused translation file
2017-02-16 09:01:17 -08:00
Christian Flothmann
ea0c1cd6e7 remove unused translation file
With Symfony 3, translation files have been moved to the Security Core
component.
2017-02-16 17:54:26 +01:00
Fabien Potencier
c24c4d544d reverted usage of isNan 2017-02-16 08:34:18 -08:00
Fabien Potencier
c5bdfc542d minor #21631 [DI] Don't try to instantiate reflection class if it doesn't exist (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Don't try to instantiate reflection class if it doesn't exist

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Introduced in https://github.com/symfony/symfony/pull/21419 so master only.
It breaks on bundles that ~~do not use the convention for naming their `Configuration`~~ do not have configuration, e.g. SecurityBundle's FirewallEntryPointExtension for which tests are actually broken (see travis).

Commits
-------

f9b917a60a [DI] Don't instantiate unexisting reflection class
2017-02-16 07:56:23 -08:00