What is a recommended setup in terms of source control, builds, testing, bug tracking, and deployment for a downloadable PHP application (a la Wordpress, phpBB, Magento, etc.)? As a developer working on the application, what would you expect? What about as a user of the application? Please describe a setup and workflow, as well as any resources you think might be relevant or helpful.
I've found the following approach to be workable for the app I maintain:
- The app is distributed as a single zip, that just has to be unzipped on a working PHP server.
- Navigating to the app automatically runs a set of sanity checks (PHP environment, app configuration). Errors explain in simple terms how to fix any issue that crops up.
- At first run, if the sanity checks pass, a configuration wizard is launched. This is disabled as soon as a settings file exists.
- All customer modifications are done in a special subfolder of the app, that they can copy over from old installs (backwards compatibility is maintained for this folder). Being able to do upgrades by unzipping files and copying around a few folders is a useful feature.
- The zip file itself is built with a command-line PHP script that is checked into the source repository. Doing a build is as simple as svn update followed by a call to build.php.
- Developer builds are made the same way as release builds, only with a "-no-optimize" flag passed to the build script to prevent minification and concatenation.
- The fact that the build script is itself PHP means that any developer can make changes to how the builds are made, without even having to log into our build server.
From the developer point of view I would prefer two ways:
- Getting the sources from SVN / GIT
- Downloading a packaged Version
But as a user I would prefer a download package (*.zip and *.tar.gz).
There should be
- readme.txt (or pdf or html)
- install.txt (or pdf or html)
- A demo configuration file with a documentation of all parameter
If you install the software there shoul be an installer.php, which checks the requirements and does the configuration work.
As far as I remember the roundcube webmailer had one of the best installer I know.
As a user
Everything that's been said already (single tarball, with an install script that does all the necessary environment checks).
Depending on the target market, don't require CLI access - some shared hosts don't allow this, and a lot of new users won't know how to use it anyway.