}
return array_merge(
+ $this->analyzeArchitecture($dependencies),
$this->analyzePhpVersion($dependencies),
$this->analyzeDatabases($dependencies),
$this->analyzeCommands($dependencies),
return $missing;
}
+ private function analyzeArchitecture(array $dependencies) {
+ $missing = [];
+ if (!isset($dependencies['architecture'])) {
+ return $missing;
+ }
+
+ $supportedArchitectures = $dependencies['architecture'];
+ if (empty($supportedArchitectures)) {
+ return $missing;
+ }
+ if (!is_array($supportedArchitectures)) {
+ $supportedArchitectures = [$supportedArchitectures];
+ }
+ $supportedArchitectures = array_map(function ($architecture) {
+ return $this->getValue($architecture);
+ }, $supportedArchitectures);
+ $currentArchitecture = $this->platform->getArchitecture();
+ if (!in_array($currentArchitecture, $supportedArchitectures, true)) {
+ $missing[] = (string)$this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
+ }
+ return $missing;
+ }
+
/**
* @param array $dependencies
* @return array
<xs:selector xpath="dependencies/database"/>
<xs:field xpath="."/>
</xs:unique>
+ <xs:unique name="uniqueArchitecture">
+ <xs:selector xpath="dependencies/architecture"/>
+ <xs:field xpath="."/>
+ </xs:unique>
<xs:unique name="uniqueLib">
<xs:selector xpath="dependencies/lib"/>
<xs:field xpath="."/>
maxOccurs="1"/>
<xs:element name="nextcloud" type="nextcloud" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="architecture" type="architecture" minOccurs="0"
+ maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="architecture">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="x86"/>
+ <xs:enumeration value="x86_64"/>
+ <xs:enumeration value="aarch"/>
+ <xs:enumeration value="aarch64"/>
+ </xs:restriction>
+ </xs:simpleType>
+
<xs:complexType name="repair-steps">
<xs:sequence>
<xs:element name="pre-migration" type="steps" minOccurs="0"