laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

[Fix] embed relations serialization

Open florianJacques opened this issue 5 months ago • 6 comments

Fixed the serialization of embed relations. These relationships were not necessarily loaded, and could not use their attribute mutators.

Checklist

  • [x] Add tests and ensure they pass

florianJacques avatar Jun 17 '25 09:06 florianJacques

In order to review the PR properly, could you add some tests that are fixed by the change?

Why Coding Standards / phpcs (pull_request) Fail?

GitHub Action fails to commit the fixes that are found by phpcs.

----------------------------------------------------------------------
FILE                                                  FIXED  REMAINING
----------------------------------------------------------------------
src/Eloquent/EmbedsRelations.php                      2      0
src/Eloquent/DocumentModel.php                        1      0
----------------------------------------------------------------------
A TOTAL OF 3 ERRORS WERE FIXED IN 2 FILES
----------------------------------------------------------------------

GromNaN avatar Jun 17 '25 12:06 GromNaN

Yes of course, I will write the tests in the next few days For CI errors, can I do something?

florianJacques avatar Jun 17 '25 14:06 florianJacques

For CI errors, can I do something?

You can run vendor/bin/phpcbf locally to fix the CS issues.

GromNaN avatar Jun 17 '25 14:06 GromNaN

Thanks, Done! I'll write the tests when I have some time...

florianJacques avatar Jun 17 '25 15:06 florianJacques

Adding test ok

florianJacques avatar Jun 20 '25 07:06 florianJacques