-
Notifications
You must be signed in to change notification settings - Fork 92
Support all models #42
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
Support all models #42
Conversation
|
Hei, Undefined array key "last_modified" at vendor/statamic/eloquent-driver/src/Assets/Asset.php:76 |
|
Thanks, I’ve pushed a fix here: ryanmitchell@040bfea
… On 29 Aug 2022, at 16:31, crackAT ***@***.***> wrote:
Hei,
got an issue when importing assets with php please eloquent:import-assets
`Undefined array key "last_modified"
at vendor/statamic/eloquent-driver/src/Assets/Asset.php:76
72▕ ])->fill(['data' => $meta]);
73▕
74▕ // Set initial timestamps.
75▕ if (empty($model->created_at)) {
➜ 76▕ $model->created_at = $meta['last_modified'];
77▕ $model->updated_at = $meta['last_modified'];
78▕ }
79▕
80▕ $model->save();`
—
Reply to this email directly, view it on GitHub <#42 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAMVO2AWN3AWYWSBQ6MB63V3TJVDANCNFSM5OVJMH6Q>.
You are receiving this because you were mentioned.
|
|
What are we missing to get this merged? |
|
Thank you @ryanmitchell and everyone else involved in this. It's hugely appreciated. 🎉 Sorry for the delay on getting this merged. For anyone already using this PR, keep in mind at the last moment that the config file was changed from I'm fine with the tests being duplicated for the moment. In the future maybe we can figure out a way to get the cms test suite running using this driver. No sense in holding this back any longer. It's working well enough for people to be using it in production. |
|
@jasonvarga awesome! I've already spotted a few typos, and the project could do with a Pint cleanup, but other than that I just need statamic/cms#5686 to be flying :D |
|
Amazing. Thanks to everyone for the contributions, testing and feedback! |
|
Just wanted to share my heartfelt thanks for all the hard work from everyone on this PR – I made this video for you! |
|
Great news! If I may ask - what would be the proper way to change from using the PR to the master repo? I tried doing a normal install, removed the vcs-part in composer.json and renamed eloquent-driver.php, but that did not play well. |
Remove my repo from your composer.json and then |
|
Howly! I was so looking forward to this moment 🎉. When I began 16 months ago, I've thought this would become a big thing to finish. Together, we have done it! Many thanks to @ryanmitchell for keeping it going and managing it. And of course all the others who made this PR finally ready to be merged. ✌️ |
|
Great News ppl, thanks for the merge |
|
Been following along the progress for some time, can't wait to plug this into my next project. Great effort and much love to everyone involved! 🥳 |
Sorry for the duplication of PRs here but I have reached out to the authors of both the previous PRs to try and combine efforts but have had no response from either.
As I indicated here I have taken the existing PR (#20) and added the rest of the models. I subsequently discovered the work that has since been opened in #41 and have added the additional blueprints and field sets work from it.
I have intentionally not included user groups and role as IMO they should be handled by Statamic core as part of the eloquent users setup.Update: I've opened a PR in statamic/cms for this: statamic/cms#5686So to confirm this PR includes:
I have also refactored the code allow for devs to opt in via config to each 'model', I have ensured it uses the bound models, and I have written console import tasks to allow migration from file based data to eloquent.
Finally I have applied fixes from any open PRs and ensured they are included (with the exception of Jason's).
@jasonvarga I'd appreciate it if you could review this and let me know what you think.