@Ken *******
If a foreigner is staying in a property regardless of being on a lease or paying rent a TM.30 is still required by law.
Your best option for this is talking to your landlord or the property agent (if you have one) and explaining that your friend is coming and you would like him to live with you in the property you are renting and will need a tm.30 submitting when he arrives (i don't see it being an issue in all honest because the rent isn't based on number of occupants, it's based on m2, location, amenities etc, and in my experinece most landlord/agents are rather reasonable)