-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
[Bug]: Error when we use UUID/ULID #26
Comments
Thanks for reporting. I'll look into it. |
I wrote new tests for models using ulid, and tests are passing, but this will be a breaking change, as it will change the signature of some I'll ship this in v3. |
Great!! Thank you for your attention and for the code that worked perfectly for my needs!! |
As a temporary fix:
I got it working with UUID this way. P.S.: Great work. Very usefull module. |
hello, any updates regarding this feature? |
thanks, this worked for me too |
What happened?
Hi Mokhosh!!
I am using ULID in the model, so when I try to drag the item to another status or edit it, an error occurs...
I found that the problem is that all declarations of the $recordId parameter were defined as integer
int $recordId
This way I found all the declarations and changed it to:
int|string $recordId
The changed methods were in the following files:
"src/Concerns/HasStatusChange.php"
"src/Concerns/HasEditRecordModal.php"
In this second file, we have the variable
public ?int $editModalRecordId = null;
Changed to:
public null|int|string $editModalRecordId = null;
And the method:
getEditModalFormSchema(?int $recordId)
Changed to
getEditModalFormSchema(null|int|string $recordId)
Important:
I also had to change the function calls:
onStatusChanged(int|string $recordId, ...)
getEditModalFormSchema(null|int|string $recordId, ...)
In the page generated through the "make" command.
Reminder:
It is necessary to change the test files and functions generated in the "make" command
Well, I believe that as the use of UUID or ULID is common, this correction is interesting...
How to reproduce the bug
Use UUID or ULID as record IDs. Then try to change them...
Package Version
v2.3.0
PHP Version
8.1.10
Laravel Version
10.10
Which operating systems does with happen with?
Windows
Which browsers does with happen with?
Chrome
Notes
No response
The text was updated successfully, but these errors were encountered: