From 2cdbdd300584bed8646364211502eb576564295f Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Thu, 6 Feb 2020 18:39:03 +0200 Subject: [PATCH 1/7] update symfony/dependency-injection version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 05c63e1..a5fc95a 100755 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "require": { "php": ">=5.6", "rollbar/rollbar": "^1", - "symfony/dependency-injection": "^3.4 | ^4.0", + "symfony/dependency-injection": "^3.4 | ^4.0 | ^5.0", "symfony/config": "^3.4 | ^4.0", "symfony/http-kernel": "^3.4 | ^4.0", "symfony/monolog-bundle": "*", From 2d6c90c7effc6bfc0a62b3ce1df217c97c794d6c Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Thu, 6 Feb 2020 18:43:52 +0200 Subject: [PATCH 2/7] update symfony/config symfony/http-kernel symfony/framework-bundle versions --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index a5fc95a..7272e6f 100755 --- a/composer.json +++ b/composer.json @@ -30,14 +30,14 @@ "php": ">=5.6", "rollbar/rollbar": "^1", "symfony/dependency-injection": "^3.4 | ^4.0 | ^5.0", - "symfony/config": "^3.4 | ^4.0", - "symfony/http-kernel": "^3.4 | ^4.0", + "symfony/config": "^3.4 | ^4.0 | ^5.0", + "symfony/http-kernel": "^3.4 | ^4.0 | ^5.0", "symfony/monolog-bundle": "*", "symfony/serializer": "*" }, "require-dev": { "phpunit/phpunit": "^5.7", - "symfony/framework-bundle": "^3.4 | ^4.0", + "symfony/framework-bundle": "^3.4 | ^4.0 | ^5.0", "squizlabs/php_codesniffer": "^2.7", "matthiasnoback/symfony-dependency-injection-test": "^1.1" }, From abeebaf1f423543f3619784bf94d1b7630ce1671 Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Thu, 6 Feb 2020 19:02:29 +0200 Subject: [PATCH 3/7] update rollbar/rollbar version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7272e6f..555d131 100755 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "require": { "php": ">=5.6", - "rollbar/rollbar": "^1", + "rollbar/rollbar": "^2", "symfony/dependency-injection": "^3.4 | ^4.0 | ^5.0", "symfony/config": "^3.4 | ^4.0 | ^5.0", "symfony/http-kernel": "^3.4 | ^4.0 | ^5.0", From e2615bcbcb05e672f164ce179e06aec36116cc7b Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Fri, 7 Feb 2020 10:33:45 +0200 Subject: [PATCH 4/7] update short factories and short configurators in Yaml to be compatible with symfony 5 --- Resources/config/services.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 4b8e19a..37f1c65 100755 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -5,10 +5,10 @@ services: - '@service_container' Rollbar\Monolog\Handler\RollbarHandler: - factory: 'Rollbar\Symfony\RollbarBundle\Factories\RollbarHandlerFactory:createRollbarHandler' + factory: ['@Rollbar\Symfony\RollbarBundle\Factories\RollbarHandlerFactory', createRollbarHandler] tags: - { name: monolog.logger, channel: rollbar } Rollbar\Symfony\RollbarBundle\Payload\Generator: arguments: - - '@service_container' \ No newline at end of file + - '@service_container' From 8f2b4a27cdbc4e6ad9e30d813b20584df1f0806e Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Fri, 7 Feb 2020 11:09:55 +0200 Subject: [PATCH 5/7] update php min version to 7.1 fix return types and small code fixes --- .travis.yml | 18 +++++---- DependencyInjection/Configuration.php | 2 +- DependencyInjection/RollbarExtension.php | 5 ++- Factories/RollbarHandlerFactory.php | 31 +++++++-------- Payload/ErrorItem.php | 6 +-- Payload/Generator.php | 18 ++++----- Payload/TraceItem.php | 4 +- .../DependencyInjection/ConfigurationTest.php | 4 +- .../RollbarExtensionTest.php | 10 ++--- Tests/Fixtures/ErrorHandler.php | 10 ++--- Tests/Fixtures/app/AppKernel.php | 20 ++++++---- Tests/Payload/ErrorItemTest.php | 15 ++++---- Tests/Payload/GeneratorTest.php | 38 ++++++++++--------- Tests/Payload/TraceChainTest.php | 2 +- Tests/Payload/TraceItemTest.php | 2 +- composer.json | 13 ++++--- 16 files changed, 102 insertions(+), 96 deletions(-) diff --git a/.travis.yml b/.travis.yml index acaf364..f292676 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,15 @@ language: php php: - - 5.6 - - 7.0 - 7.1 - 7.2 + - 7.3 env: - SYMFONY_VERSION=3.4.* - SYMFONY_VERSION=4.0.* - SYMFONY_VERSION=4.1.* + - SYMFONY_VERSION=5.0.* sudo: false dist: trusty @@ -20,14 +20,16 @@ cache: matrix: exclude: - - php: 5.6 + - php: 7.1 env: SYMFONY_VERSION=4.0.* - - php: 5.6 - env: SYMFONY_VERSION=4.1.* - - php: 7.0 - env: SYMFONY_VERSION=4.0.* - - php: 7.0 + - php: 7.1 env: SYMFONY_VERSION=4.1.* + - php: 7.1 + env: SYMFONY_VERSION=5.0.* + - php: 7.2 + env: SYMFONY_VERSION=5.0.* + - php: 7.3 + env: SYMFONY_VERSION=5.0.* before_install: - composer self-update diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 9844df3..79284f3 100755 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -19,7 +19,7 @@ class Configuration implements ConfigurationInterface /** * {@inheritdoc} */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder(RollbarExtension::ALIAS); diff --git a/DependencyInjection/RollbarExtension.php b/DependencyInjection/RollbarExtension.php index ca13c60..56aeb77 100755 --- a/DependencyInjection/RollbarExtension.php +++ b/DependencyInjection/RollbarExtension.php @@ -18,8 +18,9 @@ class RollbarExtension extends Extension /** * {@inheritdoc} + * @throws \Exception */ - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); @@ -35,7 +36,7 @@ public function load(array $configs, ContainerBuilder $container) /** * {@inheritdoc} */ - public function getAlias() + public function getAlias(): string { return static::ALIAS; } diff --git a/Factories/RollbarHandlerFactory.php b/Factories/RollbarHandlerFactory.php index b31c548..b9ea050 100755 --- a/Factories/RollbarHandlerFactory.php +++ b/Factories/RollbarHandlerFactory.php @@ -30,23 +30,20 @@ public function __construct(ContainerInterface $container) if (!empty($config['person_fn']) && is_callable($config['person_fn'])) { $config['person'] = null; - } else { - if (empty($config['person'])) { - $config['person_fn'] = function () use ($container) { - try { - $token = $container->get('security.token_storage')->getToken(); - - if ($token) { - $user = $token->getUser(); - $serializer = $container->get('serializer'); - $person = \json_decode($serializer->serialize($user, 'json'), true); - return $person; - } - } catch (\Exception $exception) { - // Ignore + } elseif (empty($config['person'])) { + $config['person_fn'] = static function () use ($container) { + try { + $token = $container->get('security.token_storage')->getToken(); + + if ($token) { + $user = $token->getUser(); + $serializer = $container->get('serializer'); + return \json_decode($serializer->serialize($user, 'json'), true); } - }; - } + } catch (\Exception $exception) { + // Ignore + } + }; } Rollbar::init($config, false, false, false); @@ -57,7 +54,7 @@ public function __construct(ContainerInterface $container) * * @return RollbarHandler */ - public function createRollbarHandler() + public function createRollbarHandler(): RollbarHandler { return new RollbarHandler(Rollbar::logger(), LogLevel::ERROR); } diff --git a/Payload/ErrorItem.php b/Payload/ErrorItem.php index 2285c20..3d6bc39 100755 --- a/Payload/ErrorItem.php +++ b/Payload/ErrorItem.php @@ -45,7 +45,7 @@ class ErrorItem */ public function __invoke($code, $message, $file, $line) { - $record = [ + return [ 'exception' => [ 'class' => $this->mapError($code), 'message' => implode(' ', [ @@ -65,8 +65,6 @@ public function __invoke($code, $message, $file, $line) ], ], ]; - - return $record; } /** @@ -76,7 +74,7 @@ public function __invoke($code, $message, $file, $line) * * @return string */ - protected function mapError($code) + protected function mapError($code): string { $code = (int) $code; diff --git a/Payload/Generator.php b/Payload/Generator.php index 39ea395..481208c 100755 --- a/Payload/Generator.php +++ b/Payload/Generator.php @@ -41,7 +41,7 @@ public function __construct(ContainerInterface $container) * * @return array */ - public function getExceptionPayload($exception) + public function getExceptionPayload($exception): array { /** * Build payload @@ -84,7 +84,7 @@ public function getExceptionPayload($exception) * * @return array */ - protected function buildGeneratorError($object, $file, $line) + protected function buildGeneratorError($object, $file, $line): array { $item = new ErrorItem(); @@ -101,7 +101,7 @@ protected function buildGeneratorError($object, $file, $line) * * @return array */ - public function getErrorPayload($code, $message, $file, $line) + public function getErrorPayload($code, $message, $file, $line): array { $item = new ErrorItem(); @@ -110,7 +110,7 @@ public function getErrorPayload($code, $message, $file, $line) 'request' => $this->getRequestInfo(), 'environment' => $this->getKernel()->getEnvironment(), 'framework' => Kernel::VERSION, - 'language_version' => phpversion(), + 'language_version' => PHP_VERSION, 'server' => $this->getServerInfo(), ]; @@ -122,7 +122,7 @@ public function getErrorPayload($code, $message, $file, $line) * * @return array */ - protected function getRequestInfo() + protected function getRequestInfo(): array { $request = $this->getContainer()->get('request_stack')->getCurrentRequest(); if (empty($request)) { @@ -144,9 +144,9 @@ protected function getRequestInfo() * * @return array */ - protected function getServerInfo() + protected function getServerInfo(): array { - $args = isset($_SERVER['argv']) ? $_SERVER['argv'] : []; + $args = $_SERVER['argv'] ?? []; $kernel = $this->getKernel(); return [ @@ -163,7 +163,7 @@ protected function getServerInfo() * * @return ContainerInterface */ - public function getContainer() + public function getContainer(): ContainerInterface { return $this->container; } @@ -173,7 +173,7 @@ public function getContainer() * * @return Kernel */ - public function getKernel() + public function getKernel(): Kernel { return $this->kernel; } diff --git a/Payload/TraceItem.php b/Payload/TraceItem.php index ff4786b..33aa39f 100755 --- a/Payload/TraceItem.php +++ b/Payload/TraceItem.php @@ -42,7 +42,7 @@ public function __invoke($throwable) $frames[] = $frame; } - $record = [ + return [ 'exception' => [ 'class' => get_class($throwable), 'message' => implode(' ', [ @@ -59,7 +59,5 @@ public function __invoke($throwable) ], 'frames' => $frames, ]; - - return $record; } } diff --git a/Tests/DependencyInjection/ConfigurationTest.php b/Tests/DependencyInjection/ConfigurationTest.php index 2cf2a6c..f9380b9 100755 --- a/Tests/DependencyInjection/ConfigurationTest.php +++ b/Tests/DependencyInjection/ConfigurationTest.php @@ -17,10 +17,10 @@ class ConfigurationTest extends KernelTestCase /** * Test parameters. */ - public function testParameters() + public function testParameters(): void { static::bootKernel(); - $container = isset(static::$container) ? static::$container : static::$kernel->getContainer(); + $container = static::$container ?? static::$kernel->getContainer(); $config = $container->getParameter(RollbarExtension::ALIAS . '.config'); diff --git a/Tests/DependencyInjection/RollbarExtensionTest.php b/Tests/DependencyInjection/RollbarExtensionTest.php index a8dc35d..23bd1df 100755 --- a/Tests/DependencyInjection/RollbarExtensionTest.php +++ b/Tests/DependencyInjection/RollbarExtensionTest.php @@ -19,7 +19,7 @@ class RollbarExtensionTest extends AbstractExtensionTestCase * * @return array */ - protected function getContainerExtensions() + protected function getContainerExtensions(): array { return [ new RollbarExtension(), @@ -34,7 +34,7 @@ protected function getContainerExtensions() * @param string $var * @param array $expected */ - public function testConfigEnabledVars($var, $expected) + public function testConfigEnabledVars(string $var, array $expected): void { $this->load(); @@ -50,7 +50,7 @@ public function testConfigEnabledVars($var, $expected) * * @return array */ - public function generatorConfigVars() + public function generatorConfigVars(): array { return [ ['rollbar.config', ['enabled' => true]], @@ -67,7 +67,7 @@ public function generatorConfigVars() * @param string $var * @param array $expected */ - public function testConfigDisabledVars($var, $expected) + public function testConfigDisabledVars(string $var, array $expected): void { $this->load(['enabled' => false]); @@ -81,7 +81,7 @@ public function testConfigDisabledVars($var, $expected) /** * Test alias. */ - public function testAlias() + public function testAlias(): void { $extension = new RollbarExtension(); $this->assertEquals(RollbarExtension::ALIAS, $extension->getAlias()); diff --git a/Tests/Fixtures/ErrorHandler.php b/Tests/Fixtures/ErrorHandler.php index b928b17..e2c8f4c 100755 --- a/Tests/Fixtures/ErrorHandler.php +++ b/Tests/Fixtures/ErrorHandler.php @@ -27,7 +27,7 @@ class ErrorHandler extends AbstractProcessingHandler * * @return ErrorHandler */ - public static function getInstance() + public static function getInstance(): ErrorHandler { if (empty(static::$instance)) { static::$instance = new self(Logger::DEBUG); @@ -41,7 +41,7 @@ public static function getInstance() * * @param callable $assert */ - public function setAssert($assert = null) + public function setAssert($assert = null): void { $this->assert = $assert; } @@ -53,12 +53,12 @@ public function setAssert($assert = null) * * @return void */ - protected function write(array $record) + protected function write(array $record): void { - $dummy = function () { + $dummy = static function () { }; $closure = empty($this->assert) ? $dummy : $this->assert; - call_user_func($closure, $record); + $closure($record); } } diff --git a/Tests/Fixtures/app/AppKernel.php b/Tests/Fixtures/app/AppKernel.php index 2eeeeb4..9e755f8 100755 --- a/Tests/Fixtures/app/AppKernel.php +++ b/Tests/Fixtures/app/AppKernel.php @@ -1,5 +1,8 @@ load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); } @@ -35,12 +39,12 @@ public function registerContainerConfiguration(LoaderInterface $loader) /** * @return string */ - public function getCacheDir() + public function getCacheDir(): string { return realpath(__DIR__ . '/../../../') . '/var/' . $this->environment . '/cache'; } - public function getLogDir() + public function getLogDir(): string { return realpath(__DIR__ . '/../../../') . '/var/' . $this->environment . '/logs'; } diff --git a/Tests/Payload/ErrorItemTest.php b/Tests/Payload/ErrorItemTest.php index a03e120..663256e 100755 --- a/Tests/Payload/ErrorItemTest.php +++ b/Tests/Payload/ErrorItemTest.php @@ -23,7 +23,7 @@ class ErrorItemTest extends KernelTestCase * @param int $line * @param string $mapped */ - public function testInvoke($code, $message, $file, $line, $mapped) + public function testInvoke(int $code, string $message, string $file, int $line, string $mapped): void { $item = new ErrorItem(); $data = $item($code, $message, $file, $line); @@ -46,15 +46,16 @@ public function testInvoke($code, $message, $file, $line, $mapped) * Data provider for testInvoke. * * @return array + * @throws \Exception */ - public function generateInvoke() + public function generateInvoke(): array { return [ - [E_ERROR, 'Error message - ' . microtime(true), __FILE__, rand(1, 100), 'E_ERROR'], - [E_WARNING, 'Error message - ' . microtime(true), __FILE__, rand(1, 100), 'E_WARNING'], - [E_PARSE, 'Error message - ' . microtime(true), __FILE__, rand(1, 100), 'E_PARSE'], - [E_NOTICE, 'Error message - ' . microtime(true), __FILE__, rand(1, 100), 'E_NOTICE'], - [E_CORE_ERROR, 'Error message - ' . microtime(true), __FILE__, rand(1, 100), 'E_CORE_ERROR'], + [E_ERROR, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_ERROR'], + [E_WARNING, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_WARNING'], + [E_PARSE, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_PARSE'], + [E_NOTICE, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_NOTICE'], + [E_CORE_ERROR, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_CORE_ERROR'], ]; } } diff --git a/Tests/Payload/GeneratorTest.php b/Tests/Payload/GeneratorTest.php index d60e732..d059e14 100755 --- a/Tests/Payload/GeneratorTest.php +++ b/Tests/Payload/GeneratorTest.php @@ -20,7 +20,7 @@ class GeneratorTest extends KernelTestCase /** * {@inheritdoc} */ - public function setUp() + public function setUp(): void { parent::setUp(); @@ -30,7 +30,7 @@ public function setUp() /** * Test getContainer. */ - public function testGetContainer() + public function testGetContainer(): void { $container = $this->getContainer(); $generator = $this->getGenerator(); @@ -43,7 +43,7 @@ public function testGetContainer() /** * Test getKernel. */ - public function testGetKernel() + public function testGetKernel(): void { $generator = $this->getGenerator(); @@ -59,8 +59,9 @@ public function testGetKernel() * @param string $method * * @return \ReflectionMethod + * @throws \ReflectionException */ - protected static function getClassMethod($class, $method) + protected static function getClassMethod(string $class, string $method): \ReflectionMethod { $class = new \ReflectionClass($class); $method = $class->getMethod($method); @@ -72,7 +73,7 @@ protected static function getClassMethod($class, $method) /** * Test getServerInfo. */ - public function testGetServerInfo() + public function testGetServerInfo(): void { $generator = $this->getGenerator(); @@ -92,8 +93,9 @@ public function testGetServerInfo() /** * Test getRequestInfo. + * @throws \ReflectionException */ - public function testGetRequestInfo() + public function testGetRequestInfo(): void { $container = $this->getContainer(); $generator = $this->getGenerator(); @@ -123,8 +125,9 @@ public function testGetRequestInfo() /** * Test getErrorPayload. + * @throws \Exception */ - public function testGetErrorPayload() + public function testGetErrorPayload(): void { $generator = $this->getGenerator(); @@ -138,9 +141,9 @@ public function testGetErrorPayload() $code = E_ERROR; $msg = 'testGetErrorPayload'; $file = __FILE__; - $line = rand(1, 10); + $line = random_int(1, 10); - list($message, $payload) = $generator->getErrorPayload($code, $msg, $file, $line); + [$message, $payload] = $generator->getErrorPayload($code, $msg, $file, $line); $this->assertEquals($msg, $message); @@ -157,14 +160,15 @@ public function testGetErrorPayload() $this->assertEquals($requestInfo, $payload['request']); $this->assertEquals(static::$kernel->getEnvironment(), $payload['environment']); $this->assertEquals(Kernel::VERSION, $payload['framework']); - $this->assertEquals(phpversion(), $payload['language_version']); + $this->assertEquals(PHP_VERSION, $payload['language_version']); $this->assertEquals($serverInfo, $payload['server']); } /** * Test getExceptionPayload. + * @throws \ReflectionException */ - public function testGetExceptionPayload() + public function testGetExceptionPayload(): void { $generator = $this->getGenerator(); @@ -207,11 +211,11 @@ public function testGetExceptionPayload() * * @param mixed $data */ - public function testStrangeException($data) + public function testStrangeException($data): void { $generator = $this->getGenerator(); - list($message, $payload) = $generator->getExceptionPayload($data); + [$message, $payload] = $generator->getExceptionPayload($data); $this->assertEquals('Undefined error', $message); $this->assertNotEmpty($payload['body']['trace']); @@ -222,7 +226,7 @@ public function testStrangeException($data) * * @return array */ - public function generatorStrangeData() + public function generatorStrangeData(): array { return [ ['zxcv'], @@ -240,15 +244,15 @@ public function generatorStrangeData() * * @return ContainerInterface */ - private function getContainer() + private function getContainer(): ContainerInterface { - return isset(static::$container) ? static::$container : static::$kernel->getContainer(); + return static::$container ?? static::$kernel->getContainer(); } /** * Get generator. * - * @return Generator + * @return object */ private function getGenerator() { diff --git a/Tests/Payload/TraceChainTest.php b/Tests/Payload/TraceChainTest.php index f217394..d5c4094 100755 --- a/Tests/Payload/TraceChainTest.php +++ b/Tests/Payload/TraceChainTest.php @@ -15,7 +15,7 @@ class TraceChainTest extends KernelTestCase /** * Test invoke. */ - public function testInvoke() + public function testInvoke(): void { $previous = new \Exception('Exception', 1); $previous = new \Exception('Exception', 2, $previous); diff --git a/Tests/Payload/TraceItemTest.php b/Tests/Payload/TraceItemTest.php index df9a113..628d566 100755 --- a/Tests/Payload/TraceItemTest.php +++ b/Tests/Payload/TraceItemTest.php @@ -15,7 +15,7 @@ class TraceItemTest extends KernelTestCase /** * Test invoke. */ - public function testInvoke() + public function testInvoke(): void { $msg = 'Text exception - ' . md5(microtime()); $ex = new \Exception($msg, 7); diff --git a/composer.json b/composer.json index 555d131..213abda 100755 --- a/composer.json +++ b/composer.json @@ -27,17 +27,18 @@ "psr-4": { "Tests\\": "tests/"} }, "require": { - "php": ">=5.6", + "php": ">=7.1", "rollbar/rollbar": "^2", - "symfony/dependency-injection": "^3.4 | ^4.0 | ^5.0", - "symfony/config": "^3.4 | ^4.0 | ^5.0", - "symfony/http-kernel": "^3.4 | ^4.0 | ^5.0", + "symfony/dependency-injection": "^4.0 | ^5.0", + "symfony/config": "^4.0 | ^5.0", + "symfony/http-kernel": "^4.0 | ^5.0", "symfony/monolog-bundle": "*", - "symfony/serializer": "*" + "symfony/serializer": "*", + "ext-json": "*" }, "require-dev": { "phpunit/phpunit": "^5.7", - "symfony/framework-bundle": "^3.4 | ^4.0 | ^5.0", + "symfony/framework-bundle": "^4.0 | ^5.0", "squizlabs/php_codesniffer": "^2.7", "matthiasnoback/symfony-dependency-injection-test": "^1.1" }, From f25795b03984fbc9f670c464535b6e1583c7e0a2 Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Fri, 7 Feb 2020 11:19:22 +0200 Subject: [PATCH 6/7] Remove backward compatibilities with symfony < 5.0 --- .travis.yml | 7 ------- README.md | 5 +---- composer.json | 8 ++++---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index f292676..8d06e76 100755 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ php: - 7.3 env: - - SYMFONY_VERSION=3.4.* - - SYMFONY_VERSION=4.0.* - - SYMFONY_VERSION=4.1.* - SYMFONY_VERSION=5.0.* sudo: false @@ -20,10 +17,6 @@ cache: matrix: exclude: - - php: 7.1 - env: SYMFONY_VERSION=4.0.* - - php: 7.1 - env: SYMFONY_VERSION=4.1.* - php: 7.1 env: SYMFONY_VERSION=5.0.* - php: 7.2 diff --git a/README.md b/README.md index 6b47b8e..7256989 100755 --- a/README.md +++ b/README.md @@ -5,10 +5,7 @@ Rollbar full-stack error tracking for Symfony. -Supported Symfony versions: 3+, 4+. - -**NOTE 10/08/2018** -The package has been renamed to `rollbar/rollbar-php-symfony-bundle` to reflect support for Symfony 3 and 4. If you have been using the package using the old name (`rollbar/rollbar-php-symfony3-bundle`) make sure to update your `composer.json` to use the new package name. +Supported Symfony versions: 5+. ## Setup Instructions 1. [Sign up for a Rollbar account](https://rollbar.com/signup) diff --git a/composer.json b/composer.json index 213abda..80e1ea3 100755 --- a/composer.json +++ b/composer.json @@ -29,16 +29,16 @@ "require": { "php": ">=7.1", "rollbar/rollbar": "^2", - "symfony/dependency-injection": "^4.0 | ^5.0", - "symfony/config": "^4.0 | ^5.0", - "symfony/http-kernel": "^4.0 | ^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/config": "^^5.0", + "symfony/http-kernel": "^^5.0", "symfony/monolog-bundle": "*", "symfony/serializer": "*", "ext-json": "*" }, "require-dev": { "phpunit/phpunit": "^5.7", - "symfony/framework-bundle": "^4.0 | ^5.0", + "symfony/framework-bundle": "^5.0", "squizlabs/php_codesniffer": "^2.7", "matthiasnoback/symfony-dependency-injection-test": "^1.1" }, From c52440409adf77d5d452906ca4e9fa1986336fa8 Mon Sep 17 00:00:00 2001 From: Yevgeniy Dyachenko Date: Fri, 7 Feb 2020 11:21:21 +0200 Subject: [PATCH 7/7] fix symfony framework-bundle --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 80e1ea3..8ce5ef3 100755 --- a/composer.json +++ b/composer.json @@ -30,8 +30,8 @@ "php": ">=7.1", "rollbar/rollbar": "^2", "symfony/dependency-injection": "^5.0", - "symfony/config": "^^5.0", - "symfony/http-kernel": "^^5.0", + "symfony/config": "^5.0", + "symfony/http-kernel": "^5.0", "symfony/monolog-bundle": "*", "symfony/serializer": "*", "ext-json": "*"