Development

/branches/1.2/lib/task/project/upgrade1.1/sfConfigFileUpgrade.class.php

You must first sign up to be able to contribute.

root/branches/1.2/lib/task/project/upgrade1.1/sfConfigFileUpgrade.class.php

Revision 7434, 0.9 kB (checked in by fabien, 7 years ago)

added an upgrade task for obsolete logging.yml and i18n.yml

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Detects obsoletes configuration files.
13  *
14  * @package    symfony
15  * @subpackage task
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfConfigFileUpgrade extends sfUpgrade
20 {
21   public function upgrade()
22   {
23     foreach (array('logging.yml', 'i18n.yml') as $name)
24     {
25       $finder = $this->getFinder('file')->name($name);
26       foreach ($finder->in($this->getProjectConfigDirectories()) as $file)
27       {
28         $this->logSection('config', sprintf('The following file is not used anymore. Please remove it.', $file));
29         $this->log('   '.$file);
30       }
31     }
32   }
33 }
34
Note: See TracBrowser for help on using the browser.