Strictly speaking there are no absolute necessities in physics. But strictly speaking there are no absolute necessities in mathematics and logic either. Mathematical theories have axioms, necessity of conclusions is relative to them, and to logic used. The law of excluded middle is rejected by intuitionists, the law of non-contradiction by dialetheists (see inconsistent mathematics), and although it is rare even the identity law a=a is sometimes rejected as well ("we do not step into the same river twice" - Heraclitus).
But notice the dependence, mathematics is necessary relative to the logic adopted, similarly physical theories are necessary relative to mathematics and logic adopted. For example, if Newton's laws are adopted as axioms then conservation of mechanical energy and momentum become necessary truths. There are more subtle necessities. Newton's laws are only valid in "inertial frames", so the entire theory is empirically meaningless without the presupposition that inertial frames exist. This presupposition is then a necessary law relative to Newtonian mechanics. When Einstein sought to discard it, he had to discard all of Newtonian mechanics along with it.
Reichenbach named such presuppositions relativized a priori, and Friedman developed a whole theory of them to analyze logical structure of scientific theories. There is a long tradition behind it involving Kant, Marburg neo-Kantians, Reichenbach, Carnap and Kuhn. Thus, a theory is roughly stratified into empirical claims, that are directly testable, coordinating principles, that relate them to theoretical predictions (like existence of inertial frames), theoretical principles needed to derive predictions (like laws of motion and Euclidean geometry), mathematics (like calculus) and logic. Coordinating and theoretical principles are the relativized a priori, they are not directly testable because they need to be assumed within a theory to produce claims and relate them to empirical tests.
But they are tested by a theory's success overall, and therefore historically revisable, dynamic. Interestingly, what may happen under revision is that a mere empirical fact of an older theory is elevated to a relativized a priori in a new one. For example, Friedman characterizes the equivalence principle as a relativized a priori that makes general relativity empirically meaningful, replacing the assumption of inertial frames, whereas in the Newtonian mechanics is was only an experimental brute fact. Also, revised theories satisfy a downward correspondence principle (inspired by Bohr's, but more elaborate): the older theories can be emulated within them as limiting cases but without the stratification, their relativized a priori may be discarded (absolute space/time) or downgraded to approximate claims (inertial frames). In this way Friedman avoids Kuhn's incommensurability of paradigms, and the resulting relativism.
See his Einstein, Kant, and the Relativized a Priori for a short version and the book Dynamics of Reason for a long one.