[5.x] Consider removing `strict_types`

Open
#1,899 1 comment 0 reactions 1 assignee View on GitHub

@Litarnus is already working on this.

Since Sep 23, 2025.

Assessment

This issue has not been assessed yet.

Description

5.0 PHP Task

We might be able to create a more robust SDK by removing declare(strict_types=1) from the code base. While we would need to be more cautions about type coercion, we would throw no more TypeErrors.
Let's investigate and document it.
Make sure to add the commit to https://github.com/getsentry/sentry-php/blob/master/.git-blame-ignore-revs after merging.

Dominant language
PHP
Stars
1.9k
Forks
474
Avg merge
2d 3h
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-php

All issues in getsentry/sentry-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.