Carbon 1.37.0 causing exceptions on all add/sub methods

Created on 3 May 2019  路  7Comments  路  Source: briannesbitt/Carbon

Hey there,

We've started to experience this exception when we first had a deployment today before this commit, all went okay. Then we made a second deployment a while back after it was merged to master, bumping the version up to 1.37.0. Now we have application wide failures.

For example when we run:

Carbon::parse('2019-01-01)->subDays(1)->isToday()

We get:

BadMethodCallException: Method subDays does not exist.

The same issue goes for all sub/add of Days, Hours, Minutes, Seconds. We've manually downgraded to the 1.36.2 version for now and the issue is then gone.

Carbon version: 1.37.0
PHP version: 7.1.28
Laravel version: 5.5.45

Thanks!

Most helpful comment

Patch released.

All 7 comments

Ping: @matt-allan and @kylekatarnls

I don鈥檛 think it鈥檚 that change, it鈥檚 a bad tag. It looks like master was tagged as 1.37 which means it contains all of the 2.0+ breaking changes?

@matt-allan That's correct, indeed.

1.37.0 include all the code from it's parent commit which is 2.17.1. Seems the tags have been mixed here.

Do you have the possibility to revert and fix the tags so this breaking change can be fixed.

I can鈥檛 create tags, only maintainers can. I think you need @kylekatarnls to do that.

Tag removed, i Will retag today

Patch released.

Run composer update to get 1.37.1.

Was this page helpful?
0 / 5 - 0 ratings