The legislation is one of the final major measures adopted under Emmanuel Macron’s presidency before he leaves office next year