Please tell me you don't think that a bunch of treaties are going to keep one disgruntled or arrogant nation in the EU from declaring war on another.
I do believe history demonstrates that it can and DOES happen.
The idea that the EU has stopped any and all wars in Europe, is a favourite myth pushed by Euro zealots.
It does however very conveniently ignore the existence of Nato and the treaties that bind Nato members.