Collection View's viewWillTransition method does not fire when orientation changes

This function is located at the bottom of this file. https://github.com/david780/app/blob/master/Playground/Playground/View/TeamCell.swift

Also I have my entire project in the github repository above.

// This function is not firing when the orientation changes
func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
     collectionView.collectionViewLayout.invalidateLayout()
}