Commit Graph

418 Commits

Author SHA1 Message Date
Pascal Borreli
4c726ea64c Fixed Phpdoc 2012-07-28 16:07:17 +00:00
Fabien Potencier
7b0d100e02 merged 2.0 2012-07-13 16:05:38 +02:00
Hugo Hamon
e9d799ce2c [Routing] fixed ApacheUrlMatcher and ApachMatcherDumper classes that did not take care of default parameters in urls. 2012-07-13 10:17:40 +02:00
Fabien Potencier
d100ffaf76 fixed CS 2012-07-09 14:54:20 +02:00
Fabien Potencier
03d22b74ec fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Fabien Potencier
8a3f5bd323 merged branch Tobion/requestmatcher (PR #4582)
Commits
-------

7464dcd added phpdoc
c413e7b [Routing] remove RequestContextAwareInterface from RequestMatcherInterface
921be34 [Routing] fix phpdoc

Discussion
----------

[Routing] RequestMatcherInterface doesn't need context

Matchers that implement RequestMatcherInterface should match a Request, thus they don't need the request context.

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

by travisbot at 2012-06-14T21:39:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1624496) (merged f5ff1fe0 into 7c91ee57).

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

by schmittjoh at 2012-06-15T13:32:59Z

I think it makes sense to remove the RequestContext from the RequestMatcher.

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

by travisbot at 2012-06-15T15:54:28Z

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

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

by Tobion at 2012-06-26T12:32:06Z

