Question

I apologise in advance if this question seems obvious to some or whether this question should not even be asked.

I have done research about the build process and I do understand the purpose of building for Java, C++, and others because of compiling and generating an executable code. I also understand that build isn't just compiling as it build the dependencies and artefacts. When we develop PHP on Eclipse project, it builds the code when changes are done.

Howevever, I do not understand why it is recommended to build PHP project on release. Most of the time, releases of PHP releases are done via FTP transfer onto the production server.

Why do software companies need to do continuous build of PHP code for different releases?

Once again, I apologise if this question is not relevant.

Était-ce utile?

La solution

It depends on what you actually call "Build", especially when you say "Continuous Build".

If one defines "Build" in the narrow sense of compiling some source code into a binary executable, then you are right, such a "Build" step does not make sense for an interpreted language like PHP. However, for some people a "Build" step is defined by everything which happens between editing of the final line of code before a version gets release, and the actual deployment. This could include, for example

  • execution of all automatic tests

  • running code or documentation generators

  • packaging for potential distribution/deployment

  • versioning / tagging in the SCCS

  • (... whatever is necessary as a pre-deployment step for a software system of a particular size)

When there is a Continuous Integration Server, these steps may be executed every night during the "nightly build step", even for a pure PHP-based system.

releases of PHP releases are done via FTP transfer onto the production server

That is a way of deployment, not "build", and it should happen after all pre-deployment steps are executed. I hope I don't have to explain why the named examples of pre-deployment above steps make sense for almost any professional software company.

Licencié sous: CC-BY-SA avec attribution
scroll top