|
Revision 10628, 1.7 kB
(checked in by fabien, 5 years ago)
|
introduced send_http_header setting for the response + added an upgrade task
- added a new send_http_header setting for sfWebResponse
- added a project:upgrade1.2 task to upgrade a project from 1.1 to 1.2
- added a UPDATE_TO_1_2 file to explain the main changes in symfony 1.2
|
- 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 sfUpgradeTo11Task extends sfBaseTask |
|---|
| 20 |
{ |
|---|
| 21 |
|
|---|
| 22 |
* @see sfTask |
|---|
| 23 |
*/ |
|---|
| 24 |
protected function configure() |
|---|
| 25 |
{ |
|---|
| 26 |
$this->namespace = 'project'; |
|---|
| 27 |
$this->name = 'upgrade1.1'; |
|---|
| 28 |
$this->briefDescription = 'Upgrade a symfony project to the 1.1 symfony release'; |
|---|
| 29 |
|
|---|
| 30 |
$this->detailedDescription = <<<EOF |
|---|
| 31 |
The [project:upgrade1.1|INFO] task upgrades a symfony project |
|---|
| 32 |
based the 1.0 release to the 1.1 symfony release. |
|---|
| 33 |
|
|---|
| 34 |
[./symfony project:upgrade1.1|INFO] |
|---|
| 35 |
|
|---|
| 36 |
Please read the UPGRADE_TO_1_1 file to have information on what does this task. |
|---|
| 37 |
EOF; |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
* @see sfTask |
|---|
| 42 |
*/ |
|---|
| 43 |
protected function execute($arguments = array(), $options = array()) |
|---|
| 44 |
{ |
|---|
| 45 |
foreach ($this->getUpgradeClasses() as $class) |
|---|
| 46 |
{ |
|---|
| 47 |
$upgrader = new $class($this->dispatcher, $this->formatter); |
|---|
| 48 |
$upgrader->setCommandApplication($this->commandApplication); |
|---|
| 49 |
$upgrader->upgrade(); |
|---|
| 50 |
} |
|---|
| 51 |
} |
|---|
| 52 |
|
|---|
| 53 |
protected function getUpgradeClasses() |
|---|
| 54 |
{ |
|---|
| 55 |
$baseDir = dirname(__FILE__).'/upgrade1.1/'; |
|---|
| 56 |
$classes = array(); |
|---|
| 57 |
|
|---|
| 58 |
foreach (glob($baseDir.'*.class.php') as $file) |
|---|
| 59 |
{ |
|---|
| 60 |
$class = str_replace(array($baseDir, '.class.php'), '', $file); |
|---|
| 61 |
|
|---|
| 62 |
if ('sfUpgrade' != $class) |
|---|
| 63 |
{ |
|---|
| 64 |
$classes[] = $class; |
|---|
| 65 |
} |
|---|
| 66 |
} |
|---|
| 67 |
|
|---|
| 68 |
return $classes; |
|---|
| 69 |
} |
|---|
| 70 |
} |
|---|
| 71 |
|
|---|