Skip to content

Fix deprecation warnings#34

Closed
BerntWinqvist wants to merge 1 commit into
onelogin:masterfrom
BerntWinqvist:deprecationWarnings
Closed

Fix deprecation warnings#34
BerntWinqvist wants to merge 1 commit into
onelogin:masterfrom
BerntWinqvist:deprecationWarnings

Conversation

@BerntWinqvist

Copy link
Copy Markdown

Fix these deprecation warnings:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses PHP deprecation warnings introduced in newer PHP versions by aligning property declarations with actual runtime usage and by making an exception constructor parameter explicitly nullable.

Changes:

  • Declare OneLoginClient::$clientId (camelCase) to prevent PHP 8.2 “dynamic property” deprecation warnings.
  • Update OneLoginException::__construct() to use ?\Throwable $previous = null to avoid PHP 8.4 “implicitly nullable parameter” deprecation warnings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/OneLoginClient.php Renames/declares the client ID property as clientId to stop dynamic property creation.
src/exceptions/OneLoginException.php Makes $previous explicitly nullable (?\Throwable) to satisfy PHP 8.4 deprecation rules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/OneLoginClient.php
Comment on lines +48 to +49
/** @var string $clientId OneLogin Client ID */
public $clientId;
@Subterrane

Copy link
Copy Markdown
Contributor

Thanks @BerntWinqvist — both deprecation fixes here are now in master via #35, which kept $clientID as a @deprecated alias of the new $clientId to avoid a breaking change for existing callers. The OneLoginException nullable-$previous fix landed identically. Closing as superseded.

@Subterrane Subterrane closed this Jun 9, 2026
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

Successfully merging this pull request may close these issues.

3 participants