Share tags2

Supersedes #11351.
The check is not needed since PHP enforces the value to not be null if you annotate it with a type