Ldaprecord-laravel: Error: Option [port] must be an integer.

Created on 24 Jun 2021  路  2Comments  路  Source: DirectoryTree/LdapRecord-Laravel

  • LdapRecord-Laravel Major Version: 2.3
  • PHP Version: [7.4.16]
  • Laravel Version: 7.29

Commands:

1) composer require directorytree/ldaprecord-laravel
2) php artisan vendor:publish --provider="LdapRecord\Laravel\LdapServiceProvider"
3) Inserted Lines in .env:

_LDAP_LOGGING=true
LDAP_CONNECTION=default
LDAP_HOST=ldap.forumsys.com
LDAP_USERNAME=null
LDAP_PASSWORD=null
LDAP_PORT=389
LDAP_BASE_DN="dc=example,dc=com"
LDAP_TIMEOUT=5
LDAP_SSL=false
LDAP_TLS=false_

4) php artisan ldap:test

_ERROR:_

LdapRecord\Configuration\ConfigurationException

Option [port] must be an integer.

bug

Most helpful comment

Sorry @ParidV & @Valitutto! I just patched this.

I released an accidental breaking change in v2.5.1 with the port validation.

It's now working normally as it did previously (v2.5.2).

I've added a test to make sure this doesn't happen again 馃憤

All 2 comments

For the moment, you can bypass it by editing the _ldap.php_ file in the _config_ folder:

'port' => intval(env('LDAP_PORT', 389)),
'timeout' => intval(env('LDAP_TIMEOUT', 5)),

Sorry @ParidV & @Valitutto! I just patched this.

I released an accidental breaking change in v2.5.1 with the port validation.

It's now working normally as it did previously (v2.5.2).

I've added a test to make sure this doesn't happen again 馃憤

Was this page helpful?
0 / 5 - 0 ratings