Encoding many qubits in different degrees of freedom (DOFs) of single photons is one of the routes towards enlarging the Hilbert space spanned by a photonic quantum state. Hyperentangled photon states (i.e. states showing entanglement in multiple DOFs) have demonstrated significant implications for both fundamental physics tests and quantum communication and computation. Increasing the number of qubits of photonic experiments requires miniaturization and integration of the basic elements and functions to guarantee the set-up stability. This motivates the development of technologies allowing the precise control of different photonic DOFs on a chip. We demonstrate the contextual use of path and polarization qubits propagating within an integrated quantum circuit. We tested the properties of four-qubit linear cluster states built on both DOFs. Our results pave the way towards the full integration on a chip of hybrid multiqubit multiphoton states.