The Laplace's Law in thermodynamics states that an adabatic reversible transformation of a perfect gas verifies the following identity : $$ PV^{\gamma} = cte \qquad \left( \gamma = \frac{C_p}{C_v} \right) $$ It seems to me that I can derive it without using the "reversible" requirement : adiabatic means $\delta Q = 0$, meaning I can write the energy and enthalpy variations as : $$ dU = 0 - P dV = n C_v dT \quad and \quad dH = 0 + V dP = n C_p dT. $$ Dividing one equation by the other leads to : $$ \gamma \frac{dV}{V} = \frac{dP}{P} \quad \Rightarrow \quad \gamma \ ln \left( \frac{V}{V_0} \right) = ln \left( \frac{P}{P_0} \right) + cte \quad i.e. \quad PV^{\gamma} = cte. $$
Nowhere in this did it feel like I was using reversibility. What bothers me is that the Joule expansion is an adiabatic irrevesible process where $T = cte$, which is not compatible with the Laplace's Law. Then I should not be able to derive it without using the requirement of reversibility.
I seems I am making a basic mistake in the definition of enthalpy, or heat transfer, or reversibility. Can anyone explain what is wrong in the derivation above ?
Edit 1: One of the answers states that using the first principle in the form $dU = T dS - P dV$ solves the problem (i.e. now adiabaticity and reversibility are required to cancel the first term). But why is there a difference between the first principle in those two forms (with $\delta Q$ and $T dS$) ?
When dealing with the Joule expansion, why is it now legal to use the first principle in the form $dU = \delta Q - P dV$ ? The Joule expansion is also associated with creation of entropy, meaning the term $\delta S_{creation}$ is not zero, and you cannot say $dU = 0$ if you start from the first principle with $T dS$.
Edit 2: I think all my problems boil down to what is explained in this post, provided by Chemomechanics (it is in a comment, I cannot accept it as best answer...)