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

[CMSP-668] Update to latest Pantheon WP Coding Standard #357

Merged
merged 5 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Minimum supported PHP version is 7.3.

### 2.1.4-dev ###
* Fix typo in the label for the certificate path [[#352](https://github.com/pantheon-systems/wp-saml-auth/pull/352)]
* Updates Pantheon WP Coding Standards to 2.0 [[#357](https://github.com/pantheon-systems/wp-saml-auth/pull/357)]

### 2.1.3 (April 8, 2023) ###
* Fixes missing vendor/ directory in previous release [[#336](https://github.com/pantheon-systems/wp-saml-auth/pull/336)]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"pantheon-systems/pantheon-wordpress-upstream-tests": "dev-master",
"pantheon-systems/pantheon-wp-coding-standards": "^1.0",
"pantheon-systems/pantheon-wp-coding-standards": "^2.0",
"phpunit/phpunit": "^9",
"symfony/filesystem": "^5",
"symfony/service-contracts": "^2",
Expand Down
504 changes: 324 additions & 180 deletions composer.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion inc/class-wp-saml-auth-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,4 @@ function wpsax_filter_option( \$value, \$option_name ) {
EOT;
return $function;
}

}
4 changes: 2 additions & 2 deletions inc/class-wp-saml-auth-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ public static function render_page_content() {
<p>
<?php
// translators: Link to the plugin settings page.
echo sprintf( wp_kses( __( 'Settings are defined with a filter and unavailable for editing through the backend. <a href="%s">Visit the plugin page</a> for more information.', 'wp-saml-auth' ), $allowed_html ), 'https://wordpress.org/plugins/wp-saml-auth/' );
printf( wp_kses( __( 'Settings are defined with a filter and unavailable for editing through the backend. <a href="%s">Visit the plugin page</a> for more information.', 'wp-saml-auth' ), $allowed_html ), 'https://wordpress.org/plugins/wp-saml-auth/' );
?>
</p>
<?php else : ?>
<p>
<?php
// translators: Link to the plugin settings page.
echo sprintf( wp_kses( __( 'Use the following settings to configure WP SAML Auth with the \'internal\' connection type. <a href="%s">Visit the plugin page</a> for more information.', 'wp-saml-auth' ), $allowed_html ), 'https://wordpress.org/plugins/wp-saml-auth/' );
printf( wp_kses( __( 'Use the following settings to configure WP SAML Auth with the \'internal\' connection type. <a href="%s">Visit the plugin page</a> for more information.', 'wp-saml-auth' ), $allowed_html ), 'https://wordpress.org/plugins/wp-saml-auth/' );
?>
</p>
<?php if ( WP_SAML_Auth_Options::do_required_settings_have_values() ) : ?>
Expand Down
4 changes: 2 additions & 2 deletions inc/class-wp-saml-auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function filter_login_body_class( $classes ) {
* @param string $password Password supplied by the user.
* @return mixed
*/
public function filter_authenticate( $user, $username, $password ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public function filter_authenticate( $user, $username, $password ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable,Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed

$permit_wp_login = self::get_option( 'permit_wp_login' );
if ( is_a( $user, 'WP_User' ) && $permit_wp_login ) {
Expand Down Expand Up @@ -270,7 +270,7 @@ public function do_saml_authentication() {
|| ( ! $permit_wp_login && false === stripos( $redirect_to, parse_url( wp_login_url(), PHP_URL_PATH ) ) ) ) {
add_filter(
'login_redirect',
function() use ( $redirect_to ) {
function () use ( $redirect_to ) {
return $redirect_to;
},
1
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Minimum supported PHP version is 7.3.

= 2.1.4-dev =
* Fix typo in the label for the certificate path [[#352](https://github.com/pantheon-systems/wp-saml-auth/pull/352)]
* Updates Pantheon WP Coding Standards to 2.0 [[#357](https://github.com/pantheon-systems/wp-saml-auth/pull/357)]

= 2.1.3 (April 8, 2023) =
* Fixes missing vendor/ directory in previous release [[#336](https://github.com/pantheon-systems/wp-saml-auth/pull/336)]
Expand Down