- Issue created by @Gábor Hojtsy
- last update
about 1 year ago 8 pass - 🇭🇺Hungary Gábor Hojtsy Hungary
The single Drupal 10 fail is due to placement of the module:
There was 1 failure: 1) Drupal\Tests\upgrade_status\Kernel\TwigDeprecationAnalyzerTest::testDeprecationReport Failed asserting that two objects are equal. --- Expected +++ Actual @@ @@ Drupal\upgrade_status\DeprecationMessage Object ( 'message' => 'Twig Filter "deprecatedfilter...71078.' 'line' => 10 - 'file' => 'modules/contrib/upgrade_status/tests/modules/upgrade_status_test_twig/templates/test.html.twig' + 'file' => 'modules/custom/upgrade_status-3403194/tests/modules/upgrade_status_test_twig/templates/test.html.twig' ) /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:94 /builds/issue/upgrade_status-3403194/tests/src/Kernel/TwigDeprecationAnalyzerTest.php:32 /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
While after merging that the test will work, it will not work for future MRs either, so we need to fix the assertion to be more MR-proof.
- Status changed to Needs work
about 1 year ago 4:47pm 21 November 2023 - 🇭🇺Hungary Gábor Hojtsy Hungary
The 9 pipeline had similar fails, but uncovers one more fail point:
There were 2 failures: 1) Drupal\Tests\upgrade_status\Functional\UpgradeStatusAnalyzeTest::testAnalyzer Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'The spaceless tag in "modules/contrib/upgrade_status/tests/modules/upgrade_status_test_twig/templates/spaceless.html.twig" at line 2 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead. See https://drupal.org/node/3071078.' +'The spaceless tag in "modules/custom/upgrade_status-3403194/tests/modules/upgrade_status_test_twig/templates/spaceless.html.twig" at line 2 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead. See https://drupal.org/node/3071078.' /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:94 /builds/issue/upgrade_status-3403194/tests/src/Functional/UpgradeStatusAnalyzeTest.php:143 /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 2) Drupal\Tests\upgrade_status\Kernel\TwigDeprecationAnalyzerTest::testDeprecationReport Failed asserting that an array contains Drupal\upgrade_status\DeprecationMessage Object &0000000040424a40000000000cf51e80 ( 'message' => 'Twig Filter "deprecatedfilter" is deprecated. See https://drupal.org/node/3071078.' 'line' => 10 'file' => 'modules/contrib/upgrade_status/tests/modules/upgrade_status_test_twig/templates/test.html.twig' ). /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121 /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55 /builds/issue/upgrade_status-3403194/tests/src/Kernel/TwigDeprecationAnalyzerTest.php:37 /builds/issue/upgrade_status-3403194/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 FAILURES!
- First commit to issue fork.
- last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - Status changed to Needs review
about 1 year ago 12:58am 22 November 2023 - 🇵🇪Peru marvil07
@Gábor Hojtsy, it took a few iterations to get it right, but I think the current code in the merge request is now ready for inclusion.
At
tests/modules/upgrade_status_test_error/fatal.php
, I added a couple of comments, one for php linting, and the other for coding standards.
The linting one is the important, that avoids a lint fail, which is expected in that case.
To avoid it I declared that it should be only linted on versions lower than php 7, and given composer requires higher than php 7 indirectly via dependencies, it basically will not happen ever.That last bit needed some changes on
UpgradeStatusAnalyzeTest
, since a few messages there contain the line number of the parse error.Finally, the directory assumptions on test, as you mentioned on #3 and #4, needed a few changes.
To solve it, I am relying on the extension object related to the module where the tested template lives.There are multiple suggestions from phpcs, phpstan, and stylint, but they are all optional, so I have not really dive into them.
Marking now as NR.
- 7b3694c2 committed on 4.x
Issue #3403194 by marvil07, Gábor Hojtsy: Adopt gitlab CI for testing
- 7b3694c2 committed on 4.x
- 🇭🇺Hungary Gábor Hojtsy Hungary
Landed in 4.x, thanks for the fantastic work on this!
Now trying to backport to 3.x. I think the getPath() may need to be rewritten as drupal_get_path(), but let's make the tests tell us that :D
- Merge request !61Issue #3319354 by anoopjohn, Gábor Hojtsy, undersound3, bserem, mandclu,... → (Open) created by Gábor Hojtsy
- last update
about 1 year ago run-tests.sh fatal error - last update
about 1 year ago run-tests.sh fatal error - last update
about 1 year ago run-tests.sh fatal error - 1de81956 committed on 8.x-3.x
Issue #3403194 by marvil07, Gábor Hojtsy: Adopt gitlab CI for testing
- 1de81956 committed on 8.x-3.x
- Status changed to Fixed
about 1 year ago 12:01pm 22 November 2023 - 🇭🇺Hungary Gábor Hojtsy Hungary
I checked and the extension class based path methods are already used, so that should be fine. Committed to 3.x. Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.