Tag Info

New answers tagged


A very clean way is using Git: Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. For more information and downloads: https://git-scm.com With Git you use branches, such as develop, master, feature/, etc. Read more here: ...


Without seeing the actual code or tests it's hard to say, but why do you need to actually use the service in the test? You'd be better off mocking the ebay API and not worrying about live/production differences.


You don't need a setting that says if you are in development or production or not. You just need settings that tell your application how to handle certain things. API keys, database connection strings,... these are all basic 'read this value and use it' things and this is the kind of stuff that configuration files are good at. It's a little different if ...


One solution I've used in the past is to have the application use the hostname of the machine it's running on to locate the configuration file, so if it's running on a machine called www7, it'll load config.www7.inc, whereas if it's running on minerva it'll load config.minerva.inc. It takes a moment to set up a new machine, but after that it's pretty easy.


One solution that sounds vaguely reasonable stems from this 12 factor methodology page on configuration. The most focused guidance I have found so far is here in the 12 factor methodology. They suggest that such configurations should be stored in environment variables. But how would that be done in PHP? Here it is suggested to use a .htaccess file.

Top 50 recent answers are included