Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

"clear_controllers" task is inflexible #273

Closed
jonathaningram opened this Issue · 1 comment

2 participants

@jonathaningram
namespace :project do
    desc "Clears all non production environment controllers"
    task :clear_controllers do
      capifony_pretty_print "--> Clear controllers"

      run "#{try_sudo} sh -c 'cd #{latest_release} && rm -f #{web_path}/app_*.php'"
      capifony_puts_ok
    end
  end
  1. app is hard-coded and so does not work correctly for, say, blog_dev.php (when using an app-name=blog which is allowed by Symfony)
  2. This does not work for beta and other environments. E.g. in my beta website which has a beta environment, the front controller is named app_beta.php which is incorrectly deleted by this task.

I know you can set the option to not clear controllers, so I'm going to use that for now, or overwrite the task, but it would be nice to have this work out of the box by:

  1. Allow custom app-names.
  2. Allow specification of exact front controllers to delete (maybe an array of regexes) via a controllers_to_clear variable, or similar.
@willdurand
Collaborator

@leek worked on something a couple months ago. I think we should reuse his work.

@mgallego mgallego referenced this issue from a commit in mgallego/capifony
@mgallego mgallego #273. Make mor flexible clear_controllers 8b1197a
@mgallego mgallego referenced this issue from a commit in mgallego/capifony
@mgallego mgallego #273. Create only one run call in the task and Tests b76932d
@willdurand willdurand closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.