Merged in bugfix/PMCORE-3920 (pull request #8518)
PMCORE-3920 Create a PM table or Report Table are not working Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
23
thirdparty/phing/IntrospectionHelper.php
vendored
23
thirdparty/phing/IntrospectionHelper.php
vendored
@@ -221,7 +221,7 @@ class IntrospectionHelper {
|
|||||||
|
|
||||||
$classname = null;
|
$classname = null;
|
||||||
|
|
||||||
if (($hint = $params[0]->getClass()) !== null) {
|
if (($hint = $this->getClass($params[0])) !== null) {
|
||||||
$classname = $hint->getName();
|
$classname = $hint->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ class IntrospectionHelper {
|
|||||||
|
|
||||||
$classname = null;
|
$classname = null;
|
||||||
|
|
||||||
if (($hint = $params[0]->getClass()) !== null) {
|
if (($hint = $this->getClass($params[0])) !== null) {
|
||||||
$classname = $hint->getName();
|
$classname = $hint->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,8 +325,8 @@ class IntrospectionHelper {
|
|||||||
$params = $method->getParameters();
|
$params = $method->getParameters();
|
||||||
|
|
||||||
$classname = null;
|
$classname = null;
|
||||||
|
|
||||||
if (($hint = $params[0]->getClass()) !== null) {
|
if (($hint = $this->getClass($params[0])) !== null) {
|
||||||
$classname = $hint->getName();
|
$classname = $hint->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ class IntrospectionHelper {
|
|||||||
|
|
||||||
$classname = null;
|
$classname = null;
|
||||||
|
|
||||||
if (($hint = $params[0]->getClass()) !== null) {
|
if (($hint = $this->getClass($params[0])) !== null) {
|
||||||
$classname = $hint->getName();
|
$classname = $hint->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,4 +539,17 @@ class IntrospectionHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get class
|
||||||
|
* @param object $param
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
private function getClass(object $param)
|
||||||
|
{
|
||||||
|
$name = null;
|
||||||
|
if ($param->getType() && !$param->getType()->isBuiltin()) {
|
||||||
|
$name = new ReflectionClass($param->getType()->getName());
|
||||||
|
}
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
thirdparty/phing/listener/DefaultLogger.php
vendored
4
thirdparty/phing/listener/DefaultLogger.php
vendored
@@ -29,7 +29,7 @@ include_once 'phing/BuildEvent.php';
|
|||||||
* any messages that get logged.
|
* any messages that get logged.
|
||||||
*
|
*
|
||||||
* @author Andreas Aderhold <andi@binarycloud.com>
|
* @author Andreas Aderhold <andi@binarycloud.com>
|
||||||
* @copyright <EFBFBD> 2001,2002 THYRELL. All rights reserved
|
* @copyright © 2001,2002 THYRELL. All rights reserved
|
||||||
* @version $Revision: 1.11 $ $Date: 2005/08/25 19:33:43 $
|
* @version $Revision: 1.11 $ $Date: 2005/08/25 19:33:43 $
|
||||||
* @see BuildEvent
|
* @see BuildEvent
|
||||||
* @package phing.listener
|
* @package phing.listener
|
||||||
@@ -214,7 +214,7 @@ class DefaultLogger implements BuildListener {
|
|||||||
$minutes, ($minutes === 1 ? " " : "s "),
|
$minutes, ($minutes === 1 ? " " : "s "),
|
||||||
$seconds - floor($seconds/60) * 60, ($seconds%60 === 1 ? "" : "s"));
|
$seconds - floor($seconds/60) * 60, ($seconds%60 === 1 ? "" : "s"));
|
||||||
} else {
|
} else {
|
||||||
return sprintf("%0.4f second%s", $seconds, ($seconds%60 === 1 ? "" : "s"));
|
return sprintf("%0.4f second%s", $seconds, ((int) $seconds % 60 === 1 ? "" : "s"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
thirdparty/phing/system/util/Properties.php
vendored
5
thirdparty/phing/system/util/Properties.php
vendored
@@ -215,7 +215,10 @@ class Properties {
|
|||||||
* @return mixed Old property value or NULL if none was set.
|
* @return mixed Old property value or NULL if none was set.
|
||||||
*/
|
*/
|
||||||
function setProperty($key, $value) {
|
function setProperty($key, $value) {
|
||||||
$oldValue = @$this->properties[$key];
|
$oldValue = null;
|
||||||
|
if (array_key_exists($key, $this->properties)) {
|
||||||
|
$oldValue = $this->properties[$key];
|
||||||
|
}
|
||||||
$this->properties[$key] = $value;
|
$this->properties[$key] = $value;
|
||||||
return $oldValue;
|
return $oldValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ include_once 'phing/tasks/system/condition/Condition.php';
|
|||||||
*
|
*
|
||||||
* @author Hans Lellelid <hans@xmpl.org>
|
* @author Hans Lellelid <hans@xmpl.org>
|
||||||
* @author Andreas Aderhold <andi@binarycloud.com>
|
* @author Andreas Aderhold <andi@binarycloud.com>
|
||||||
* @copyright <EFBFBD> 2001,2002 THYRELL. All rights reserved
|
* @copyright © 2001,2002 THYRELL. All rights reserved
|
||||||
* @version $Revision: 1.16 $
|
* @version $Revision: 1.16 $
|
||||||
* @package phing.tasks.system.condition
|
* @package phing.tasks.system.condition
|
||||||
*/
|
*/
|
||||||
@@ -46,7 +46,7 @@ abstract class ConditionBase extends ProjectComponent implements IteratorAggrega
|
|||||||
/**
|
/**
|
||||||
* Required for IteratorAggregate
|
* Required for IteratorAggregate
|
||||||
*/
|
*/
|
||||||
function getIterator() {
|
function getIterator(): \Traversable {
|
||||||
return new ConditionEnumeration($this);
|
return new ConditionEnumeration($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ class ConditionEnumeration implements Iterator {
|
|||||||
$this->outer = $outer;
|
$this->outer = $outer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function valid() {
|
public function valid(): bool {
|
||||||
return $this->outer->countConditions() > $this->num;
|
return $this->outer->countConditions() > $this->num;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ class ConditionEnumeration implements Iterator {
|
|||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
function next() {
|
function next(): void {
|
||||||
$this->num++;
|
$this->num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ class ConditionEnumeration implements Iterator {
|
|||||||
return $this->num;
|
return $this->num;
|
||||||
}
|
}
|
||||||
|
|
||||||
function rewind() {
|
function rewind(): void {
|
||||||
$this->num = 0;
|
$this->num = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
thirdparty/phing/util/StringHelper.php
vendored
2
thirdparty/phing/util/StringHelper.php
vendored
@@ -167,7 +167,7 @@ class StringHelper {
|
|||||||
* a natural way of getting a subtring, php's circular string buffer and strange
|
* a natural way of getting a subtring, php's circular string buffer and strange
|
||||||
* return values suck if you want to program strict as of C or friends
|
* return values suck if you want to program strict as of C or friends
|
||||||
*/
|
*/
|
||||||
public static function substring($string, $startpos, $endpos = -1) {
|
public static function substring(string $string, $startpos, $endpos = -1) {
|
||||||
$len = strlen($string);
|
$len = strlen($string);
|
||||||
$endpos = (int) (($endpos === -1) ? $len-1 : $endpos);
|
$endpos = (int) (($endpos === -1) ? $len-1 : $endpos);
|
||||||
if ($startpos > $len-1 || $startpos < 0) {
|
if ($startpos > $len-1 || $startpos < 0) {
|
||||||
|
|||||||
@@ -148,7 +148,11 @@ CREATE TABLE ".$this->quoteIdentifier($table->getName())."
|
|||||||
// $script .= " DEFAULT CHARSET='". $platform->escapeText( $vendorSpecific['Collation'] )."'";
|
// $script .= " DEFAULT CHARSET='". $platform->escapeText( $vendorSpecific['Collation'] )."'";
|
||||||
$script .= " DEFAULT CHARSET='utf8'";
|
$script .= " DEFAULT CHARSET='utf8'";
|
||||||
}
|
}
|
||||||
if($vendorSpecific['Comment'] ) {
|
$value = null;
|
||||||
|
if (array_key_exists('Comment', $vendorSpecific)) {
|
||||||
|
$value = $vendorSpecific['Comment'];
|
||||||
|
}
|
||||||
|
if($value) {
|
||||||
$script .= " COMMENT='". $platform->escapeText( $vendorSpecific['Comment'] )."'";
|
$script .= " COMMENT='". $platform->escapeText( $vendorSpecific['Comment'] )."'";
|
||||||
}
|
}
|
||||||
// if($table->getDescription()) {
|
// if($table->getDescription()) {
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ abstract class XMLElement {
|
|||||||
if (is_numeric($val)) {
|
if (is_numeric($val)) {
|
||||||
return (bool) $val;
|
return (bool) $val;
|
||||||
} else {
|
} else {
|
||||||
|
$val = is_null($val) ? '' : $val;
|
||||||
return (in_array(strtolower($val), array('true', 't', 'y', 'yes'), true) ? true : false);
|
return (in_array(strtolower($val), array('true', 't', 'y', 'yes'), true) ? true : false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,9 @@ class MysqlPlatform extends DefaultPlatform {
|
|||||||
$usingInnoDB = false;
|
$usingInnoDB = false;
|
||||||
if(class_exists('DataModelBuilder', false))
|
if(class_exists('DataModelBuilder', false))
|
||||||
{
|
{
|
||||||
$usingInnoDB = strtolower(DataModelBuilder::getBuildProperty('mysqlTableType')) == 'innodb';
|
$val = DataModelBuilder::getBuildProperty('mysqlTableType');
|
||||||
|
$val = is_null($val) ? '' : $val;
|
||||||
|
$usingInnoDB = strtolower($val) == 'innodb';
|
||||||
}
|
}
|
||||||
return $usingInnoDB || false;
|
return $usingInnoDB || false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -821,7 +821,7 @@ class PmTable
|
|||||||
*
|
*
|
||||||
* @return array contains all supported columns types provided by propel
|
* @return array contains all supported columns types provided by propel
|
||||||
*/
|
*/
|
||||||
public function getPropelSupportedColumnTypes()
|
public static function getPropelSupportedColumnTypes()
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* http://www.propelorm.org/wiki/Documentation/1.2/Schema
|
* http://www.propelorm.org/wiki/Documentation/1.2/Schema
|
||||||
@@ -926,7 +926,8 @@ class PmTable
|
|||||||
$args[] = $target;
|
$args[] = $target;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && @posix_isatty(STDOUT))) {
|
$fd = defined('STDOUT') ? STDOUT : fopen('php://stdout', 'w');
|
||||||
|
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && posix_isatty($fd))) {
|
||||||
$args[] = '-logger';
|
$args[] = '-logger';
|
||||||
$args[] = 'phing.listener.AnsiColorLogger';
|
$args[] = 'phing.listener.AnsiColorLogger';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user