🇮🇹
Account created on 7 May 2011, over 14 years ago
#

Merge Requests

More

Recent comments

🇮🇹Italy mondrake 🇮🇹

FTR, @coversClass has never been a PHPUnit supported annotation...

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

Cool.

🇮🇹Italy mondrake 🇮🇹

We shouldn't, but I saw this happening in a commit recently (sorry I lost track of which one). But yeah - it's harmless anyway and now numbers are just too big to baseline them at the moment.

🇮🇹Italy mondrake 🇮🇹

I think we can close this now. Yes there are couple of follow-ups open but the test codebase is now fully converted.

Setting to RTBC for any comment.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

Good catch.

Few comments:
1) this is now partially overlapping with 📌 Enforce removal of PHPUnit annotations from test classes' class metadata Postponed , in the sense that it analyses same scope with slightly different checks. May be better try to have one rule only?
2) the check on #[Group] attribute presence here is limited to Functional and Kernel tests AFAICS - should be on any test class actually

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

Approx 1k instances of $this->container in Functional/FunctionaJavascript tests... I think that probably needs a meta and childs.

🇮🇹Italy mondrake 🇮🇹

+1, can we check what would be the impact of deprecating access to $container here before deciding if to do here or in follow up?

Also, I wouldn't have allowed access to dynamic properties at all; minor though as in any case both warnings and deprecations are set to cause tests to fail.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

added a comment inline

🇮🇹Italy mondrake 🇮🇹

Not sure it's worth changing this isolated case here.

My suggestion would be to do, for core/tests:

  • 📌 Add return types to core tests code via Rector Active adding some return types
  • Round 2 (issue tbd) - complete return types and add argument types via Rector
  • Round 3 (issue tbd) - add types to class properties via Rector
  • Round 4 (issue tbd) - convert anything that is left out
🇮🇹Italy mondrake 🇮🇹

Rebased and reverted changes to DocParserTest, back to RTBC.

🇮🇹Italy mondrake 🇮🇹

Per 4.0.0 release notes, this is expected as now the module enforces strict typing.

🇮🇹Italy mondrake 🇮🇹

Uh oh... 4185 errors would be added to the baseline...

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

Let's be bold here, #28 is almost two years old and no activity since.

🇮🇹Italy mondrake 🇮🇹

Looks like the consolidated approach now is to use autowiring attributes in code to solve this issue - I suggest to close won't fix this

🇮🇹Italy mondrake 🇮🇹

Out of curiosity, I checked out the rotated image derivatives from the CI runs, and they're actually quite different in PHP 8.4 and 8.5. Attaching here.

This is an area where local testing may yield different results, as PHP with the embedded GD library (that Drupal GitLabCI uses) has code quite different from PHP that links the library separately, as #2921123: Adjust Rectangle class to calculate rotated image dimensions according to libgd 2.2.2+ shown extensively.

🇮🇹Italy mondrake 🇮🇹

All the new Kernel tests (one per image type) are green on PHP 8.5 now.

🇮🇹Italy mondrake 🇮🇹

#29 - thanks @andypost, AVIF now looks OK in latest tests.

#28 - In the end I think we should be testing conditionally on PHP version, without changing the default interpolation algo. Latest commit does that.

🇮🇹Italy mondrake 🇮🇹

IMHO

imagesetinterpolation($toolkit->getImage(), IMG_NEAREST_NEIGHBOUR);

should be placed in the toolkit code, conditionally on the PHP version, not in the test. Otherwise we'd be testing something that does not match the normal runtime behavior.

Or, we need to have different reference values to check against (again, PHP version-dependent).

Setting to NR for comments.

🇮🇹Italy mondrake 🇮🇹

AVIF images misdetected as HEIF after introducing HEIF support in getimagesize() was fixed upstream so in PHP 8.5RC4 we should not longer have that part to be solved.

What remains is the different default interpolation used in PHP 8.5 vs earlier versions.

This test is one of the longest running kernel tests, I think it would make sense to split it in an abstract base class and one concrete test class per image type (gif, png, webp, etc.).
It should not be that hard, will try to look into it.

🇮🇹Italy mondrake 🇮🇹

#93 and #94 IMHO the effort to try supporting global constants in unloaded .module files is not worth doing at this point. So dropped it in the last commit.

Retitled and updated IS.

🇮🇹Italy mondrake 🇮🇹

Blocker is in.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

Looks good to me.

🇮🇹Italy mondrake 🇮🇹

#8 sure it would make sense. Can PHPCS selectively detect that the test class inherits from one of KernelTestBase or BrowserTestBase? Only those should have the attribute, Unit and Build tests do not need it, at least by default.

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

I think this should be cherrypicked to 11.3.x too

🇮🇹Italy mondrake 🇮🇹

📌 doctrine/annotations is abandoned Active seems the culprit, may need reverting

🇮🇹Italy mondrake 🇮🇹

Yes...

🇮🇹Italy mondrake 🇮🇹

HEAD test jobs are broken right now.

🇮🇹Italy mondrake 🇮🇹

Adding a release snippet in case

🇮🇹Italy mondrake 🇮🇹

Rebased post commit of 📌 Remove support for PHPUnit 10 Active

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

I think the CR of 📌 Remove support for PHPUnit 10 Active is enough. Not sure about a release note specifically for this issue, but leaving the tag.

🇮🇹Italy mondrake 🇮🇹

mondrake changed the visibility of the branch 3554077-incorrect-failure-message to hidden.

🇮🇹Italy mondrake 🇮🇹

Thank you!

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

The MR is built on top of 📌 Make Drupal\Core\Database\Database type strict and PHPStan L10 compliant Active , but it is reviewable now.

🇮🇹Italy mondrake 🇮🇹

Newbie here, excuse my ignorance

Could this help with 🐛 [CI] Performance pipeline execution drops warmed caches Postponed ?

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

@smustgrave yes, or postponed on the referenced. There are already a bunch of issues about run-tests.sh that are not moving, alas, let's not add more.

🇮🇹Italy mondrake 🇮🇹

📌 Enforce removal of PHPUnit annotations from test classes' methods metadata Needs review will report #50 as a PHPStan error.

🇮🇹Italy mondrake 🇮🇹

Apparently, PHPUnit 11 is not throwing deprecations when @testWith is used...

🇮🇹Italy mondrake 🇮🇹

Any reason why Drupal\image\ImageEffectBase is not converted?

🇮🇹Italy mondrake 🇮🇹

Committed to 5.0.x and cherry-picked to 4.0.x

Not cherry-picked to 4.1.x because there is not likely going to be a release 4.1.0 ever, for the same reason of 💬 Stable release imagemagick 4.1.0 Active .

Thanks!

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

mondrake made their first commit to this issue’s fork.

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

No - database drivers in sub-namespaces of Drupal\Driver\Database are long gone, and in fact those test cases should have been removed when the logic was. Better late than never.

🇮🇹Italy mondrake 🇮🇹

Thanks

I wonder whether we should detect whether the rotate_ie plugin is available before swapping the operation.

Either way, we need a small test to prove this works and to prevent future regressions.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

Committed to 5.0.x and cherry-picked to 4.0.x

Not cherry-picked to 4.1.x because there is not likely going to be a release 4.1.0 ever, for the same reason of 💬 Stable release imagemagick 4.1.0 Active .

Thanks!

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

I see the MR already targets 5.0.x, thanks

🇮🇹Italy mondrake 🇮🇹

There are deprecation failures.

🇮🇹Italy mondrake 🇮🇹

mondrake created an issue.

🇮🇹Italy mondrake 🇮🇹

PHPUnit 12 is out of the game for Drupal 11: #3546029-25: Ensure that #[RunTestsInSeparateProcesses] attribute is added to all Kernel tests

@catch:

Just discussed this with @alexpott, @bircher and others at DrupalCon, and we think that we should only update to phpunit 12 in Drupal 12 - just because forcing every contrib module to update their tests in a minor release would be a massive break.

It would be good to do 📌 Remove support for PHPUnit 10 Active though, to avoid rerolls.

🇮🇹Italy mondrake 🇮🇹

📌 Remove support for PHPUnit 10 Active must happen before committing this, but the MR can be reviewed now.

🇮🇹Italy mondrake 🇮🇹

Please target 5.0.x first.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

The MR is 1280+ commits behind head, needs a rebase.

🇮🇹Italy mondrake 🇮🇹
🇮🇹Italy mondrake 🇮🇹

Let's add couple more test cases.

🇮🇹Italy mondrake 🇮🇹

Thanks! Applied suggestion.

🇮🇹Italy mondrake 🇮🇹

Added a test for the PHPStan rule.

🇮🇹Italy mondrake 🇮🇹

Needs tests, but I am opening up for review

🇮🇹Italy mondrake 🇮🇹

Let's extend to Kernel tests data providers, too - now we have a clean report of the failures in 📌 Introduce support for PHPUnit 12 Postponed .

🇮🇹Italy mondrake 🇮🇹

Just rebased to see if the new deprecation for Kernel tests missing the #[RunTestsInSeparateProcesses] attribute triggers as expected. 📌 Check that #[RunTestsInSeparateProcesses] attribute is added to all Kernel and Functional tests Needs review

Sorry for the noise.

🇮🇹Italy mondrake 🇮🇹

mondrake made their first commit to this issue’s fork.

Production build 0.71.5 2024