|
Revision 7962, 1.5 kB
(checked in by fabien, 5 years ago)
|
moved *Configuration classes in "better" places
- moved ProjectConfiguration? from lib/ to config/
- moved $APP_NAME$Configuration to apps/$APP_NAME$/config/
- added a ProjectConfiguration::getApplicationConfiguration() to retrieve an application configuration
- removed sfApplicationConfiguration::getForApplication() method (please use ProjectConfiguration::getApplicationConfiguration)
- updated the UPGRADE file for early adopters (how to upgrade projects that live on the 1.1 branch)
|
- 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 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
class sfTestUpgrade extends sfUpgrade |
|---|
| 20 |
{ |
|---|
| 21 |
public function upgrade() |
|---|
| 22 |
{ |
|---|
| 23 |
|
|---|
| 24 |
$unit = sfConfig::get('sf_test_dir').'/bootstrap/unit.php'; |
|---|
| 25 |
if (file_exists($unit)) |
|---|
| 26 |
{ |
|---|
| 27 |
$content = file_get_contents($unit); |
|---|
| 28 |
if (false !== strpos($content, 'SF_ROOT_DIR') || false !== strpos($content, 'lib/ProjectConfiguration')) |
|---|
| 29 |
{ |
|---|
| 30 |
$this->logSection('test', sprintf('Migrating %s', $unit)); |
|---|
| 31 |
file_put_contents($unit, file_get_contents(dirname(__FILE__).'/../../generator/skeleton/project/test/bootstrap/unit.php')); |
|---|
| 32 |
} |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|
| 35 |
$functional = sfConfig::get('sf_test_dir').'/bootstrap/functional.php'; |
|---|
| 36 |
if (file_exists($functional)) |
|---|
| 37 |
{ |
|---|
| 38 |
$content = file_get_contents($functional); |
|---|
| 39 |
if (false !== strpos($content, 'SF_ROOT_DIR') || false !== strpos($content, 'new $class')) |
|---|
| 40 |
{ |
|---|
| 41 |
$this->logSection('test', sprintf('Migrating %s', $functional)); |
|---|
| 42 |
file_put_contents($functional, file_get_contents(dirname(__FILE__).'/../../generator/skeleton/project/test/bootstrap/functional.php')); |
|---|
| 43 |
} |
|---|
| 44 |
} |
|---|
| 45 |
} |
|---|
| 46 |
} |
|---|
| 47 |
|
|---|