Anything missing?
2012-07-01 23:09:16 +02:00
Fabien Potencier
ed49e3be35 [Routing] removed trailing slash behavior on non-safe requests (refs #2626) 2012-07-01 19:02:05 +02:00
Fabien Potencier
16976be8ce [Routing] fixed indentation 2012-07-01 18:56:00 +02:00
Tobias Schultze
c413e7ba39 [Routing] remove RequestContextAwareInterface from RequestMatcherInterface 2012-06-15 17:27:49 +02:00
Tobias Schultze
921be34ee7 [Routing] fix phpdoc 2012-06-14 23:15:09 +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
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
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
Niklas Fiekas
2277500835 [Routing][HttpKernel] Add RequestMatcherInterface.
While UrlMatcherInterface is only for matching URLs with routes, add
RequestMatcherInterface, that allows to match against whole requests.
2012-06-07 09:37:25 +02:00
Ph3nol
a6d32de181 UrlMatcher class indent and doc fixes 2012-06-02 13:54:03 +02:00
Fabien Potencier
335d4eab86 fixed CS 2012-05-21 22:27:15 +02:00
Fabien Potencier
c01fed0c89 fixed CS 2012-05-21 22:25:19 +02:00
Fabien Potencier
fc3c609bfd removed empty files 2012-05-18 21:54:07 +02:00
Fabien Potencier
18132c18b4 removed empty files 2012-05-18 20:30:14 +02:00
Fabien Potencier
ec36ae7eda merged 2.0 2012-05-18 19:04:58 +02:00
Fabien Potencier
c9ba077a20 added missing LICENSE files 2012-05-18 19:00:00 +02:00
Fabien Potencier
41621e42e9 fixed phpdoc @param alignment 2012-05-15 22:19:31 +02:00
Fabien Potencier
ce9791246b fixed phpdoc @param alignment 2012-05-15 18:56:32 +02:00
Fabien Potencier
26f933e7bd fixed CS 2012-05-01 15:23:48 +02:00
Tobias Schultze
cb47b03209 [Routing] small refactoring + language fixes 2012-04-12 21:23:30 +02:00
Tobias Schultze
f666836900 [Routing] simplified regex with named variables 2012-04-11 18:27:19 +02:00
Tobias Schultze
9307f5b33b [Routing] Implement bug fixes and enhancements 2012-04-11 15:45:27 +02:00
Fabien Potencier
c7ba1b9605 merged 2.0 2012-04-11 09:33:57 +02:00
Victor Berchet
6465a6987a [Routing] Fixes to handle spaces in route pattern
- The route compiler does not add extra space or line-feed,
- The generated regex does not use the 'x' modified any more,
- The PHP and apache matchers do not need to strip any chars (vs space and line feed before),
- The space characters are escaped according to the apache format
2012-04-10 17:29:34 +02:00
Victor Berchet
55014a6841 [Routing] Request methods always return a raw path, fix the matcher to decode only once
sq
2012-04-10 10:40:58 +02:00
Tobias Schultze
56c1e31e8a performance improvement in PhpMatcherDumper 2012-04-03 09:18:44 +02:00
Fabien Potencier
0c7b2911bc [Routing] removed code that was not ready to be pushed 2012-03-30 20:36:59 +02:00
Fabien Potencier
fea6b79acd moved component and bridge unit tests to the src/ directory
This is the first step to make each Symfony Component and Bridge self-contained.
2012-03-29 08:37:22 +02:00
Fabien Potencier
be92973512 merged branch arnaud-lb/apache-matcher-fixes (PR #3406)
Commits
-------

e6e9b5a [Routing] Return the _route parameter from ApacheUrlMatcher

Discussion
----------

[Routing] Return the _route parameter from ApacheUrlMatcher

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

by fabpot at 2012-02-22T23:13:49Z

Can you squash  your commits before I merge? Thanks.

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

by arnaud-lb at 2012-02-23T09:12:45Z

sure, done
2012-02-23 19:06:54 +01:00
Arnaud Le Blanc
e6e9b5adbe [Routing] Return the _route parameter from ApacheUrlMatcher 2012-02-23 10:11:35 +01:00
Fabien Potencier
611b241f56 fixed CS 2012-02-22 19:03:34 +01:00
Victor Berchet
651f4c5d2d [Routing] Added a missing property declaration 2012-02-16 07:03:32 +01:00
Victor Berchet
9d6eb8216e [Routing] Fix a bug in the TraceableUrlMatcher 2012-02-10 09:49:35 +01:00
Victor Berchet
4fcf9efe65 [Routing] Small optimization in the UrlMatcher 2012-02-10 09:49:34 +01:00
Victor Berchet
abc2141d5b [Routing] Added a missing property declaration 2012-02-10 09:49:34 +01:00
Victor Berchet
d86e1eb71c [Routing] Remove a weird dependency 2012-02-10 09:49:25 +01:00
Fabien Potencier
d12f5b202c [Routing] removed trailing slash support for routes that are not available for GET/HEAD methods (as the redirection will always occurs with a GET/HEAD request, closes #2626) 2011-12-30 19:30:23 +01:00
Fabien Potencier
2b5d4b90d8 merged 2.0 2011-11-24 07:16:52 +01:00
Fabien Potencier
5878490b16 removed unused use statements 2011-11-24 07:16:14 +01:00
dbu
57040a8703 document exceptions on the interfaces, inheritDoc on implementations, use statements instead of fully qualified exception names 2011-11-08 08:47:17 +01:00
Fabien Potencier
8550f372fb removed unused use statements 2011-10-29 12:01:53 +02:00
Fabien Potencier
dec43f5539 merged 2.0 2011-10-29 12:01:39 +02:00
Fabien Potencier
851eb73778 removed unused use statements 2011-10-29 11:56:30 +02:00
Fabien Potencier
cbb4bbae97 [Routing] fixed side-effect in the PHP matcher dumper 2011-10-24 11:41:08 +02:00
Fabien Potencier
167a96fcf3 [Routing] fixed side-effect in the PHP matcher dumper 2011-10-24 11:39:31 +02:00
Fabien Potencier
24b93928bf [Routing] added a matcher that helps debugging matching problems 2011-10-24 09:08:36 +02:00
Fabien Potencier
c5ca40c711 [Routing] added support for _scheme requirement in UrlMatcher (see 07aae98495) 2011-10-22 08:04:10 +02:00
Fabien Potencier
5c8a2fb48d [Routing] fixed route overriden mechanism when using embedded collections (closes #2139) 2011-09-30 12:01:46 +02:00
Fabien Potencier
e2945c9f9b [Routing] fixed Apache matcher dumper (broken by previous merge) 2011-09-23 20:56:36 +02:00
Jordi Boggiano
418d6a0ead [Routing] Fix syntax error when dumping routes with single quotes in the requirements or pattern 2011-06-29 03:40:17 +02:00
Jordi Boggiano
2b5e22d961 [Routing] Fix ApacheDumper when a space appears in a default value 2011-06-29 03:40:13 +02:00
Jordi Boggiano
6c7f484f6b [Routing] Fix dumper so it doesn't print trailing whitespace
This fixes tests from the previous commit
2011-06-29 03:40:10 +02:00
Jordi Boggiano
761724ae57 [Routing] Adjust urlescaping rules, fixes #752
Only + and % are now encoded in generated routes, since they are the only characters that, if not encoded, could cause problems/conflicts when decoded. Namely + turns into a space, and % followed by numbers could do funky things.

The matcher decodes everything which works since nothing will have %NN without being escaped, and + are escaped as well.
2011-06-29 03:39:54 +02:00
Fabien Potencier
c536797cc9 [Routing] removed an optimization as it does not always work as expected 2011-06-17 14:28:23 +02:00
Fabien Potencier
46a93c376c [Routing] optimized PHP dumper when the parent prefix is the same for several adjacent collections (avoids the same test to be made) 2011-06-15 09:36:36 +02:00
Fabien Potencier
1438f6be04 [Routing] added some unit tests for latest merge (and fixed a bug ;)) 2011-06-15 09:22:10 +02:00
Fabien Potencier
c8df0ccf79 merged branch lmcd/master (PR #1290)
Commits
-------

49dd558 Couple more CS fixes
5a986bf Add $keysCount & minor CS fix
91f4097 [Routing] Better nesting for RouteCollections in dumped URL matcher classes With this change, a route prefixed with '/blogger' will be nested inside '/blog' (for example)

Discussion
----------

[Routing] Better nesting for RouteCollections in dumped URL matcher classes

Consider the following routing file:

    _blog:
        resource: "@AcmeDemoBundle/Resources/config/routing/BlogController.yml"
        prefix:   /blog

    _blogger:
        resource: "@AcmeDemoBundle/Resources/config/routing/BloggerController.yml"
        prefix:   /blogger

    _bloggeroo:
        resource: "@AcmeDemoBundle/Resources/config/routing/BloggerooController.yml"
        prefix:   /bloggeroo

    _blogtest:
        pattern:   /blogtest
        defaults:  { _controller: AcmeDemoBundle:Blog:test }

    login:
        pattern:   /login
        defaults:  { _controller: AcmeDemoBundle:Security:login }

Note: Each imported file contains two simple blog/blogger/bloggeroo routes (e.g. blog_index & blog_view)
With this change, the cached URL matcher looks something like this:

```php
<?php
class appprodUrlMatcher
{
  public function match($pathinfo)
  {
      $allow = array();

      if (0 === strpos($pathinfo, '/blog')) {
          // blog_index
          if (preg_match('#^/blog/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {...}

          // blog_view
          if (preg_match('#^/blog/(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {...}

          if (0 === strpos($pathinfo, '/blogger')) {
              // blogger_index
              if (preg_match('#^/blogger/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {...}

              // blogger_view
              if (preg_match('#^/blogger/(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {...}

              if (0 === strpos($pathinfo, '/bloggeroo')) {
                  // bloggeroo_index
                  if (preg_match('#^/bloggeroo/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {...}

                  // bloggeroo_view
                  if (preg_match('#^/bloggeroo/(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {...}

                  throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
              }

              throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
          }

          // _blogtest
          if ($pathinfo === '/blogtest') {...}

          throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
      }

      // login
      if ($pathinfo === '/login') {...}

      throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
  }
}
```

As far as I can see, you can throw the 404 earlier (as I've done), as by nesting all these possibilities, there is no chance another route will be matched outside the parent if statement.

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

by stloyd at 2011/06/11 08:37:15 -0700

You should follow Symfony [CS rules] (http://symfony.com/doc/current/contributing/code/standards.html), also you should modify tests.

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

by lmcd at 2011/06/11 08:46:32 -0700

Besides the inline `continue` statement, I can't see spot any other CS violations. I'm on to the updated tests.

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

by fabpot at 2011/06/13 02:19:14 -0700

What if you have this:

    _blog:
        resource: "@AcmeDemoBundle/Resources/config/routing/BlogController.yml"
        prefix:   /blog

    login:
        pattern:   /login
        defaults:  { _controller: AcmeDemoBundle:Security:login }

    _blogger:
        resource: "@AcmeDemoBundle/Resources/config/routing/BloggerController.yml"
        prefix:   /blogger

You cannot send 404 early because the same `blog` prefix is used in two different places. I can see many things that will break with this patch. I'm pretty sure we can enhance the performance of the existing code but let's do that after 2.0.

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

by lmcd at 2011/06/13 05:04:03 -0700

@fabpot: The code was designed so it would work in these kind of circumstances. I ran the dumper against the routing file you provided and this is the output below.

I see no reason why you can't throw the 404 earlier, as by nesting everything with similar prefixes, we're eliminating the possibility that a route will ever be matched outside of that if statement.

```php
public function match($pathinfo)
{
    $allow = array();

    if (0 === strpos($pathinfo, '/blog')) {
        // blog_index
        if (preg_match('#^/blog/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {
            ...
        }

        // blog_view
        if (preg_match('#^/blog/(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {
            ...
        }

        if (0 === strpos($pathinfo, '/blogger')) {
            // blog_index
            if (preg_match('#^/blogger/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {
                ...
            }

            // blog_view
            if (preg_match('#^/blogger/(?P<year>\d{4})/(?P<month>\d{2})/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {
                ...
            }

            throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
        }

        throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
    }

    // login
    if ($pathinfo === '/login') {
        ...
    }

    throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
}
```

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

by fabpot at 2011/06/13 07:48:49 -0700

Can you add some more tests to ensure that everything works fine and that we won't have regressions later on? Thanks.
2011-06-15 09:09:35 +02:00
Fabien Potencier
72483f946b [Routing] tagged the public @api 2011-06-14 15:35:32 +02:00
Lee McDermott
49dd558444 Couple more CS fixes 2011-06-13 02:40:21 +01:00
Lee McDermott
5a986bfc27 Add $keysCount & minor CS fix 2011-06-11 16:43:28 +01:00
Lee McDermott
91f4097a09 [Routing] Better nesting for RouteCollections in dumped URL matcher classes
With this change, a route prefixed with '/blogger' will be nested inside '/blog' (for example)
2011-06-11 16:11:55 +01:00
Fabien Potencier
96554e645a Merge remote branch 'lmcd/master'
* lmcd/master:
  $code referenced but not defined in compileRoute()
  [Routing] Optimised the PHP URL matcher dumper The cached URL matcher classes contain some unneeded logic. Consider the following example:
2011-06-11 07:32:22 +02:00
Lee McDermott
2c0efa7488 $code referenced but not defined in compileRoute() 2011-06-11 04:38:11 +01:00
Lee McDermott
10bb4ff25e [Routing] Optimised the PHP URL matcher dumper
The cached URL matcher classes contain some unneeded logic. Consider the following example:

if (0 === strpos($pathinfo, '/Blog')) {
    // blog_index
    if (0 === strpos($pathinfo, '/Blog') && preg_match('#^/Blog/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {
        return array_merge($this->mergeDefaults($matches, array (  '_action' => 'index',)), array('_route' => 'blog_index'));
    }
}

The 2nd strpos is not required, as we have already satisfied this condition in the parent if statement.
My change will produce the following code for the same routing setup::

if (0 === strpos($pathinfo, '/Blog')) {
    // blog_index
    if (preg_match('#^/Blog/(?P<slug>[^/]+?)$#x', $pathinfo, $matches)) {
        return array_merge($this->mergeDefaults($matches, array (  '_action' => 'index',)), array('_route' => 'blog_index'));
    }
}
2011-06-11 01:20:22 +01:00
Fabien Potencier
c72537da6b [Routing] fixed route matching when the prefix contains variables 2011-06-04 19:45:54 +02:00
Fabien Potencier
c561f4f0c0 [Routing] changed HTTP method to always be uppercased (to be consistent with HttpFoundation/Request) 2011-06-04 19:06:39 +02:00
Fabien Potencier
f9ffdf5b33 [Routing] added proper support for the HEAD method 2011-06-04 12:47:38 +02:00
Fabien Potencier
9eae7e54ca [Routing] removed unneeded code in the dumper Apache rules 2011-06-04 12:46:19 +02:00
Fabien Potencier
2cd04547fd [Routing] renamed some exceptions 2011-05-17 16:52:02 +02:00
Fabien Potencier
02e77ec4e3 [Routing] moved Matcher exceptions 2011-05-17 10:11:27 +02:00
Fabien Potencier
c7fddca891 replaced some url..code by rawurl..code 2011-05-03 23:06:55 +02:00
Daniel Holmes
b14db26062 [Routing] added setContext to RouterInterfaces as it is used on RouterInterface references 2011-04-30 13:56:40 +10:00
Fabien Potencier
944a98086e [Routing] optimized PHP route dumper 2011-04-25 17:45:59 +02:00
Fabien Potencier
7c95bda751 [Routing] simplified route compiler 2011-04-25 12:38:20 +02:00
Pascal Borreli
8c0beea677 [Phpdoc] Cleaning/fixing 2011-04-23 15:18:47 +00:00
Fabien Potencier
813627bd4c [Routing] added getContext() accessor 2011-04-21 21:20:27 +02:00
Fabien Potencier
f7d44148df [Routing] removed unused defaults variable 2011-04-20 22:55:23 +02:00
Fabien Potencier
fd1636b324 [Routing] added RedirectableUrlMatcher 2011-04-20 15:54:48 +02:00
Fabien Potencier
0dbfa18c46 [Routing] made a small optimization to the route dumper 2011-04-20 14:19:33 +02:00
Fabien Potencier
117321d3c6 replaced array for request context in Routing by a RequestContext class 2011-04-20 14:19:32 +02:00
Fabien Potencier
07aae98495 [Routing] added support for _scheme requirement
The _scheme requirement can be used to force routes to always match one given scheme
and to always be generated with the given scheme.

So, if _scheme is set to https, URL generation will force an absolute URL if the
current scheme is http. And if you request the URL with http, you will be redirected
to the https URL.
2011-04-20 10:49:32 +02:00
Fabien Potencier
e3679ef44f [Routing] decoupled Routing from FrameworkBundle 2011-04-05 15:21:32 +02:00
Fabien Potencier
372907ead1 [Routing] fixed CS 2011-04-05 12:13:47 +02:00
Fabien Potencier
7c0a39c353 [Routing] optimized the output of the PHP matcher dumper 2011-04-05 11:58:56 +02:00
Aurelijus
38318f8f80 removes unwanted characters from goto name 2011-03-24 10:03:59 +02:00
Fabien Potencier
b5857528e0 [Routing] moved protected to private 2011-03-23 19:25:56 +01:00
Fabien Potencier
e159c47cc9 [Routing] fixed UrlMatcher when no method requirement is defined 2011-03-22 20:56:55 +01:00
Kris Wallsmith
b2f5ac8beb [Routing] refactored URL matching to support 405 Method Not Allowed responses 2011-03-21 05:56:53 -07:00
Fabien Potencier
6e81c28ca4 [Routing] fixed typo 2011-03-11 10:40:38 +01:00
Fabien Potencier
dded1955e4 [Routing] fixed the / problem in a URL segment 2011-03-09 23:57:26 +01:00
Fabien Potencier
17ef911f19 [Routing] removed the normalizeUrl() method and renamed url to pathinfo as this is more correct 2011-03-09 17:25:44 +01:00
Jordi Boggiano
4c0ea6179b [Routing] UrlMatcher shouldn't collapse multiple slashes
* fixes a problem with security (/foo/bar and /foo///bar are not the same URL as far as security is concerned)
* this can still be done in your web server configuration or by adding a core.request listener
2011-03-09 17:07:12 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Fabien Potencier
e16c666266 [Routing] made an empty path info to redirect to / (as for any other route that ends with a /) 2011-02-26 08:56:44 +01:00
Fabien Potencier
f46c6f7e45 [Routing] fixed the %2f problem in URLs 2011-02-25 18:01:32 +01:00
Fabien Potencier
9619c7dade [Routing] removing the routing hack where we add a / at the beginning if it does not exist 2011-02-21 10:25:22 +01:00
Jordi Boggiano
5bf593353f [Routing] Added optional trailing slash support to ApacheMatcherDumper 2011-02-10 23:46:23 +01:00
Jordi Boggiano
fe694de746 [Routing] Make trailing slashes in urls optional 2011-02-10 23:46:23 +01:00
Fabien Potencier
ca8c7907e2 [Routing] added setContext() method to both matchers and generators 2011-01-24 16:59:32 +01:00
Dominique Bongiraud
64fb94c725 normalized license messages in PHP files 2011-01-18 08:07:46 +01:00
Benjamin Lévêque
8a472b7d98 [Routing] Fix PhpMatcherDump when url contains a . or a - 2010-12-22 11:14:49 +01:00
Victor Berchet
5e94807668 Speed up url matching for route without variable 2010-12-20 18:25:32 +01:00
Ryan Weaver
bd0d9dc1cb [Routing] Fixing a coding standard violating I introduced. 2010-11-29 18:23:02 +01:00
Ryan Weaver
739ebf92f5 [Routing] Changing the _method route requirement to be a regular expression so that it's consistent with all other requirements.
Unlike all other requirements, the _method regex requirement is case-insensitive.
2010-11-27 11:48:57 +01:00
Ryan Weaver
acb977aa88 [Routing] Tweaking the ApacheMatcherDumper formatting - no real change. 2010-11-27 11:48:00 +01:00
Ryan Weaver
1e9e1b346d [Routing] Adding tests for the ApacheMatcherDumper, PhpMatcherDumper and UrlMatcher. 2010-11-27 11:47:48 +01:00
Ryan Weaver
5aa6ad28ae Updating RouteCollection::getRoutes() call to RouteCollection::getAll() in many places. 2010-11-26 14:43:12 +01:00
Fabien Potencier
44ccd44dd6 [Routing] fixed ApacheMatcherDumper default config 2010-11-11 23:22:15 +01:00
Kris Wallsmith
f79e23ffb5 Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Kris Wallsmith
0b1f3145ae Removed unnecessary "public" from interface method signatures. 2010-10-18 16:55:09 +02:00
Artur Kotyrba
308e85a5a7 Removed methods which implemented interfaces by throwing \LogicException('You must override...'). 2010-10-17 07:54:18 +02:00
pborreli
86cc6a11d9 [Component] Fixed some spelling typos 2010-10-17 07:51:50 +02:00
Fabien Potencier
bf82cf42dd renamed Symfony\Components to Symfony\Component 2010-08-20 23:09:55 +02:00