Commit Graph

29746 Commits

Author SHA1 Message Date
Nicolas Grekas
0be9ea8ba1 [EventDispatcher] Fix abstract event subscribers registration 2017-02-26 09:54:11 +01:00
Fabien Potencier
e58be70aca Merge branch '3.2'
* 3.2:
  Revamped the README file
  Fix missing namespace in AddConstraintValidatorPassTest
  [SecurityBundle] simplified code
  [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-24 05:59:04 -08:00
Fabien Potencier
346eacd1a0 Merge branch '2.8' into 3.2
* 2.8:
  Revamped the README file
  Fix missing namespace in AddConstraintValidatorPassTest
  [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-24 05:58:52 -08:00
Fabien Potencier
de95fd5fe5 Merge branch '2.7' into 2.8
* 2.7:
  Revamped the README file
  Fix missing namespace in AddConstraintValidatorPassTest
  [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-24 05:57:05 -08:00
Fabien Potencier
ffe3ab1341 minor #21744 Revamped the README file (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #21744).

Discussion
----------

Revamped the README file

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

Here is a before/after comparison image:

![before-after-readme](https://cloud.githubusercontent.com/assets/73419/23294444/cb001e9a-fa6b-11e6-88f2-a8449470fb4e.png)

Commits
-------

c7d30ca486 Revamped the README file
2017-02-24 05:55:45 -08:00
Javier Eguiluz
c7d30ca486 Revamped the README file 2017-02-24 05:55:42 -08:00
Nicolas Grekas
fe5a30880e minor #21740 Fix missing namespace in test (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix missing namespace in test

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes

Commits
-------

1e9ca7b Fix missing namespace in AddConstraintValidatorPassTest
2017-02-23 23:10:03 +01:00
Robin Chalas
1e9ca7bead Fix missing namespace in AddConstraintValidatorPassTest 2017-02-23 22:30:07 +01:00
Fabien Potencier
518d02d565 fixed typo 2017-02-23 09:15:17 -08:00
Fabien Potencier
5d3561a1fc bug #21736 [Config] fixed glob file loader when there is an exception (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config] fixed glob file loader when there is an exception

| 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

Fixes a typo. When importing a glob, we definitely want to have errors like syntax errors in a YAML file.

Commits
-------

d1b6601612 [Config] fixed glob file loader when there is an exception
2017-02-23 08:39:57 -08:00
Fabien Potencier
d1b6601612 [Config] fixed glob file loader when there is an exception 2017-02-23 08:37:29 -08:00
Nicolas Grekas
71fba9608b minor #21729 [UPGRADE guide] Merged duplicated SecurityBundle section and ordered alphabetically (wouterj)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[UPGRADE guide] Merged duplicated SecurityBundle section and ordered alphabetically

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

Commits
-------

67c3107 Merge duplicated SecurityBundle section and order alphabetically
2017-02-23 13:13:43 +01:00
Wouter J
67c3107afa Merge duplicated SecurityBundle section and order alphabetically 2017-02-23 12:35:33 +01:00
Fabien Potencier
a7db2bbe6c minor #21709 [SecurityBundle] simplified code (fabpot)
This PR was merged into the 3.2 branch.

Discussion
----------

[SecurityBundle] simplified code

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

Simplified code for 3.2 (followup to #21679)

Commits
-------

512742be52 [SecurityBundle] simplified code
2017-02-22 18:45:41 -08:00
Fabien Potencier
512742be52 [SecurityBundle] simplified code 2017-02-22 17:31:21 -08:00
Fabien Potencier
d69bb30400 feature #21718 [SecurityBundle] Don't normalize username of in-memory users (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] Don't normalize username of in-memory users

| 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

It's common to have e.g. emails as keys in `security.providers.in_memory.users` since keys are username. Actually they are normalized so `foo-bar@gmail.com` becomes `foo_bar@gmail.com` and authentication fails unexpectedly.

Commits
-------

8d03332726 [SecurityBundle] Don't normalize keys of in-memory users
2017-02-22 14:26:24 -08:00
Fabien Potencier
fcb83a8ad0 bug #21722 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported (maidmaid)
This PR was squashed before being merged into the 2.7 branch (closes #21722).

Discussion
----------

[ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported

| 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

If we add expr. function after first eval/compile like this:

```php
$el = new ExpressionLanguage();
$el->evaluate('1 + 1');
$el->addFunction(new ExpressionFunction('fn', function () {}, function () {}));
$el->evaluate('fn()');
```
A ``SyntaxError`` is thrown that says ``The function "fn" does not exist around position 1.``. It's the same bug with ``$el->compile('fn()')``.

This PR fixes this (duplicate of #21098 that was closed).

Commits
-------

e305369f98 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-22 14:24:24 -08:00
Dany Maillard
e305369f98 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported 2017-02-22 14:24:23 -08:00
Robin Chalas
8d03332726 [SecurityBundle] Don't normalize keys of in-memory users 2017-02-22 18:37:26 +01:00
Fabien Potencier
99f60dcbd7 feature #20107 Added a build method to the kernel to replace Bundle::build() (iltar)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Added a build method to the kernel to replace Bundle::build()

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

Adds a DX method to make it easier to omit using an AppBundle in your application.

**Old situation**

``` php
// src/AppBundle.php
class AppBundle extends Bundle
{
    public function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(new SomeCompilerPass());
        $container->addCompilerPass(new AnotherCompilerPass());
        $container->addCompilerPass(new YetAnotherCompilerPass());
    }
}

// src/DependencyInjection/AppExtension.php
class AppExtension extends Extension
{
    public function load(array $config, ContainerBuilder $container)
    {
        $binary = ExecutableResolver::getPath($container->getParameter('kernel.root_dir').'/../');
        $snappyConfig = ['pdf' => ['binary' => realpath($binary)]];

        $container->prependExtensionConfig('knp_snappy', $snappyConfig);
    }
}
```

**New situation**

``` php
// rm src/AppBundle.php
// rm src/DependencyInjection/AppExtension.php

// app/AppKernel.php
class AppKernel extends Kernel
{
    protected function build(ContainerBuilder $container)
    {
        $binary = ExecutableResolver::getPath($container->getParameter('kernel.root_dir').'/../');
        $snappyConfig = ['pdf' => ['binary' => realpath($binary)]];

        $container->prependExtensionConfig('knp_snappy', $snappyConfig);
        $container->addCompilerPass(new SomeCompilerPass());
        $container->addCompilerPass(new AnotherCompilerPass());
        $container->addCompilerPass(new YetAnotherCompilerPass());
    }
}
```

Still missing tests, wondering if worth adding in this state first.

Commits
-------

62e80fc0af Added build and class cache to kernel
2017-02-22 09:07:08 -08:00
Iltar van der Berg
62e80fc0af Added build and class cache to kernel 2017-02-22 09:57:32 +01:00
Fabien Potencier
0e92e0a7ba Merge branch '3.2'
* 3.2:
  fixed bad merge
2017-02-21 18:38:51 -08:00
Fabien Potencier
677df7b57b fixed bad merge 2017-02-21 18:38:39 -08:00
Fabien Potencier
f2378c1ffa Merge branch '3.2'
* 3.2:
  fix priority ordering of security voters
2017-02-21 18:36:24 -08:00
Fabien Potencier
d3b1363ff1 Merge branch '2.8' into 3.2
* 2.8:
  fix priority ordering of security voters
2017-02-21 18:35:49 -08:00
Fabien Potencier
8201e47e9f Merge branch '2.7' into 2.8
* 2.7:
  fix priority ordering of security voters
2017-02-21 18:34:30 -08:00
Fabien Potencier
b675d0518c bug #21679 [SecurityBundle] fix priority ordering of security voters (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] fix priority ordering of security voters

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

Could be updated in the `3.2` branch to make use of the `PriorityTaggedServiceTrait `.

Commits
-------

dcd19f3cf9 fix priority ordering of security voters
2017-02-21 18:27:23 -08:00
Nicolas Grekas
1d50688580 Merge branch '3.2'
* 3.2:
  fix phpunit bridge tests
2017-02-21 18:56:14 +01:00
Nicolas Grekas
2ee37c7dc3 fix phpunit bridge tests 2017-02-21 18:53:16 +01:00
Nicolas Grekas
1a9f9af1db Merge branch '3.2'
* 3.2:
  fix deps
2017-02-21 18:38:51 +01:00
Nicolas Grekas
ae1343b281 fix deps 2017-02-21 18:33:36 +01:00
Nicolas Grekas
6a8f9e84e6 Merge branch '3.2'
* 3.2:
  fix deps
  [DoctrineBridge] Fixed validating custom doctrine type columns
2017-02-21 17:23:07 +01:00
Nicolas Grekas
9ed5e8c184 Merge branch '2.8' into 3.2
* 2.8:
  fix deps
2017-02-21 17:21:09 +01:00
Nicolas Grekas
4584fad6ca fix deps 2017-02-21 17:18:52 +01:00
Fabien Potencier
fbcd227763 bug #21656 [DoctrineBridge] Fixed validating custom doctrine type columns (dmaicher)
This PR was merged into the 3.2 branch.

Discussion
----------

[DoctrineBridge] Fixed validating custom doctrine type columns

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

This fixes #21619 by not assuming the invalid `$value` is a Doctrine entity if its an object

Commits
-------

ad59370241 [DoctrineBridge] Fixed validating custom doctrine type columns
2017-02-21 07:00:37 -08:00
Nicolas Grekas
4c95d19c2d Merge branch '3.2'
* 3.2:
  Use PHPUnit 6.0 on PHP 7.* test lines
2017-02-21 15:51:50 +01:00
Nicolas Grekas
442cf595be Merge branch '2.8' into 3.2
* 2.8:
  Use PHPUnit 6.0 on PHP 7.* test lines
2017-02-21 15:41:00 +01:00
Nicolas Grekas
5db127bf1b Merge branch '2.7' into 2.8
* 2.7:
  Use PHPUnit 6.0 on PHP 7.* test lines
2017-02-21 15:21:52 +01:00
Nicolas Grekas
9a2122dea7 minor #21698 Use PHPUnit 6.0 on PHP 7.* test lines (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Use PHPUnit 6.0 on PHP 7.* test lines

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

Commits
-------

96ecd3c Use PHPUnit 6.0 on PHP 7.* test lines
2017-02-21 15:08:13 +01:00
Nicolas Grekas
96ecd3c798 Use PHPUnit 6.0 on PHP 7.* test lines 2017-02-21 14:43:45 +01:00
Nicolas Grekas
3064facaea Fix phpunit-bridge blacklist 2017-02-21 13:59:34 +01:00
Nicolas Grekas
ef0fcb7ff1 fix 2017-02-21 12:58:05 +01:00
Nicolas Grekas
ba8abcb5d0 Fix 5.3 compat of SymfonyTestsListener 2017-02-21 12:48:23 +01:00
Nicolas Grekas
6c0d5c90e4 feature #21694 [Bridge/PhpUnit] Add PHPUnit 6 support (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Bridge/PhpUnit] Add PHPUnit 6 support

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

This PR makes our phpunit bridge compatible with all namespaced versions of phpunit, from 4.8.35 to 6.
It takes another approach than #21668 and #21221, thus replaces them.
Tested locally : tests pass when using phpunit 5.7, and fails with v6.0 because our own test suite is not yet compatible with it - but at least it runs nice.
If this were handled as usual Symfony component, we would consider some changes to be BC breaks. But in this specific case - a phpunit bridge - it makes no sense to me to apply the bc policy here. I added `@final` and `@internal` annotations to make this clearer.

Commits
-------

9e0745c [Bridge/PhpUnit] Add PHPUnit 6 support
2017-02-21 11:50:26 +01:00
Nicolas Grekas
a1dbe041f7 minor #21697 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 (peterrehm)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Refactored other PHPUnit method calls to work with namespaced PHPUnit 6

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

Continued work to make Symfony PHPUnit 6 compatible.

Commits
-------

e9f3faf Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
2017-02-21 11:23:26 +01:00
Peter Rehm
e9f3faf840 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 2017-02-21 11:20:16 +01:00
Nicolas Grekas
e28f6b44e5 Merge branch '3.2'
* 3.2:
  Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
  Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
  Further refactorings to PHPUnit namespaces
  resolve parameters in definition classes
2017-02-21 11:07:34 +01:00
Nicolas Grekas
94146f9b09 minor #21696 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 (peterrehm)
This PR was squashed before being merged into the 3.2 branch (closes #21696).

Discussion
----------

Refactored other PHPUnit method calls to work with namespaced PHPUnit 6

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

Continued work to make Symfony PHPUnit 6 compatible.

Commits
-------

9eeec8d Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
2017-02-21 11:04:39 +01:00
Peter Rehm
9eeec8d776 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 2017-02-21 11:04:38 +01:00
Nicolas Grekas
5fc3589381 Merge branch '2.8' into 3.2
* 2.8:
  Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
  Further refactorings to PHPUnit namespaces
  resolve parameters in definition classes
2017-02-21 10:12:04 +01:00