drupal-composer/drupal-project

Init 9.x branch

leymannx opened this issue · 19 comments

Does it make sense do init a 9.x branch? I tried it with the patch applied and it seems to work just fine.

git clone --branch 8.x git@github.com:drupal-composer/drupal-project.git some-dir
cd some-dir
curl https://patch-diff.githubusercontent.com/raw/drupal-composer/drupal-project/pull/569.patch | git apply -v --index
composer install -n
  1. PHP 7.3
  2. Drupal console needed to be removed due to mismatched dependencies. 😢
  3. Is it okay to require core ^9.0 versions instead of ^9.0.0?
  4. And Drush ^10.0 instead of ^10.0.0?
diff --git a/composer.json b/composer.json
index b29500c..16c4ed8 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
 {
     "name": "drupal-composer/drupal-project",
-    "description": "Project template for Drupal 8 projects with composer",
+    "description": "Project template for Drupal 9 projects with composer",
     "type": "project",
     "license": "GPL-2.0-or-later",
     "authors": [
@@ -16,19 +16,18 @@
         }
     ],
     "require": {
-        "php": ">=7.0.8",
+        "php": ">=7.3",
         "composer/installers": "^1.2",
         "cweagans/composer-patches": "^1.6.5",
-        "drupal/console": "^1.0.2",
-        "drupal/core": "^8.8.0",
-        "drupal/core-composer-scaffold": "^8.8.0",
-        "drush/drush": "^9.7.1 | ^10.0.0",
+        "drupal/core": "^9.0",
+        "drupal/core-composer-scaffold": "^9.0",
+        "drush/drush": "^10.0",
         "vlucas/phpdotenv": "^4.0",
         "webflo/drupal-finder": "^1.0.0",
         "zaporylie/composer-drupal-optimizations": "^1.0"
     },
     "require-dev": {
-        "drupal/core-dev": "^8.8.0"
+        "drupal/core-dev": "^9.0"
     },
     "conflict": {
         "drupal/drupal": "*"

I wrote a letter to @webflo about 9.x branch. @leymannx you can create pull request.

tormi commented

I'd use drupal/core-recommended instead of drupal/core. This will ensure that all core dependencies are fixed to tested versions.

Is drupal console obsolete in D9?

@dillix – Drupal Console unfortunately seems to be abandoned. The dependencies don't match anymore and no one takes care of it. See hechoendrupal/drupal-console#4250 and hechoendrupal/drupal-console#4220.

I provided a PR now to have a patch to work from in #569. To start a Drupal 9 project with this template perform the following steps.

git clone --branch 8.x git@github.com:drupal-composer/drupal-project.git some-dir
cd some-dir
curl https://patch-diff.githubusercontent.com/raw/drupal-composer/drupal-project/pull/569.patch | git apply -v --index
composer install -n
tormi commented

Just an additional remark from Drupal Slack #composer channel to my previous comment at #568 (comment)

Screenshot 2020-06-06 at 10 21 39 (1)

What is the status of this project in regards of Drupal 9?

Well, looking at https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies using this template became deprecated.

I guess it's a bit like Drupal Console and Drush where Drupal Console fulfilled its purpose in showing Drush in which direction to head, what Drush finally did. And now Drupal Console became kind of obsolete. drupal-composer/drupal-project basically can be seen as blueprint for what finally became the drupal/recommended-project which now is the recommend Composer template. And maybe some day soon it will also come with Drush which again makes it a little bit closer to the Drupal project here.

Still, right now the drupal/recommended-project doesn't come with Drush (although that's easily to be changed yourself) or with a script handler (providing a settings.php and permissions), which makes me conclude that the drupal-composer/drupal-project still has its purpose, especially for a bit more experienced developers.

But it's up to the maintainers and we can only beg @webflo @derhasi and @davidbarratt to finally have a look at it and finally open a 9.x branch or officially deprecate and archive this template here and on Packagist.

I agree “that the drupal-composer/drupal-project still has its purpose, especially for a bit more experienced developers.”

We just need to remove Drupal Console and use Drupal 9. Your PR probably deals with all that.

Of course, we need maintainers to open the 9.x branch. But, as a last resort, we could fork this project and open the 9.x branch in the fork.

@webflo @derhasi @davidbarratt – Any chance to get you commenting on that matter? It's just a pity that suddenly no one seems to be taking care of that project anymore. Same as Drupal Console.

There is an excellent manual how to migrate from drupal-composer/drupal-project to drupal/recommended-project from @Niklan:
https://niklan.net/blog/209

Its on Russian, but you can use google translate.

PS: It seems that drupal-project was abandon by maintainers.

Even if we can “migrate from drupal-composer/drupal-project to drupal/recommended-project”, we need a reliable maintainer to host and maintain the 9.x branch of this project.

Anyone willing to take that role?

Yes, me.

tormi commented

Our company @wunderio maintains the fork of this project with some additions here: https://github.com/wunderio/drupal-project. We have already upgraded it to "drupal/core-recommended": "^9.0".

Nice.

Also seems Drupal Console has finally addressed D9 compatibility in a new release 6 days ago: https://github.com/hechoendrupal/drupal-console/releases/tag/1.9.5

Yes, I noticed the Drupal Console 1.9.5 release.

@leymannx Can you fork the drupal-project, then? As a maintainer having this project in your namespace would make sense. Or we could switch to the @wunderio project.

I created a new organization at https://github.com/drupalgold and forked it to there.

To start a new D9 project run:

composer create-project drupalgold/drupal-project:9.x-dev some-dir --no-interaction

Co-maintainers welcome!

@webflo created a new 9.x branch. You now can run composer create-project drupal-composer/drupal-project:9.x-dev some-dir --no-interaction to create a D9 project as usual.