[go: up one dir, main page]

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

Fixes geometry values on created event #71

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Dylan-DutchAndBold
Copy link
Contributor

See issue #70

@Dylan-DutchAndBold
Copy link
Contributor Author

@grimzy Any idea why the tests fail, looking at it, it might be that model events do not work in tests. I'm trying to run the tests locally but I get Class "\Mockery\Adapter\Phpunit\TestListener" does not implement the PHPUnit\Framework\TestListener interface

Updated event is fired before saved. So to make this work on observers observing the updated event we need to invoke on the updated event instead of the saved event.
@grimzy
Copy link
Owner
grimzy commented Feb 6, 2019

@Dylan-DutchAndBold : thank you for the PR.
I'm sorry, I still didn't have time to look at it thoroughly to merge it.

Regarding tests, maybe this will help: https://laravel.com/docs/5.7/mocking#event-fake

@grimzy
Copy link
Owner
grimzy commented Mar 9, 2020

Closes #70, #80

@RomainMazB
Copy link

This PR is absolutely needed!

I've tested it in my project and it perfectly solved the geometries issues on save/create events.

For now to implement this I've extended SpatialTrait to create a custom one with this PR's change into its bootTrait method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Numeric value out of range when inserting
3 participants