Metadrop / drupal-boilerplate

Drupal projects up and running with Docker and many other tools in minutes
28 stars 23 forks source link

PHPUnit is missing from branch 3.x #122

Closed rsanzante closed 11 months ago

rsanzante commented 1 year ago

After a fresh install from branch 3 PHPunit is missing.

Using this command line: composer create-project --ignore-platform-reqs metadrop/drupal-boilerplate:3.0.0-beta1 my-project

rsanzante commented 1 year ago

I think the problem is drupal/core-dev package is missing

Additionally, trying to install it results in an outdated release:

$ composer require drupal/core-dev
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update drupal/core-dev
No patches supplied.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking drupal/core-dev (8.0.0-beta15)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
No patches supplied.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/core-dev (8.0.0-beta15)
Generating autoload files
41 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Found 8 security vulnerability advisories affecting 5 packages.
Run composer audit for a full list of advisories.
Using version ^8.0@beta for drupal/core-dev

Version 8.0.0-beta15 is installed, but it won't work with Drupal 10.

After installing core-dev 10.x (and removing some modules that break unit tests like honeypot, paragraphs and rabbit hole) tests are working:

composer require drupal/core-dev:^10.0

Modules to remove:

composer remove drupal/honeypot drupal/config_split drupal/rabbit_hole drupal/paragraphs

And check tests:

wodby@php.container:/var/www/html $ phpunit -c web/core
PHPUnit 9.6.8 by Sebastian Bergmann and contributors.

Testing 
[...]

I didn't investigate the modules breaking the tests, it could be a configuration error or some issue with modules (for examle, I remember a case where a module included tests that required a module that was not a dependency, so it was not installed, but becasue the module weanted to test integration with that module tried to use it, making tests fail). I would handle this on other issue.

So, currently I think we need to bump the core-dev version.

omarlopesino commented 1 year ago

After a fresh install from branch 2 PHPunit is missing.

Using this command line: composer create-project --ignore-platform-reqs metadrop/drupal-boilerplate:3.0.0-beta1 my-project

The issue is about 2.x but you are referring to a 3.x tag in the command line example so it looks like a confusion, @rsanzante is it ok if I fix the title to 3.x?

rsanzante commented 1 year ago

Ouch! Yes, I'm editing it, sorry!

omarlopesino commented 11 months ago

The latest versions of boilerplate are including drupal/core-dev https://github.com/Metadrop/drupal-dev/blob/0.x/composer.json#L16 . Lookslike the problem is produced by the problems installing core-dev:10 mentioned at https://github.com/Metadrop/drupal-boilerplate/issues/122#issuecomment-1566270090

I'll review it asap.

omarlopesino commented 11 months ago

@rsanzante I am not able to reproduce the problem. When I do a fresh boilerplate install, phpunit and drupal core dev are installed:

imagen

imagen

rsanzante commented 11 months ago

I doesn't happen anymore, I guess something related to the dependencies that has been fixed elsewhere.