Last I heard the Phils and Hamels are still trying to work out a deal. Due to injuries and the hole they've dug, the Phillies are pretty much done for this year, but with their pitching staff, and presumably Howard and Utley back for the start of the year next year, albeit most likely a diminished version of each, I think the Phillies can still be the force next year that everyone expected them to be this year.
So with that being said, if I were the Phillies and Hamels and we did work out say a 5 year deal I would hold off on executing it with a "gentlemen's" agreement. I would still trade Hamels for a few top prospects, probably not the 4 or 5 they are looking for, but maybe 3, and then Hamels can play out the year for a contender and then resign with his original franchise which is now 3 or 4 prospects stronger for the future.
It's a bit unethical, but not illegal as the Phillies have the right to negotiate with Hamels right now, and it's certainly win-win. Hamels gets to still play the vast majority of his career for one team and gets the contract he wants, but also gets to compete for a championship this year. The Phillies get to keep their rotation intact but still get to replenish their terribly depleted farm system.
I'm actually a little surprised this sort of thing doesn't happen more often. Yeah the Phillies are taking most of the risk, but if they truly believe Hamels wants to play in Philly, and they trade him to Texas and the AL, and not to the Dodgers and his preferred West Coast, they probably don't have to worry about losing him to another team, and even if they do, they get the same thing as if they didn't work out a contract and just had to trade him for the prospects.