Skip to content

Update ITable.php to include comment - #63177

Merged
CarlSchwan merged 1 commit into
masterfrom
fix-add-missing-`comment`-to-`$options`-array-in-ITable
Aug 12, 2026
Merged

Update ITable.php to include comment#63177
CarlSchwan merged 1 commit into
masterfrom
fix-add-missing-`comment`-to-`$options`-array-in-ITable

Conversation

@Chartman123

@Chartman123 Chartman123 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

In Forms with NC35 the Psalm actions fail because comment is missing in the docblock for addColumn and modifyColumn:

https://github.com/nextcloud/forms/actions/runs/31592467991/job/94100460339?pr=3578

This adds the missing array key to the docblocks.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@Chartman123
Chartman123 requested a review from a team as a code owner August 12, 2026 12:17
@Chartman123
Chartman123 requested review from Altahrim, icewind1991, provokateurin and sorbaugh and removed request for a team August 12, 2026 12:17
@CarlSchwan

Copy link
Copy Markdown
Member

Thanks!

@CarlSchwan CarlSchwan self-assigned this Aug 12, 2026
@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Aug 12, 2026
@CarlSchwan CarlSchwan removed their assignment Aug 12, 2026
@CarlSchwan CarlSchwan added this to the Nextcloud 35 milestone Aug 12, 2026
In Forms with NC35 the Psalm actions fail because `comment` is missing in the docblock for `addColumn` and `modifyColumn`:

https://github.com/nextcloud/forms/actions/runs/31592467991/job/94100460339?pr=3578

This adds the missing array key to the docblocks.

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan force-pushed the fix-add-missing-`comment`-to-`$options`-array-in-ITable branch from 417314b to 8bc710c Compare August 12, 2026 12:25
@CarlSchwan
CarlSchwan enabled auto-merge August 12, 2026 12:25
@Chartman123

Chartman123 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@CarlSchwan thanks for the quick review :)

in the same error log, you can find that the function name for changing a column has changed between migrations for NC34 and NC35. Until now, we used ISchemaWrapper with getTable which in turn returned Doctrine\DBAL\Schema\Table with changeColumn().

Now with OCP\DB\Schema\ITable it's called modifyColumn().

@CarlSchwan

Copy link
Copy Markdown
Member

@Chartman123 changeColumn has been deprecated for a long time.

technically it will still work because OC\DB\Schema\Table has a __call method that will forward the call, so I am not super inclined to add it back to the public interface

@CarlSchwan
CarlSchwan merged commit 39ca6af into master Aug 12, 2026
199 checks passed
@CarlSchwan
CarlSchwan deleted the fix-add-missing-`comment`-to-`$options`-array-in-ITable branch August 12, 2026 13:19
@welcome

welcome Bot commented Aug 12, 2026

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@Chartman123

Copy link
Copy Markdown
Contributor Author

@Chartman123 changeColumn has been deprecated for a long time.

technically it will still work because OC\DB\Schema\Table has a __call method that will forward the call, so I am not super inclined to add it back to the public interface

ok, then we'll adjust all existing migrations to the correct calls :)

@susnux

susnux commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

technically it will still work because OC\DB\Schema\Table has a __call method that will forward the call, so I am not super inclined to add it back to the public interface

But that will break all existing apps. Not hard but from linting.
We should add this back and mark it as deprecated, no?

@Chartman123

Copy link
Copy Markdown
Contributor Author

changeColumn() is only used 10 times within Nextclouds Github org:

https://github.com/search?q=org%3Anextcloud+changeColumn+path%3A%2F%5Elib%5C%2FMigration%5C%2F%2F&type=code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants