Commit Graph

780 Commits

Author SHA1 Message Date
Victor Berchet
5e141402e1 [WebProfilerBundle] Fix the intercept_redirects option 2011-04-02 16:13:08 +02:00
Victor Berchet
ac03440d7a [WebProfilerBundle] Make wdtb verbosity configurable 2011-04-02 16:13:08 +02:00
Victor Berchet
b2be041475 [WebProfilerBundle] Remove the format and content type from the wdtb 2011-04-02 16:13:07 +02:00
Fabien Potencier
fcea63c0a1 [WebProfilerBundle] prefixed all services with web_profiler 2011-03-30 20:36:52 +02:00
Fabien Potencier
33ee321d28 [WebProfilerBundle] fixed typo 2011-03-30 20:03:34 +02:00
Fabien Potencier
bdc07ad13e [WebProfilerBundle] converted the configuration to the new system 2011-03-30 19:31:32 +02:00
Victor Berchet
db0149ba6e [WebProfilerBundle] Fix a few typos 2011-03-29 23:09:29 +02:00
Fabien Potencier
315147c6c8 fixed remaining Bundle suffixes 2011-03-28 19:04:02 +02:00
Kris Wallsmith
ade83e2e80 updated codebase to use shorter bundle names
Controllers:
"BlogBundle:Post:show" is now "Blog:Post:show"

Templates:
"BlogBundle:Post:show.html.twig" is now "Blog:Post:show.html.twig"

Resources:
"@BlogBundle/Resources/config/blog.xml" is now "@Blog/Resources/config/blog.xml"

