Issue #57: Distinguish files depending on dev environment.#58
Issue #57: Distinguish files depending on dev environment.#58FlorentTorregrosa wants to merge 9 commits intodrupal-composer:masterfrom
Conversation
README.md
Outdated
| "includes": [ | ||
| "sites/default/example.settings.my.php" | ||
| ], | ||
| "dev": [ |
There was a problem hiding this comment.
Maybe includes-dev (like require-dev)?
|
Hello, Thanks for the review. I have pushed a commit to take your suggestion into account. |
|
Looks okay to me. |
|
I am not convinced of this feature, because initially we told people to commit the files from I won't block the PR, its just for the discussion. |
|
Folks could .gitignore the dev files and run |
|
Hello, Thanks for the discussion, here are thoughts and opinion. @derhasi, I intend to put sites/example.settings.local.php in excludes on my projects, I already have a sites/development.settings.php (better name in my opinion) https://github.com/Drupal-FR/socle-drupalcampfr/tree/8.x-1.x/www/sites. For sites/example.sites.php, I have no idea. I remember having problem if it was not here, I scanned Drupal core and Drush, there are references to this file but I see nothing that would prevent an installation. @webflo, even if Drupal scaffold is thought to be used with the files versionned, I personnally ignore them as they are "generated" (obtained from "contrib"), except files I have modified like settings.php. Before I used a custom script to do what drupal-scaffold do and this weekend I decided to use it as it is one less script to maintain and to stick more with the best practice of the community. Drupal-FR/socle-drupalcampfr@08b6606 |
|
Ok, works for me. Can we add a test for it? |
|
Hello, I have written a test case. I wanted to extend the PluginTest class to avoid duplicate code but I got the following error in that case Also may I suggest to add Thanks for the review. |
|
Hello, Is the last patch ok for you? |
src/Handler.php
Outdated
| * TRUE if dev packages are installed. FALSE otherwise. | ||
| */ | ||
| public function downloadScaffold() { | ||
| public function downloadScaffold($dev = FALSE) { |
There was a problem hiding this comment.
This is also called from (Plugin.php)[https://github.com/drupal-composer/drupal-scaffold/blob/2.3.0/src/Plugin.php#L77).
Rather than risking changing the API of this method every time we have an enhancement to the state we respond to, it would probably be better to pass the $event in here, and let downloadScaffold() access $event->isDevMode() itself.
|
This looks great. Try having PluginTest and HandlerTest extend the same base class, and push duplicate code down there. |
b012a24 to
2b4d09a
Compare
|
Hello, Both proposed changes has been addressed. Is it ok now? Edit: And thanks @greg-1-anderson for the review at DrupalCon Vienna! |
5364fbd to
21f28fb
Compare
|
Hello, I have rebased my changes to followup the last code changes in drupal-scaffold. Would it be possible to have a review please? |
331c486 to
d0d450f
Compare
|
Hello, I have rebased my pull request and made some adjustments following the recent commits. Would it be possible to merge it please? |
… have the checked files.
…omposer to add require-dev by default.
|
Hello, Now that #88 is ok and will be merged soon, I have rebased this PR to fix conflicts. Will it be possible to have it reviewed one more/last time and hopefully merged please? :) |
|
Hi! There is some limitation with the current implementation, it doesn't allow to scaffold dev files in a different folder (if my drupal folder is in /web using drupal-project for example). |
No description provided.