Several methodological a priori assumptions that underlie modern physics are investigated. They are transcendental in Kant's sense, i.e. necessary conditions of objective physical knowledge, in particular, of theory formation and experimental practice. In the transition from classical physics to quantum physics, their meaning weakened substantially. (1) The general methodological and metaphysical principles behind modern physics were closely related to rationalist metaphysics, above all the belief in knowledge-independent causal agents and fundamental laws of nature. This belief is an essential ingredient of Planck's and Einstein's metaphysical realism and of current positions of scientific realism, or what is called classical realism in the paper. (2) Empiricism criticises classical realism. However, this criticism misses the methodological indispensability of non-empirical principles such as the principles of substance, mereological and causal analysis, unity, and simplicity. (3) Kant criticised classical realism. His a priori is compatible with a methodological view of these principles. (4) In twentieth century physics, however, Kant's a priori turned out to be too strong. The touchstone of his critical account of physical reality is quantum theory. It is shown that a critical account of subatomic reality, which is slightly more liberal, comes close to central ideas of Niels Bohr's complementarity view of quantum mechanics.