Doctrine:
"$em->find('BlogBundle:Post', $id)" is now "$em->find('Blog:Post', $id)"
2011-03-27 06:25:43 -07:00
Fabien Potencier
6fe8884ad8 [WebProfilerBundle] fixed WDT (please test before sending a PR -- I'm wasting my time) 2011-03-26 17:14:02 +01:00
Fabien Potencier
7a3185c856 [WebProfilerBundle] fixed tests 2011-03-26 17:04:10 +01:00
Antoine Hérault
7049810729 [WebProfilerBundle] Use a template for the redirection interceptions 2011-03-26 16:43:53 +01:00
Antoine Hérault
237d7fd327 [WebProfilerBundle] Add some tests for the listener 2011-03-26 16:43:16 +01:00
Antoine Hérault
614cf4c7b0 Remove kernel from the web debug toolbar 2011-03-25 00:15:19 +01:00
Fabien Potencier
662a4b3740 removed the status message from HttpException, changed the signature so that most useful arguments are first, fixed many small problems introduced with previous HTTP exception refactoring
Quote from HTTP (bis) spec (Part 2 - 5.1.1):

The Reason Phrase exists for the
sole purpose of providing a textual description associated with the
numeric status code, out of deference to earlier Internet application
protocols that were more frequently used with interactive text
clients.  A client SHOULD ignore the content of the Reason Phrase.
2011-03-23 16:11:54 +01:00
Fabien Potencier
82dec51b30 moved integration between the Yaml component and Twig to a Symfony Bridge 2011-03-23 15:50:55 +01:00
Miha Vrhovnik
5a620c0573 unless I'm missing something the first instance of loader is not used and thus not needed 2011-03-21 11:11:49 +01:00
Douglas Greenshields
53a9997e23 [WebProfilerBundle] added explicit left horizontal alignment for toolbar in CSS to prevent inconsistent alignment 2011-03-20 21:34:07 +00:00
Fabien Potencier
f36b10afe7 [WebProfilerBundle] removed the link on the controller name when the IDE is not configured 2011-03-18 16:39:19 +01:00
Fabien Potencier
0c8ff92ecd made the controller name in the WDT clickable 2011-03-18 16:09:21 +01:00
Fabien Potencier
0917f0d406 [WebProfilerBundle] updated the close icon for the WDT 2011-03-18 15:21:47 +01:00
Fabien Potencier
9d8c053d42 updated icons for swiftmailer and security 2011-03-18 15:19:39 +01:00
Fabien Potencier
20a717ea3c [WebProfileBundle] added the controller callable name in the WDT (also tweaked the CSS to free some space) 2011-03-18 14:57:41 +01:00
Fabien Potencier
4d521e159d [WebProfilerBundle] removed old icon 2011-03-18 14:24:55 +01:00
Fabien Potencier
0fbffde1f4 [WebProfilerBundle] changed the license for the icons as they have been changed to new customized ones 2011-03-18 13:04:59 +01:00
Fabien Potencier
d02a700c06 [FrameworkBundle] fixed the traceable event manager 2011-03-18 07:42:41 +01:00
Fabien Potencier
6c8e71c8e7 renamed filterCore* to onCore*
The onCore* events are fired at some pre-defined points during the
handling of a request. At this is more important than the fact
that you can change things from the event.
2011-03-17 17:01:59 +01:00
Bernhard Schussek
5f14d8d6aa Merge remote branch 'symfony/master' into event-manager
Conflicts:
	src/Symfony/Bundle/AsseticBundle/CacheWarmer/AssetWriterCacheWarmer.php
	src/Symfony/Bundle/AsseticBundle/Tests/CacheWarmer/AssetWriterCacheWarmerTest.php
	src/Symfony/Bundle/FrameworkBundle/Profiler/ProfilerListener.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml
	src/Symfony/Component/HttpKernel/HttpKernel.php
	src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
2011-03-17 12:34:12 +01:00
Fabien Potencier
95532cc1de [WebProfilerBundle] tweaked profiler CSS 2011-03-17 08:12:15 +01:00
Fabien Potencier
ee70656030 [WebProfileBundle] removed the logger info in the WDT if no error has been recorded (to save space on smaller screens) 2011-03-17 07:47:05 +01:00
Fabien Potencier
0610385615 Merge remote branch 'vicb/profiler_liquid' 2011-03-16 19:37:02 +01:00
Victor Berchet
d56fadfbb9 [WebProfilerBundle] Use a liquid layout rather than a fixed width layout. 2011-03-16 18:02:55 +01:00
Fabien Potencier
ad3b7e912d merged noelg/profiler 2011-03-16 16:44:44 +01:00
Martin Hason
aae492f79b removed unused use statements in DIC extensions 2011-03-16 11:29:41 +01:00
Victor Berchet
8128300baa [WebProfilerBundle] Revert the support for a status in data collectors 2011-03-14 17:24:11 +01:00
Victor Berchet
ddb935a4f0 [WebProfilerBundle] Tweak styles 2011-03-14 10:37:45 +01:00
Bernhard Schussek
06c682b4fb Switched from Doctrine's EventManager implementation to the EventManager clone in Symfony2 (now called EventDispatcher again) 2011-03-13 19:49:10 +01:00
Bernhard Schussek
25931caeab Merge remote branch 'symfony/master' into event-manager
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventManager.php
	src/Symfony/Bundle/WebProfilerBundle/WebDebugToolbarListener.php
	src/Symfony/Component/Security/Http/Firewall.php
	src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
	src/Symfony/Component/Security/Http/Firewall/AccessListener.php
	src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/ChannelListener.php
	src/Symfony/Component/Security/Http/Firewall/ContextListener.php
	src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
	src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php
	src/Symfony/Component/Security/Http/Firewall/LogoutListener.php
	src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php
	src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php
	tests/Symfony/Tests/Component/Security/Http/Firewall/RememberMeListenerTest.php
2011-03-13 19:15:25 +01:00
Victor Berchet
36d51d7bbd [WebProfilerBundle] Config panel
Split the main Key / Value table in different sections.
Add a list of active bundles.
2011-03-13 16:25:16 +01:00
Victor Berchet
1d8be2b112 [WebProfilerBundle] DOM and CSS tweaks 2011-03-13 15:50:44 +01:00
Victor Berchet
b04a647c65 [WebProfilerBundle] Create a configuration panel 2011-03-13 15:50:44 +01:00
Victor Berchet
308ea7a668 [WebProfilerBundle] Specify missing alt attributes 2011-03-13 15:50:44 +01:00
Victor Berchet
5b39894efc [WebProfilerBundle] Add shortcuts to the panels in the toolbar 2011-03-13 15:50:44 +01:00
Victor Berchet
f752dd34a0 [Profiler] Profilers now return a status which is used for visual feedback 2011-03-13 15:50:44 +01:00
Victor Berchet
66f8ed8e51 [WebProfilerBundle] Tweak styles 2011-03-13 15:50:44 +01:00
Victor Berchet
481bb4cdf9 [WebProfilerBundle] Introduce a template for toolbar items 2011-03-13 15:50:44 +01:00
Fabien Potencier
e0b46fea73 [WebProfilerBundle] hmmmm 2011-03-11 21:34:46 +01:00
Fabien Potencier
92acd46ede [WebProfilerBundle] fixed WDT controller to keep the current flashes 2011-03-11 20:49:25 +01:00
Fabien Potencier
48c222dd02 [WebProfilerBundle] fixed WDT to keep the current flashes for one more request 2011-03-11 20:47:03 +01:00
Fabien Potencier
8421f95476 [WebProfilerBundle] fixed WDT to keep the current flashes for one more request 2011-03-11 20:44:14 +01:00
Fabien Potencier
18e56409c6 Merge remote branch 'azogheb/webProfilerOptimization'
* azogheb/webProfilerOptimization:
  [WebProfilerBundle] Optimization to listener
2011-03-09 21:54:06 +01:00
Fabien Potencier
c41e16293b Merge remote branch 'vicb/profiler_log'
* vicb/profiler_log:
  [WebProfilerBundle] Always use the default background color for counters
  [WebProfilerBundle] The total number of log entries is not relevant, display only the number of errors when required
  [WebProfilerBundle] Display the number of log entries together with the number of errors
2011-03-09 17:30:07 +01:00
Victor Berchet
6571140b17 [WebProfilerBundle] Always use the default background color for counters 2011-03-09 17:27:48 +01:00
Victor Berchet
95d3fd2fdb [WebProfilerBundle] Always use the default background color for counters 2011-03-09 17:25:28 +01:00
Victor Berchet
643a2d5657 [WebProfilerBundle] Remove dead code 2011-03-09 16:15:31 +01:00
Victor Berchet
f49a30c366 [WebProfilerBundle] Better handling of queries with an empty result 2011-03-09 15:27:28 +01:00
Victor Berchet
ed09566a47 [WebProfilerBundle] Improve the "token not found" page 2011-03-09 15:27:25 +01:00
Victor Berchet
c9ab59399c [WebProfilerBundle] Always remember the query including the token 2011-03-09 15:27:09 +01:00
Victor Berchet
45ff4948b3 [WebProfilerBundle] Apply missing styles 2011-03-09 14:06:57 +01:00
Victor Berchet
62341e5ad6 [WebProfilerBundle] The total number of log entries is not relevant, display only the number of errors when required 2011-03-08 15:55:10 +01:00
Fabien Potencier
33b9cacc3f Merge remote branch 'vicb/profiler_tweaks'
* vicb/profiler_tweaks:
  Tweak inline js
  [WebProfilerBundle] Tweak some css
2011-03-08 14:43:57 +01:00
Victor Berchet
ba9e5b58ff Tweak inline js 2011-03-08 10:23:31 +01:00
Victor Berchet
6df06dffaa [WebProfilerBundle] Tweak some css 2011-03-08 10:05:00 +01:00
Fabien Potencier
91d7caca6b merged 2011-03-08 09:08:09 +01:00
Victor Berchet
d171eaf801 [WebProfilerBundle] Display the number of log entries together with the number of errors 2011-03-08 09:03:41 +01:00
Fabien Potencier
b5085d4823 Merge remote branch 'Exeu/webprofiler-fixes'
* Exeu/webprofiler-fixes:
  Fixed the Profiler-Layout of MongoDBBundle to work without actuvating the DoctrineBundle
2011-03-07 20:37:56 +01:00
Bernhard Schussek
2cf3779a2c Renamed EventArgs classes and adapted remaining code to EventManager
The only missing part is ContainerAwareEventManager::addEventSubscriberService(),
because I'm not sure how to find out the class name of a service in the DIC.

Also, inline documentation of this code needs to be finished once it is accepted.
2011-03-07 19:16:05 +01:00
Bernhard Schussek
a54d3e6fb0 Merge remote branch 'symfony/master' into event-manager 2011-03-07 19:15:57 +01:00
Victor Berchet
4f15840e4b [webProfilerBundle] Update the 'token not found' page with the new design 2011-03-07 18:46:28 +01:00
Exeu
58123c620f Fixed the Profiler-Layout of MongoDBBundle to work without actuvating the DoctrineBundle 2011-03-07 18:00:24 +01:00
Jordi Boggiano
b79fb28f12 [WebProfilerBundle] Display hand cursor on the close button 2011-03-07 15:03:45 +01:00
Douglas Greenshields
e4f9f4ddd7 [WebProfilerBundle] changed search input on web profiler to use HTML5 search input type 2011-03-06 21:06:35 +00:00
Fabien Potencier
ecc0a83912 [WebProfilerBundle] updatd favicon 2011-03-06 19:05:01 +01:00
Francis Besset
b03463dd55 [WebProfilerBundle] Deleted one pixel on the left for logs icon 2011-03-06 15:52:10 +01:00
Francis Besset
4c0f7f26e4 [WebProfiler] Fixed integration of web debug toolbar 2011-03-06 15:30:02 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Fabien Potencier
aca2c161c8 [WebProfilerBundle] made various changes to the profiler 2011-03-06 11:58:49 +01:00
alexandresalome
d7ce23fe53 Change the count span font size 2011-03-06 11:44:58 +01:00
alexandresalome
fa6a9c1db9 Make the width adapt the page 2011-03-06 11:44:58 +01:00
alexandresalome
0ce6630ba3 Change the doctrine image resource 2011-03-06 11:44:58 +01:00
alexandresalome
659bfc5615 Remove png_fix class 2011-03-06 11:44:58 +01:00
alexandresalome
0b41116a7b Change profiler menu entry images to be in template 2011-03-06 11:44:58 +01:00
alexandresalome
56dee48342 Change CSS URL to be relative to CSS folder 2011-03-06 11:44:58 +01:00
hhamon
91caf4b6e3 [WebProfilerBundle] customized search and admin tools in the profiler left sidebar 2011-03-06 11:44:57 +01:00
hhamon
124461ccee [WebProfilerBundle] fixed exception stack trace integration 2011-03-06 11:44:57 +01:00
hhamon
f4f78d47c8 [WebProfilerBundle] simplified theme 2011-03-06 11:44:57 +01:00
hhamon
8367694371 [WebProfilerBundle] simplified new web profiler layout 2011-03-06 11:44:57 +01:00
hhamon
bfb6e03290 [WebProfilerBundle] added missing security.png pictogram 2011-03-06 11:44:57 +01:00
hhamon
d37f52c743 [WebProfilerBundle] implemented new web profiler layout 2011-03-06 11:44:56 +01:00
hhamon
2d68ca4d00 [WebProfilerBundle] changed web debug toolbar css layout 2011-03-06 11:44:56 +01:00
Bernhard Schussek
f1393d7b1f Replaced EventDispatcher by Doctrine's EventManager implementation
Doctrine's EventManager implementation has several advantages over the
EventDispatcher implementation of Symfony2. Therefore I suggest that we
use their implementation.

Advantages:

 * Event Listeners are objects, not callbacks. These objects have handler
   methods that have the same name as the event. This helps a lot when
   reading the code and makes the code for adding an event listener shorter.
 * You can create Event Subscribers, which are event listeners with an
   additional getSubscribedEvents() method. The benefit here is that the
   code that registers the subscriber doesn't need to know about its
   implementation.
 * All events are defined in static Events classes, so users of IDEs benefit
   of code completion
 * The communication between the dispatching class of an event and all
   listeners is done through a subclass of EventArgs. This subclass can be
   tailored to the type of event. A constructor, setters and getters can be
   implemented that verify the validity of the data set into the object.
   See examples below.
 * Because each event type corresponds to an EventArgs implementation,
   developers of event listeners can look up the available EventArgs methods
   and benefit of code completion.
 * EventArgs::stopPropagation() is more flexible and (IMO) clearer to use
   than notifyUntil(). Also, it is a concept that is also used in other
   event implementations

Before:

    class EventListener
    {
        public function handle(EventInterface $event, $data) { ... }
    }

    $dispatcher->connect('core.request', array($listener, 'handle'));
    $dispatcher->notify('core.request', new Event(...));

After (with listeners):

    final class Events
    {
        const onCoreRequest = 'onCoreRequest';
    }

    class EventListener
    {
        public function onCoreRequest(RequestEventArgs $eventArgs) { ... }
    }

    $evm->addEventListener(Events::onCoreRequest, $listener);
    $evm->dispatchEvent(Events::onCoreRequest, new RequestEventArgs(...));

After (with subscribers):

    class EventSubscriber
    {
        public function onCoreRequest(RequestEventArgs $eventArgs) { ... }

        public function getSubscribedEvents()
        {
            return Events::onCoreRequest;
        }
    }

    $evm->addEventSubscriber($subscriber);
    $evm->dispatchEvent(Events::onCoreRequest, new RequestEventArgs(...));
2011-03-05 15:30:34 +01:00
Alexander Zogheb
80b282b115 [WebProfilerBundle] Optimization to listener 2011-03-05 00:57:48 -08:00
noel guilbert
a8eff2b154 Improved profiler to store and retrieve sub requests data 2011-02-26 17:24:02 +01:00
Kris Wallsmith
2b2a7f0a1d added nowrap style to WDT toolbar so image and text stays together when the toolbar wraps 2011-02-24 06:14:08 -08:00
Fabien Potencier
353177d1d6 replaced Response::createRedirect by a new RedirectResponse class 2011-02-21 18:10:53 +01:00
Fabien Potencier
d94acd85f9 remove response as a service
The Response is not available in the DIC anymore.

When you need to create a response, create an instance of
Symfony\Component\HttpFoundation\Response instead.

As a side effect, the Controller::createResponse() and Controller::redirect()
methods have been removed and can easily be replaced as follows:

  return $this->createResponse('content', 200, array('foo' => 'bar'));
  return new Response('content', 200, array('foo' => 'bar'));

  return $this->redirect($url);
  return Response::createRedirect($url);
2011-02-21 17:36:04 +01:00
Fabien Potencier
23e9386a0e changed all extensions to use the default Extension::getAlias() impl 2011-02-20 08:58:37 +01:00
Fabien Potencier
28bf834c0c [WebProfilerBundle] made the WDT less intruisive by moving it to its own Ajax request 2011-02-19 23:05:22 +01:00
Fabien Potencier
67ec6e5d94 Merge remote branch 'hidenorigoto/fix-profiler-header'
* hidenorigoto/fix-profiler-header:
  [WebProfilerBundle]link to the original url to go back to the application easily
2011-02-19 17:32:19 +01:00
hidenorigoto
bbdbd81877 [WebProfilerBundle]link to the original url to go back to the application easily 2011-02-20 01:05:31 +09:00
Christophe Coevoet
857a9f3b8b [WebProfilerBundle] Fixed template to work with the new behavior of {% set %} 2011-02-19 16:54:34 +01:00
Fabien Potencier
0834bf47dc [WebProfilerBundle] removed the WDT on malformed HTML content 2011-02-19 14:41:22 +01:00
Fabien Potencier
2c45611f4e fixed WDT link to the profiler 2011-02-19 14:11:18 +01:00
Fabien Potencier
dff3585162 fixed profiler when using ESI in dev env 2011-02-19 12:18:49 +01:00
Lukas Kahwe Smith
7f182bd877 implicitly load all registered bundles, all loading is now handled by load(), disable loading of an extension explcitly via setting the extension config to false (for now only Yaml is implemented) 2011-02-15 22:11:08 +01:00
Fabien Potencier
14aa95ba21 added the concept of a main DIC extension for bundles
This allows for better conventions and better error messages if you
use the wrong configuration alias in a config file.

This is also the first step for a bigger refactoring of how the configuration
works (see next commits).

 * Bundle::registerExtensions() method has been renamed to Bundle::build()

 * The "main" DIC extension must be renamed to the new convention to be
   automatically registered:

      SensioBlogBundle -> DependencyInjection\SensioBlogExtension

 * The main DIC extension alias must follow the convention:

      sensio_blog for SensioBlogBundle

 * If you have more than one extension for a bundle (which should really
   never be the case), they must be registered manually by overriding the
   build() method

 * If you use YAML or PHP for your configuration, renamed the following
   configuration entry points in your configs:

      app -> framework
      webprofiler -> web_profiler
      doctrine_odm -> doctrine_mongo_db
2011-02-15 22:11:07 +01:00
Fabien Potencier
5c905beb13 moved common configuration classes to a new Config component 2011-02-13 22:31:50 +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
hidenorigoto
82a8a3fb42 [WebProfilerBundle][FrameworkBundle]Fixed events panel to handle closures correctly 2011-02-10 15:32:04 +01:00
Fabien Potencier
a8ec9b27f0 moved duplicated files to a new Config component 2011-02-10 03:43:36 +01:00
Fabien Potencier
e58a84eb09 added a FileLocator to DIC so that we can load resources like @BundleName/Resources/... 2011-02-10 00:44:02 +01:00
Fabien Potencier
e5403490e7 removed the need to define getNamespace() and getPath() in bundles 2011-02-05 22:40:30 +01:00
Fabien Potencier
f455700b88 fixed previous commit 2011-02-04 12:18:26 +01:00
Victor Berchet
3ed47114d6 [Bundle] Make getPath() less error prone by allowing both backward and forward slashes 2011-02-04 12:12:19 +01:00
Fabien Potencier
e645090423 moved security related things to a new SecurityBundle (the Security component is left unchanged) 2011-01-26 19:10:54 +01:00
Fabien Potencier
0e66e388ec added two interfaces: EventInterface and EventDispatcherInterface 2011-01-25 14:23:32 +01:00
Fabien Potencier
1c11d81611 made all event listeners lazy loaded
* The register() method on all listeners has been removed
 * Instead, the information is now put directly in the DIC tag

For instance, a listener on core.request had this method:

   public function register(EventDispatcher $dispatcher, $priority = 0)
   {
       $dispatcher->connect('core.response', array($this, 'filter'), $priority);
   }

And this tag in the DIC configuration:

  <tag name="kernel.listener" />

Now, it only has the following configuration:

  <tag name="kernel.listener" event="core.response" method="filter" priority="0" />

The event and method attributes are now mandatory.
2011-01-23 18:07:05 +01:00
Fabien Potencier
73ab687521 moved ControllerResolver methods to HttpKernel (makes more sense) 2011-01-23 10:23:33 +01:00
Johannes M. Schmitt
8d19136a55 refactors extensions to call XXXLoad only once with all config sections 2011-01-21 17:04:18 +01:00
Henrik Bjørnskov
5e9c9f4174 Template rename fix files 2011-01-21 15:06:10 +01:00
Henrik Bjørnskov
a5007febdd [FrameworkBundle] Renderer is once more the last of the templates 2011-01-21 15:06:10 +01:00
Fabien Potencier
6d1e91a1fa refactored bundle management
Before I explain the changes, let's talk about the current state.

Before this patch, the registerBundleDirs() method returned an ordered (for
resource overloading) list of namespace prefixes and the path to their
location. Here are some problems with this approach:

 * The paths set by this method and the paths configured for the autoloader
   can be disconnected (leading to unexpected behaviors);

 * A bundle outside these paths worked, but unexpected behavior can occur;

 * Choosing a bundle namespace was limited to the registered namespace
   prefixes, and their number should stay low enough (for performance reasons)
   -- moreover the current Bundle\ and Application\ top namespaces does not
   respect the standard rules for namespaces (first segment should be the
   vendor name);

 * Developers must understand the concept of "namespace prefixes" to
   understand the overloading mechanism, which is one more thing to learn,
   which is Symfony specific;

 * Each time you want to get a resource that can be overloaded (a template for
   instance), Symfony would have tried all namespace prefixes one after the
   other until if finds a matching file. But that can be computed in advance
   to reduce the overhead.

Another topic which was not really well addressed is how you can reference a
file/resource from a bundle (and take into account the possibility of
overloading). For instance, in the routing, you can import a file from a
bundle like this:

  <import resource="FrameworkBundle/Resources/config/internal.xml" />

Again, this works only because we have a limited number of possible namespace
prefixes.

This patch addresses these problems and some more.

First, the registerBundleDirs() method has been removed. It means that you are
now free to use any namespace for your bundles. No need to have specific
prefixes anymore. You are also free to store them anywhere, in as many
directories as you want. You just need to be sure that they are autoloaded
correctly.

The bundle "name" is now always the short name of the bundle class (like
FrameworkBundle or SensioCasBundle). As the best practice is to prefix the
bundle name with the vendor name, it's up to the vendor to ensure that each
bundle name is unique. I insist that a bundle name must be unique. This was
the opposite before as two bundles with the same name was how Symfony2 found
inheritance.

A new getParent() method has been added to BundleInterface. It returns the
bundle name that the bundle overrides (this is optional of course). That way,
there is no ordering problem anymore as the inheritance tree is explicitely
defined by the bundle themselves.

So, with this system, we can easily have an inheritance tree like the
following:

FooBundle < MyFooBundle < MyCustomFooBundle

MyCustomFooBundle returns MyFooBundle for the getParent() method, and
MyFooBundle returns FooBundle.

If two bundles override the same bundle, an exception is thrown.

Based on the bundle name, you can now reference any resource with this
notation:

    @FooBundle/Resources/config/routing.xml
    @FooBundle/Controller/FooController.php

This notation is the input of the Kernel::locateResource() method, which
returns the location of the file (and of course it takes into account
overloading).

So, in the routing, you can now use the following:

    <import resource="@FrameworkBundle/Resources/config/internal.xml" />

The template loading mechanism also use this method under the hood.

As a bonus, all the code that converts from internal notations to file names
(controller names: ControllerNameParser, template names: TemplateNameParser,
resource paths, ...) is now contained in several well-defined classes. The
same goes for the code that look for templates (TemplateLocator), routing
files (FileLocator), ...

As a side note, it is really easy to also support multiple-inheritance for a
bundle (for instance if a bundle returns an array of bundle names it extends).
However, this is not implemented in this patch as I'm not sure we want to
support that.

How to upgrade:

 * Each bundle must now implement two new mandatory methods: getPath() and
   getNamespace(), and optionally the getParent() method if the bundle extends
   another one. Here is a common implementation for these methods:

    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return 'MyFrameworkBundle';
    }

    /**
     * {@inheritdoc}
     */
    public function getNamespace()
    {
        return __NAMESPACE__;
    }

    /**
     * {@inheritdoc}
     */
    public function getPath()
    {
        return strtr(__DIR__, '\\', '/');
    }

 * The registerBundleDirs() can be removed from your Kernel class;

 * If your code relies on getBundleDirs() or the kernel.bundle_dirs parameter,
   it should be upgraded to use the new interface (see Doctrine commands for
   many example of such a change);

 * When referencing a bundle, you must now always use its name (no more \ or /
   in bundle names) -- this transition was already done for most things
   before, and now applies to the routing as well;

 * Imports in routing files must be changed:
    Before: <import resource="Sensio/CasBundle/Resources/config/internal.xml" />
    After:  <import resource="@SensioCasBundle/Resources/config/internal.xml" />
2011-01-20 18:42:47 +01:00
Victor Berchet
b75840c6fc DI Extension: use the base class from the HttpKernel Component 2011-01-19 22:08:41 +01:00
Dominique Bongiraud
64fb94c725 normalized license messages in PHP files 2011-01-18 08:07:46 +01:00
Fabien Potencier
4c2537f1c3 made data collectors private 2011-01-17 11:17:48 +01:00
Fabien Potencier
d06f805d95 added a priority for data collectors 2011-01-17 11:09:31 +01:00
Fabien Potencier
a28627dfaf tweaked HTML 2011-01-17 07:42:21 +01:00
Christophe Coevoet
105d5918bc Added the roles in the Security panel of the profiler 2011-01-17 07:40:28 +01:00
Fabien Potencier
a365ab2884 changed the template name format
Before

bundle:section:template.format.renderer

After

bundle:section:template.renderer.format

Notice that both the renderer and the format are mandatory.
2011-01-15 12:33:27 +01:00
Fabien Potencier
b47cf7984b changed priority meaning to be more intuitive 2011-01-14 14:37:32 +01:00
Christophe Coevoet
1f88edd9e0 Updated routing to the new syntax 2011-01-12 07:09:19 +01:00
Victor Berchet
f2d32ccfde [Extensions] Type hints 2011-01-11 20:31:44 +01:00
Victor Berchet
40dac2363e [WebProfiler] Normalize header name and use a single reference 2011-01-11 20:30:37 +01:00
Victor Berchet
9a2e053cbc [Event] Collected data is about listener (not event) calls 2011-01-11 14:57:18 +01:00
Fabien Potencier
10fee8c8bb [HttpKernel] added escaping to the profiler SQLite storage 2011-01-08 14:29:59 +01:00
Victor Berchet
89433fbcfe [ProfilerController] Fix handling of uploaded files 2011-01-07 15:53:45 +01:00
Victor Berchet
e2f2513b05 [ProfilerController] fix view parameters 2011-01-07 15:53:02 +01:00
Victor Berchet
ae5a506532 [WebProfilerBundle] Update the notfound template (to match the default layout) 2011-01-07 15:51:08 +01:00
Victor Berchet
99b9bff684 [WebProfilerBundle] The search results must be rendered in the panel slot 2011-01-07 15:48:25 +01:00
Fabien Potencier
3022aa3e35 [WebProfilerBundle] fixed layout when templates are not defined 2011-01-07 15:48:05 +01:00
Johannes M. Schmitt
da5475ec42 service visibility changes 2011-01-05 16:01:48 +01:00
Ryan Weaver
9b10c8a866 [WebProfileBundle] Adding more information to the Response content returned when an intercept is redirected.
Since this is a debug-only feature, I think the more details we can include, the less trouble it'll cause when people are not expecting their requests to be intercepted. It's a good feature - this better-communicates what's happening.
2011-01-04 08:13:51 +01:00
Fabien Potencier
62cd09e708 [TwigBundle] replaced the asset tag with an asset function (from {% asset css/foo.css %} to {{ asset('css/foo.css') }} 2010-12-31 16:59:44 +01:00
Henrik Bjørnskov
42d2f837fe [WebProfilerBundle] Another call to block removed. 2010-12-30 13:41:10 +01:00
Fabien Potencier
0f95f75874 [WebProfilerBundle] updated templates for the latest version of Twig 2010-12-30 12:12:06 +01:00
Jordi Boggiano
98db58ac17 Minor template cleanup 2010-12-20 18:22:51 +01:00
Fabien Potencier
0518f04935 [WebProfilerBundle] removed the hide button when in the web profiler 2010-12-20 12:36:53 +01:00
Jordi Boggiano
b861c5a765 [WebProfilerBundle] Adding 'hide' button on the toolbar, fixes #9362 2010-12-20 12:31:58 +01:00
Fabien Potencier
b0cfec598e [TwigBundle] simplified code 2010-12-20 12:31:10 +01:00
Fabien Potencier
5d65f3edbd [TwigBundle] converted path and url tags to functions
{% url 'blog_post' with { 'id': post.id } %} -> {{ url('blog_post', { 'id': post.id }) }}
{% path 'blog_post' with { 'id': post.id } %} -> {{ path('blog_post', { 'id': post.id }) }}
2010-12-20 09:39:51 +01:00
Fabien Potencier
6970a46b84 updated Twig templates for the new hash syntax 2010-12-14 09:46:24 +01:00
Jordi Boggiano
c0565a5d47 [WebProfilerBundle][FrameworkBundle] Fix twig templates for compatibility with strict_variables 2010-11-26 20:24:31 +01:00
Jordi Boggiano
998d872f28 [WebProfilerBundle] Fixed var name in toolbar 2010-11-26 19:09:40 +01:00
Fabien Potencier
944d91c1df made some method name changes to have a better coherence throughout the framework
When an object has a "main" many relation with related "things" (objects,
parameters, ...), the method names are normalized:

 * get()
 * set()
 * all()
 * replace()
 * remove()
 * clear()
 * isEmpty()
 * add()
 * register()
 * count()
 * keys()

The classes below follow this method naming convention:

 * BrowserKit\CookieJar -> Cookie
 * BrowserKit\History -> Request
 * Console\Application -> Command
 * Console\Application\Helper\HelperSet -> HelperInterface
 * DependencyInjection\Container -> services
 * DependencyInjection\ContainerBuilder -> services
 * DependencyInjection\ParameterBag\ParameterBag -> parameters
 * DependencyInjection\ParameterBag\FrozenParameterBag -> parameters
 * DomCrawler\Form -> FormField
 * EventDispatcher\Event -> parameters
 * Form\FieldGroup -> Field
 * HttpFoundation\HeaderBag -> headers
 * HttpFoundation\ParameterBag -> parameters
 * HttpFoundation\Session -> attributes
 * HttpKernel\Profiler\Profiler -> DataCollectorInterface
 * Routing\RouteCollection -> Route
 * Security\Authentication\AuthenticationProviderManager -> AuthenticationProviderInterface
 * Templating\Engine -> HelperInterface
 * Translation\MessageCatalogue -> messages

The usage of these methods are only allowed when it is clear that there is a
main relation:

 * a CookieJar has many Cookies;

 * a Container has many services and many parameters (as services is the main
   relation, we use the naming convention for this relation);

 * a Console Input has many arguments and many options. There is no "main"
   relation, and so the naming convention does not apply.

For many relations where the convention does not apply, the following methods
must be used instead (where XXX is the name of the related thing):

 * get()      -> getXXX()
 * set()      -> setXXX()
 * all()      -> getXXXs()
 * replace()  -> setXXXs()
 * remove()   -> removeXXX()
 * clear()    -> clearXXX()
 * isEmpty()  -> isEmptyXXX()
 * add()      -> addXXX()
 * register() -> registerXXX()
 * count()    -> countXXX()
 * keys()
2010-11-25 17:30:06 +01:00
H. Westphal
5b056b2b9a Refactored web profiler template definitions to make it easier for bundle developers to add their templates 2010-11-23 12:48:35 +01:00
Fabien Potencier
e9d4d990df [WebProfiler] renamed block names for data collector templates 2010-11-22 08:43:30 +01:00
Fabien Potencier
381347bcfe [WebProfilerBundle] fixed data collector loading (they should always be loaded as you can enable the web profiler without the web debug toolbar) 2010-11-21 15:51:50 +01:00
H. Westphal
97d4dce614 Adds the ability to configure additional web profiler templates 2010-11-21 15:48:01 +01:00
Fabien Potencier
6fa943ad54 moved Exception and WebProfiler templates to Twig 2010-11-21 15:37:01 +01:00
henrikbjorn
c5ceb37f8b Changed bag.php and request_panel.php to dump arrays and objects as yaml. 2010-11-18 19:54:29 +01:00
Jordi Boggiano
ac0081f8b9 Switching doctypes to HTML5, it's the future 2010-11-18 07:01:03 +01:00
Fabien Potencier
4cd5b2b1ff [WebProfilerBundle] fixed redirection interceptions (we must keep as many headers as possible) 2010-11-09 22:48:02 +01:00
Fabien Potencier
4d4f9f344e added request attributes in the request data collector and web profiler 2010-11-06 16:47:49 +01:00
Fabien Potencier
52e03e8885 simplified code 2010-10-31 14:45:04 +01:00
Fabien Potencier
e1116524ed [WebProfiler] fixed WDT display 2010-10-26 17:42:44 +02:00
Fabien Potencier
f216f313e8 added the Security Component and its integration into the MVC framework
Happy birthday symfony!
2010-10-19 13:33:17 +02:00
Kris Wallsmith
f79e23ffb5 Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
pborreli
2dc357d3a8 [WebProfilerBundle] Fixed label reference, fixed markup, optimized css and images 2010-10-18 16:52:47 +02:00
Masao Maeda
ade5fd6574 fixed: fixed the bug of request_panel.php in WebProfiler
When the session attributes don't exist, $data->sessionAttributes->getRawValue() cannot be called as not being defined.
So check the session attributes before calling getRawValue()
2010-10-08 15:53:41 +02:00
Bulat Shakirzyanov
db3476aeaa [WebProfilerBundle] simplified DIC extension 2010-10-06 14:31:06 +02:00
Alex
568cd57da6 [WebProfilerBundle] updated two references to the bag template to the new style by adding a .php extension to them 2010-09-30 07:17:13 +02:00
Fabien Potencier
a6dc10c31a changed templating name notation
Old notation: bundle:section:name.format:renderer (where both format and renderer are optional)
New notation: bundle:section:name.format.renderer (where only format is optional)

Valid new template names: Blog:Post:index.php, Blog:Post:index.xml.php

The new notation is more explicit and put all templating engines on the same level (there is no
more the concept of a "default" templating engine).

Even if the notation changed, the semantic has not. So, the logical template name for the above
examples is still 'index'. So, if you use a database loader for instance, the template
name is 'index' and everything else are options.

Upgrading current applications can be easily done by appending .php to each existing template
name reference (in both controllers and templates), and changing :twig to .twig for Twig templates
(for twig templates, you should also add .twig within templates themselves when referencing
another Twig templates).
2010-09-28 08:33:33 +02:00
Fabien Potencier
9e50782b9d fixed request data collector 2010-09-27 21:17:37 +02:00
Dustin Whittle
f3993b45c1 added width, height, alt tags for all images used in web profilers (for proper html) 2010-09-23 09:04:26 +02:00
Fabien Potencier
d657adbfa2 removed Symfony\Framework
Things have been moved to Symfony\Component\HttpKernel
and Symfony\Bundle\FrameworkBundle

The kernel configuration namespace was removed and merged
with the main web configuration namespace (kernel:config => web:config,
kernel:test => web:test, and kernel:session => web:session):

Before:
<kernel:config charset="UTF-8" error_handler="null" />

<web:config csrf-secret="xxxxxxxxxx">
    <web:router resource="%kernel.root_dir%/config/routing.xml" />
    <web:validation enabled="true" annotations="true" />
</web:config>

After:
<web:config csrf-secret="xxxxxxxxxx" charset="UTF-8" error-handler="null">
    <web:router resource="%kernel.root_dir%/config/routing.xml" />
    <web:validation enabled="true" annotations="true" />
</web:config>

Renamed classes:

Symfony\{Framework => Bundle\FrameworkBundle}\Cache\Cache
Symfony\{Framework => Bundle\FrameworkBundle}\Client
Symfony\{Framework => Bundle\FrameworkBundle}\Debug\EventDispatcher
Symfony\{Framework => Bundle\FrameworkBundle}\Debug\EventDispatcherTraceableInterface
Symfony\{Framework => Bundle\FrameworkBundle}\EventDispatcher
Symfony\{Framework => Component\HttpFoundation}\UniversalClassLoader
Symfony\{Framework => Component\HttpKernel}\Bundle\Bundle
Symfony\{Framework => Component\HttpKernel}\Bundle\BundleInterface
Symfony\{Framework => Component\HttpKernel}\ClassCollectionLoader
Symfony\{Framework => Component\HttpKernel}\Debug\ErrorException
Symfony\{Framework => Component\HttpKernel}\Debug\ErrorHandler
Symfony\{Bundle\FrameworkBundle => Component\HttpKernel}\Debug\ExceptionListener
Symfony\{Framework => Component\HttpKernel}\Kernel
2010-09-17 12:58:24 +02:00
Fabien Potencier
2f8db9135a fixed webprofiler on Windows (closes #9045) 2010-09-06 15:25:33 +02:00
Fabien Potencier
c8935cc25a [WebProfilerBundle] added a favicon.ico 2010-09-01 18:42:50 +02:00
Fabien Potencier
7e2f135245 simplified Profiler method names 2010-09-01 16:53:28 +02:00
Fabien Potencier
4e57899374 [WebProfilerBundle] added the bundle 2010-09-01 10:11:22 +02:00