Releases: briannesbitt/Carbon
3.0.0-beta.3
Complete commits list: 3.0.0-beta.2...3.0.0-beta.3
Summary:
- Fixed fallback from setter to macro #2922
3.0.0-beta.2
Complete commits list: 3.0.0-beta.1...3.0.0-beta.2
Summary:
- Fixed
resolve*
method return type so to allow sub-classes to take other sub-classes as parameters
3.0.0-beta.1
Complete commits list: 2.72.2...3.0.0-beta.1
Summary:
-
Dropped Symfony < 4.4 #2070
-
Added enums for week days, months and units #2701
-
Added generic
unitOfUnit
andunitsInUnit
getters #2885 -
Changed
CarbonPeriod
to extendDatePeriod
#1752 -
Changed
create*
method to returnnull
instead offalse
#2340 -
Changed
forHumans()
to show0 seconds
y default for empty intervals #2035 -
Changed
CarbonInterval
to be empty by default #2079 -
Changed
diffIn*
methods to returnfloat
and relative diff ($absolute = false
by default) #2119- diffIn* will use the floatDiffInReal* behavior, all other variants will be removed
-
Changed week methods to work with current global locale #1967
-
Allowed to add and subtract decimal numbers of any unit #2347 #2519
-
Changed factories to have isolated settings, locale, testNow, macros and default timezone #2345
2.72.2
Complete commits list: 2.72.1...2.72.2
Summary:
- Fixed #2908 typo of day name in Slovak language — @richardDobron
- Fixed #2918 Use febr. as Hungarian abbreviation for február (February) — @dvidke
New Contributors
- @richardDobron made their first contribution in #2908
- @dvidke made their first contribution in #2918
2.72.1
Complete commits list: 2.72.0...2.72.1
Summary:
- Fixed #2899 setConfigCacheFactory compatibility — @kylekatarnls
- Updated #2896 phpcs version — @kylekatarnls
2.72.0
Complete commits list: 2.71.0...2.72.0
Summary:
- Fixed #2872 Slovak translations — @s4muel
- Fixed #2884 Use relevant class to synchronize CarbonPeriod mock — @kylekatarnls
- Fixed #2890 Apply rounding changes to result before applying unit — @Sjoertjuh
- Fixed #2879 Narrow phpstan types in assertInstanceOf* AbstractTestCase methods — @staabm
- Fixed #2864 Cleanup PHPDoc — @kylekatarnls
- Added #2848 Dependabot — @juherr
- Changed #2859 Externalize doctrine types — @kylekatarnls
- Changed #2862 Bump actions/checkout from 3 to 4 — @dependabot
- Changed #2886 Use new timezone names in tests — @kylekatarnls
New Contributors
- @juherr made their first contribution in #2848
- @dependabot made their first contribution in #2862
- @s4muel made their first contribution in #2872
- @staabm made their first contribution in #2879
- @Sjoertjuh made their first contribution in #2890
2.71.0
Complete commits list: 2.70.0...2.71.0
Summary:
- Added #2857
var_export()
support forCarbonInterval
— @hettiger - Fixed #2852 UnknownGetterException error on serialization — @gjespo85
- Fixed #2854 Allow to set options at least one per construction — @kylekatarnls
New Contributors
2.70.0
Complete commits list: 2.69.0...2.70.0
Summary:
- Added #2838 #2839 Allow float in interval units — @kylekatarnls
- Added #2840
T
modifier for translation — @nicko170 - Fixed #2842 Upgrade codecov V1 => V3 and switch to pcov — @Chris53897
- Fixed #2837 Use env var to pass composer cache config in GitHub Actions — @Chris53897
New Contributors
- @Chris53897 made their first contribution in #2837
- @nicko170 made their first contribution in #2840
2.69.0
Complete commits list: 2.68.1...2.69.0
Summary:
- Added #2813 Implement
Psr\Clock\ClockInterface
— @kylekatarnls - Fixed #2823 Make createFromFormat work the same with mocked time — @kylekatarnls
- Fixed #2822 Exclude locale from
getSetting()
if set by default — @kylekatarnls - Fixed #2819 Carbon constructor mutates passed DateTime argument — @kylekatarnls
- Fixed #2829 Fix dual for month in Slovenian language — @alesf
- Fixed #2825 Change before Malay translation to "sebelum" — @kylekatarnls
- Fixed #2155 #2160 Dedupe the diff methods set — @kylekatarnls
Breaking chances (for edge-case usages):
getSetting()
now longer return the locale when it's unchanged default, so you can distinguish between explicit 'en'
which has Sunday as start of week vs. null
which is English but with Monday as start of week. To get the previous behavior you can use:
$settings = array_merge(['locale' => 'en'], $date->getSettings());
2.68.1
Complete commits list: 2.68.0...2.68.1
Summary:
- Fixed bug mutating the parameter of
diffInWeekdays()
anddiffInWeekendDays()