[5.x] Consider removing `strict_types`
@Litarnus is already working on this.
Since Sep 23, 2025.
Assessment
This issue has not been assessed yet.
Description
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-php
-
Improvement PHP Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
getsentry/sentry-php#2173 · 1 comment ·
-
PHP Task
getsentry/sentry-php#2162 · 1 comment · 1 assignee ·
-
PHP
getsentry/sentry-php#2140 · 1 comment · 1 assignee ·
-
5.0 Improvement PHP
getsentry/sentry-php#1956 · 1 comment · 1 assignee ·
-
PHP Spans Task
getsentry/sentry-php#1954 · 1 comment · 1 assignee ·
All issues in getsentry/sentry-php
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
coollabsio/coolify#11927 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100