Skip to content

Commit 6b7c57e

Browse files
authored
Upgrade Symfony 3.x to 4.4.x (GoogleCloudPlatform#1011)
- [x] Remove deprecated code for Symfony >= 4.3 - [x] Upgrade SF framework from 3.x to 4.4.x. Deprecated changes: * The class `GetResponseForExceptionEvent` is deprecated since Symfony 4.3, use ExceptionEvent instead. * Method `$event->getException()` is deprecated since Symfony 4.4, use getThrowable instead
1 parent f969df5 commit 6b7c57e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

appengine/flexible/symfony/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Before setting up Symfony on App Engine, you will need to complete the following
1717
Use composer to download Symfony Standard and its dependencies
1818

1919
```sh
20-
composer create-project symfony/framework-standard-edition:^3.0
20+
composer create-project symfony/framework-standard-edition:^4.4
2121
```
2222

2323
# Integrate Stackdriver

appengine/flexible/symfony/src/AppBundle/EventSubscriber/ExceptionSubscriber.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Google\Cloud\ErrorReporting\Bootstrap;
88
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
9-
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
9+
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
1010
use Symfony\Component\HttpKernel\KernelEvents;
1111

1212
class ExceptionSubscriber implements EventSubscriberInterface
@@ -19,9 +19,9 @@ public static function getSubscribedEvents()
1919
]];
2020
}
2121

22-
public function logException(GetResponseForExceptionEvent $event)
22+
public function logException(ExceptionEvent $event)
2323
{
24-
$exception = $event->getException();
24+
$exception = $event->getThrowable();
2525
Bootstrap::exceptionHandler($exception);
2626
}
2727
}

appengine/flexible/symfony/test/DeployTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static function verifyEnvironmentVariables()
6969
private static function createSymfonyProject($targetDir)
7070
{
7171
// install
72-
$symfonyVersion = 'symfony/framework-standard-edition:^3.0';
72+
$symfonyVersion = 'symfony/framework-standard-edition:^4.4';
7373
$cmd = sprintf('composer create-project --no-scripts %s %s', $symfonyVersion, $targetDir);
7474
$process = self::createProcess($cmd);
7575
$process->setTimeout(300); // 5 minutes

0 commit comments

Comments
 (0)