Skip to content

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 2, 2020

  • Update signature for like/notLike/in/notIn: $x is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported.
  • Update signature for in/notIn: $y is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported.
  • Update signature for set: also ILiteral and IQueryFunction are valid values.
  • Update signature for setValue: also IParameter is supported.

⚠️ Functional change: setValue now casts $value to string. This was done before much later by doctrine.

$x is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported.

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb kesselb added 2. developing Work in progress enhancement labels Oct 2, 2020
$y is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported.

Signed-off-by: Daniel Kesselberg <[email protected]>
also ILiteral and IQueryFunction are valid.

Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb kesselb force-pushed the enh/noid/update-param-for-psalm branch from 6062461 to 0e3ddf1 Compare October 3, 2020 15:16
@kesselb kesselb changed the title WIP: Less psalm warnings Less psalm warnings Oct 3, 2020
@kesselb kesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 3, 2020
@faily-bot
Copy link

faily-bot bot commented Oct 3, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 33616: failure

mariadb10.4-php7.4

acceptance-users

  • tests/acceptance/features/users.feature:4
Show full log
  Scenario: create a new user                                       # /drone/src/tests/acceptance/features/users.feature:4
    Given I act as Jane                                             # ActorContext::iActAs()
    And I am logged in as the admin                                 # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                    # SettingsMenuContext::iOpenTheUserSettings()
    And I click the New user button                                 # UsersSettingsContext::iClickTheNewUserButton()
      New user button in Users Settings could not be found (NoSuchElementException)
    And I see that the new user form is shown                       # UsersSettingsContext::iSeeThatTheNewUserFormIsShown()
    When I create user unknownUser with password 123456acb          # UsersSettingsContext::iCreateUserWithPassword()
    Then I see that the list of users contains the user unknownUser # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

So far looks good 👍

Also neat that it solves 129 errors :)

* Creates a LIKE() comparison expression with the given arguments.
*
* @param string $x Field in string format to be inspected by LIKE() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by LIKE() comparison.
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be done on some other functions too, but well one after the other

@MorrisJobke MorrisJobke added this to the Nextcloud 21 milestone Oct 6, 2020
@MorrisJobke
Copy link
Member

@kesselb the PHPDoc of setValue is updated, right? Anything else missing to get this in?

@kesselb
Copy link
Contributor Author

kesselb commented Oct 6, 2020

@kesselb the PHPDoc of setValue is updated, right? Anything else missing to get this in?

@MorrisJobke ready. Just the check was missing.

@MorrisJobke MorrisJobke merged commit c1fd22b into master Oct 6, 2020
@MorrisJobke MorrisJobke deleted the enh/noid/update-param-for-psalm branch October 6, 2020 20:08
@ChristophWurst
Copy link
Member

🙏 this also solves some issues in Mail reported by psalm. Thanks 🚀

@MorrisJobke
Copy link
Member

I back ported the PHPDoc in #23971, because there was the method newly used and thus caused issues.

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 enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants