-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Add ability to install "drupal-core" projects to the project root #38
Conversation
That is kinda weird, you can't really install a vendor as project root, because updating it would remove the whole directory and your entire project with it. People should rather use create-project to bootstrap project, and drupal stuff should be in vendor/ too if possible though I understand that won't be possible right now. |
Hmm, Drupal has to live in the web-root, unfortunately, which currently is the project root.
Right now, |
Well drupal itself can't really be handled as a dependency until you fix that "has to be web-root" situation. Are you sure it couldn't live in a subdir? Surely all you need is an index.php in the root? |
FWIW, I have a proof of concept handling a install to root situation using with create-project and a post-install-cmd. Take a look at https://github.com/shama/eatcake for an example. It's kind of silly over just using |
Perhaps just "core" then? |
I think this is okay to merge. Just let me get #43 done so we can test if it causes any craziness. FWIW, the ZF2 types install to a single folder. It seems problematic to me but let's at least have test cases to show whether or not we should do this. |
What about doing this at a higher level? This doesn't seem to be Drupal exclusive. Perhaps a webroot installer type with a webroot extra to set the path and throw an error for configuration if more than one package is set for webroot? |
Shouldn't the Drupal core project add a composer.json file to the root? That way you can do a command like this: php composer.phar create-project drupal/drupal-standard path/ 8.0 This is the same way Symfony handles creation of projects: I don't think it makes sense to have a completely new type for a single project (drupal core), since the installers should represent a group of projects. thanks! |
Here is more information on which I think should suit everyone's needs (if a composer.json file is added to the root of Drupal) thanks! |
@davidbarratt Definitely, there's a patch I have at http://drupal.org/node/1805316 to move |
@davidbarratt The There's also another pull request I put together which will automatically figure out the proper location for modules/themes/profiles: Thanks! |
@RobLoach what do you mean "installing Drupal core into drupal?" Thanks! |
I'm not sure this pull requests makes sense. Since the composer.json file is in Drupal's root, if you were to include Drupal in a composer file it would be something like this
I'm not sure how this is really helpful since you end up with a core within a core and you still have to point your webroot to index.php, and index.php is going to get the autoloader from core/vendor not from ../vendor. So I'm not really sure how this fixes the problem. I feel like drupal/drupal-core really needs to be its own project, and drupal/drupal has it's vendor directory set as "core" that was drupal core will end up in "core/drupal" and symfony will be in "core/symfony" etc. That's the only way I can see fixing the problem, but that will require some changes to Drupal. At that point though, you might as well leave it "vendor" instead of "core". However, this still doesn't address the issue of being able to edit the composer.json file, I guess then it would be acceptable to modify (like .gitignore or .htaccess), since the only required package will be "drupal/drupal-core". I'd support a Drupal patch like that, that would also remove the requirement to have a "drupal-core" installer and will make Drupal Core a standard library (which makes way more sense to me anyways. This would be a similar architecture to Symfony & Symfony Standard which honestly makes way more sense to me than what Drupal is trying to do and what you're trying to compensate for in this pull request. |
@RobLoach I couldn't find a Drupal Issue anywhere for this, so I created one: https://drupal.org/node/1975220 Thanks! |
I don't think we would need to do this if we used a different solution in Drupal core. I posted some ideas here: https://www.drupal.org/node/1975220#comment-9389981 |
I've responded to @greg-1-anderson's comment at length here: Let's not junk this issue up with how to solve Drupal's composer problems. I've even described why this pull request (in Drupal's current state) doesn't work in #38 (comment) btw @RobLoach and @shama I think this pull request is good to go when https://www.drupal.org/node/1975220 makes it into Drupal (or you can do it before then if we think it will make it). At that point, this pull request will be blocking https://www.drupal.org/node/2372815 |
The related Drupal Issue https://www.drupal.org/node/1975220 has been committed! This pull request should be merged! :) |
Moved it over to #208 . Was an old repo. |
Drupal core is to be installed to the project root. A "drupal-core" project would be:
http://drupal.org/project/drupal
I have a fork of it using the "drupal-core" type at https://packagist.org/packages/robloach/drupal .