PHP code validation when refactoring -


As a developer used for stable typing, I usually tell the compiler that if the code is correct, logic Blame But when I have to do a PHP refactor, I know that it is right that my code is correct.

There always seems to be some strange reference to a law or a member who is broken and runtime. Even when limited refactoring support is used in Z Studio, it breaks in any way.

Due to the dynamic nature of language, I understand that this is a difficult problem. But is there a tool that is to verify the PHP code permanently, so that I can know that it's okay before the runtime? I do not want to see any more "undefined property" error messages.

Write a test for your code (), run a continuous integration server setup, UI test (). With enough testing, you will see your problems directly after a bad code. Just keep the test code coverage high.

This is a key point of unit tests - you can actually re-apply your code without breaking it, because you check all the functionality after every change.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -