-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move custom DB scripts to separate files #592
Conversation
Codecov Report
@@ Coverage Diff @@
## master #592 +/- ##
============================================
+ Coverage 28.52% 28.57% +0.04%
- Complexity 1308 1309 +1
============================================
Files 51 52 +1
Lines 4203 4200 -3
============================================
+ Hits 1199 1200 +1
+ Misses 3004 3000 -4
Continue to review full report at Codecov.
|
@@ -45,6 +45,7 @@ public function install_db( $version_to_install = null, $app_token = '' ) { | |||
$sso = $options->get( 'sso' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just comments in this file ... I was researching the DB version and wanted to persist what I found.
@@ -2,13 +2,13 @@ | |||
/** | |||
* Plugin Name: Login by Auth0 | |||
* Description: Login by Auth0 provides improved username/password login, Passwordless login, Social login and Single Sign On for all your sites. | |||
* Version: 3.8.1 | |||
* Version: 3.9.0-beta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First change after a release needs to bump the version number in master
in a way that can be updated when the official release comes out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* @return bool|string | ||
*/ | ||
public static function get_script( $name, $token ) { | ||
$script = (string) file_get_contents( WPA0_PLUGIN_DIR . 'lib/scripts-js/db-' . $name . '.js' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever I see file_get_contents
followed by a variable. 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://secure.php.net/manual/en/function.file-get-contents.php
This function is similar to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE.
Worst that happens is a PHP warning if the file does not exist.
Changes
This is the first PR in a process to improve the user migration setup process.
3.9.0-beta
Testing
No new tests added, previous tests updated to new format.
Checklist