Skip to content

Commit

Permalink
new location of symfony version [BC break]
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Apr 4, 2024
1 parent 19c9153 commit 0600ec9
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion lib/autoload/sfCoreAutoload.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

// The current symfony version.
define('SYMFONY_VERSION', '1.5.20-dev');

/**
* @deprecated
Expand Down
2 changes: 1 addition & 1 deletion lib/command/sfSymfonyCommandApplication.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function configure()

// application
$this->setName('symfony');
$this->setVersion(SYMFONY_VERSION);
$this->setVersion(sfProjectConfiguration::SYMFONY_VERSION);

$this->loadTasks($configuration);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/config/sfProjectConfiguration.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
class sfProjectConfiguration
{
public const SYMFONY_VERSION = '1.5.20-dev';

/** @var string */
protected $rootDir;

Expand Down
2 changes: 1 addition & 1 deletion lib/debug/sfDebug.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class sfDebug
public static function symfonyInfoAsArray()
{
return [
'version' => SYMFONY_VERSION,
'version' => sfProjectConfiguration::SYMFONY_VERSION,
'path' => sfConfig::get('sf_symfony_lib_dir'),
];
}
Expand Down
2 changes: 1 addition & 1 deletion lib/debug/sfWebDebugPanelSymfonyVersion.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class sfWebDebugPanelSymfonyVersion extends sfWebDebugPanel
{
public function getTitle()
{
return '<span id="sfWebDebugSymfonyVersion">'.SYMFONY_VERSION.'</span>';
return '<span id="sfWebDebugSymfonyVersion">'.sfProjectConfiguration::SYMFONY_VERSION.'</span>';
}

public function getPanelTitle()
Expand Down
2 changes: 1 addition & 1 deletion lib/exception/data/exception.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function toggle(id)
<div id="sf_globals" style="display: none"><?php echo $globalsTable; ?></div>

<p id="footer">
symfony v.<?php echo SYMFONY_VERSION; ?> - php <?php echo PHP_VERSION; ?><br />
symfony v.<?php echo sfProjectConfiguration::SYMFONY_VERSION; ?> - php <?php echo PHP_VERSION; ?><br />
for help resolving this issue, please visit <a href="http://www.symfony-project.org/">http://www.symfony-project.org/</a>.
</p>
</div></center>
Expand Down
2 changes: 1 addition & 1 deletion lib/exception/data/exception.txt.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

<?php } ?>
<?php } ?>
[symfony] v. <?php echo SYMFONY_VERSION; ?> (symfony-project.org)
[symfony] v. <?php echo sfProjectConfiguration::SYMFONY_VERSION; ?> (symfony-project.org)
[PHP] v. <?php echo PHP_VERSION; ?>
2 changes: 1 addition & 1 deletion lib/plugin/sfPearRest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ class sfPearRest extends PEAR_REST
*/
public function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false)
{
return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : [], ["\r\nX-SYMFONY-VERSION: ".SYMFONY_VERSION]));
return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : [], ["\r\nX-SYMFONY-VERSION: ".sfProjectConfiguration::SYMFONY_VERSION]));
}
}
8 changes: 4 additions & 4 deletions lib/plugin/sfSymfonyPluginManager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ protected function registerSymfonyPackage()
$symfony->setChannel('pear.symfony-project.com');
$symfony->setConfig($this->environment->getConfig());
$symfony->setPackageType('php');
$symfony->setAPIVersion(preg_replace('/\d+(\-\w+)?$/', '0', SYMFONY_VERSION));
$symfony->setAPIStability(false === strpos(SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta');
$symfony->setReleaseVersion(preg_replace('/\-\w+$/', '', SYMFONY_VERSION));
$symfony->setReleaseStability(false === strpos(SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta');
$symfony->setAPIVersion(preg_replace('/\d+(\-\w+)?$/', '0', sfProjectConfiguration::SYMFONY_VERSION));
$symfony->setAPIStability(false === strpos(sfProjectConfiguration::SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta');
$symfony->setReleaseVersion(preg_replace('/\-\w+$/', '', sfProjectConfiguration::SYMFONY_VERSION));
$symfony->setReleaseStability(false === strpos(sfProjectConfiguration::SYMFONY_VERSION, 'DEV') ? 'stable' : 'beta');
$symfony->setDate(date('Y-m-d'));
$symfony->setDescription('symfony');
$symfony->setSummary('symfony');
Expand Down

0 comments on commit 0600ec9

Please sign in to comment.