Skip to content
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

test: remove redundant url variable #922

Merged

Conversation

jordyvanderhaegen
Copy link
Collaborator

No description provided.

@jordyvanderhaegen jordyvanderhaegen merged commit af5b239 into mcamara:master Dec 2, 2024
12 checks passed
@jordyvanderhaegen jordyvanderhaegen deleted the test/remove-helper-url branch December 2, 2024 20:36
@iwasherefirst2
Copy link
Collaborator

Great, thank you!

jordyvanderhaegen added a commit that referenced this pull request Dec 18, 2024
* Preserve "locale" cookie value on redirect to localized URL

* Fix test

* test: remove redundant url variable (#922)

* test: remove redundant url variable

* test: refactor static property to a constant

* Draft first SetLanguage Middleware.

LocaleMapping has been extracted to its own middleware.

* Save readme to README_LEGACY.md

* Slowly update Readme to 3.x

* Remove outdated caching readme

* Fix currentLocale call

* Remove custom cache

* Set current locale in middleware

* Define macro route

* use Constructor property promotion

* Remove setLocale, no longer used.
Provide function to set locale for middleware.

* use constructor property promotion

* Remove set locale. Should be set via middleware.

* Allow to set locale via middleware.

* Update usage section

* Remove cache commands

* Ignore IDE files

* Ignore IDE files

* fix: macro being registered multiple times

* tests: update route registration to use new localized macro

* Ensure default routes are always present

Initially, I thought default routes might not be required, but after reviewing the current package behavior, I confirmed they are always needed. This is because `LaravelLocalization::setLocale()` simply returns the first URL segment if it matches a supported locale.

* chore: remove redundant exception class

* Restrict {locale} parameter to configuration values.

* Add tests for LocaleSetMiddleware

* Restrict {locale} parameter to configuration values.

* Fix tests

* Remove unintended gitignore file

* chore: cleanup old route caching leftovers

* Rename middleware

* Mark todo for skip question

* Add default locale

* Rename test to match testcase

* Rename SetLocale Test class

* Use supported locales from LaravelLocalization

* Avoid code duplications

* Restore getCurrentLocaleRegional

* Avoid code duplication

* Change visibility of constructor properties

* chore: improve version references

* fix: call to undefined method

---------

Co-authored-by: Oleksandr Kovpashko <o.kovpashko@gmail.com>
Co-authored-by: Adam Nielsen <info@drnielsen.de>
Co-authored-by: jordyvanderhaegen <jordy.vanderhaegen@gmail.com>
Co-authored-by: jordyvanderhaegen <jordy@esign.eu>
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