Problem/Motivation
\Drupal\metatag\MetatagServiceProvider::alter triggers the following deprecation:
Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
setPublic() exists, so this should be safe to fix anytime.
Reporting this mostly because it's not trivial to find which service is actually causing this in a project with a lot of modules, unfortunately the deprecation messages does not mention which service is causing it.
Steps to reproduce
Proposed resolution
add $definition->setPublic(TRUE)
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3240989-not-marking-service.patch | 882 bytes | anagomes |
Issue fork metatag-3240989
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anagomes commentedComment #8
anagomes commentedSo, the changes in the code seem to be working and correct. Although it says it's not mergeable, if you open the request you see there is no error showing and it is ready to be merged.
Comment #9
anagomes commentedComment #10
damienmckennaMaybe upload the changes a patch and see how it works?
Comment #11
anagomes commentedAs DamienMcKenna suggested, I'm uploading the changes in a patch.
Comment #12
damienmckennaThanks. Everything is a-ok with 9.2, so let's see what happens with 8.9.
Comment #13
damienmckennaThe next release will be the first one since Drupal 8 hit EOL, so this is ok to commit.
Comment #14
berdirThis is compatible with D8 anyway, the method isn't new, just having to call it will be required.
Comment #16
damienmckennaCommitted.