Thursday, November 28, 2024
HomeWeb application programmingSymfonySymfony: Delete an Application

Symfony: Delete an Application

The command line provisioning utility in symfony provides mechanisms to create an application, but doesn’t have the means to delete one. If you’ve unintentionally created an application or no longer need an app and want to do housecleaning, this Tech-Recipe describes how to get it gone.


To delete a symfony application, you just need to delete the application directory and the front controller scripts. For example, if your application is named ‘testapp’ you need to delete the following directory and all of its contents:

apps/testapp

The front controllers are created in the web/ directory. Two are typically created for new applications, one for production and one for development. Continuing the example above, to delete the controllers for the application ‘testapp’ you must delete these files:

web/testapp.php
web/testapp_dev.php

All of the files and directories referenced above are contained in the symfony installation (meaning if you have created the application, you should know where these files are). One caveat in deleting the front controller scripts: if you are deleting the first application you created or is the current default application, the production controller is named index.php instead of testapp.php. While you can delete the index.php file, this may have undesirable effects for web requests that do not explicitly reference a controller script. In this case, you can edit the web/index.php file and replace the name of the application (testapp) on the line starting define(‘SF_APP’, with the name of the application you want to run by default.

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!