It has been done, but it's not a direct swap engine for engine.
Keep everything from the 2.5 in case you decide to use it on the 2.7.
The biggest differences will be in the computer/wiring harness and the intake. The harness from a 2.7L engine does not have the same connector for the computer as the 2.5L and the two can not just be interchanged without doing some modifications.
The throttle on the 2.7L engines is electronic and the 2.5L engines uses a physical throttle cable. The 2.7L engines have a 'resonance flapper' on the intake to improve airflow across the RPM range. In 2002 the fuel system changed and no longer used a vacuum controlled fuel pressure regulator on the fuel rail.
Look at some of these posts. 'Chi-town' and 'truegearhead' have done similar swaps to what you want to do.:
1999 Porsche Boxster Engine Swap Questions.......
2.7 swap for 2.5? (Blown motor)