-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Config] Extract the definition component from the config component #32847
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
Comments
Those links all point to issues/posts that are rather dated (up to 7 years) and I'm not exactly sure what the point of this issue is, can you elaborate?
What exactly is up for debate and what should be changed? |
I'm sorry, I should've been more clear. I'm mainly talking about https://www.drupal.org/project/drupal/issues/3021900 which is a more recent one, where they are talking about implementing the new features introduced in Symfony 3.3. In one of it's sub-issues it was stated that some of these features reside in symfony/config (https://www.drupal.org/project/drupal/issues/3021899#comment-12909285), but it was decided not to use that component because it would be too much overhead (Drupal doesn't need/want to use the classes in the Symfony\Component\Config\Definition namespace).
In #7796 fabpot stated it would not be worthwhile splitting the config component into three components (config loading, config definition, config cache). Since that is a decision made in 2015, I was wondering if you still feel that it would not be worthwhile splitting it up. So basically what I'm asking is, if you would reconsider #7796? |
What would be the benefit of splitting it up? They are tightly coupled. The config component is used to parse the bundle config (and services/parameters), validate this and then have Symfony process this configuration to manipulate the container. Taken from #7796, I would like to add some comments. Configuration definition/validation (in Config/Definition) Configuration loading (in Config/Loader) Caching things in a file on disk with a revalidation mechanism (ConfigCache et. al.) While splitting the first one off might give a benefit, I don't see why Drupal would need to split this. I don't see the problem with using the config component this way and don't understand what the arguments against using it are about. taken from https://www.drupal.org/project/drupal/issues/1632930#comment-6646246
Who cares about the internal implementation size?
250 KB of source isn't a problem, especially not with opcache. Slow? It's only ran when the container needs to compile, so that's not an issue either, besides of that, it's lightning fast.
I don't think this is relevant to using it or not. If complexity is an issue, I don't think using a framework is the right choice. Besides of that, custom code becomes complex as well.
I don't get problem in this comment While this comment is very old by now, it's also incorrect by the way it was assessed. So my question is, why should it be re-considered to split it? They should be used together if you want to compile a container and configure things, unless you want to write your own service loader, which is basically reinventing the wheel for no good purpose. |
@linaori Thank you for taking the time to write such an elaborate reply. I'll try to get more feedback from the Drupal community, linking to your explanation above. You might be right when you say the initial assessment was incorrect. I would need to get feedback from some people that know this part of the Drupal codebase like the back of their hand. I would very much like seeing the Symfony Config component, and all the benefits with it, in Drupal core myself. Maybe the Drupal community/core commiters will reconsider themselves, or reassess the config component. Thanks again for your time! |
I'm not familiar with how Drupal works, so I can't comment on that part. My recommendation to Drupal would be to keep it simple, use the Container (compilation)/config/resource tracking in a way that Symfony does if you use the full framework. This provides the most benefits, though I understand if this is difficult to do for a CMS that doesn't want to rely on have a build step first. |
What @linaori said. Closing for now, please reopen/resubmit with details when you have more. |
@linaori there are some mistakes in what you said. The But anyway, I still don't understand the reason for this request here. Are you asking to extract |
Uh oh!
There was an error while loading. Please reload this page.
Coming from https://www.drupal.org/project/drupal/issues/1632930 and having seen #7796 I would like to inform if your stance on this has changed in the meanwhile.
Drupal folks are discussing to basically re-implement the same functionality the Symfony Config component provides (see https://www.drupal.org/project/drupal/issues/3021900 and https://www.drupal.org/project/drupal/issues/3021899#comment-12909285), which seems a bit silly to me. The reason they don't use the config component is because it was deemed too much overhead (https://www.drupal.org/project/drupal/issues/1632930#comment-6646246)
Is this up for debate? And if not, is there anything we can do to possibly change your mind?
TIA!
Kind regards,
Jelle
The text was updated successfully, but these errors were encountered: