rollbar / rollbar-php-laravel

Rollbar error monitoring integration for Laravel projects
https://docs.rollbar.com/docs/laravel
140 stars 39 forks source link

Bump to rollbar-php v3.1.0 for PHP 8.0 compat #129

Closed philsturgeon closed 2 years ago

philsturgeon commented 2 years ago

Description of the change

Users on PHP 8.0+ started getting deprecation notices:

PHP Deprecated: Rollbar\Payload\Level implements the Serializable interface, which is deprecated. Implement serialize() and unserialize() instead (or in addition, if support for old PHP versions is necessary) in /app/vendor/rollbar/rollbar/src/Payload/Level.php on line 5

This was fixed in rollbar-php v3.1.0, so I bumped it and ran the test suite. It's showing green lights so... whoppeee let's go!

Type of change

Related issues

Checklists

Development

Code review

bretto36 commented 2 years ago

@danielmorell The breaking change to remove php 7.3 is on the way anyway. Laravel 9 is released and ONLY supports PHP 8.

This makes it a warranted breaking change. Can we just version it differently then adjust the docs to say. If using Laravel 8 or below on PHP 7.3 use vX otherwise use current.

https://github.com/laravel/laravel/blob/9.x/composer.json

danielmorell commented 2 years ago

@bretto36 yes PHP 7.3 is EOL and 7.4 will be joining it before the end of the year. This means the only supported version of PHP will be 8 and above.

That being said, I am all in favor of moving toward PHP 8. However, we need to be careful not to leave people high and dry who are not on PHP 8.

Because of the nature of what Rollbar does, we need to support old tech even after it is no longer supported. Not everyone upgrades as fast as they should (for a multitude of reasons). And we would not be doing them any favors by making errors harder to spot. We will probably need to continue to support PHP 7.2 for a couple more years. Yes, it is a pain. But it is part of our commitment to error monitoring.

Now to the good part. I have been doing some testing on rollbar/rollbar v3 and I don't think there are any significant advantages of PHP 8 syntax that would warrant dropping support for PHP 7.2. It would probably be better to support both rollbar/rollbar v2 and v3 at this time.

I hope this makes sense.

philsturgeon commented 2 years ago

@danielmorell done, good catch. This codebase using this library will need to run on both PHP 7.4 and 8.0 for seversl months whilst we slowly switch everything to PHP 8, so Its great you noticed that.