C
C
Crash2014-06-29 18:51:24
PHP
Crash, 2014-06-29 18:51:24

How to effectively debug and refactor PHP code?

Please advise resources on the topic of the subject, for such cases as: PHP inserts mixed with layout, unclear project architecture, procedural-functional development style of the entire project (without OOP), etc. Needed to work with self-writing in PHP in freelance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-06-29
@Bandicoot

We take a piece of the project, cover it with functional tests, refactor .... In the end, the essence is still the same as for projects with OOP: isolation of changes, separation of bold functions into less bold ones (it is especially important to separate functions that produce HTML shreds at the output, what would happen later the template system could be easily interposed).
Well, it depends on the project. If you need to write new functionality, I would also wrap it all in Symfony's HttpKernel, and write the new functionality in Symfony (if the client's budget allows, and if it makes sense).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question