-
Notifications
You must be signed in to change notification settings - Fork 90
Add PHP 8.5 support #83
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
Open
vedavith
wants to merge
31
commits into
php-lock:master
Choose a base branch
from
vedavith:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
b28ae9a
Update composer.json
vedavith 8aab350
Update test-unit.yml
vedavith 4a4329a
test_workflow.yml
vedavith 01af359
Update workflow.yml
vedavith dabbcb1
Create workflow.yml
vedavith 6c169e2
Updated composer.json to support php8.5
vedavith 71df896
Update composer.json to support 8.5
vedavith 55d5b2e
Update composer.json
vedavith 0263dcf
Update workflow.yml
vedavith 23a35ab
Delete .github/workflows/workflow.yml
vedavith b37e49c
Update test-unit.yml
vedavith c9a2cbc
Update composer.json
vedavith 23c345d
Update composer.json - php85
vedavith 044a97b
Update composer.json
vedavith 09f2573
Update composer.json - eloquent/liberator
vedavith fcb17df
Update composer.json
vedavith c1845a1
Update composer.json - Backward compatibility
vedavith 75a7671
Merge branch 'master' into patch-1
vedavith 49452c6
Prevent INF/NAN from being passed to acquireMutex
vedavith 2f5653f
Updated composer - eloquent
vedavith 355875c
Updated files:
vedavith 6337b31
Refactor formatTimeout to simplify NaN and infinite value handling
vedavith ff26db6
Refactor tests to remove dependency on Eloquent Liberator and introdu…
vedavith 3a3bed1
Refactor TestAccess class to remove static methods and streamline pro…
vedavith daebb8a
Add namespace declaration to TestAccess class
vedavith 070f2d5
Refactor tests to use instance of TestAccess for property access
vedavith 6a0e20e
Refactor TestAccess class for improved readability and consistency
vedavith ef9cd52
Remove version constraint for spatie/async in composer.json
vedavith 4a00e6a
Update phpunit version constraint in composer.json to support newer v…
vedavith 3783124
Update PHP version constraints in composer.json and test-unit.yml to …
vedavith f9ab21a
Enhance formatTimeout to handle NaN and infinities
vedavith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?php | ||
|
|
||
| namespace Malkusch\Lock\Tests; | ||
|
|
||
| /** | ||
| * TestAccess - Helper for accessing private/protected properties and methods in tests. | ||
| */ | ||
| class TestAccess | ||
| { | ||
| private $object; | ||
|
|
||
| public function __construct($object) | ||
| { | ||
| $this->object = $object; | ||
| } | ||
|
|
||
| public function getProperty($property) | ||
| { | ||
| $ref = new \ReflectionProperty($this->object, $property); | ||
| if (\PHP_VERSION_ID < 80100) { | ||
| $ref->setAccessible(true); | ||
| } | ||
|
|
||
| return $ref->getValue($this->object); | ||
| } | ||
|
|
||
| public function setProperty($property, $value) | ||
| { | ||
| $ref = new \ReflectionProperty($this->object, $property); | ||
| if (\PHP_VERSION_ID < 80100) { | ||
| $ref->setAccessible(true); | ||
| } | ||
| $ref->setValue($this->object, $value); | ||
| } | ||
|
|
||
| public function callMethod($method, ...$args) | ||
| { | ||
| $ref = new \ReflectionMethod($this->object, $method); | ||
| if (\PHP_VERSION_ID < 80100) { | ||
| $ref->setAccessible(true); | ||
| } | ||
|
|
||
| return $ref->invokeArgs($this->object, $args); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change. Please send it as an extra PR.
Then this PR for PHP 8.5 would be hugely simplified and much more readable.