Skip to content

Implemented Laravel 13 --langswitch compatibility. - #191

Merged
askdkc merged 1 commit into
mainfrom
fix-langswitcher
Aug 1, 2026
Merged

Implemented Laravel 13 --langswitch compatibility.#191
askdkc merged 1 commit into
mainfrom
fix-langswitcher

Conversation

@askdkc

@askdkc askdkc commented Aug 1, 2026

Copy link
Copy Markdown
Owner
  • Regex now accepts optional : void.
  • Generated callback consistently includes : void.
  • Test fixture updated to Laravel 13’s signature.
  • Full suite passes: 12 tests, 93 assertions.
  • PHPStan and Pint pass.

- Regex now accepts optional : void.
- Generated callback consistently includes : void.
- Test fixture updated to Laravel 13’s signature.
- Full suite passes: 12 tests, 93 assertions.
- PHPStan and Pint pass.
@what-the-diff

what-the-diff Bot commented Aug 1, 2026

Copy link
Copy Markdown

PR Summary

  • Updated Function Declaration in InstallLanguageSwitcher.php
    The declared function within the middleware now explicitly states it does not return any output by including a void return type. This change increases code readability and predictability, making it clearer to developers what they should expect when using this function.

  • Adjusted Regular Expression in InstallLanguageSwitcher.php
    We've made a modification in the regular expression used within this file that now accurately recognizes optional return type declaration. This aspect allows for greater flexibility when declaring a function by not making it compulsory for a function to specify a return type.

  • Reflected Function Syntax Changes in app.php.stub
    To ensure consistency across our codebase, we adapted the app.php.stub file to reflect the new syntax for middleware function with the void return type. This way, developers creating new applications using this stub will automatically benefit from the updated, more explicit, syntax.

@askdkc
askdkc merged commit 32850bb into main Aug 1, 2026
14 checks passed
@askdkc
askdkc deleted the fix-langswitcher branch August 1, 2026 13:23
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.

1 participant