-
Notifications
You must be signed in to change notification settings - Fork 6
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
Upgrade local & Silta PHP to 7.4 & add PHPUnit testing setup. #122
Conversation
Should we upgrade PHP here as well: https://github.com/wunderio/drupal-project/blob/master/composer.json#L19 ? |
Please test mysql vs SQLite. Tested with this:
Beware to get coffe as it might take few minutes in Mac! With the current setup commited (using SQLite): Test 1: Time: 01:57.210, Memory: 10.00 MB Then in in my local changed the SIMPLETEST_DB parameter in .lando.yml to use the MySQL connection:
Test 1: Time: 00:41.787, Memory: 10.00 MB That's more than 2x speed increase for me. Is it only my setup? There is supposed to be also in memory support for SQLLite but didn't get it working.
https://www.drupal.org/project/drupal/issues/2983452 In my previous tests with other projects didn't see any speed increase either. Then again I wasn't testing kernel tests. |
d61d8a9
to
95ba4a6
Compare
There are some failures with functional tests,
|
@hkirsman, thanks :) lando/lando#2283 (comment) |
206457c
to
7d6f7de
Compare
Should we run some tests in CircleCI as well? |
…MPLETEST_BASE_URL.
@@ -30,6 +30,7 @@ | |||
}, | |||
"require-dev": { | |||
"drupal/core-dev": "^9.1", | |||
"phpspec/prophecy-phpunit": "^2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"phpspec/prophecy-phpunit"
comes from https://www.drupal.org/node/3176567.
- Add minified phpunit_example module from https://www.drupal.org/project/examples. - Enable phpunit in grumphp.yml.
48ffbde
to
52433df
Compare
This reverts commit 528fdd2.
This tries to resolve the following error in CI: [ERROR] syntax error, unexpected '|', expecting variable (T_VARIABLE)
Looks like the problem with | (8658c52) is similar to https://stackoverflow.com/questions/66100477/symfony-5-2-3-interface-type-hinting |
Looks like CI is using PHP
Full verbose log:
|
Yeah, it's defined in
|
Also in here
|
Changed the PHP version to
|
And PHPUnit tests output locally with PHP
|
Okay, unittest passes in CI and is using the correct PHP version:
|
And
|
Seems like there's something wrong with
|
Successfully tried out psalm:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected. Ready for merge.
This PR upgrades PHP to
7.4
and adds PHPUnit setup. Runlando phpunit --group admin_toolbar
to test the PHPUnit setup.This is the same PR as #121 with default PHP version upgraded to
7.4
. See more at #121 (comment).