dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

Intent To Implement: Breaking Build Into Seperate Command #1283

Open Fenikkusu opened 7 years ago

Fenikkusu commented 7 years ago

I've noticed two issues with the BuildWorker process. The first is that builds have to run under whatever the worker is running under. The second is that if you add a custom PHP-CI plugin to your repo (as suggested via the wiki), that plugin gets loaded and doesn't get reset. This means that as you are developing your plugin (or if you update a Composer one), the build process has to be reset every time or the new changes will be ignored and the memory version used.

Breaking the build into it's own command fixes these two issues. By having the BuildWorker (or Daemon) manually launch the build command instead, a new php instance is launched that is separate from the main executable. By default, this means reloading the custom plugin. This also opens up the ability to have multiple projects running under different versions of PHP. While not a true implementation of testing under multiple versions, it at least gives a push in the right direction by allowing users to create duplicates of a project, changing only the PHP executable to use.

In my specific use case, I use Phalcon, a compiled extension for PHP. I have multiple sites that use phalcon, but at differing versions. Because of this, I have to run a different PHP version for each site to properly run. Currently, I have to either have multiple copies of PHP-CI or change the php settings and thereby force some projects to fail. By splitting up the build command, I can let PHPCI run under whatever version, but then separate the actual builds into specific PHP Builds with the proper version of Phalcon installed under the PHP Install.

dancryer commented 7 years ago

@Fenikkusu This sounds great. I fully support you going ahead with this.