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

Make psalm passing part of the build #691

Merged
merged 4 commits into from
Nov 2, 2023
Merged
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ jobs:
php_version: 7.3
version: 9

# Note, lint errors are being escaped here - so this will report, but not cause the build to fail
- name: Run Psalm
run: psalm --output-format=github || exit 0
run: psalm --output-format=github

js_build:
name: JavaScript build, test and lint
Expand Down
3 changes: 3 additions & 0 deletions api/src/Authentication/Type/LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function authenticate($login, $password)

if ($conn) {
// Tested against LDAP version 3 (could add support for older versions here)
/**
* @psalm-suppress UndefinedConstant
*/
ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);

// use a secure connection for LDAP, if configured this way (default is unsecured as this was the historical setting)
Expand Down
3 changes: 3 additions & 0 deletions api/src/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,9 @@ function _ldap_search($search, $email = False)
if ($ds)
{
// Explictly set the protocol version to prevent bind errors
/**
* @psalm-suppress UndefinedConstant
*/
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$r = ldap_bind($ds);
$sr = ldap_search($ds, $ldap_search, $search);
Expand Down
Loading