Open sydekumf opened 4 years ago
I agree that the declarative approach is always better than imperative, and having declarative data scripts has drawbacks. So having declarative data definitions would be a huge improvement. Regarding the current proposal:
setup:upgrade
, just to make sure it's only once.app/etc
(as part of a specific project). While they can also be located in modules to support essential data (like websites), w/o which the module can't work.Scheduled meeting to discuss: https://adobe.bluejeans.com/7385677850 , Thursday, May 28, 10am (CDT)
@mslabko I guess profile generator has too general approach for generation. entities like 'Store 1' and 'Store 2' rarely used in real online stores. @sydekumf by the way, what is the difference between data import and this approach? The names of entities would be different each time anyway. CSV is not so hard to manage comparison to XML/JSON or whatever format you would like to pick. And even if import isn't the option, you always can create own sample-data configuration and use it. if I'm not mistaken it use CSV config types as well.
It could be quite uncertain. Due Magento saves the mentioned entities in a database the introduction of config like this will cause the question is this data that were declared can be edited? What should happen if the module disabled or removed?
The common recommendation never setup new EAV attributes through the application installation because the stores, attributes, and sets are something that should be managed by a merchant and we can not rely on this information presence in code.
The proper solution for the case you mentioned will be data import.
Meeting minutes:
maintained
flag.Action items:
@sydekumf one more question, in the examples you mentioned could EAV attributes be replaced with extension attributes which are already declarative? https://devdocs.magento.com/guides/v2.3/extension-dev-guide/attributes.html#extension
Hi @buskamuza we updated the proposal with the information from our last call :-) Could you please have a look into it. We would be very happy to talk about that with you in another call. Let me know what you think, thanks a lot!
We simplified the concept and updated the document :-)
@fascinosum : How events on configuration update will be covered? May be not an issue for initial installation, but may lead to unexpected behavior during update.
Regarding required attributes: agreed that as this is an existing problem, it's not necessarily should be addressed in this proposal. A default value should be used for attributes whenever possible, in this case it can be used to fill data for existing records.
@buskamuza How can we proceed with this PR? Would be happy to get any news or plans from Adobe/Magento :-) Thanks!
Problem
When you start a new Magento project there are similar initial tasks to set up configuration including websites, stores, tax, store configuration, attributes and more which lead to different problems:
Solution
There should be a declarative schema approach to provision a new instance with all necessary configuration to run. It is related to the existing delcarative database schema but manages configuration data like:
Requested Reviewers
@buskamuza @paliarush