Skip to content
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

Symfony/Options-resolver issue when Sentry will be initialized #1634

Closed
neilexfafet opened this issue Nov 9, 2023 · 5 comments
Closed

Symfony/Options-resolver issue when Sentry will be initialized #1634

neilexfafet opened this issue Nov 9, 2023 · 5 comments

Comments

@neilexfafet
Copy link

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

4.0

Steps to reproduce

Issue will display after initialization of Sentry (\Sentry\init(['dsn' => 'MY_SENTRY_DSN']))

Expected result

Sentry should be able to initialize.

Actual result

Parse error: syntax error, unexpected 'bool' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /usr/src/app/vendor/symfony/options-resolver/OptionsResolver.php on line 146

@cleptric
Copy link
Member

cleptric commented Nov 9, 2023

Please provide a bit more info about your environment, like PHP version used etc.

@Jean85
Copy link
Collaborator

Jean85 commented Nov 9, 2023

That seems an error that would be triggered under PHP below 7.4, and with symfony/option-resolver 6.3+, which requires PHP 8.1+

You should check your environment when using composer update, or your PHP constraints in composer.json.

@neilexfafet
Copy link
Author

Please provide a bit more info about your environment, like PHP version used etc.

PHP version was recently upgraded from 7.2 to 8.2

@neilexfafet
Copy link
Author

That seems an error that would be triggered under PHP below 7.4, and with symfony/option-resolver 6.3+, which requires PHP 8.1+

You should check your environment when using composer update, or your PHP constraints in composer.json.

Already tried composer update, as well as downgrading the version of sentry and the option-resolver, still the issue occurs.

@neilexfafet
Copy link
Author

That seems an error that would be triggered under PHP below 7.4, and with symfony/option-resolver 6.3+, which requires PHP 8.1+

You should check your environment when using composer update, or your PHP constraints in composer.json.

After multiple checks, i found out some docker container issues which it did not upgrade my php version but on my docker file it says 8.2. Issue already resolved. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants