-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Factories #3722
Factories #3722
Conversation
See what you all think of this. I will obviously add tests and docs but I want us to iron out the core class first. I would also like to see about implementing it for Also, should this move to system/ root instead of being part of system/Config? Or even be part of system/Autoload? |
I like how it looks. You added some nice config options so it's even better. I am very much into using this wherever it will bring some benefits. I think it fits good to system/Config - alongside the |
@michalsn Thanks for the feedback! I have some improvements in the works I'm excited about - I think this will becomes a very versatile core aspect of the framework when it is ready. |
@MGatner Looking great! Those methods definitely multiplied over time. Will be great to have this pulled out into a central class. |
Thanks! I keep going back and forth on the names... @michalsn @lonnieezell have any input?
IMO (1) is easier to type and makes more sense logically, but (2) is consistent with |
@MGatner I think I like option 2 more, but I don't mind 1 either. Glad I could help 😅 |
@MGatner I'm ok with either, but do agree that option 2 parallels existing stuff in the framework better, keeping a nice consistency. And a decent IDE makes typing lots of things even easier than the naming itself. :) |
Glad to hear support from both of you because I already changed it :) Got some test failures to work through and working on the User Guide, then this should be set for review. |
Failing tests again :/ I don't have more time to work on this now - if anyone can figure out why the failures and post back I can take another shot at it later in the week. |
Okay I see the problem: |
Down to what appears to be a discrepancy with |
Test failure is unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User guide syntax check still fails. Other than the phpstan ignored message, I approve. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks really good.
We should only mention about ModelFactory
depreciation in the changelog.
Co-authored-by: Michal Sniatala <michal@sniatala.pl>
@paulbalandan Any ideas on what is still wrong? |
I added a note for both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add this to the changelog in the user guide? I think this is the main one, and the changelog.md
is always generated semi-automatically before release.
Oops! Sorry, will do. I haven't touched the changelogs before, good for me to learn this :D |
Found the fault. After the preferApp row, you should add the bottom table borders that matches above borders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last two. :)
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
I believe this is mergeable already. @MGatner any last additions? |
I think it's ready, I'm just scared. 😳 |
I see this as a useful addition. 🎉 |
Description
Defines a new dynamic lookup class,
Factories
, for returning shared instances of named components.Supersedes #3712 (but still read about the
ModelFactory
bug there, which also applies to the previousConfig
).Checklist: