mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update dependencies and refactor code for clarity
- Changed version constraint for `spomky-labs/otphp` in composer.json to allow any 11.x version. - Refactored `getDatabasesDBForProject` method in Migrations class to use the shorthand syntax for callable. - Updated return values in Format class to use more descriptive types for index creation. - Corrected parameter documentation in Attributes class for clarity and consistency.
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@
|
||||
"phpmailer/phpmailer": "6.9.*",
|
||||
"chillerlan/php-qrcode": "4.3.*",
|
||||
"adhocore/jwt": "1.1.*",
|
||||
"spomky-labs/otphp": "^11.4.2",
|
||||
"spomky-labs/otphp": "11.*",
|
||||
"webonyx/graphql-php": "14.11.*",
|
||||
"league/csv": "9.14.*",
|
||||
"enshrined/svg-sanitize": "0.22.*"
|
||||
|
||||
@@ -544,9 +544,9 @@ class Migrations extends Action
|
||||
protected function getDatabasesDBForProject(Document $database)
|
||||
{
|
||||
if ($this->sourceProject) {
|
||||
return call_user_func($this->getDatabasesDB, $database, $this->sourceProject);
|
||||
return ($this->getDatabasesDB)($database, $this->sourceProject);
|
||||
}
|
||||
return call_user_func($this->getDatabasesDB, $database);
|
||||
return ($this->getDatabasesDB)($database);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -309,7 +309,7 @@ abstract class Format
|
||||
case 'createIndex':
|
||||
switch ($param) {
|
||||
case 'type':
|
||||
return 'IndexType';
|
||||
return 'DatabasesIndexType';
|
||||
case 'orders':
|
||||
return 'OrderBy';
|
||||
}
|
||||
@@ -342,7 +342,7 @@ abstract class Format
|
||||
case 'createIndex':
|
||||
switch ($param) {
|
||||
case 'type':
|
||||
return 'IndexType';
|
||||
return 'TablesDBIndexType';
|
||||
case 'orders':
|
||||
return 'OrderBy';
|
||||
}
|
||||
@@ -361,7 +361,7 @@ abstract class Format
|
||||
case 'createIndex':
|
||||
switch ($param) {
|
||||
case 'type':
|
||||
return 'IndexType';
|
||||
return 'DocumentsDBIndexType';
|
||||
case 'orders':
|
||||
return 'OrderBy';
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class Attributes extends Validator
|
||||
/**
|
||||
* @param int $maxAttributes Maximum number of attributes allowed
|
||||
* @param bool $supportForSpatialAttributes Whether DB supports spatial attributes
|
||||
* @param bool $supportForSpatialAttributes Whether DB supports attributes or not
|
||||
* @param bool $supportForAttributes Whether DB supports attributes or not
|
||||
*/
|
||||
public function __construct(
|
||||
int $maxAttributes = APP_LIMIT_ARRAY_PARAMS_SIZE,
|
||||
@@ -81,7 +81,7 @@ class Attributes extends Validator
|
||||
}
|
||||
|
||||
if (\count($value) && !$this->supportForAttributes) {
|
||||
$this->message = "Attributes are not supported by the current database";
|
||||
$this->message = 'Attributes are not supported by the current database';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user