Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update php intl stub and fix type issues #50452

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/files_external/lib/Command/Notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,20 @@ private function logUpdate(IChange $change, OutputInterface $output): void {
}

private function getStorageIds(int $mountId, string $path): array {
$pathHash = md5(trim((string)\OC_Util::normalizeUnicode($path), '/'));
$pathHash = md5(trim(\OC_Util::normalizeUnicode($path), '/'));
$qb = $this->connection->getQueryBuilder();
return $qb
->select('storage_id', 'user_id')
->from('mounts', 'm')
->innerJoin('m', 'filecache', 'f', $qb->expr()->eq('m.storage_id', 'f.storage'))
->where($qb->expr()->eq('mount_id', $qb->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->eq('path_hash', $qb->createNamedParameter($pathHash, IQueryBuilder::PARAM_STR)))
->execute()
->executeQuery()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that changes the exception thrown, but it’s actually not clear.
Looking into that made me spot https://github.com/nextcloud/server/pull/46547/files#r1950850746

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the exception changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I dunno, it was a memory that the exception class is not always the same.

executeQuery wraps \Doctrine\DBAL\Exception in OC\DB\Exceptions\DbalException, execute does not.

So for intance I think the try/catch here: https://github.com/nextcloud/server/pull/50452/files/70b9ce8d579c55e22885c99d0c45cfdc080bb903#diff-e6c27e6e12c5df9554aee0a8c9fa6c3c8aca1e33821c4a32ebb8fc1fd1f40197R116
Might need to be adapted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well than revert that part for now as it is unrelated?

->fetchAll();
}

private function updateParent(array $storageIds, string $parent): int {
$pathHash = md5(trim((string)\OC_Util::normalizeUnicode($parent), '/'));
$pathHash = md5(trim(\OC_Util::normalizeUnicode($parent), '/'));
$qb = $this->connection->getQueryBuilder();
return $qb
->update('filecache')
Expand Down
8 changes: 0 additions & 8 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1750,9 +1750,6 @@
<InvalidNullableReturnType>
<code><![CDATA[array]]></code>
</InvalidNullableReturnType>
<InvalidScalarArgument>
<code><![CDATA[\OC_Util::normalizeUnicode($path)]]></code>
</InvalidScalarArgument>
<NullableReturnStatement>
<code><![CDATA[null]]></code>
<code><![CDATA[null]]></code>
Expand Down Expand Up @@ -2005,11 +2002,6 @@
</NoInterfaceProperties>
</file>
<file src="lib/private/Files/Storage/Wrapper/Encoding.php">
<InvalidArgument>
<code><![CDATA[\Normalizer::FORM_C]]></code>
<code><![CDATA[\Normalizer::FORM_C]]></code>
<code><![CDATA[\Normalizer::FORM_D]]></code>
</InvalidArgument>
<UndefinedInterfaceMethod>
<code><![CDATA[$this->namesCache]]></code>
<code><![CDATA[$this->namesCache]]></code>
Expand Down
Loading
Loading