@@ -167,7 +167,7 @@ protected function driverConnect(): bool
167167 protected function driverRead (CacheItemInterface $ item )
168168 {
169169 try {
170- $ options = new Cassandra \ ExecutionOptions (
170+ $ options = $ this -> getCompatibleExecutionOptionsArgument (
171171 [
172172 'arguments ' => ['cache_id ' => $ item ->getKey ()],
173173 'page_size ' => 1 ,
@@ -203,7 +203,7 @@ protected function driverWrite(CacheItemInterface $item): bool
203203 if ($ item instanceof Item) {
204204 try {
205205 $ cacheData = $ this ->encode ($ this ->driverPreWrap ($ item ));
206- $ options = new Cassandra \ ExecutionOptions (
206+ $ options = $ this -> getCompatibleExecutionOptionsArgument (
207207 [
208208 'arguments ' => [
209209 'cache_uuid ' => new Cassandra \Uuid (),
@@ -267,7 +267,7 @@ protected function driverDelete(CacheItemInterface $item): bool
267267 */
268268 if ($ item instanceof Item) {
269269 try {
270- $ options = new Cassandra \ ExecutionOptions (
270+ $ options = $ this -> getCompatibleExecutionOptionsArgument (
271271 [
272272 'arguments ' => [
273273 'cache_id ' => $ item ->getKey (),
@@ -320,4 +320,17 @@ protected function driverClear(): bool
320320 return false ;
321321 }
322322 }
323+
324+ /**
325+ * @param array<string, mixed> $options
326+ * @return array<string, mixed>|Cassandra\ExecutionOptions
327+ */
328+ protected function getCompatibleExecutionOptionsArgument (array $ options )
329+ {
330+ if ($ this ->getConfig ()->isUseLegacyExecutionOptions ()) {
331+ return new Cassandra \ExecutionOptions ($ options );
332+ }
333+
334+ return $ options ;
335+ }
323336}
0 commit comments