I was testing just this on a local VPS a few days ago. I started with Debian 6 plus the Dotdeb repo, including PHP 5.4.
I got a clean upgrade to Debian 7 with Debian's php 5.4 like this:
- Run apt-get update/upgrade to bring the Debian 6 system up to date
- Remove the dotdeb php54 squeeze repo from sources (leaving the main dotdeb repo in place)
- Edit all occurrences of 'squeeze' to 'wheezy' in sources
Then proceed with the upgrade.
Dotdeb has php 5.5 for Wheezy. You can later add it to sources and upgrade if that's what you want.
One minor hitch I encountered is that sysklog is gone from Debian 7. Irrelevant if you're running rsyslogd currently in your Deb 6
