-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(php-cs) Fix php-cs styles according to configuration
- Loading branch information
Showing
907 changed files
with
67,547 additions
and
73,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/* | ||
* This file is part of the symfony package. | ||
* (c) Fabien Potencier <[email protected]> | ||
* | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
@@ -13,22 +13,22 @@ | |
* | ||
* Usage: php data/bin/changelog.php -r12345:67890 /branches/1.3 | ||
* | ||
* @package symfony | ||
* @author Fabien Potencier <[email protected]> | ||
* | ||
* @version SVN: $Id$ | ||
*/ | ||
require_once __DIR__.'/../../lib/task/sfFilesystem.class.php'; | ||
|
||
if (!isset($argv[1])) | ||
{ | ||
echo "You must provide a revision range (-r123:456)\n"; | ||
exit(1); | ||
if (!isset($argv[1])) { | ||
echo "You must provide a revision range (-r123:456)\n"; | ||
|
||
exit(1); | ||
} | ||
|
||
if (!isset($argv[2])) | ||
{ | ||
echo "You must provide a repository path (/branches/1.4)\n"; | ||
exit(1); | ||
if (!isset($argv[2])) { | ||
echo "You must provide a repository path (/branches/1.4)\n"; | ||
|
||
exit(1); | ||
} | ||
|
||
$filesystem = new sfFilesystem(); | ||
|
@@ -37,13 +37,12 @@ | |
$info = new SimpleXMLElement($out); | ||
|
||
list($out, $err) = $filesystem->execute(vsprintf('svn log %s --xml %s', array_map('escapeshellarg', array( | ||
$argv[1], | ||
(string) $info->entry->repository->root.$argv[2], | ||
$argv[1], | ||
(string) $info->entry->repository->root.$argv[2], | ||
)))); | ||
$log = new SimpleXMLElement($out); | ||
|
||
foreach ($log->logentry as $logentry) | ||
{ | ||
echo sprintf(' * [%d] %s', $logentry['revision'], trim(preg_replace('/\s*\[[\d\., ]+\]\s*/', '', (string) $logentry->msg))); | ||
echo PHP_EOL; | ||
foreach ($log->logentry as $logentry) { | ||
echo sprintf(' * [%d] %s', $logentry['revision'], trim(preg_replace('/\s*\[[\d\., ]+\]\s*/', '', (string) $logentry->msg))); | ||
echo PHP_EOL; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/* | ||
* This file is part of the symfony package. | ||
* (c) 2004-2007 Fabien Potencier <[email protected]> | ||
* | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
@@ -13,65 +13,59 @@ | |
* | ||
* Usage: php data/bin/release.php 1.3.0 stable | ||
* | ||
* @package symfony | ||
* @author Fabien Potencier <[email protected]> | ||
* | ||
* @version SVN: $Id$ | ||
*/ | ||
require_once(__DIR__.'/../../lib/exception/sfException.class.php'); | ||
require_once(__DIR__.'/../../lib/task/sfFilesystem.class.php'); | ||
require_once(__DIR__.'/../../lib/util/sfFinder.class.php'); | ||
require_once(__DIR__.'/../../lib/vendor/lime/lime.php'); | ||
|
||
if (!isset($argv[1])) | ||
{ | ||
throw new Exception('You must provide version prefix.'); | ||
require_once __DIR__.'/../../lib/exception/sfException.class.php'; | ||
|
||
require_once __DIR__.'/../../lib/task/sfFilesystem.class.php'; | ||
|
||
require_once __DIR__.'/../../lib/util/sfFinder.class.php'; | ||
|
||
require_once __DIR__.'/../../lib/vendor/lime/lime.php'; | ||
|
||
if (!isset($argv[1])) { | ||
throw new Exception('You must provide version prefix.'); | ||
} | ||
|
||
if (!isset($argv[2])) | ||
{ | ||
throw new Exception('You must provide stability status (alpha/beta/stable).'); | ||
if (!isset($argv[2])) { | ||
throw new Exception('You must provide stability status (alpha/beta/stable).'); | ||
} | ||
|
||
$stability = $argv[2]; | ||
|
||
$filesystem = new sfFilesystem(); | ||
|
||
if (($stability == 'beta' || $stability == 'alpha') && count(explode('.', $argv[1])) < 2) | ||
{ | ||
$version_prefix = $argv[1]; | ||
if (('beta' == $stability || 'alpha' == $stability) && count(explode('.', $argv[1])) < 2) { | ||
$version_prefix = $argv[1]; | ||
|
||
list($result) = $filesystem->execute('svn status -u '.getcwd()); | ||
if (preg_match('/Status against revision\:\s+(\d+)\s*$/im', $result, $match)) | ||
{ | ||
$version = $match[1]; | ||
} | ||
list($result) = $filesystem->execute('svn status -u '.getcwd()); | ||
if (preg_match('/Status against revision\:\s+(\d+)\s*$/im', $result, $match)) { | ||
$version = $match[1]; | ||
} | ||
|
||
if (!isset($version)) | ||
{ | ||
throw new Exception('Unable to find last SVN revision.'); | ||
} | ||
if (!isset($version)) { | ||
throw new Exception('Unable to find last SVN revision.'); | ||
} | ||
|
||
// make a PEAR compatible version | ||
$version = $version_prefix.'.'.$version; | ||
} | ||
else | ||
{ | ||
$version = $argv[1]; | ||
// make a PEAR compatible version | ||
$version = $version_prefix.'.'.$version; | ||
} else { | ||
$version = $argv[1]; | ||
} | ||
|
||
print sprintf("Releasing symfony version \"%s\".\n", $version); | ||
echo sprintf("Releasing symfony version \"%s\".\n", $version); | ||
|
||
// tests | ||
list($result) = $filesystem->execute('php data/bin/symfony symfony:test'); | ||
|
||
if (0 != $result) | ||
{ | ||
throw new Exception('Some tests failed. Release process aborted!'); | ||
if (0 != $result) { | ||
throw new Exception('Some tests failed. Release process aborted!'); | ||
} | ||
|
||
if (is_file('package.xml')) | ||
{ | ||
$filesystem->remove(getcwd().DIRECTORY_SEPARATOR.'package.xml'); | ||
if (is_file('package.xml')) { | ||
$filesystem->remove(getcwd().DIRECTORY_SEPARATOR.'package.xml'); | ||
} | ||
|
||
$filesystem->copy(getcwd().'/package.xml.tmpl', getcwd().'/package.xml'); | ||
|
@@ -80,21 +74,19 @@ | |
$finder = sfFinder::type('file')->relative(); | ||
$xml_classes = ''; | ||
$dirs = array('lib' => 'php', 'data' => 'data'); | ||
foreach ($dirs as $dir => $role) | ||
{ | ||
$class_files = $finder->in($dir); | ||
foreach ($class_files as $file) | ||
{ | ||
$xml_classes .= '<file role="'.$role.'" baseinstalldir="symfony" install-as="'.$file.'" name="'.$dir.'/'.$file.'" />'."\n"; | ||
} | ||
foreach ($dirs as $dir => $role) { | ||
$class_files = $finder->in($dir); | ||
foreach ($class_files as $file) { | ||
$xml_classes .= '<file role="'.$role.'" baseinstalldir="symfony" install-as="'.$file.'" name="'.$dir.'/'.$file.'" />'."\n"; | ||
} | ||
} | ||
|
||
// replace tokens | ||
$filesystem->replaceTokens(getcwd().DIRECTORY_SEPARATOR.'package.xml', '##', '##', array( | ||
'SYMFONY_VERSION' => $version, | ||
'CURRENT_DATE' => date('Y-m-d'), | ||
'CLASS_FILES' => $xml_classes, | ||
'STABILITY' => $stability, | ||
'SYMFONY_VERSION' => $version, | ||
'CURRENT_DATE' => date('Y-m-d'), | ||
'CLASS_FILES' => $xml_classes, | ||
'STABILITY' => $stability, | ||
)); | ||
|
||
list($results) = $filesystem->execute('pear package'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.