We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, after upgrading from 3.1.1 to 3.2.1 ->toPediod(.. throws an error.
->toPediod(..
I encountered an issue with the following code:
$date1 = \Carbon\Carbon::parse('2018-06-01'); $date2 = \Carbon\Carbon::parse('2018-06-10'); $period = $date1->toPeriod($date2, 'P1D'); // before 3.2.1 -> works // after 3.2.1 --> this error: DatePeriod::__construct() accepts (DateTimeInterface, DateInterval, int [, int]), or (DateTimeInterface, DateInterval, DateTime [, int]), or (string [, int]) as arguments at vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php:702 698▕ 699▕ $raw ??= ['R1/2000-01-01T00:00:00Z/P1D']; 700▕ 701▕ // Dummy construct, as properties are completely overridden ➜ 702▕ parent::__construct(...$raw); 703▕ 704▕ if (isset($sortedArguments['start'])) { 705▕ $this->setStartDate($sortedArguments['start']); 706▕ }
Carbon version: 3.2.1
PHP version: 8.3.4
I expected to get:
a new \Carbon\CarbonPeriod instance.
But I actually get:
DatePeriod::__construct() arguments error.
Thanks!
The text was updated successfully, but these errors were encountered:
Sorry for this regression, I will publish a patch today.
Sorry, something went wrong.
kylekatarnls
Successfully merging a pull request may close this issue.
Hello, after upgrading from 3.1.1 to 3.2.1
->toPediod(..
throws an error.I encountered an issue with the following code:
Carbon version: 3.2.1
PHP version: 8.3.4
I expected to get:
But I actually get:
Thanks!
The text was updated successfully, but these errors were encountered: