The July 31 trade deadline was 11 days away, and the Phillies were in first place in their surprising season. They had already lost out on Manny Machado, but there was still time to make moves to bolster the roster for the season's final two months. But it was clear that the Phillies were not trying to acquire a starting pitcher.

"Right now, starting pitching has been the strength of our team this year," general manager Matt Klentak said then. "We're very encouraged about not only the five here but also what we have in triple A, and we're hopeful that that's going to mean that we can stay out of the starting-pitcher trade market at the deadline because, if you can avoid it, that is definitely a market to avoid."

The Phillies passed on acquiring a starter and avoided a market that included Cole Hamels, J.A. Happ, and Nathan Eovaldi. One of those pitchers probably would not have been enough to stop the team's late-season collapse but might have provided some help.

From what they saw in the final two months, however, the Phillies entered the offseason knowing they cannot begin next season with the same five pitchers who "encouraged" Klentak before the trade deadline. Vince Velasquez, Nick Pivetta, and Zach Eflin combined for a 5.47 ERA down the stretch. The Phillies avoided the summer's starting-pitching market. But they cannot avoid this winter's.

"Going out and trying to procure pitching either through free agency or trades when they get into their 30s is a dicey proposition. So you try to grow your own," team president Andy MacPhail said in his end-of season news conference. "Four of our five starters were 26 or under. We think we have a good crew coming up in our system below that. But you never have enough.

"We're very right-handed. I wish we'd get a little more left-handed. You never have enough starting pitching. You've always got to be on the lookout for it because … it can break down on you. If you've got eight quality ones, you'll be lucky to get four. That's just how the season often progresses. You just have to be prepared to deal with that."

As baseball's free agency begins Saturday, much of the focus will be on the Phillies' pursuit of Machado and Bryce Harper. But how the Phillies address their pitching is just as important.

When looking at a free-agent pitcher, the Phillies need to ask whether he is an upgrade over Eflin, Pivetta, and Velasquez. That should disqualify pitchers such as Lance Lynn and Hyun-Jin Ryu. If the Phillies sign a pitcher, it must be one who  slots in directly behind Aaron Nola and Jake Arrieta.

Here are four options — three free agents and one possible trade — that would be upgrades for the Phillies:

Patrick Corbin pitching for Arizona.
Gregory Bull / AP
Patrick Corbin pitching for Arizona.

LHP Patrick Corbin

MacPhail wishes the rotation could "get a little more lefthanded" and there's no better way to do that than by signing Corbin. The 29-year-old had a 3.15 ERA in 200 innings for the Diamondbacks, with a career-best strikeout rate of 11.2 per nine innings. His xFIP, the advanced metric preferred by manager Gabe Kapler, was the second best among major-league starters.

Corbin and Astros left-hander Dallas Keuchel will be the premier pitchers on the market and will attract the most attention. Clayton Kershaw could also become a free agent, but he's expected to return to the Dodgers. Perhaps signing Corbin early would be a move that helps persuade Machado or Harper to take the Phillies' money. Corbin grew up a Yankees fan in upstate New York, and the Yanks will be after his services.

Nathan Eovaldi pitching during the American League Championship Series.
Frank Franklin II / AP
Nathan Eovaldi pitching during the American League Championship Series.

RHP Nathan Eovaldi

If you watched the postseason, then you're familiar with Eovaldi. The Red Sox acquired him at the trade deadline from Tampa Bay, and the 28-year-old had an excellent October. His history of elbow problems could be a concern. Eovaldi missed the 2017 season after undergoing his second Tommy John surgery and the first two months of last season after having another elbow surgery at the end of spring training.

But Eovaldi's average fastball, 97.82 mph, was just as fast this season as it was before surgery. He seemed to get stronger as the season progressed, finishing the year with a 3.33 ERA in his two months with Boston.

LHP J.A. Happ

Next season will Happ's 13th, and he seems to be getting better with age. He made his first All-Star team last season and posted a 2.69 ERA after the Yankees acquired him at the trade deadline. Happ turned 36 in October, but his success relies more on command than overpowering batters, which should allow him to remain successful as he nears 40. He has logged at least 170 innings in three of the last four seasons.

And the former Phillies starter is left-handed. Cole Hamels, another former Phillies left-hander, is expected to have his option picked up Friday by the Cubs.

"I often talk about balance in everything, so creating a balanced rotation, I would love for that to include a lefty," Klentak said in the summer. "If there's a chance someday to trade for a lefty or sign a lefty free agent and it fits for us, then we'll look into it. We'd love for that to be the case, but we're not going to force it."

Will the Diamondbacks listen to trade offers for starting pitcher Zack Greinke?
Rick Scuteri / AP
Will the Diamondbacks listen to trade offers for starting pitcher Zack Greinke?

RHP Zack Greinke

The Diamondbacks owe Greinke $104.5 million over the next three seasons, and that could allow them to listen to trade offers. Greinke, 35, had a 3.21 ERA last season and is still one of baseball's elite pitchers.

A deal could be a challenge if the Diamondbacks expect a team to give them a bounty of prospects and take Grienke's contract. But imagine the offseason Klentak would have if he corrals Greinke and Harper.

It all begins Saturday.