Skip to content

Commit

Permalink
Add NelmioSecurityBundle and minor code improvements
Browse files Browse the repository at this point in the history
Included NelmioSecurityBundle in composer dependencies to enhance security features. Simplified import management in PwaRuntime and improved code readability in PwaDevServerSubscriber by adjusting line formatting. These changes aim to improve maintainability and clarity.
  • Loading branch information
Spomky committed Dec 16, 2024
1 parent 6225673 commit 7131d5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"ergebnis/phpunit-slow-test-detector": "^2.14",
"infection/infection": "^0.28|^0.29",
"matthiasnoback/symfony-config-test": "^5.1",
"nelmio/security-bundle": "^3.0",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpstan/extension-installer": "^1.1",
"phpstan/phpdoc-parser": "^1.28|^2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Subscriber/PwaDevServerSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public function onKernelRequest(RequestEvent $event): void

public function onKernelResponse(ResponseEvent $event): void
{
$headers = $event->getResponse()->headers;
$headers = $event->getResponse()
->headers;
if ($headers->has('X-Pwa-Dev')) {
$event->stopPropagation();
}
Expand Down
1 change: 1 addition & 0 deletions src/Twig/PwaRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Symfony\Component\AssetMapper\MappedAsset;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\Mime\MimeTypes;
use function array_key_exists;
use function sprintf;
use const ENT_COMPAT;
use const ENT_SUBSTITUTE;
Expand Down

0 comments on commit 7131d5b

Please sign in to comment.