{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":440577490,"defaultBranch":"1.x","name":"lunar","ownerLogin":"lunarphp","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-12-21T16:14:38.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/112434999?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1726660597.0","currentOid":""},"activityList":{"items":[{"before":"24cba88e1bdd53d77c97b7313be10e76190e98d6","after":"4aad66d2927719d924ef35f6f55aa4c0283a4b4f","ref":"refs/heads/1.x","pushedAt":"2024-09-18T12:43:40.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Fix price breaks not storing in correct currency factor (#1948)","shortMessageHtmlLink":"Fix price breaks not storing in correct currency factor (#1948)"}},{"before":"80d4b39ce202c094c385eae6fdf51a9b402dcc6f","after":"24cba88e1bdd53d77c97b7313be10e76190e98d6","ref":"refs/heads/1.x","pushedAt":"2024-09-18T12:19:54.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Update documentation to point to correct config file for cart session (#1952)","shortMessageHtmlLink":"Update documentation to point to correct config file for cart session ("}},{"before":"e6492fca4115568af06440aa52d1f12d8ef6881f","after":null,"ref":"refs/heads/lun-185-call-to-a-member-function-getmorphclass-on-string","pushedAt":"2024-09-18T11:56:37.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"}},{"before":"efe4bd215c814c23a7f7f1e26a4c4d4890fdffe9","after":"80d4b39ce202c094c385eae6fdf51a9b402dcc6f","ref":"refs/heads/1.x","pushedAt":"2024-09-18T11:56:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Fix method `getMorphClass` call on string (#1957)","shortMessageHtmlLink":"Fix method getMorphClass call on string (#1957)"}},{"before":"6bba0931283eef6b60ad55c48a3fb3e75e946b10","after":"e6492fca4115568af06440aa52d1f12d8ef6881f","ref":"refs/heads/lun-185-call-to-a-member-function-getmorphclass-on-string","pushedAt":"2024-09-18T11:52:19.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Merge branch '1.x' into lun-185-call-to-a-member-function-getmorphclass-on-string","shortMessageHtmlLink":"Merge branch '1.x' into lun-185-call-to-a-member-function-getmorphcla…"}},{"before":"882cc18fd336aaabc4814238892114c6614f60f7","after":null,"ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:52:09.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"}},{"before":"c4381dc732aaa3e43b6032afa1871438b74e1956","after":"efe4bd215c814c23a7f7f1e26a4c4d4890fdffe9","ref":"refs/heads/1.x","pushedAt":"2024-09-18T11:52:07.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Tweak pint action author (#1959)","shortMessageHtmlLink":"Tweak pint action author (#1959)"}},{"before":"5e9b973e31102ccfbeaef554bc5a71ba3716f8f6","after":"882cc18fd336aaabc4814238892114c6614f60f7","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:49:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":"bd9a19e0b8b9ec89136546bf6f4a5a366887b3ff","after":"5e9b973e31102ccfbeaef554bc5a71ba3716f8f6","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:47:03.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Update Address.php","shortMessageHtmlLink":"Update Address.php"}},{"before":"fd57423e610104a75dafcd9d44a383197ff2d1d0","after":"bd9a19e0b8b9ec89136546bf6f4a5a366887b3ff","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:42:56.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Update fix-code-style.yml","shortMessageHtmlLink":"Update fix-code-style.yml"}},{"before":"73b7a08de84d5dc24c34c149e5d0860f40d60cf7","after":"fd57423e610104a75dafcd9d44a383197ff2d1d0","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:35:41.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Merge branch 'lun-188-change-owner-of-pint-style-fixing' of github.com:lunarphp/lunar into lun-188-change-owner-of-pint-style-fixing","shortMessageHtmlLink":"Merge branch 'lun-188-change-owner-of-pint-style-fixing' of github.co…"}},{"before":"628429b33359325e1c5c761bad2b3c09a464e114","after":"73b7a08de84d5dc24c34c149e5d0860f40d60cf7","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:28:05.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":"4fd9377c0dc9bca9cd4cc1f88da6f9cfbf2e7aa0","after":"628429b33359325e1c5c761bad2b3c09a464e114","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:25:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Update Address.php","shortMessageHtmlLink":"Update Address.php"}},{"before":"345e2442abdaa2f642fb9dae7e08466db5fe6f99","after":"4fd9377c0dc9bca9cd4cc1f88da6f9cfbf2e7aa0","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:21:04.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Update fix-code-style.yml","shortMessageHtmlLink":"Update fix-code-style.yml"}},{"before":"4b33a7529eb7f2fd3abe7f959b430019c3e3484e","after":"345e2442abdaa2f642fb9dae7e08466db5fe6f99","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:04:01.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":"ae33481ca77d9a34086a497f78201dca9d00d875","after":"4b33a7529eb7f2fd3abe7f959b430019c3e3484e","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T11:01:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Force pint update","shortMessageHtmlLink":"Force pint update"}},{"before":null,"after":"ae33481ca77d9a34086a497f78201dca9d00d875","ref":"refs/heads/lun-188-change-owner-of-pint-style-fixing","pushedAt":"2024-09-18T10:57:33.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Tweak pint action author","shortMessageHtmlLink":"Tweak pint action author"}},{"before":"2aa9fdc547049bce1f18ec089bf194c8af6bb1d6","after":"6bba0931283eef6b60ad55c48a3fb3e75e946b10","ref":"refs/heads/lun-185-call-to-a-member-function-getmorphclass-on-string","pushedAt":"2024-09-18T08:58:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":null,"after":"2aa9fdc547049bce1f18ec089bf194c8af6bb1d6","ref":"refs/heads/lun-185-call-to-a-member-function-getmorphclass-on-string","pushedAt":"2024-09-18T08:55:48.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Fix method call on string","shortMessageHtmlLink":"Fix method call on string"}},{"before":"ea82e765ee672b8dbbe834f53d62c66a9aa7aa5a","after":null,"ref":"refs/heads/lun-153-publishing-lunar-migrations-causes-an-error-on-polymorph","pushedAt":"2024-09-17T08:41:50.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"}},{"before":"f3db11375c7ee03ca94b273543d9ade3e6f7efbc","after":"c4381dc732aaa3e43b6032afa1871438b74e1956","ref":"refs/heads/1.x","pushedAt":"2024-09-17T08:41:49.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"Manually map models on migration instead of loading via directory (#1928)\n\nCurrently if you publish the migrations they can fail due to trying to\r\nread a directory relative to the the vendor folder. This PR instead opts\r\nto manually map the models to prevent this issue completely.\r\n\r\n---------\r\n\r\nCo-authored-by: alecritson \r\nCo-authored-by: Glenn Jacobs ","shortMessageHtmlLink":"Manually map models on migration instead of loading via directory (#1928"}},{"before":"43dbae84d58770bdbeabf39a1a0ad43a504c02cc","after":null,"ref":"refs/heads/lun-156-unable-to-create-order","pushedAt":"2024-09-17T08:41:31.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"}},{"before":"6b0e787e6c2fb02684cb68eb3e775d827f5f3c80","after":"f3db11375c7ee03ca94b273543d9ade3e6f7efbc","ref":"refs/heads/1.x","pushedAt":"2024-09-17T08:41:29.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"Fix extended model resolving (#1949)\n\nThis PR looks to solve some anomalies that have been discovered with\r\nmodel extending.\r\n\r\n## Problem A\r\n\r\nWhen replacing a Lunar model, there are instances where the model\r\nprovided by Lunar is still used for example, if you replace the model\r\nlike so\r\n\r\n```php\r\n\\Lunar\\Facades\\ModelManifest::replace(\r\n \\Lunar\\Models\\Contracts\\Order::class,\r\n \\App\\Models\\Order::class\r\n);\r\n```\r\n\r\nLater in the Lunar core, we are still referencing\r\n`Lunar\\Models\\Order::first()` or via relationships\r\n`$orderLine->order()`. We attempted to resolve these queries to their\r\nconcrete replacements by overriding the `newModelQuery` method, however\r\nthere were issues with castable attributes which caused them to be cast\r\nmultiple times, resulting in errors.\r\n\r\n### Solution\r\n\r\nThis has been rewritten so Lunar doesn't try to `fill` the extended\r\ninstance of the model from the Lunar base class anymore and instead just\r\npopulates the attributes as they are. Since this should just be a simple\r\nclass swap it should no longer result in duplicate calls to attribute\r\ncasters.\r\n\r\nThere are some additional checks to see if we are actually working with\r\na model that hasn't been extended to ensure we are not getting into a\r\nsituation where we try and rehydrate with the same class.\r\n\r\n### Affected issues\r\n\r\nThis change should resolve #1942 #1930 \r\n\r\n## Problem B\r\n\r\nIf your own custom model was named something other than it's\r\ncounterpart, for example:\r\n\r\n```php\r\n\\Lunar\\Facades\\ModelManifest::replace(\r\n \\Lunar\\Models\\Contracts\\Order::class,\r\n \\App\\Models\\MyCustomOrder::class\r\n);\r\n```\r\n\r\nThis would result in the table name and subsequent foreign key naming to\r\nbe incorrect i.e. `my_custom_order` and `my_custom_order_id`. This would\r\nmean developers would need to add their own methods to override this in\r\norder for the naming to resolve properly, which is a bit of a\r\nmaintenance burden and easily missed when encountering errors.\r\n\r\n\r\n### Solution\r\n\r\nThe `HasModelExtending` trait now provides its own `getTable` and\r\n`getForeignKey` methods which will check which class within Lunar we are\r\nextending and return the appropriate table name and foreign key.\r\n\r\n## How this slipped through testing\r\n\r\nLooks like there was an oversight and although there were tests for\r\nextending models, the tests themselves didn't use any extending when\r\nperforming more complex tasks, like creating orders from carts.\r\n\r\nThis PR has now added some model extending to tests which were affected\r\nby the issues referenced above to hopefully keep this in check and make\r\nfor a more \"real world\" test environment.\r\n\r\n---------\r\n\r\nCo-authored-by: alecritson ","shortMessageHtmlLink":"Fix extended model resolving (#1949)"}},{"before":"30896604ea4616d545f8def2bda1533f506da8db","after":"43dbae84d58770bdbeabf39a1a0ad43a504c02cc","ref":"refs/heads/lun-156-unable-to-create-order","pushedAt":"2024-09-17T08:33:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":"9eac4c75f1374691abaa2f38edaa7154427115da","after":"6b0e787e6c2fb02684cb68eb3e775d827f5f3c80","ref":"refs/heads/1.x","pushedAt":"2024-09-17T08:33:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":"a3fb640bb43e0ecac5da7d325434500f62112f44","after":"30896604ea4616d545f8def2bda1533f506da8db","ref":"refs/heads/lun-156-unable-to-create-order","pushedAt":"2024-09-17T08:30:51.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Merge branch '1.x' into lun-156-unable-to-create-order","shortMessageHtmlLink":"Merge branch '1.x' into lun-156-unable-to-create-order"}},{"before":"fc20edbb07f7077be18d86359f08ad4eec5362c8","after":"9eac4c75f1374691abaa2f38edaa7154427115da","ref":"refs/heads/1.x","pushedAt":"2024-09-17T08:30:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Add helper function to get model morph name (#1947)","shortMessageHtmlLink":"Add helper function to get model morph name (#1947)"}},{"before":"e9776551badbc206a591491f87a644bf8756cd46","after":"ea82e765ee672b8dbbe834f53d62c66a9aa7aa5a","ref":"refs/heads/lun-153-publishing-lunar-migrations-causes-an-error-on-polymorph","pushedAt":"2024-09-16T08:12:39.000Z","pushType":"push","commitsCount":5,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Merge branch '1.x' into lun-153-publishing-lunar-migrations-causes-an-error-on-polymorph","shortMessageHtmlLink":"Merge branch '1.x' into lun-153-publishing-lunar-migrations-causes-an…"}},{"before":"cb6c457f9dd939cafa325ab573453d71ac3f6ee7","after":"a3fb640bb43e0ecac5da7d325434500f62112f44","ref":"refs/heads/lun-156-unable-to-create-order","pushedAt":"2024-09-16T07:39:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"glennjacobs","name":"Glenn Jacobs","path":"/glennjacobs","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/647407?s=80&v=4"},"commit":{"message":"chore: fix code style","shortMessageHtmlLink":"chore: fix code style"}},{"before":"047bfb2e9051906471e67810bc22011265457d34","after":"cb6c457f9dd939cafa325ab573453d71ac3f6ee7","ref":"refs/heads/lun-156-unable-to-create-order","pushedAt":"2024-09-16T07:36:43.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"alecritson","name":"Alec Ritson","path":"/alecritson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1488016?s=80&v=4"},"commit":{"message":"Update HasModelExtending.php","shortMessageHtmlLink":"Update HasModelExtending.php"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEuaxPPgA","startCursor":null,"endCursor":null}},"title":"Activity · lunarphp/lunar"}