Skip to content
New issue

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

Fix FeedItem update() use with CarbonImmutable date #178

Merged
merged 1 commit into from
Oct 14, 2021
Merged

Fix FeedItem update() use with CarbonImmutable date #178

merged 1 commit into from
Oct 14, 2021

Conversation

Okipa
Copy link
Contributor

@Okipa Okipa commented Oct 13, 2021

Using the FeedItem::update() method after having set Carbon dates as immutable (https://dyrynda.com.au/blog/laravel-immutable-dates), currently causes this error.

Capture d’écran 2021-10-13 à 15 28 32

We can easily solve this by changing the FeedItem $updated attribute type by CarbonInterface instead of Carbon => it solves the error and make this package compatible with CarbonImmutable dates 👍

I actually need this PR to be merged because we use your package on our projets. But I am also participating to this Hacktoberfest edition, so if you could tag this PR with hacktoberfest-accepted before merging, I would be grateful ! (I wouldn't feel offended if you don't).

Thanks and keep up the good work !

@freekmurze freekmurze merged commit e911a11 into spatie:main Oct 14, 2021
@freekmurze
Copy link
Member

Thanks!

yipeecaiey added a commit to yipeecaiey/laravel-feed that referenced this pull request Sep 11, 2024
* commit '9ba8fde4272c4e149fe56f9fa0f42411942a8c5b': (31 commits)
  wip
  wip
  wip
  wip
  Update run-tests.yml
  wip
  wip
  Add changelog workflow (automated commit)
  Remove misplaced * (spatie#182)
  Update CHANGELOG.md
  Fixed FeedItem update() use with CarbonImmutable date (spatie#178)
  Update CHANGELOG.md
  Fix config validation (spatie#159)
  wip
  do not fail with default config
  wip
  wip
  Package throws an exception when using with Statamic (spatie#155)
  wip
  use defaults
  ...

# Conflicts:
#	.gitignore
#	src/Feed.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants