#3231·Carbon

Migrate docs don't mention removal of `addReal*` and `diffInReal*` apis

Author: jeroen1602Created Sep 1, 2025Updated Sep 1, 2025
Labelsdocumentation

Describe the bug

The diffInReal* methods have been removed in commit c55e2a69ec2a619db89287845d6abe8ae2145cc6 and have been release in version 3.0.0 of carbon. But these changes are not documented in the migration guide.

The addReal* methods have been removed in commit 41b550c65ff3fd05f97d1ce483afd551373920de and have been released in version 3.2.0 of carbon. These changes are also not documented in the migration guide.

To Reproduce This still works in version 3.10.2 but the methods are no longer annotated in the PHP docs so the IDE doesn't know they exist.

php
echo Carbon::now()->diffInRealSeconds( Carbon::now()->addRealSeconds(4) );

Expected behavior The methods either shouldn't work or they should exist for the IDE to index and then be marked as deprecated. This change should probably also be documented in the migration guide.

Actual behavior It works but shouldn't?

Versions

  • PHP: 8.4.11
  • Carbon: 3.10.2

Additional context Add any other context about the problem here. If some default timezone or other php.ini settings are in use for instance.