Cities become unhappy from insufficient military protection even with garrisoned units, if the garrison's combined Garrison Value is too low when compared with the city's population size.
A unit's Garrison Value is now also displayed in its tooltip.
Some buildings can help alleviate the problem.

Cities of size 9 and higher are no longer completely satisfied with a single Warrior as garrison.

Hovering over the Warrior reveals its Garrison Value.
The Barracks and some other buildings can help an outnumbered garrison keep order.
A unit's Garrison Value is now also displayed in its tooltip.
Some buildings can help alleviate the problem.

Cities of size 9 and higher are no longer completely satisfied with a single Warrior as garrison.

Hovering over the Warrior reveals its Garrison Value.
Spoiler Another Screenshot :
The Barracks and some other buildings can help an outnumbered garrison keep order.