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

[BUG] Stabilized attribute is being improperly set by StartTranscription #78

Closed
4 of 5 tasks
jonathanminson opened this issue Mar 31, 2025 · 0 comments · Fixed by #79
Closed
4 of 5 tasks

[BUG] Stabilized attribute is being improperly set by StartTranscription #78

jonathanminson opened this issue Mar 31, 2025 · 0 comments · Fixed by #79
Labels
bug Something isn't working

Comments

@jonathanminson
Copy link

Checklist

  • Have you provided a description of the bug?
  • Have you provided your Environment information?
  • Have you provided a sample code snippet?
  • Have you provided a stack trace?
  • Have you outlined the expected behavior?

Description

The stabilized attribute is improperly labeled as stability in StartTranscription.php. This results either in a failure to start a call or the attribute just being ignored by Bandwidth when the call is started.

Environment Information

All

Sample Code Snippet

public function stability(bool $stability): StartTranscription {
    $this->stability = $stability;
    return $this;
}

...

 if(isset($this->stability)) {
      $element->setattribute("stability", $this->stability);
  }

Stack Trace

# Stack Trace

N/A

Expected Behavior

Suggested Fix

To fix, add a proper stabilized setter. Leave the old one for backwards compatibility.

/**
 * Sets the stabilized attribute for StartTranscription. This remains for backwards compatibility.
 *
 * @param bool $stability Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
 * @deprecated Use stabilized() instead
 */
public function stability( bool $stability): StartTranscription {
    $this->stabilized = $stability;
    return $this;
}

/**
 * Sets the stabilized attribute for StartTranscription
 *
 * @param bool $stabilized Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
 */
public function stabilized( bool $stabilized): StartTranscription {
    $this->stabilized = $stabilized;
    return $this;
}

Then, properly set the XML attribute:

if(isset($this->stabilized)) {
    $element->setattribute("stabilized", $this->stabilized ? 'true' : 'false');
}
@jonathanminson jonathanminson added the bug Something isn't working label Mar 31, 2025
@jonathanminson jonathanminson changed the title [BUG] Description [BUG] Stabilized is being improperly set by StartTranscription Mar 31, 2025
@jonathanminson jonathanminson changed the title [BUG] Stabilized is being improperly set by StartTranscription [BUG] Stabilized attribute is being improperly set by StartTranscription Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant