Skip to content

Allow Symfony v8#3

Open
davidromani wants to merge 3 commits into
eveltic:mainfrom
davidromani:main
Open

Allow Symfony v8#3
davidromani wants to merge 3 commits into
eveltic:mainfrom
davidromani:main

Conversation

@davidromani

Copy link
Copy Markdown
Contributor

Allow Symfony v8

davidromani and others added 3 commits June 21, 2026 12:23
CookieConsentService passed a possibly-null value straight into
strtotime() (isConsentGiven) and json_decode() (getConsentCookie),
which PHP 8.5 deprecates and PHP 9 will reject with a TypeError:

- isConsentGiven(): bail out early when the consent cookie is absent or
  missing its expiration/version keys, and cast strtotime() to int so an
  invalid value can't reach DateTime::setTimestamp(false).
- getConsentCookie(): return null without decoding when no cookie is set
  (and null-safe the request lookup).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant