I wonder if the scripting guys could work something out? You'd possibly start by Ctrl clicking the type layer's thumbnail to select it, then apply the extents of that selection to your shape. Is this for something like a lower third graphic? There are a ton of templates available, and a lot of them are free.
Thank you for your answer! However, since this function is necessary in Photoshop, I will request the function according to the contents of the other answer.
I work by sharing PSD with collaborators who are not familiar with Photoshop. This is necessary so that they doesn't have to touch other designs when changing text.