Skip to content
Snippets Groups Projects
Commit 3193371c authored by damjan's avatar damjan
Browse files

[TASK] Typo3MinVersion default = "4.5"

parent 04040c53
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,9 @@ class Property {
* @var string The TYPO3 version in which the property was introduced
* Example: "4.5" "6.1" "6.2"), NULL is default and NULL is interpreted as most early version.
*
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, nullable=true)
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, options={"default" = "4.5"}, nullable=true)
*/
private $minVersion = NULL;
private $minVersion = Type::MIN_VERSION_DEFAULT;
/**
* @var string Last TYPO3 version in which the property existed.
......
......@@ -30,6 +30,12 @@ class Type {
*/
const USER_GROUP = 3;
/**
* Default value of property $minVersion. Default value also needs to be specified in property annotation:
* options={"default" = "4.5"}
*/
const MIN_VERSION_DEFAULT = "4.5";
/**
* @var integer
*
......@@ -64,9 +70,9 @@ class Type {
* @var string The TYPO3 version in which the type was introduced
* Example: "4.5" "6.1" "6.2"), NULL is default and NULL is interpreted as most early version.
*
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, nullable=true)
* @ORM\Column(name="min_version", type="decimal", precision=4, scale=1, options={"default" = "4.5"}, nullable=true)
*/
private $minVersion = NULL;
private $minVersion = Type::MIN_VERSION_DEFAULT;
/**
* @var string Last TYPO3 version in which the type existed.
......
......@@ -38,7 +38,7 @@ class TypoScriptReferenceImportService {
* @param int $typo3Group - Attribute::NORMAL_GROUP | Attribute::PAGE_GROUP | Attribute::USER_GROUP
*/
public function import(
$fileAddress, $typo3MinVersion = NULL, $typo3MaxVersion = NULL, $typo3Group = Type::NORMAL_GROUP
$fileAddress, $typo3MinVersion = Type::MIN_VERSION_DEFAULT, $typo3MaxVersion = NULL, $typo3Group = Type::NORMAL_GROUP
) {
/** @var \SimpleXMLElement $tsrefXml */
$tsrefXml = simplexml_load_file($fileAddress);
......@@ -72,7 +72,7 @@ class TypoScriptReferenceImportService {
* @return array
*/
protected function tsrefXmlToPhp(
$tsrefXml, $typo3MinVersion = NULL, $typo3MaxVersion = NULL, $typo3Group = Type::NORMAL_GROUP
$tsrefXml, $typo3MinVersion = Type::MIN_VERSION_DEFAULT, $typo3MaxVersion = NULL, $typo3Group = Type::NORMAL_GROUP
) {
$types = [];
/**
......@@ -136,7 +136,7 @@ class TypoScriptReferenceImportService {
* @param int $typo3Group - Attribute::NORMAL_GROUP | Attribute::PAGE_GROUP | Attribute::USER_GROUP
*/
protected function parseTypeChildTags(
$typeTagChildren, $typo3MinVersion = NULL, $typo3MaxVersion = NULL, Type $parentType,
$typeTagChildren, $typo3MinVersion = Type::MIN_VERSION_DEFAULT, $typo3MaxVersion = NULL, Type $parentType,
array $types, $typo3Group = Type::NORMAL_GROUP
) {
/**
......@@ -227,7 +227,7 @@ class TypoScriptReferenceImportService {
* @param int $typo3Group
*/
protected function resolveChildrenAndParents(
\SimpleXMLElement $tsrefXml, $typo3MinVersion = NULL, $typo3MaxVersion = NULL, array $types,
\SimpleXMLElement $tsrefXml, $typo3MinVersion = Type::MIN_VERSION_DEFAULT, $typo3MaxVersion = NULL, array $types,
$typo3Group = Type::NORMAL_GROUP
) {
/** @var \SimpleXMLElement $typeTag */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment