Skip to content

Conversation

@MorrisJobke
Copy link
Member

@kesselb
Copy link
Collaborator

kesselb commented Sep 16, 2020

Yep. Should also work with Psalm and hopefully PHPStorm sometime.

@MorrisJobke
Copy link
Member Author

Yep. Should also work with Psalm and hopefully PHPStorm sometime.

Does work, but now Psalm stumbles over the non-class keys. :/ Anyways - something that we can look into with this separate PR.

@MorrisJobke
Copy link
Member Author

Anyways - something that we can look into with this separate PR.

Things that are good to clean up :)

@MorrisJobke MorrisJobke marked this pull request as draft September 16, 2020 14:20
@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 16, 2020
@MorrisJobke MorrisJobke self-assigned this Sep 16, 2020
@kesselb
Copy link
Collaborator

kesselb commented Sep 16, 2020

Ah. At some places we are still using ->query('UserStatus'). Psalm is unable to resolve those aliases and fails.

@MorrisJobke
Copy link
Member Author

Ah. At some places we are still using ->query('UserStatus'). Psalm is unable to resolve those aliases and fails.

Exactly - but this is something we can tackle in 21.

@faily-bot
Copy link

faily-bot bot commented Sep 16, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 33109: failure

mariadb10.1-php7.2

Show full log
There were 2 warnings:

1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

--

There was 1 failure:

1) OCA\Files_Versions\Tests\VersioningTest::testRestoreMovedShare
File content has not changed
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'version 2'
+'version 1'

/drone/src/apps/files_versions/tests/VersioningTest.php:729

mysql8.0-php7.2

Show full log
There was 1 error:

1) OCA\Files_Trashbin\Tests\StorageTest::testDeleteVersionsOfFileAsRecipient
OCP\Files\StorageNotAvailableException: File with id "10689" has not been found.

/drone/src/lib/private/Files/Storage/FailedStorage.php:70
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:122
/drone/src/lib/private/Files/Storage/Wrapper/Wrapper.php:113
/drone/src/lib/private/Files/View.php:1161
/drone/src/lib/private/Files/View.php:379
/drone/src/lib/private/Files/View.php:715
/drone/src/apps/files_trashbin/tests/StorageTest.php:303

Caused by
OCP\Files\NotFoundException: File with id "10689" has not been found.

/drone/src/lib/private/Files/View.php:1755
/drone/src/apps/files_sharing/lib/SharedStorage.php:128
/drone/src/apps/files_sharing/lib/SharedStorage.php:480
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:122
/drone/src/lib/private/Files/Storage/Wrapper/Wrapper.php:113
/drone/src/lib/private/Files/View.php:1161
/drone/src/lib/private/Files/View.php:379
/drone/src/lib/private/Files/View.php:715
/drone/src/apps/files_trashbin/tests/StorageTest.php:303

--

There were 2 warnings:

1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

acceptance-app-theming

  • tests/acceptance/features/app-theming.feature:17
Show full log
  Scenario: resetting the color updates the header color                       # /drone/src/tests/acceptance/features/app-theming.feature:17
    Given I am logged in as the admin                                          # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I visit the settings page                                              # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Theming" section                                           # AppNavigationContext::iOpenTheSection()
    And I see that the color selector in the Theming app has loaded            # ThemingAppContext::iSeeThatTheColorSelectorInTheThemingAppHasLoaded()
    And I set the "Color" parameter in the Theming app to "#C9C9C9"            # ThemingAppContext::iSetTheParameterInTheThemingAppTo()
    And I see that the parameters in the Theming app are eventually saved      # ThemingAppContext::iSeeThatTheParametersInTheThemingAppAreEventuallySaved()
    And I see that the header color is eventually "#C9C9C9"                    # ThemingAppContext::iSeeThatTheHeaderColorIsEventually()
    When I reset the "Color" parameter in the Theming app to its default value # ThemingAppContext::iSetTheParameterInTheThemingAppToItsDefaultValue()
    Then I see that the parameters in the Theming app are eventually saved     # ThemingAppContext::iSeeThatTheParametersInTheThemingAppAreEventuallySaved()
      The 'Saved' status messages in Theming app has not been shown after 100 seconds
    And I see that the header color is eventually "#0082C9"                    # ThemingAppContext::iSeeThatTheHeaderColorIsEventually()

acceptance-header

  • tests/acceptance/features/header.feature:31
Show full log
  Scenario: users from other groups are not seen in the contacts menu when autocompletion is restricted within the same group # /drone/src/tests/acceptance/features/header.feature:31
    Given I am logged in as the admin                                                                                         # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I visit the settings page                                                                                             # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Sharing" section of the "Administration" group                                                            # AppNavigationContext::iOpenTheSectionOf()
    And I enable restricting username autocompletion to groups                                                                # SettingsContext::iEnableRestrictingUsernameAutocompletionToGroups()
    And I see that username autocompletion is restricted to groups                                                            # SettingsContext::iSeeThatUsernameAutocompletionIsRestrictedToGroups()
    When I open the Contacts menu                                                                                             # ContactsMenuContext::iOpenTheContactsMenu()
    Then I see that the Contacts menu is shown                                                                                # ContactsMenuContext::iSeeThatTheContactsMenuIsShown()
    And I see that the contact "user0" in the Contacts menu is not shown                                                      # ContactsMenuContext::iSeeThatTheContactInTheContactsMenuIsNotShown()
      Failed asserting that true is false.
    And I see that the contact "admin" in the Contacts menu is not shown                                                      # ContactsMenuContext::iSeeThatTheContactInTheContactsMenuIsNotShown()

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

🙈 sure


/**
* @template T
* @param class-string<T> $id
Copy link
Member

Choose a reason for hiding this comment

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

what if you use class-string<T>|string for now? would that work with our named aliases?

@MorrisJobke
Copy link
Member Author

Implemented via #23377

@MorrisJobke MorrisJobke deleted the phpdoc/noid/annotate-how-query-works branch November 30, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants