Commit Graph

10053 Commits

Author SHA1 Message Date
Julien Brochet dacd8aa5e3 tweaked UPGRADE file 2012-06-16 19:50:09 +03:00
Fabien Potencier bc147d3492 merged branch aerialls/fs_exists (PR #4586)
Commits
-------

38cad9d [Filesystem] added exists method

Discussion
----------

[Filesystem] added exists method

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:

---------------------------------------------------------------------------

by travisbot at 2012-06-15T16:29:20Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1629204) (merged ebd1a4c6 into f881d282).

---------------------------------------------------------------------------

by sstok at 2012-06-16T09:05:48Z

Shouldn't it be better to stop on the first failure? as all the others files will be false automatically.

---------------------------------------------------------------------------

by stof at 2012-06-16T10:21:49Z

indeed. We should avoid unnecessary filesystem IO by returning false as soon as it is known

---------------------------------------------------------------------------

by aerialls at 2012-06-16T11:55:24Z

Indeed it's better this way. fixed!

---------------------------------------------------------------------------

by travisbot at 2012-06-16T12:01:16Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1634615) (merged 8d98f417 into 76b2ed46).
2012-06-16 18:35:22 +02:00
Fabien Potencier 1ac2e9c217 merged branch shieldo/fix_docblock_typo (PR #4590)
Commits
-------

bfe5e58 [Form] fixed typo in docblock

Discussion
----------

[Form] fixed typo in docblock

---------------------------------------------------------------------------

by travisbot at 2012-06-15T20:03:08Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1630865) (merged bfe5e585 into f881d282).
2012-06-16 18:22:26 +02:00
Fabien Potencier 96c2a2711d merged branch henrikbjorn/editorconfig (PR #4595)
Commits
-------

b6001cf Add EditorConfig File

Discussion
----------

Add EditorConfig File

http://editorconfig.org is a way to configure the different editor
configurations.

This could help some who develop with ruby and php where ruby uses 2
spaces and we use 4. Or where some develop for Drupal where they also
use 2 spaces but 4 for contributing to Symfony.

---------------------------------------------------------------------------

by travisbot at 2012-06-16T12:14:54Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1634672) (merged b6001cf5 into 76b2ed46).
2012-06-16 18:16:19 +02:00
Fabien Potencier f65ade24b2 fixed order of translation files registration 2012-06-16 18:09:40 +02:00
Julien Brochet 38cad9d415 [Filesystem] added exists method 2012-06-16 14:10:34 +02:00
Henrik Bjørnskov b6001cf57d Add EditorConfig File
http://editorconfig.org is a way to configure the different editor
configurations.

This could help some who develop with ruby and php where ruby uses 2
spaces and we use 4. Or where some develop for Drupal where they also
use 2 spaces but 4 for contributing to Symfony.
2012-06-16 14:08:15 +02:00
Fabien Potencier 76b2ed46d6 moved validator translation files to the Form and Validator components to make them reusable (closes #4588) 2012-06-16 13:31:07 +02:00
Douglas Greenshields bfe5e5856a [Form] fixed typo in docblock 2012-06-15 20:56:24 +01:00
Fabien Potencier f881d28240 [Validator] avoid to get information from the cache when we already have them locally (also fixes usage of this class when not using a cache) 2012-06-15 17:30:46 +02:00
Fabien Potencier 7c91ee5755 merged branch shieldo/fix_docblock (PR #4579)
Commits
-------

9e71b42 [Validator] fixed typo in docblock

Discussion
----------

[Validator] fixed typo in docblock
2012-06-14 13:31:33 +02:00
Douglas Greenshields 9e71b426c4 [Validator] fixed typo in docblock 2012-06-14 12:25:16 +01:00
Fabien Potencier 6448fd0772 [FrameworkBundle] added a missing attribute in XSD 2012-06-14 11:31:07 +02:00
Fabien Potencier c07e9163a6 merged branch SamsonIT/remove_symlink_on_windows (PR #4565)
Commits
-------

fc3ebb8 [FileSystem] added if-windows check
0b58828 [FileSystem] remove symlinks under windows

Discussion
----------

[FileSystem] remove symlinks under windows

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

When installing assets on Windows with symlink, the following error occurs when symlink-folders already exist. This PR makes sure symlink-folders are removed under Windows.

```
$ app/console assets:install web --symlink
Installing assets using the symlink option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework

  [ErrorException]
  Warning: symlink(): Cannot create symlink, error code(1314) in C:\workspace\erik\roompot\vendor\symfony\symfony\src\Symfony\Component\Filesystem\Filesystem.php line 167

assets:install [--symlink] [--relative] target
```

---------------------------------------------------------------------------

by travisbot at 2012-06-13T09:00:42Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1608541) (merged 0b58828b into 37550d23).

---------------------------------------------------------------------------

by travisbot at 2012-06-13T14:39:32Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611288) (merged fc3ebb8c into 0f67ca88).
2012-06-13 16:41:41 +02:00
Erik Trapman fc3ebb8c65 [FileSystem] added if-windows check 2012-06-13 16:33:54 +02:00
Fabien Potencier 0f67ca88c1 [HttpFoundation] fixed StreamedResponse with HEAD as a method (closes #4502) 2012-06-13 16:21:50 +02:00
Fabien Potencier 6efc00d39d merged branch kriswallsmith/head-streamed-response-err (PR #4502)
Commits
-------

280fc05 failing test for HEAD StreamedResponse requests

Discussion
----------

[WIP] failing test for HEAD StreamedResponse requests

An exception is thrown if you prepare a StreamedResponse with a HEAD request. I'm not sure what the right fix is…

---------------------------------------------------------------------------

by kriswallsmith at 2012-06-06T15:51:04Z

The Travis build is here: http://travis-ci.org/#!/symfony/symfony/builds/1543352

---------------------------------------------------------------------------

by sstok at 2012-06-08T11:07:31Z

Well a HEAD can't/shouldn't be streamed as it doesn't contain a body so what is the real problem here?

---------------------------------------------------------------------------

by kriswallsmith at 2012-06-08T16:14:18Z

@sstok the response is prepared by the ResponseListener regardless of request method

---------------------------------------------------------------------------

by adrienbrault at 2012-06-08T19:41:27Z

Shouldn't the test at least assert something ?
2012-06-13 16:17:27 +02:00
Fabien Potencier 6baa2b19c4 merged branch stof/change_typehint (PR #4569)
Commits
-------

92e028f Changed the typehint in the LocaleListener

Discussion
----------

Changed the typehint in the LocaleListener

The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.

---------------------------------------------------------------------------

by travisbot at 2012-06-13T14:12:10Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611055) (merged 92e028f1 into 1d7501db).
2012-06-13 16:13:52 +02:00
Christophe Coevoet 92e028f1f0 Changed the typehint in the LocaleListener
The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.
2012-06-13 16:06:22 +02:00
Fabien Potencier 1d7501dbc4 merged branch stealth35/fs_micropt (PR #4568)
Commits
-------

abab929 Prevent empty value in isAbsolutePath, use rtrim in mirror

Discussion
----------

Prevent empty value in isAbsolutePath, use rtrim in mirror

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/stealth35/symfony.png?branch=fs_micropt)](http://travis-ci.org/stealth35/symfony)

---------------------------------------------------------------------------

by travisbot at 2012-06-13T13:39:39Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1610607) (merged abab9295 into 3ab9a6ee).
2012-06-13 16:04:04 +02:00
Fabien Potencier 3ab9a6eec5 [Yaml] fixed string parsing (closes #4561) 2012-06-13 14:57:32 +02:00
stealth35 abab929516 Prevent empty value in isAbsolutePath, use rtrim in mirror 2012-06-13 14:39:17 +02:00
Fabien Potencier c55ddb9276 merged branch merk/patch-2 (PR #4561)
Commits
-------

4ac48d9 Added failing YAML inline string to tests

Discussion
----------

Added failing YAML inline string to tests

#4042 introduced a regression for yaml string parsing starting with a double colon (::). The below configuration syntax no longer works.

The addition to the tests generates a failure:

1) Symfony\Component\Yaml\Tests\InlineTest::testDump
Symfony\Component\Yaml\Exception\ParseException: Malformed inline YAML string ('::form_base.html.twig').

```yaml
# Twig Configuration
twig:
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%
    form:
        resources:
            - '::form_theme.html.twig'
            - 'InfiniteFormBundle::form_theme.html.twig'
```

---------------------------------------------------------------------------

by merk at 2012-06-12T22:15:42Z

For those having this trouble, locking composer at a specific symfony commit is the best option until it is fixed:

```
        "symfony/symfony": "dev-master#3bb7dc0bfa87b2d4db8262be65b5f49cc6a17a9b",
```

---------------------------------------------------------------------------

by travisbot at 2012-06-13T00:44:45Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1605553) (merged 4ac48d9e into 37550d23).
2012-06-13 14:06:46 +02:00
Erik Trapman 0b58828b3f [FileSystem] remove symlinks under windows 2012-06-13 10:40:20 +02:00
Fabien Potencier f5c99d2421 merged branch Tobion/eager (PR #4562)
Commits
-------

49e9957 added test to ensure matching is eager

Discussion
----------

[Routing] added test to ensure matching is eager

This just adds a passing test that wasn't covered yet, so we don't break this scenario in the future.

---------------------------------------------------------------------------

by travisbot at 2012-06-13T01:04:09Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1605738) (merged 49e99572 into 37550d23).
2012-06-13 08:18:21 +02:00
Fabien Potencier 47cd378f3d merged branch michelsalib/patch-2 (PR #4564)
Commits
-------

be637b5 Add upgrade for commit 0995b1f28b

Discussion
----------

Add upgrade for UserPassword moving from Bundle to Component

Just add some documentation in the Upgrade file about the `UserPassword` moving from Bundle to Component in commit 0995b1f28b.

---------------------------------------------------------------------------

by travisbot at 2012-06-13T01:23:49Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1606080) (merged be637b5c into 37550d23).
2012-06-13 08:16:27 +02:00
Michel Salib be637b5c23 Add upgrade for commit 0995b1f28b 2012-06-13 02:33:21 +03:00
Tim Nagel 4ac48d9e6c Added failing YAML inline string to tests 2012-06-13 08:07:25 +10:00
Fabien Potencier 37550d23c6 merged branch Burgov/enhance_form_error_message (PR #4557)
Commits
-------

b5cf337 [Form] Enhanced the form error message

Discussion
----------

[Form] Enhanced the form error message

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes

The error message on type mismatch is a bit obscure:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.

This commit changes it to:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of class Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of class Samson\Bundle\TRSBundle\Entity\Labour.

---------------------------------------------------------------------------

by travisbot at 2012-06-12T14:04:08Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601478) (merged 70a15df6 into 77839690).

---------------------------------------------------------------------------

by travisbot at 2012-06-12T14:06:31Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601507) (merged 12ec4dbd into 77839690).

---------------------------------------------------------------------------

by travisbot at 2012-06-12T14:13:09Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1601517) (merged b5cf337c into 77839690).

---------------------------------------------------------------------------

by bschussek at 2012-06-12T18:21:31Z

👍 Thanks!
2012-06-12 20:26:00 +02:00
Fabien Potencier ba8333a5b2 merged branch Burgov/builder_getparent_call_fix (PR #4556)
Commits
-------

1e83206 [Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore)

Discussion
----------

[Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore)

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

---------------------------------------------------------------------------

by travisbot at 2012-06-12T13:43:25Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601018) (merged 9826ca66 into 77839690).

---------------------------------------------------------------------------

by travisbot at 2012-06-12T13:51:33Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1601030) (merged 1e83206e into 77839690).

---------------------------------------------------------------------------

by bschussek at 2012-06-12T18:21:56Z

👍 Thanks again! :)
2012-06-12 20:25:45 +02:00
Fabien Potencier 28f6c5889b merged branch Seldaek/route-gen (PR #4534)
Commits
-------

31843cf [FrameworkBundle] Add info to config
d5ab4c1 [Routing] Update changelog
bbef65e [Routing] Add strict_parameters option to disable exceptions when a route generation fails due to an invalid parameter

Discussion
----------

[Routing] Add strict_parameters option to disable exceptions on invalid parameters

---------------------------------------------------------------------------

by travisbot at 2012-06-09T15:07:26Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577025) (merged bbef65e6 into 37678e17).

---------------------------------------------------------------------------

by stof at 2012-06-09T15:43:48Z

Seems good, but you forgot to update the Changelog of the component. Anyway, let's wait for @vicb's review as he knows the Routing component better than me.

---------------------------------------------------------------------------

by Seldaek at 2012-06-09T16:35:56Z

I updated the changelog

---------------------------------------------------------------------------

by travisbot at 2012-06-09T16:38:31Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577716) (merged d5ab4c1d into 37678e17).

---------------------------------------------------------------------------

by travisbot at 2012-06-11T10:10:37Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1590901) (merged a54e59e4 into 37678e17).

---------------------------------------------------------------------------

by travisbot at 2012-06-11T13:50:21Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1591926) (merged 31843cf0 into 0995b1f2).
2012-06-12 19:58:14 +02:00
Fabien Potencier ef41e308cc merged branch Tobion/phpdoc (PR #4539)
Commits
-------

680e732 [Routing] fix phpDoc

Discussion
----------

[Routing] fix phpDoc

using inheritdoc where possible and removing api tag when parent interface has one
as requested by stof and fabpot

---------------------------------------------------------------------------

by travisbot at 2012-06-09T16:14:53Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577508) (merged 0a44632a into f8a09db5).

---------------------------------------------------------------------------

by travisbot at 2012-06-10T19:36:25Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1585766) (merged 680e732a into 7bec0786).
2012-06-12 19:54:37 +02:00
Fabien Potencier 6e524e2863 merged branch jalliot/patch-4 (PR #4544)
Commits
-------

5d55726 [HttpFoundation] Added 308 as a valid redirect code

Discussion
----------

[HttpFoundation] Added 308 as a valid redirect code

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jalliot/symfony.png?branch=patch-4)](http://travis-ci.org/jalliot/symfony)
Fixes the following tickets: -
Todo: -

I think this should go on 2.0 but error code 308 has only been added in master...

---------------------------------------------------------------------------

by lyrixx at 2012-06-09T22:56:32Z

👍

---------------------------------------------------------------------------

by travisbot at 2012-06-10T06:27:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579937) (merged 5d557261 into 6266b72d).
2012-06-12 19:54:09 +02:00
Bart van den Burg b5cf337c9c [Form] Enhanced the form error message
The error message on type mismatch is a bit obscure:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.

This commit changes it to:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of Samson\Bundle\TRSBundle\Entity\Labour.
2012-06-12 16:02:18 +02:00
Bart van den Burg 1e83206e1d [Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore) 2012-06-12 15:07:40 +02:00
Fabien Potencier 77839690d9 changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384) 2012-06-12 14:23:19 +02:00
Fabien Potencier 7938cf9cb3 Merge branch '2.0'
* 2.0:
  changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384)
  Fixed typo in ConstraintValidatorFactoryInterface PHPDoc (2.0)
  MethodNotImplementedException -> MethodArgumentValueNotImplementedException
  Accept calling setLenient(false)
  bumped Symfony version to 2.0.16-DEV
  updated VERSION for 2.0.15
  update CONTRIBUTORS for 2.0.15
  updated CHANGELOG for 2.0.15
  updated vendors for 2.0.15
  [Yaml] Fixed double quotes escaping in Dumper.
2012-06-12 14:17:30 +02:00
Fabien Potencier ba16a51d37 changed getName() to name on all Reflection* object calls (fixes #4555, refs https://bugs.php.net/bug.php?id=61384) 2012-06-12 13:59:42 +02:00
Fabien Potencier 66ff06096c fixed an issue with session mocking in functional tests that do not start with a fresh session instance for each request (Silex for instance) 2012-06-12 10:24:12 +02:00
Fabien Potencier 171eecf679 [HttpFoundation] removed unused variable 2012-06-12 10:01:41 +02:00
Jordi Boggiano 31843cf0bf [FrameworkBundle] Add info to config 2012-06-11 14:26:01 +02:00
Fabien Potencier 0995b1f28b moved the UserPassword validator from the security bundle to the security component to make it reusable outside the full-stack framework 2012-06-10 21:58:31 +02:00
Fabien Potencier ea8ccf65ce [TwigBridge] updated composer file 2012-06-10 21:51:29 +02:00
Tobias Schultze 680e732a9e [Routing] fix phpDoc
using inheritdoc where possible and removing api tag when parent interface has one
2012-06-10 21:30:17 +02:00
Fabien Potencier 7bec0786be moved the Security Twig extension to the bridge 2012-06-10 19:01:52 +02:00
Fabien Potencier 9a5b275514 merged branch l3l0/add-options-resolver-test (PR #4545)
Commits
-------

83ff200 [OptionsResolver] Added options resolver tests to improve coverage

Discussion
----------

[OptionsResolver] Added options resolver tests

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes [![Build Status](https://secure.travis-ci.org/l3l0/symfony.png?branch=add-options-resolver-test)](http://travis-ci.org/l3l0/symfony)
License of the code: MIT

---------------------------------------------------------------------------

by travisbot at 2012-06-10T09:14:34Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1581756) (merged 320617b6 into 6266b72d).

---------------------------------------------------------------------------

by l3l0 at 2012-06-10T11:41:15Z

Fixed test names and replaced loop with iterator_to_array

---------------------------------------------------------------------------

by travisbot at 2012-06-10T11:44:49Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1582569) (merged 68588202 into 6266b72d).

---------------------------------------------------------------------------

by bschussek at 2012-06-10T12:38:47Z

Could you please also squash the commits into one and prefix the commit message with "[OptionsResolver]"?

---------------------------------------------------------------------------

by l3l0 at 2012-06-10T12:56:20Z

Commits squashed

---------------------------------------------------------------------------

by travisbot at 2012-06-10T13:01:35Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1583038) (merged 83ff200e into 6266b72d).

---------------------------------------------------------------------------

by bschussek at 2012-06-10T14:52:16Z

Thanks! @fabpot 👍
2012-06-10 17:13:41 +02:00
l3l0 83ff200e5f [OptionsResolver] Added options resolver tests to improve coverage
[OptionsResolver] Fixed test names and iterator test
2012-06-10 14:54:03 +02:00
Jordan Alliot 5d55726183 [HttpFoundation] Added 308 as a valid redirect code 2012-06-10 01:20:06 +03:00
Fabien Potencier 6266b72ddc merged branch dlsniper/wdt-session-metadata (PR #4428)
Commits
-------

8dd2af7 Added Session Metadata info to the Request section of the WDT

Discussion
----------

[WebProfilerBundle] Added Session Metadata info to the Request section of the WDT

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/dlsniper/symfony.png?branch=wdt-session-metadata)](http://travis-ci.org/dlsniper/symfony)
Fixes the following tickets: #4181
Todo: ~
License of the code: MIT
Documentation PR: ~

This PR adds some session metadata available into the WDT (Created, Last used, Lifetime specifically).
If you'd like to see more info then let me know.

---------------------------------------------------------------------------

by travisbot at 2012-05-26T21:11:56Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1443801) (merged 9b0b4383 into 9e951991).

---------------------------------------------------------------------------

by travisbot at 2012-05-26T21:24:27Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1443856) (merged 31858319 into 9e951991).

---------------------------------------------------------------------------

by drak at 2012-05-27T00:48:37Z

Nice addition.

---------------------------------------------------------------------------

by dlsniper at 2012-05-31T21:21:37Z

@drak While using this patch on a production application I've noticed that the `$request->hasSession()` section will fail to recognize that there's no session anymore in the app if I'm not using the auto-start feature. I'm using the latest master branch, updated today around 12:00 UTC. Clearly this is not the right place to discuss that there's a problem with ::hasSession() but I wanted to ask someone else for an opinion before creating the issue/fix for it.

---------------------------------------------------------------------------

by stof at 2012-06-09T10:14:05Z

@dlsniper create an ticket for it, and it will become the best place to discuss it :)

---------------------------------------------------------------------------

by dlsniper at 2012-06-09T10:42:58Z

Ok, but then can this be merged meanwhile?

---------------------------------------------------------------------------

by stof at 2012-06-09T10:58:39Z

@fabpot  👍

---------------------------------------------------------------------------

by dlsniper at 2012-06-09T17:36:24Z

