Part of the reason why countries stopped declaring war is because the laws of war make it harder to do so, so it's easier to have a war without one. Also, declaring war on certain groups would entitle them to being treated as war combatants, and people don't want to extend that privilege to terrorists (al Qaeda, ISIS, etc)