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

PHP 8.1: $this->_login and $this->_password not accessible #178

Closed
cweiske opened this issue Sep 28, 2022 · 1 comment
Closed

PHP 8.1: $this->_login and $this->_password not accessible #178

cweiske opened this issue Sep 28, 2022 · 1 comment

Comments

@cweiske
Copy link
Contributor

cweiske commented Sep 28, 2022

When #177 is fixed, the next problem appears:

PHP Warning: Undefined property: Thybag\Auth\SharePointOnlineAuth::$_login in vendor/thybag/php-sharepoint-lists-api/src/Thybag/Auth/SharePointOnlineAuth.php on line 78
Warning: Undefined property: Thybag\Auth\SharePointOnlineAuth::$_password in vendor/thybag/php-sharepoint-lists-api/src/Thybag/Auth/SharePointOnlineAuth.php on line 79

This is because at least in PHP 8.1, _login and _password are private, and the child class cannot access this anymore.

A backwards-compatible workaround for this problem would be to catch the options in a custom constructor, and using them later.

cweiske added a commit to mogic-le/PHP-SharePoint-Lists-API that referenced this issue Sep 28, 2022
In PHP 8.1, the SoapClient properties are private and cannot be accessed
anymore.
Thus we store them ourselves.

Resolves: thybag#178
cweiske added a commit to mogic-le/PHP-SharePoint-Lists-API that referenced this issue Sep 28, 2022
In PHP 8.1, the SoapClient properties are private and cannot be accessed
anymore.
Thus we store them ourselves.

Resolves: thybag#178
@thybag
Copy link
Owner

thybag commented Apr 30, 2023

I believe this was resolved as part of #180

@thybag thybag closed this as completed Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants