This commit renames currentTransaction() to forCurrentTransaction() for greater clarity. Closes gh-23086