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

Deprecate not passing server base url and secret #195

Conversation

SamuelWei
Copy link

No description provided.

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 98.93%. Comparing base (7e55854) to head (abe8a0e).

❗ Current head abe8a0e differs from pull request most recent head a0c168b. Consider uploading reports for the commit a0c168b to get more accurate results

Files Patch % Lines
src/BigBlueButton.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #195      +/-   ##
============================================
- Coverage     99.02%   98.93%   -0.09%     
- Complexity      475      477       +2     
============================================
  Files            53       53              
  Lines          1123     1127       +4     
============================================
+ Hits           1112     1115       +3     
- Misses           11       12       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FelixJacobi
Copy link
Member

Thank you, nice to do it already in 6.0 :) .

src/BigBlueButton.php Outdated Show resolved Hide resolved
src/BigBlueButton.php Outdated Show resolved Hide resolved
if (empty($secret)) {
@trigger_error(sprintf('Constructing "%s" without passing a secret is deprecated and will throw an exception 6.0.', self::class), \E_USER_DEPRECATED);
}

// Keeping backward compatibility with older deployed versions
Copy link
Member

Choose a reason for hiding this comment

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

I think, we should trigger a notice when this is present in the environment to ensure that developers remove their hacks to get around this :) .

Copy link
Author

Choose a reason for hiding this comment

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

So just replacing \E_USER_DEPRECATED with \E_USER_NOTICE ?

Copy link
Member

Choose a reason for hiding this comment

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

No, deprecated is fine and will be displayed by common reporting tools like Symfony profiler. notice would cause throwing an exception e.g. with Symfony error handler.

Copy link
Author

Choose a reason for hiding this comment

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

Ok. So what should I change? Do you want to make the change?

Copy link
Member

Choose a reason for hiding this comment

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

I would just compare if getenv returns something else than false for both variables and would trigger a deprecation notice then that reminds the consumer to stop passing environment variables for security reasons.

SamuelWei and others added 3 commits April 4, 2024 22:58
Co-authored-by: Felix Jacobi <felix@jacobi-hamburg.net>
Co-authored-by: Felix Jacobi <felix@jacobi-hamburg.net>
@SamuelWei SamuelWei added this to the 5.4 milestone Apr 9, 2024
@FelixJacobi FelixJacobi merged commit 7f7320f into master May 5, 2024
14 checks passed
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.

Deprecate support for passing BigBlueButton server configuration trough env
2 participants