From eacdd72cb62edc288645db0336362010df28e172 Mon Sep 17 00:00:00 2001 From: Justin Sternberg Date: Mon, 17 Aug 2015 12:25:40 -0400 Subject: [PATCH 1/2] Likely the wrong issue is documented here --- WordPress/Sniffs/VIP/SessionVariableUsageSniff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php b/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php index aa6db76d18..1d812c3432 100644 --- a/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php +++ b/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php @@ -7,7 +7,7 @@ * @category PHP * @package PHP_CodeSniffer * @author Shady Sharaf - * @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/69 + * @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/75 */ class WordPress_Sniffs_VIP_SessionVariableUsageSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff { From 81c0331836be615305a6c02d135eb9abe2f69bd9 Mon Sep 17 00:00:00 2001 From: Justin Sternberg Date: Mon, 17 Aug 2015 12:31:57 -0400 Subject: [PATCH 2/2] Add explicit reasoning for session sniff From https://vip.wordpress.com/documentation/code-review-what-we-look-for/#session_start-and-other-session-related-functions, linked in #75 --- WordPress/Sniffs/VIP/SessionVariableUsageSniff.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php b/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php index 1d812c3432..8641b52a08 100644 --- a/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php +++ b/WordPress/Sniffs/VIP/SessionVariableUsageSniff.php @@ -2,7 +2,8 @@ /** * WordPress_Sniffs_VIP_SessionVariableUsageSniff * - * Discourages the use of the session variable + * Discourages the use of the session variable. + * Creating a session writes a file to the server and is unreliable in a multi-server environment. * * @category PHP * @package PHP_CodeSniffer