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-666] Fix linting for latest Pantheon WP Coding Standards #264

Merged
merged 6 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -72,6 +72,7 @@ This mu-plugin will load WP Native PHP Sessions before all other plugins, while
## Changelog ##

### 1.3.7-dev ###
* Updates Pantheon WP Coding Standards to 2.0 [[#264](https://github.com/pantheon-systems/wp-native-php-sessions/pull/264)]

### 1.3.6 (June 1, 2023) ###
* Fixes PHP 8.2 deprecated dynamic property error [[#251](https://github.com/pantheon-systems/wp-native-php-sessions/pull/251)] (props @miguelaxcar)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -15,7 +15,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",
"yoast/phpunit-polyfills": "^2.0"
},
Expand Down
492 changes: 318 additions & 174 deletions composer.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion inc/class-admin.php
Expand Up @@ -135,5 +135,4 @@ public function action_admin_footer() {
</script>
<?php
}

}
1 change: 0 additions & 1 deletion inc/class-cli-command.php
Expand Up @@ -78,7 +78,6 @@ public function delete( $args, $assoc_args ) {
}
}
}

}

\WP_CLI::add_command( 'pantheon session', '\Pantheon_Sessions\CLI_Command' );
1 change: 0 additions & 1 deletion inc/class-list-table.php
Expand Up @@ -84,5 +84,4 @@ public function column_default( $item, $column_name ) {
return esc_html( $item->$column_name );
}
}

}
1 change: 0 additions & 1 deletion inc/class-session-handler.php
Expand Up @@ -123,5 +123,4 @@ public function gc( $maxlifetime ) {
public function close() {
return true;
}

}
1 change: 0 additions & 1 deletion inc/class-session.php
Expand Up @@ -319,5 +319,4 @@ private static function get_session_id_column() {
return 'session_id';
}
}

}
5 changes: 5 additions & 0 deletions phpcs.xml.dist
Expand Up @@ -36,4 +36,9 @@
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>*/inc/class-cli-command.php</exclude-pattern>
</rule>

<!-- Ignoring the either function declarations or structure declarations sniff for the main plugin file. This probably isn't best practice and the function should probably be defined in a separate file, but the function is just an implementation of the class to get the plugin started. -->
<rule ref="Universal.Files.SeparateFunctionsFromOO.Mixed">
<exclude-pattern>*/pantheon-sessions.php</exclude-pattern>
</rule>
</ruleset>
1 change: 1 addition & 0 deletions readme.txt
Expand Up @@ -71,6 +71,7 @@ This mu-plugin will load WP Native PHP Sessions before all other plugins, while
== Changelog ==

= 1.3.7-dev =
* Updates Pantheon WP Coding Standards to 2.0 [[#264](https://github.com/pantheon-systems/wp-native-php-sessions/pull/264)]

= 1.3.6 (June 1, 2023) =
* Fixes PHP 8.2 deprecated dynamic property error [[#251](https://github.com/pantheon-systems/wp-native-php-sessions/pull/251)] (props @miguelaxcar)
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/bootstrap.php
Expand Up @@ -39,4 +39,3 @@ function _manually_load_plugin() {
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );

require $_tests_dir . '/includes/bootstrap.php';

2 changes: 0 additions & 2 deletions tests/phpunit/test-init-plugin.php
Expand Up @@ -42,6 +42,4 @@ public function test_database_created() {
$columns
);
}

}

3 changes: 1 addition & 2 deletions tests/phpunit/test-sessions.php
Expand Up @@ -5,7 +5,7 @@
* @package WPNPS
*/

use \Pantheon_Sessions\Session;
use Pantheon_Sessions\Session;

/**
* Tests plugin interactions with sessions.
Expand Down Expand Up @@ -182,5 +182,4 @@ public function tearDown(): void {
$results = $wpdb->query( "DELETE FROM {$wpdb->pantheon_sessions}" );
parent::tearDown();
}

}