Light amplification by stimulated emission of radiation, well-known for revolutionising photonic science, has been realised primarily in fermionic systems including widely applied diode lasers. The prerequisite for fermionic lasing is the inversion of electronic population, which governs the lasing threshold. More recently, bosonic lasers have also been developed based on Bose-Einstein condensates of exciton-polaritons in semiconductor microcavities. These electrically neutral bosons coexist with charged electrons and holes. In the presence of magnetic fields, the charged particles are bound to their cyclotron orbits, while the neutral exciton-polaritons move freely. We demonstrate how magnetic fields affect dramatically the phase diagram of mixed Bose-Fermi systems, switching between fermionic lasing, incoherent emission and bosonic lasing regimes in planar and pillar microcavities with optical and electrical pumping. We collected and analyzed the data taken on pillar and planar microcavity structures at continuous wave and pulsed optical excitation as well as injecting electrons and holes electronically. Our results evidence the transition from a Bose gas to a Fermi liquid mediated by magnetic fields and light-matter coupling.