Conversation
94d214b to
dcd3b93
Compare
There was a problem hiding this comment.
Pull request overview
This PR standardizes enum case naming across the framework from UPPER_SNAKE_CASE to PascalCase, and introduces backwards compatibility by exposing the previous names as deprecated public constants until Mako 13.
Changes:
- Convert enum cases (and call sites/tests) to
PascalCase. - Add deprecated public constants on enums to preserve legacy
UPPER_SNAKE_CASEaccess. - Update changelog with the deprecation note.
Reviewed changes
Copilot reviewed 65 out of 66 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/http/routing/RouterTest.php | Update status enum usage to PascalCase. |
| tests/unit/http/response/senders/stream/event/FieldTest.php | Update event stream Type enum usage to PascalCase. |
| tests/unit/http/response/senders/stream/event/EventTest.php | Update event stream Type enum usage to PascalCase. |
| tests/unit/http/response/senders/RedirectTest.php | Update Status enum usage to PascalCase. |
| tests/unit/http/response/senders/EventStreamTest.php | Update event stream Type enum usage to PascalCase. |
| tests/unit/http/response/builders/JSONTest.php | Update Status enum usage to PascalCase. |
| tests/unit/http/response/StatusTest.php | Update Status enum usage to PascalCase. |
| tests/unit/http/ResponseTest.php | Update Status enum usage to PascalCase. |
| tests/unit/gatekeeper/adapters/SessionTest.php | Update LoginStatus and Status enum usage to PascalCase. |
| tests/unit/gatekeeper/LoginStatusTest.php | Update LoginStatus enum usage to PascalCase. |
| tests/unit/file/PermissionsTest.php | Update Permission enum usage to PascalCase. |
| tests/unit/file/PermissionTest.php | Update Permission enum usage to PascalCase. |
| tests/unit/error/handlers/web/ProductionHandlerTest.php | Update Status enum usage to PascalCase. |
| tests/unit/database/query/compilers/PostgresCompilerTest.php | Update VectorDistance enum usage to PascalCase. |
| tests/unit/database/query/compilers/MySQLCompilerTest.php | Update VectorDistance enum usage to PascalCase. |
| tests/unit/database/query/compilers/MariaDBCompilerTest.php | Update VectorDistance enum usage to PascalCase. |
| tests/unit/cli/input/components/SelectTest.php | Update Key enum usage to PascalCase. |
| tests/unit/cli/input/components/ConfirmationTest.php | Update Key enum usage to PascalCase. |
| tests/unit/FunctionsTest.php | Update env Type enum usage to PascalCase. |
| src/mako/pixel/metadata/xmp/properties/Type.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/pixel/metadata/xmp/XmpReader.php | Update enum case references for XMP property typing. |
| src/mako/pixel/image/operations/traits/CalculateNewDimensionsTrait.php | Update AspectRatio enum case references to PascalCase. |
| src/mako/pixel/image/operations/imagemagick/Watermark.php | Update WatermarkPosition enum case references to PascalCase. |
| src/mako/pixel/image/operations/imagemagick/Resize.php | Update AspectRatio enum default to PascalCase. |
| src/mako/pixel/image/operations/imagemagick/Flip.php | Update flip direction enum usage to PascalCase. |
| src/mako/pixel/image/operations/gd/Watermark.php | Update WatermarkPosition enum case references to PascalCase. |
| src/mako/pixel/image/operations/gd/Resize.php | Update AspectRatio enum default to PascalCase. |
| src/mako/pixel/image/operations/gd/Flip.php | Update flip direction enum usage to PascalCase. |
| src/mako/pixel/image/operations/WatermarkPosition.php | Add deprecated legacy constants + PascalCase enum cases (and fix doc text). |
| src/mako/pixel/image/operations/Flip.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/pixel/image/operations/AspectRatio.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/http/response/senders/stream/event/Type.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/http/response/senders/Redirect.php | Update Status enum usage to PascalCase. |
| src/mako/http/response/senders/File.php | Update Status enum usage to PascalCase. |
| src/mako/http/response/Status.php | Add deprecated legacy constants + PascalCase enum cases; update message mapping. |
| src/mako/http/exceptions/UnsupportedMediaTypeException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/UnauthorizedException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/TooManyRequestsException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/ServiceUnavailableException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/RangeNotSatisfiableException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/NotFoundException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/MethodNotAllowedException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/InvalidTokenException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/GoneException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/ForbiddenException.php | Update Status enum usage to PascalCase. |
| src/mako/http/exceptions/BadRequestException.php | Update Status enum usage to PascalCase. |
| src/mako/http/Response.php | Update Status enum usage to PascalCase. |
| src/mako/gatekeeper/adapters/Session.php | Update LoginStatus/Status enum usage to PascalCase. |
| src/mako/gatekeeper/LoginStatus.php | Add deprecated legacy constants + PascalCase enum cases; update boolean helper. |
| src/mako/functions.php | Update env Type enum match arms to PascalCase. |
| src/mako/file/Permissions.php | Update Permission enum usage to PascalCase. |
| src/mako/file/Permission.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/file/FileSystem.php | Update permission mask enum usage to PascalCase. |
| src/mako/file/FileInfo.php | Update permission mask enum usage to PascalCase. |
| src/mako/error/handlers/web/Handler.php | Update Status enum usage to PascalCase. |
| src/mako/env/Type.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/database/query/values/out/VectorDistance.php | Update vector distance enum usage to PascalCase. |
| src/mako/database/query/compilers/Postgres.php | Update vector distance enum usage to PascalCase. |
| src/mako/database/query/compilers/MySQL.php | Update vector distance enum usage to PascalCase. |
| src/mako/database/query/compilers/MariaDB.php | Update vector distance enum usage to PascalCase. |
| src/mako/database/query/VectorDistance.php | Add deprecated legacy constants + PascalCase enum cases. |
| src/mako/database/query/Query.php | Update default enum parameters to PascalCase. |
| src/mako/cli/input/components/Select.php | Update Key enum comparisons to PascalCase. |
| src/mako/cli/input/components/Confirmation.php | Update Key enum comparisons to PascalCase. |
| src/mako/cli/input/Key.php | Add deprecated legacy constants + PascalCase enum cases. |
| CHANGELOG.md | Document enum-case deprecations for 12.2.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 65 out of 66 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type
Additional information
Description
This PR updates all enum cases to use PascalCase instead of "UPPER_SNAKE_CASE". It also provides backwards compatibility by offering the old cases as public constants. All the constants are marked as deprecated and will be removed in Mako 13.