Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2022
Merged

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

merged 2 commits into from
Mar 17, 2022

Conversation

philsturgeon
Copy link

@philsturgeon philsturgeon commented Mar 11, 2022

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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

Copy link
Collaborator

@danielmorell danielmorell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting this PR!

Unfortunately, updating to rollbar/rollbar v3 will remove support for PHP 7 since rollbar/rollbar v3 only supports PHP 8 and up. It would probably be better to support both v2 and v3 of rollbar/rollbar otherwise we should release a new major version of this library since dropping support for PHP 7 would be a breaking change.

@bretto36
Copy link

@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
Copy link
Collaborator

@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
Copy link
Author

@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.

@danielmorell danielmorell changed the base branch from master to rollbar-v3 March 17, 2022 10:08
@danielmorell danielmorell merged commit a49277b into rollbar:rollbar-v3 Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to rollbar-php 3.x
3 participants