-
Notifications
You must be signed in to change notification settings - Fork 86
Modernize codebase with PHP 8.1+ features #166
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
aarondfrancis
wants to merge
13
commits into
main
Choose a base branch
from
refactor
base: main
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 4 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b590927
Modernize codebase with PHP 8.1+ features
aarondfrancis 50df4ef
Convert Runtime and Architecture to PHP 8.1 backed enums
aarondfrancis 2370029
Add tests for Runtime and Architecture enums
aarondfrancis 6e8f2e4
Fix LambdaClientTest expectations for architecture values
aarondfrancis fa80caa
Remove unused properties and import from DetermineRegion
aarondfrancis a0506ec
Fix potential null return in getEnvironment() under strict types
aarondfrancis e29df01
Docs
aarondfrancis 8910434
Merge main into refactor, resolve Runtime.php conflict
aarondfrancis 01a0b4b
Drop Laravel 8 and 9 support
aarondfrancis e770cd5
Fix PHP 8.1 compatibility for deprecated constants classes
aarondfrancis b984e20
Bump minimum testbench version to fix prefer-lowest CI
aarondfrancis 423a323
Update CI testbench constraints to match composer.json minimums
aarondfrancis 7d8f848
Bump testbench to ^9.5 for Laravel 11 to fix early version bugs
aarondfrancis 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Hammerstone\Sidecar; | ||
|
|
||
| abstract class Architecture | ||
| enum Architecture: string | ||
| { | ||
| public const X86_64 = 'x86_64'; | ||
|
|
||
| public const ARM_64 = 'arm64'; | ||
| case X86_64 = 'x86_64'; | ||
| case ARM_64 = 'arm64'; | ||
| } |
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,17 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Hammerstone\Sidecar; | ||
|
|
||
| /** | ||
| * @deprecated Use the Architecture enum instead. This class will be removed in a future version. | ||
| */ | ||
| abstract class ArchitectureConstants | ||
| { | ||
| /** @deprecated Use Architecture::X86_64 instead */ | ||
| public const X86_64 = Architecture::X86_64->value; | ||
|
|
||
| /** @deprecated Use Architecture::ARM_64 instead */ | ||
| public const ARM_64 = Architecture::ARM_64->value; | ||
| } |
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Hammerstone\Sidecar\Clients; | ||
|
|
||
| use Aws\S3\S3Client as BaseClient; | ||
|
|
||
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @author Aaron Francis <aaron@hammerstone.dev> | ||
| */ | ||
|
|
||
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @author Aaron Francis <aaron@hammerstone.dev> | ||
| */ | ||
|
|
||
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @author Aaron Francis <aaron@hammerstone.dev> | ||
| */ | ||
|
|
||
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.
🛠️ Refactor suggestion | 🟠 Major
Remove unused properties
$clientand$isVapor.Neither property is used anywhere in this class:
$clientis declared but never assigned or accessed$isVaporis initialized tofalsebut never readThese appear to be remnants from a prior implementation or copy-paste from another action class.
class DetermineRegion extends BaseAction { - protected S3Client $client; - - protected bool $isVapor = false; - public function invoke(): stringAlso remove the unused import:
Actually,
Fileis used on line 42. Only remove theS3Clientimport:-use Aws\S3\S3Client; use Illuminate\Support\Facades\File;📝 Committable suggestion
🤖 Prompt for AI Agents