I've opened #4529 to address the issue seen in the comment.
2012-06-09 21:44:05 +02:00
Fabien Potencier 1787992d0c merged branch niklasf/request-matcher-interface (PR #4363)
Commits
-------

2277500 [Routing][HttpKernel] Add RequestMatcherInterface.

Discussion
----------

[Routing][HttpKernel] Add RequestMatcherInterface.

First try at implementing #4351.

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT

---------------------------------------------------------------------------

by travisbot at 2012-05-21T19:37:07Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1392716) (merged 457496db into ea33d4d3).

---------------------------------------------------------------------------

by travisbot at 2012-05-21T19:47:51Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1392939) (merged 78effa98 into ea33d4d3).

---------------------------------------------------------------------------

by everzet at 2012-05-21T20:17:03Z

No tests?

---------------------------------------------------------------------------

by travisbot at 2012-05-21T20:18:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1393392) (merged 6564fb6a into ea33d4d3).

---------------------------------------------------------------------------

by schmittjoh at 2012-05-21T20:35:14Z

You need to remove the type-hint from the constructor, and probably add an exception instead where the matching methods are called to ensure that either ``UrlMatcherInterface``, or ``RequestMatcherInterface`` were passed. Alternatively, you could also add such a check to the constructor.

---------------------------------------------------------------------------

by fabpot at 2012-05-22T06:52:01Z

related to symfony/symfony#4020

---------------------------------------------------------------------------

by niklasf at 2012-05-25T11:11:45Z

Reverted the changes to UrlMatcher.php.

---------------------------------------------------------------------------

by fabpot at 2012-05-25T12:46:06Z

@niklasf: it looks good now except for the listener constructor (see @schmittjoh suggestion above). Can you fix that and add some unit tests to ensure that everything works as expected? Thanks.

---------------------------------------------------------------------------

by stof at 2012-05-25T12:52:59Z

Another solution could be to make the ``RequestMatcherInterface`` extend the ``MatcherInterface`` to keep the typehint in the constructor

---------------------------------------------------------------------------

by fabpot at 2012-05-25T13:52:26Z

I thought about that as well, but that does not make sense.

---------------------------------------------------------------------------

by stof at 2012-05-25T14:12:19Z

Well, the RouterInterface extends UrlMatcherInterface anyway (and it should stay this way as it would be a huge BC break) so I guess most people will implement both interfaces when implementing the RquestMatcherInterface

---------------------------------------------------------------------------

by travisbot at 2012-05-25T15:26:22Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1433963) (merged 8f36204c into ff4d446c).

---------------------------------------------------------------------------

by travisbot at 2012-05-25T15:33:13Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1433996) (merged 6d2f2cd9 into ff4d446c).

---------------------------------------------------------------------------

by travisbot at 2012-05-25T15:39:01Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1434060) (merged 3c1d89e2 into ff4d446c).

---------------------------------------------------------------------------

by travisbot at 2012-05-25T22:06:34Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1437398) (merged 3ab997c1 into ff4d446c).

---------------------------------------------------------------------------

by travisbot at 2012-05-25T22:06:47Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1437385) (merged d8c0e387 into ff4d446c).

---------------------------------------------------------------------------

by fabpot at 2012-05-26T06:41:31Z

Can you add a note in the CHANGELOG of the component?

---------------------------------------------------------------------------

by travisbot at 2012-05-26T08:12:40Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1440435) (merged c7458733 into 9e951991).

---------------------------------------------------------------------------

by niklasf at 2012-05-26T08:14:41Z

@fabpot: Sorry, not sure how: Under 2.1.0 or in a new section? As the first or last entry of the list?

---------------------------------------------------------------------------

by stof at 2012-05-26T10:20:23Z

@niklasf the new interface should be mentioned in the changelog of the Routing component

---------------------------------------------------------------------------

by travisbot at 2012-05-26T10:30:06Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1440837) (merged 34ea86a9 into 9e951991).

---------------------------------------------------------------------------

by niklasf at 2012-06-02T15:27:01Z

Ah ... so there were two pitfalls:

- PHPUnit clones the arguments of mocked functions. So they wouldn't equal.
- createGetResponseEventForUri() disables routing on purpose. So not using that helper, now.

Tests should be passing.

---------------------------------------------------------------------------

by travisbot at 2012-06-02T15:30:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1509054) (merged 7fab0118 into 1541fe26).
2012-06-09 21:38:41 +02:00