Skip to content

Fix PHP 8.5 + symfony deprecations#1613

Merged
scyzoryck merged 3 commits into
schmittjoh:masterfrom
W0rma:fix-php85-deprecations
Nov 21, 2025
Merged

Fix PHP 8.5 + symfony deprecations#1613
scyzoryck merged 3 commits into
schmittjoh:masterfrom
W0rma:fix-php85-deprecations

Conversation

@W0rma

@W0rma W0rma commented Nov 20, 2025

Copy link
Copy Markdown
Contributor
Q A
Bug fix? no
New feature? no
Doc updated no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT

Fixes the following deprecation warnings:

  • The return value of method DateTimeImmutable::setTimezone() should either be used or intentionally ignored by casting it as (void), as DateTimeImmutable::setTimezone() does not modify the object itself in /home/runner/work/serializer/serializer/tests/Serializer/BaseSerializationTestCase.php:854
  • Method SplObjectStorage::attach() is deprecated since 8.5, use method SplObjectStorage::offsetSet() instead in /home/runner/work/serializer/serializer/src/SerializationContext.php:71
  • Method SplObjectStorage::contains() is deprecated since 8.5, use method SplObjectStorage::offsetExists() instead in /home/runner/work/serializer/serializer/src/SerializationContext.php:101
  • Method SplObjectStorage::detach() is deprecated since 8.5, use method SplObjectStorage::offsetUnset() instead in /home/runner/work/serializer/serializer/src/SerializationContext.php:84
  • Since symfony/validator 7.3: Passing an array of options to configure the "Symfony\Component\Validator\Constraints\Length" constraint is deprecated, use named arguments instead. in /home/runner/work/serializer/serializer/vendor/symfony/deprecation-contracts/function.php:25
  • Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of Symfony\Component\Validator\Constraints\Length instead. in /home/runner/work/serializer/serializer/vendor/symfony/deprecation-contracts/function.php:25

@W0rma
W0rma force-pushed the fix-php85-deprecations branch from 9c3d7a3 to ed81bfd Compare November 20, 2025 09:43
@W0rma
W0rma marked this pull request as ready for review November 20, 2025 09:45
@scyzoryck
scyzoryck merged commit 2051818 into schmittjoh:master Nov 21, 2025
25 checks passed
@W0rma
W0rma deleted the fix-php85-deprecations branch November 22, 2025 05:05
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.

2 participants