-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Symfony 3.x Compatibility: - Updated usage of table helper (deprecated in 3.x) in commands to Table class. - Updated references to security context (deprecated in 3.x) to token storage. - Updated readme, should only register bundle in dev and test environments where it is intended to be used. * Symfony 3: - Fixes issue with webdev toolbar when on anonymous access pages.
- Loading branch information
Showing
9 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; | ||
use Symfony\Component\Security\Core\Exception\AccessDeniedException; | ||
use Egulias\SecurityDebugCommandBundle\HttpKernel\SimpleHttpKernel; | ||
use Symfony\Component\Console\Helper\Table; | ||
|
||
/** | ||
* @author Eduardo Gulias <[email protected]> | ||
|
@@ -51,7 +52,7 @@ protected function execute(InputInterface $input, OutputInterface $output) | |
$session = $this->getContainer()->get('session'); | ||
$session->setName('security.debug.console'); | ||
$session->set('_security_' . $firewallProvider, serialize($token)); | ||
$this->getContainer()->get('security.context')->setToken($token); | ||
$this->getContainer()->get('security.token_storage')->setToken($token); | ||
|
||
$kernel = new SimpleHttpKernel(); | ||
$request = Request::create($uri, 'GET', array(), array('security.debug.console' => true)); | ||
|
@@ -77,7 +78,7 @@ protected function execute(InputInterface $input, OutputInterface $output) | |
sprintf('Firewall <comment>%s</comment> listeners', $firewallProvider) | ||
); | ||
$output->writeln($formattedLine); | ||
$table = $this->getHelperSet()->get('table'); | ||
$table = new Table($output); | ||
$table->setHeaders(array('Class', 'Stopped propagation')); | ||
$firewallContext = $map->getContext(); | ||
$event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
services: | ||
egulias.voters_collector: | ||
class: Egulias\SecurityDebugCommandBundle\DataCollector\VotersCollector | ||
arguments: [@security.access.decision_manager, @security.context] | ||
arguments: ["@security.access.decision_manager", "@security.token_storage"] | ||
egulias.firewall_collector: | ||
class: Egulias\SecurityDebugCommandBundle\DataCollector\FirewallCollector | ||
arguments: [@security.context, @service_container] | ||
arguments: ["@security.token_storage", "@service_container"] | ||
egulias.security_listeners_debug: | ||
class: Egulias\SecurityDebugCommandBundle\EventListener\SecurityListenersDebugListener | ||
arguments: [@sensio_framework_extra.security.listener, @data_collector.egulias_security_debug] | ||
arguments: ["@sensio_framework_extra.security.listener", "@data_collector.egulias_security_debug"] | ||
tags: | ||
- {name: kernel.event_listener, event: kernel.exception, priority: 128} | ||
data_collector.egulias_security_debug: | ||
class: Egulias\SecurityDebugCommandBundle\DataCollector\SecurityDebugDataCollector | ||
arguments: [@egulias.voters_collector, @egulias.firewall_collector] | ||
arguments: ["@egulias.voters_collector", "@egulias.firewall_collector"] | ||
tags: | ||
- { name: data_collector, template: "EguliasSecurityDebugCommandBundle:Collector:security_debug", id: "egulias_security_debug"} |