framework icon indicating copy to clipboard operation
framework copied to clipboard

[10.x] Database layer fixes

Open saadsidqui opened this issue 1 year ago • 4 comments

This PR fixes a couple of issues discussed in #49735 .

Appropriate checks are added to Illuminate\Database\Eloquent\Relations\BelongsTo::getForeignKeyFrom() and Illuminate\Database\Query\Builder::whereIntegerInRaw() to return the proper value if a BackedEnum is encountered. This is typically the case on models where a cast has been defined, especially on keys.

I have also added a couple of tests to cover these cases where it seemed appropriate.

There might be other similar cases. Please see this comment.

saadsidqui avatar Jan 23 '24 02:01 saadsidqui

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

github-actions[bot] avatar Jan 23 '24 02:01 github-actions[bot]

@taylorotwell sorry I'm confused as to why the PR was reverted to a draft. If there are any comments or suggestions I'll be happy to contribute the fixes.

saadsidqui avatar Jan 25 '24 20:01 saadsidqui

@driesvints any idea what else is needed here? I'm very confused.

saadsidqui avatar Feb 01 '24 20:02 saadsidqui

Hi @sidquisaad. Most likely Taylor is too busy rn to review and will review at a later moment. Thanks!

driesvints avatar Feb 07 '24 10:02 driesvints

@taylorotwell gonna mark this ready for you again if that's okay.

driesvints avatar Apr 11 '24 07:04 driesvints