- Issue created by @project update bot
- last update
9 months ago Patch Failed to Apply This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.
Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.
Therefore these changes did not update the
info.yml
file for Drupal 11 compatibility.The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.
Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
Bot run #11-127659These packages were used to generate the fixes:
- drupal/upgrade_status: 4.1.0
- mglaman/phpstan-drupal: 1.2.9
- palantirnet/drupal-rector: 0.20.1
- last update
9 months ago 119 pass, 2 fail - Status changed to Needs work
7 months ago 10:33am 14 May 2024 - 🇺🇸United States DamienMcKenna NH, USA
I committed the info file changes separately so this can be left open for actual API fixes. Thank you.
- First commit to issue fork.
- last update
7 months ago Composer require failure - last update
7 months ago 120 pass - Open on Drupal.org →Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7last update
6 months ago Not currently mergeable. - last update
6 months ago 119 pass, 2 fail - last update
6 months ago 120 pass - last update
6 months ago 119 pass, 2 fail - 🇮🇳India chandu7929 Pune
chandu7929 → changed the visibility of the branch project-update-bot-only to hidden.
- last update
6 months ago run-tests.sh fatal error - last update
6 months ago run-tests.sh fatal error - last update
6 months ago run-tests.sh fatal error - last update
6 months ago run-tests.sh fatal error - First commit to issue fork.
- Status changed to Needs review
5 months ago 2:33pm 29 July 2024 - 🇺🇸United States jrglasgow Idaho
The only outstanding PHP Stan issue I am seeing is
sites/default/modules/metatag/metatag_views/src/Form/MetatagViewsTranslationForm.php:173 The 'config_translation/drupal.config_translation.admin' library is not defined because the defining extension is not installed. Cannot decide if it is deprecated or not.
So I have added a check to see if he module is enabled before adding the library. I also rebased.
- 🇺🇸United States DamienMcKenna NH, USA
Bumping priority on this - it should have been included in the last release but I accidentally overlooked it.
- 🇺🇸United States DamienMcKenna NH, USA
Everything is working, except for a test that checks the page title output. I need to dig into it further, to compare what is happening in the 2.0.x branch vs what is happening in the issue fork as it's not behaving the way I expect.
- First commit to issue fork.
- 🇧🇷Brazil murilohp
Hey @damienmckenna, I was taking a look at the code in order to debug it and find what's the problem with the test, that's why I did some commits(sorry for the noise by the way, just trying to test it correctly).
Apparently the issue relies on the
metatag/src/Plugin/Field/FieldType/MetatagFieldItem.php
file, this commit added the change, the problem is actually to replace the $this->value by the $this->getValue(), the getValue function will load all the properties from the propertyDefinitions method(in this case it's just the value, and it returns an array with the following structure:array:1 [▼ "value" => "{"title":"[node:title] | [site:name]","description":"[node:summary]","canonical_url":"[node:url]"}" ]
If you take a look at the rest of the code, the code wasn't expecting an array where the key is the property and the value is the metatags. After I change the code, I was able to properly see the tests passing. But I saw some other tests failing, that's why I've done some rollbacks, IDK if all the tests were related to the changes I made, but I don't want to increase the work here, so I just rolled back to the way it was before I changed and I think this explanation might help you to move this forward.
- 🇧🇷Brazil murilohp
Just added a new commit and right now it seems the tests all passed, I tried to keep the original idea from metatagFieldItem class by using the getValue and setValue, the setValue expects an array of key => value, so I changed it
- 🇺🇸United States DamienMcKenna NH, USA
Amazing work, thank you murilohp!
The remaining issue is this error on the last-minor test run:
PHP Fatal error: Cannot make non static method Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::providerSource() static in class Drupal\Tests\metatag\Kernel\Plugin\migrate\source\d7\MetatagFieldInstanceTest in /builds/issue/metatag-3433376/tests/src/Kernel/Plugin/migrate/source/d7/MetatagFieldInstanceTest.php on line 81
I haven't looked into it yet.
- 🇧🇷Brazil murilohp
I was testing locally here, and I wasn't able to reproduce the issue, I found out the function was removed and according to the 📌 Remove Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::providerSource() Fixed , the method was removed from the code, but still expected to be static, the way the method was declared is apparently right, so IDK how to fix it
- Assigned to DamienMcKenna
- Status changed to Needs work
about 2 months ago 4:47pm 31 October 2024 - 🇺🇸United States DamienMcKenna NH, USA
The providerSource() change means we can't have the tests run against 10.2 anymore, though the rest of the codebase should be compatible. I guess that will have to be a limitation we deal with, and we'll have to disable OPT_IN_TEST_PREVIOUS_MINOR.
- 🇺🇸United States DamienMcKenna NH, USA
I've changed it so that phpcs tests can fail, will deal with that later: 📌 Resolve phpcs issues in 2.0.x / 2.1.x Active
- 🇺🇸United States DamienMcKenna NH, USA
The v2 upgrades fail because the d9 fixtures file was removed. That makes sense.
- 🇺🇸United States DamienMcKenna NH, USA
Ok.. so at some point today the default build changed from 10.3 to 11.0. I'll do a separate issue to update the tests to also test 10.3, but otherwise this is ready to go.
-
damienmckenna →
committed e7964017 on 2.0.x authored by
ankitv18 →
Issue #3433376 by damienmckenna, ankitv18, murilohp, project update bot...
-
damienmckenna →
committed e7964017 on 2.0.x authored by
ankitv18 →
- 🇺🇸United States DamienMcKenna NH, USA
Committed. Thank you everyone for digging through this.
Automatically closed - issue fixed for 2 weeks with no activity.