Skip to content

Conversation

AhmedAlaa4611
Copy link
Contributor

@AhmedAlaa4611 AhmedAlaa4611 commented Aug 31, 2025

Description

This PR fixes an inconsistency between the ArrayStore docblocks and its actual runtime behavior.

Currently, the PHPDoc annotations and the all() method suggest that cached items are stored as:

['expiresAt' => float, 'value' => mixed]

However, the put() method actually stores items as:

['value' => mixed, 'expiresAt' => float]

This PR updates the docblocks and the all() method to reflect the correct array shape.

No behavior is changed; only the documentation and array construction order are corrected for consistency.

See

public function put($key, $value, $seconds)
{
$this->storage[$key] = [
'value' => $this->serializesValues ? serialize($value) : $value,
'expiresAt' => $this->calculateExpiration($seconds),
];
return true;
}

@taylorotwell taylorotwell merged commit 2ef64e1 into laravel:12.x Aug 31, 2025
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants