sfConfigFileUpgrade.class.php 956 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Detects obsoletes configuration files.
  11. *
  12. * @package symfony
  13. * @subpackage task
  14. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  15. * @version SVN: $Id: sfConfigFileUpgrade.class.php 7434 2008-02-09 15:32:51Z fabien $
  16. */
  17. class sfConfigFileUpgrade extends sfUpgrade
  18. {
  19. public function upgrade()
  20. {
  21. foreach (array('logging.yml', 'i18n.yml') as $name)
  22. {
  23. $finder = $this->getFinder('file')->name($name);
  24. foreach ($finder->in($this->getProjectConfigDirectories()) as $file)
  25. {
  26. $this->logSection('config', sprintf('The following file is not used anymore. Please remove it.', $file));
  27. $this->log(' '.$file);
  28. }
  29. }
  30. }
  31. }