Commit Graph

77 Commits

Author SHA1 Message Date
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
cf11cc067f removed unused use statements 2012-05-19 09:22:59 +02:00
Fabien Potencier
e173d79e34 fixed CS 2012-05-18 19:37:58 +02:00
Fabien Potencier
ce9791246b fixed phpdoc @param alignment 2012-05-15 18:56:32 +02:00
Fabien Potencier
17af13813a fixed usage of LIBXML_COMPACT as it is not always available 2011-09-28 21:54:54 +02:00
Fabien Potencier
a6670c214a [Routing] fixed a caching issue when annotations are used on a base class used by more than one concrete class
Doctrine caches annotations. For methods, it uses PHP reflection and the getDeclaringClass() to create
a unique cache key. Unfortunately, if you have 2 classes that extend another one, the cache will be shared.
It's not a problem except that before this patch, the default route name was also cached (as the cache is serialized
after we changed the object). So, all other classes inherited this default route name. The fix is quite easy:
just don't change the read annotation object.
2011-08-30 21:39:58 +02:00
Fabien Potencier
946ccb6bd2 [Routing] fixed annotation loaders for abstract classes, added more unit tests 2011-08-30 20:57:43 +02:00
Fabien Potencier
6a81f07862 [Routing] made a small speed optimization 2011-08-30 20:53:32 +02:00
Victor Berchet
2a24603061 [Routing] Allow multiple @Route annotations with a default name on a single method (fixes #1647) 2011-07-12 15:30:32 +02:00
Fabien Potencier
610c1cc987 [Routing] removed AnnotationGlobLoader 2011-06-17 18:18:03 +02:00
Fabien Potencier
3859589daa [Yaml] renamed load() to parse() 2011-06-14 16:25:25 +02:00
Fabien Potencier
72483f946b [Routing] tagged the public @api 2011-06-14 15:35:32 +02:00
Ryan Weaver
4f0214eff4 [Routing] Fixing a bug where the current directory was set too late in the PhpFileLoader 2011-05-29 11:26:36 -05:00
Fabien Potencier
9aa8083cb4 [Routing] fixed previous merge 2011-05-26 18:28:42 +02:00
Fabien Potencier
5911fb946d [Routing] fixed CS 2011-05-26 18:27:18 +02:00
Fabien Potencier
1c0dfad979 Merge remote branch 'Chekote/xmlfileloader_overload_refactor'
* Chekote/xmlfileloader_overload_refactor:
  Refactored the processing of each individual node into it's own method, enabling easier overloading of behavior for Bundles such as FriendsOfSymfony/RestBundle
2011-05-26 18:25:53 +02:00
Fabien Potencier
a2a1a88291 Merge remote branch 'schmittjoh/annotations'
* schmittjoh/annotations:
  removed obsolete compiler pass
  fixed some more tests
  fixed tests
  removed unused vendor
  some cleanups
  updated to latest changes
  [WebProfilerBundle] removed @ignorePhpDoc annotations
  [FrameworkBundle] fixed default
  [FrameworkBundle] updated configuration
  [Validator] updated fixtures
  updated UPDATE file
  updated Annotations integration
  [Routing] updated to changes
  [FrameworkBundle] added framework-wide annotation reader, updated validator tests
  [WebProfilerBundle] fixed controllers
  fixed unit tests
  added Annotations library
2011-05-22 08:45:24 +02:00
Johannes Schmitt
42fb34b647 fixed tests 2011-05-19 22:46:34 +02:00
Benjamin Eberlei
ec22b03b1d [Routing] Remove exception condition in YamlFileLoader::load() as its duplicating a check that is done in parseRoute() anyways. This changes allows to extend the YamlFileLoader without having to duplicate the whole method. 2011-05-19 20:26:26 +02:00
Johannes Schmitt
796d9af0c4 some updates 2011-05-16 22:26:24 +02:00
Chekote
ebab0a3ac2 Refactored the processing of each individual node into it's own method, enabling easier overloading of behavior for Bundles such as FriendsOfSymfony/RestBundle 2011-05-12 10:55:14 -05:00
Johannes Schmitt
73b92db612 [Routing] updated to changes 2011-04-29 17:44:56 +02:00
Johannes Schmitt
7e26575bbd [FrameworkBundle] added framework-wide annotation reader, updated validator tests 2011-04-29 15:54:44 +02:00
Artur Kotyrba
713e8c26a6 [Routing] removed redundant parameter in addRoute method 2011-04-25 22:58:23 +02:00
Pascal Borreli
8c0beea677 [Phpdoc] Cleaning/fixing 2011-04-23 15:18:47 +00:00
Brikou CARRE
e898445b94 removed empty lines/trailing spaces 2011-04-15 21:12:02 +02:00
Ryan Weaver
b9883a3bad [Config] Improving the exception when a resource cannot be imported
This improves, for example, the exception one would receive if they tried to import a resource from a bundle that doesn't exist.
Previously, the deep "bundle is not activated" exception would be thrown. That has value, however there is no indication of where
the exception is actually occurring.

In this new implementation, we throw an exception that explains exactly which resource, and from which source resource, cannot be
loaded. The deeper exception is still thrown as a nested exception.

Two caveats:

  * The `HttpKernel::varToString` method was replicated
  * This introduces a new `Exception` class, which allows us to prevent lot's of exceptions from nesting into each other in the case
    that some deeply imported resource cannot be imported (each upstream import that fails doesn't add its own exception).
2011-04-01 18:59:54 -05:00
Kris Wallsmith
daccbf45bf [Routing] updated for DirectoryResource changes 2011-04-01 04:57:10 -07:00
Fabien Potencier
1fb08b6445 [Routing] fixed private method 2011-03-23 21:40:54 +01:00
Fabien Potencier
e4a3e0c2c7 [Config] moved from protected to private (WIP) 2011-03-23 19:34:00 +01:00
Fabien Potencier
b5857528e0 [Routing] moved protected to private 2011-03-23 19:25:56 +01:00
Sven Paulus
eb8491f754 re-add filename based directory filter to the AnnotationDirectoryLoader,
now restricting to *.php files and therefore disregarding e.g. SVN metadata
files
2011-03-22 18:23:54 +01:00
Sven Paulus
61974adb4f revert adding filename based filter to the directory resource 2011-03-22 12:14:12 +01:00
Sven Paulus
f93e4b2d73 Eleminate the need to manually clear the cache if a new controller file containing routing annotations is added - part II
* add unit tests
* introduce filename filter to DirectoryResource (to restrict change monitoring to a subset of files)
* modify AnnotationDirectoryLoader.php to use filename filter set on Controller\.php$
2011-03-22 09:03:45 +01:00
Fabien Potencier
a505ff43b5 [Routing] added supported for multiple route annotations for a single controller 2011-03-19 17:40:24 +01:00
everzet
e4eee05b06 [Routing] tuned exception message 2011-03-19 12:58:31 +02:00
everzet
3fd50ea4e6 [Routing] throw an exception if route config has unsupported keys 2011-03-19 12:54:29 +02:00
Victor Berchet
61be2b7986 [Routing] XMLFileLoader small optimization 2011-03-11 09:47:46 +01:00
develop
1daedcc6fc fix whitespace problem 2011-03-08 09:49:52 +01:00
develop
a93aa55199 If you use an annotation resource pointing to a controller directory
in your routing configuration, only existing files in this directory
get tracked for changes in this directory. So if you add a new
controller file in this directory you'd have to manually clear the
cache since the new file gets ignored.
This patch adds a DirectoryResource for this case which tracks all
changes in the given directory (and files and directories contained
within).
2011-03-08 09:49:45 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Fabien Potencier
2bb2388c3f fixed typo 2011-02-28 12:12:49 +01:00
Fabien Potencier
3948c2d8a2 [Routing] fixed annotation dir loader auto-reload when a controller class changes 2011-02-27 22:39:54 +01:00
Christophe Coevoet
92bfbf575c Fixed CS 2011-02-27 20:56:29 +01:00
Fabien Potencier
5c905beb13 moved common configuration classes to a new Config component 2011-02-13 22:31:50 +01:00
Jeremy Mikola
8525ff83cd [Routing] XmlFileLoader should treat a missing "type" attribute as null when calling FileLoader::import() 2011-02-12 21:52:16 +01:00
Fabien Potencier
5ee8eca0ee [Routing] fixed previous commit 2011-02-11 01:54:25 +01:00
Jeremy Mikola
d85a839997 [Routing] Avoid locating imported resources as files unless they resolve to a FileLoader
XML/YAML loaders assume imported resources are files before attempting to resolve their loader. This is problematic for loaders such as Assetic, which does not use a file as its resource. Furthermore, the previous consecutive calls to both locate() and getAbsolutePath() were redundant. File location can safely be delayed until FileLoader::import(), and we can let that throw an exception if the file is not found.
2011-02-11 00:08:43 +01:00
Fabien Potencier
b91f082be5 Revert "moved Resource to the Config component"
This reverts commit f53080860a.

Revert "[Router] config fixes"

This reverts commit 51beecc6f2.

Revert "moved duplicated files to a new Config component"

This reverts commit a8ec9b27f0.
2011-02-10 16:14:12 +01:00
Fabien Potencier
f53080860a moved Resource to the Config component 2011-02-10 16:07:42 +01:00