All-Star pitcher Cole Hamels is staying with the Philadelphia Phillies under a $144 million, six-year contract extension, while Hanley Ramirez joined the Los Angeles Dodgers as the centerpiece of a four-player trade with the Miami Marlins.