Skip to content

Commit

Permalink
Merge pull request #195 from fredden/no-composer
Browse files Browse the repository at this point in the history
Add compatibility with Magento compilation
  • Loading branch information
colinmollenhour authored Nov 19, 2023
2 parents 08025ef + ecc99bf commit 60fddb0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/code/local/Cm/RedisSession/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@
require_once __DIR__.'/../lib/src/Cm/RedisSession/Handler.php';
require_once __DIR__.'/../lib/src/Cm/RedisSession/ConnectionFailedException.php';
require_once __DIR__.'/../lib/src/Cm/RedisSession/ConcurrentConnectionsExceededException.php';
} else {
foreach (['/Cm_RedisSession_lib_src_Cm_RedisSession_ConcurrentConnectionsExceededException.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_ConnectionFailedException.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_Handler_ConfigInterface.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_Handler_LoggerInterface.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_Handler.php',
] as $file) {
if (file_exists(__DIR__ . $file)) {
require_once __DIR__ . $file;
} else {
break;
}
}
}

class Cm_RedisSession_Model_Session implements \Zend_Session_SaveHandler_Interface
Expand Down
13 changes: 13 additions & 0 deletions app/code/local/Cm/RedisSession/Model/Session/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@
require_once __DIR__.'/../../lib/src/Cm/RedisSession/Handler.php';
require_once __DIR__.'/../../lib/src/Cm/RedisSession/ConnectionFailedException.php';
require_once __DIR__.'/../../lib/src/Cm/RedisSession/ConcurrentConnectionsExceededException.php';
} else {
foreach (['/Cm_RedisSession_lib_src_Cm_RedisSession_ConcurrentConnectionsExceededException.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_ConnectionFailedException.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_Handler_ConfigInterface.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_Handler_LoggerInterface.php',
'/Cm_RedisSession_lib_src_Cm_RedisSession_Handler.php',
] as $file) {
if (file_exists(__DIR__ . $file)) {
require_once __DIR__ . $file;
} else {
break;
}
}
}

class Cm_RedisSession_Model_Session_Handler extends \Cm\RedisSession\Handler
Expand Down

0 comments on commit 60fddb0

Please sign in to comment.