Closed ChristophWurst closed 3 years ago
Please note that we just merged a PR with our own constants for the types, so the app can be fully independent of any 3rdparty libraries: https://github.com/nextcloud/server/pull/25089.
Thanks for raising the issue! Sadly I'm currently way too busy studying for university, so I don't feel ready to do the required changes to get the app in shape for a Nextcloud 21 compatible release during the foreseeable future. So I'd really appreciate some help. (@ChristophWurst maybe you know someone who would have the time for it?)
Could you possibly open a forum post? I can try to get some attention on this but I can't promise more.
No worries if you don't have time for the maintenance anymore, it's a lot of work and you did this in your free time. :v:
@ChristophWurst
The only reference I found is in the migration step, which, of all types, only uses Type::String. Do you suggest changing references to \Doctrine\DBAL\Types\Type::* to \OCP\DB\Types:: as suggested here [1] ?
yes, please follow the upgrade guide
by trying to install user_external app on a fresh nextcloud 21 setup, I already did:
a.
Now this is what I receive:
An unhandled exception has been thrown: Error: Class "OCA\User_external\Migration\Type" not found in /var/www/https/mycloud/apps/user_external/lib/Migration/Version0010Date20200630193751.php:48 Stack trace:
What else? thank you.
Class "OCA\User_external\Migration\Type" not found in /var/www/https/mycloud/apps/user_external/lib/Migration/Version0010Date20200630193751.php:48
You use a Type
class that doesn't exist. You have to use \OCP\DB\Types
that file is the one supplied by default with the app. I don't know where and how to change it.
and this is the function in which the error is reported: public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /* @var ISchemaWrapper $schema / $schema = $schemaClosure();
if (!$schema->hasTable('users_external')) {
$table = $schema->createTable('users_external');
$table->addColumn('backend', Type::STRING, [
'notnull' => true,
'length' => 128,
'default' => '',
]);
$table->addColumn('uid', Type::STRING, [
'notnull' => true,
'length' => 64,
'default' => '',
]);
$table->addColumn('displayname', Type::STRING, [
'notnull' => false,
'length' => 64,
]);
$table->setPrimaryKey(['uid', 'backend']);
}
return $schema;
}
the fault is in: $table->addColumn('displayname', Type::STRING, [ 'notnull' => false, 'length' => 64, ]);
Hi there,
I found that your app uses some classes of Nextcloud's third party libraries. Since an upgrade of those for php8 compatibility, your app will have to be adjusted as well. See https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/upgrade-guide.html#doctrine-dbal for details. Your app uses
Doctrine\DBAL\Types\Type
which lost the old constants: https://github.com/doctrine/dbal/blob/3.0.x/UPGRADE.md#deprecated-type-constants.Cheers