Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2014 at 21:33 UTC
Updated:
5 Mar 2015 at 18:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
eclipsegc commentedI've emulated Symfony's approach to attribution here, dunno if Dries is a.) ok with this and b.) if he wants to use the email address.
Eclipse
Comment #2
penyaskitotypo :-P
Comment #3
eclipsegc commentedTypo
Eclipse
Comment #4
eclipsegc commentedWe don't have any attribution in the base composer.json for drupal, so I just went ahead and removed it here as well. I think this probably puts this into a committable state.
Eclipse
Comment #5
dawehnerLet's go with 5.3.10 for now.
Maybe some examples would be helpful (String/XSS)
Should we link to https://www.drupal.org/project/drupal instead?
I wonder whether we should prefix the drupal core components somehow. (drupal/core-utility). Just wondering.
Comment #6
eclipsegc commented1.) Crell and I discussed this and he suggested setting it the same as D8, I didn't argue, but I see no reason to set it arbitrarily higher than what is actually needed here.
2.) OOOOOK
3.) You're not the first person to suggest that. I disagree, but am apparently in the minority, and it seems a really minor thing.
4.) Not sure what we'll do for Drupal/Core stuff... you're solution doesn't seem bad, but I question whether any of that will ever end up "composerable".
Eclipse
Comment #7
eclipsegc commentedwe'll make it https
Eclipse
Comment #8
dawehnerLet's go with that as a first step.
We should consider to create an issue somewhere to do an automatic subtree cron based splitting
Comment #10
sunIs it is very likely that we'll copy/paste this first file as a template later on, can we (1) fix the indentation and (2) turn the inner namespace hashmap onto a separate line?
In short:
Comment #11
dawehnerThis 4 spaces clearly from the outside world which pretty much all uses 4 spaces in the composer.json files. Maybe we should discuss that somewhere.
Comment #12
sunI've seen composer.json files in the wild using 2 spaces, 4 spaces, or even tabs.
I don't think there is a coding standard for composer.json files. → As long as it's valid JSON, everything works.
I don't really care which form we're going to use, but I think there is one crystal clear rule that we can all agree to:
Within the scope of a single file, the style should be consistent.
The autoload:psr-0 lines are the only lines that diverge from the rest of the file. There are multiple ways to fix this, just choose one. I'd personally prefer to stick to 2 spaces, but again, only consistency matters. :)
Comment #13
eclipsegc commentedYou are completely right, my bad.
Eclipse
Comment #14
sunThanks! :-)
Now, personally, I'd like to perform the following change for maximum accuracy + architectural sanity, but I'm not sure whether we're able to do it right now, because AFAIK there is at least one offender (Settings):
In other words: Any class that is not a static utility function class (mainly wrapping PHP core code) has absolutely no place in \Drupal\Component\Utility. It concerns me that this is not a hard requirement for \Utility.
That said, I'd also drop the "Drupal components including" part. → By exposing them to the public, they are no longer for "Drupal components" only. :P
Comment #15
eclipsegc commentedwhat about:
"description": "Mostly static utility classes for string, xss, array, image, and other commonly needed manipulations.",??? I know, it's totally suboptimal, but at least it's honest.
Let me know.
Eclipse
Comment #16
sun"Mostly static" is an excellent idea and compromise! :-)
Comment #17
eclipsegc commentedOk then.
Eclipse
Comment #18
damien tournoud commentedThe license property doesn't seem to match the documented ones. From the doc, we should be using
GPL-2.0+.Comment #19
eclipsegc commentedSorry, didn't realize there was a page documenting that standard. Thanks!
Eclipse
Comment #20
Tor Arne Thune commentedhttps://www.drupal.org/ redirects to https://drupal.org/ so wouldn't it be more correct to use: https://drupal.org/project/drupal ?
Comment #21
eclipsegc commentedSeems kosher.
Eclipse
Comment #22
damien tournoud commentedLooks like a good start.
Comment #23
webchickI have no idea what this is for, let's get an updated issue summary.
When I asked Eclipse what it was for, he said it was to allow Component to be split off and that sounds like a strategic question, so also assigning to Dries. This might not actually need to happen, but I can't tell because there's no issue summary. :)
Comment #24
eclipsegc commentedComment #25
Crell commentedAdding parent issue for context.
Comment #26
dawehner@webchick
So yeah it is not about splitting up the code itself, it is about supporting people which want to reuse the component in NON-drupal variants.
Theoretically this is already possible, though it is kind of a mess without the composer.json file.
Comment #27
eclipsegc commentedI updated the summary but failed to remove the tag.
Eclipse
Comment #28
eclipsegc commentedComment #29
tstoeckler"xss" should be "XSS", I think.
Comment #30
sunI'm not sure why this needs approval from Dries — for now, the intention is just to perform periodical git-subtree splits (exports) from git.drupal.org/project/drupal into standalone repos per component. The "master"/originating code stays in core.
The composer.json only needs to be added to core, because the subtree-split should be a 1:1 copy of the originating code. A composer.json file is required to use a standalone component with Composer.
In essence, we want to do the exact same thing as Symfony: All Symfony components are maintained in a single project repository, and each of them is split/exported into a standalone repository. This allows other projects (like Drupal) to cherry-pick the components they want to use.
Comment #31
eclipsegc commentedThank you sun for explaining what I appear to be incapable of communicating.
sun++
Eclipse
Comment #32
eclipsegc commented@tstoeckler
I'd prefer to not do that since they're all currently lower case, consistency and all, and I don't have to decide if various elements of this need additional capitalization.
Eclipse
Comment #33
dries commentedThis looks like a good idea to me (but a low priority).
I'm fine with having read-only clones outside of core, but for now I want these components to be maintained in Drupal core itself.
Comment #34
effulgentsia commentedUnassigning from Dries since he answered.
Comment #35
eclipsegc commentedYeah, I think we have the same goals in that regard, all this does is make it possible for us to begin working toward that goal. Thanks for responding! I think we're still RTBC.
Eclipse
Comment #36
alexpottCommitted a50ebdf and pushed to 8.x. Thanks!
I validated the the composer json by running
composer validate core/lib/Drupal/Component/Utility/composer.jsonI think we should have a change record to detail the purpose of this.
Comment #37
eclipsegc commentedAdded a change record.
Eclipse
Comment #38
eclipsegc commentedComment #39
eclipsegc commentedComment #41
xanoSee #2210257: Bump \Drupal\Component\Utility's PHP requirement to 5.4.2.
Comment #42
davidwbarratt commentedComment #43
mile23