Skip to content

chore(deps): allow nesbot/carbon 3.x for Symfony 7 translation support - #80

Merged
courtney-miles merged 1 commit into
frictionlessdata:mainfrom
pauljura:chore/support-carbon-3
Jul 27, 2026
Merged

chore(deps): allow nesbot/carbon 3.x for Symfony 7 translation support#80
courtney-miles merged 1 commit into
frictionlessdata:mainfrom
pauljura:chore/support-carbon-3

Conversation

@pauljura

Copy link
Copy Markdown
Contributor

Overview

Carbon 2.x caps symfony/translation at ^6.0, which blocks consumers from upgrading to Symfony 7. Carbon 3.x allows symfony/translation ^7.0 || ^8.0, so widening the constraint to ^2.63.0 || ^3.0 unblocks Symfony 7 upgrades without breaking existing Carbon 2.x consumers.

Changes:

  • composer.json: widen nesbot/carbon to ^2.63.0 || ^3.0
  • DateField/DatetimeField/TimeField: reject non-string, non-DateTimeInterface inputs. Carbon 3.x is more permissive than 2.x and treats bool/int values as Unix timestamps, which silently accepted invalid input (e.g. true). DurationField already had this guard.
  • FieldTypesTest: compare CarbonInterval by spec() instead of whole-object assertEquals. Carbon 3.x changed internal CarbonInterval properties (originalInput) breaking whole-object comparison. The interval values are identical; only the internal Carbon state differs.

All 148 tests pass with both Carbon 2.73.0 and Carbon 3.13.1.


Please preserve this line to notify @courtney-miles (lead of this repository)

Carbon 2.x caps symfony/translation at ^6.0, which blocks consumers
from upgrading to Symfony 7. Carbon 3.x allows symfony/translation
^7.0 || ^8.0, so widening the constraint to ^2.63.0 || ^3.0 unblocks
Symfony 7 upgrades without breaking existing Carbon 2.x consumers.

Changes:
- composer.json: widen nesbot/carbon to ^2.63.0 || ^3.0
- DateField/DatetimeField/TimeField: reject non-string, non-DateTimeInterface
  inputs. Carbon 3.x is more permissive than 2.x and treats bool/int values
  as Unix timestamps, which silently accepted invalid input (e.g. true).
  DurationField already had this guard.
- FieldTypesTest: compare CarbonInterval by spec() instead of whole-object
  assertEquals. Carbon 3.x changed internal CarbonInterval properties
  (originalInput) breaking whole-object comparison. The interval values
  are identical; only the internal Carbon state differs.

All 148 tests pass with both Carbon 2.73.0 and Carbon 3.13.1.
@pauljura
pauljura force-pushed the chore/support-carbon-3 branch from 181f377 to 7101fa9 Compare July 27, 2026 02:44
@courtney-miles
courtney-miles merged commit eaf8de1 into frictionlessdata:main Jul 27, 2026
14 checks passed
@pauljura
pauljura deleted the chore/support-carbon-3 branch July 27, 2026 02:54
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