Skip to content

Conversation

@cebe
Copy link
Contributor

@cebe cebe commented Jun 18, 2018

currently the order in which available languages are defined influences the way URL patterns are matched,
if I specify en before en-GB the matching will always find en in the URL but never en-GB. Changing the pattern to match
longer patterns first fixes this.

cebe added 6 commits June 18, 2018 13:34
currently the order in which available languages are defined influences the way URL patterns are matched, if I specify `en` before `en-GB` the matching will always find `en` in the URL but never `en-GB`. Changing the pattern to match longer patterns first fixes this.
@cebe
Copy link
Contributor Author

cebe commented Jun 18, 2018

fixed the travis build by adding output_buffering=On option. Otherwise tests that include session handling were broken.

@mikehaertl
Copy link
Collaborator

@cebe Thanks, I'll have a look.

Regarding sessions in tests: Weird, we already used sessions before. Did the default phpunit version change again in travis?

@mikehaertl
Copy link
Collaborator

@cebe Could you also fix the README? There's a note about language order here:

https://github.com/codemix/yii2-localeurls#language-configuration

this is not necessary anymore.
@cebe
Copy link
Contributor Author

cebe commented Jun 18, 2018

@cebe Could you also fix the README? There's a note about language order here:

done.

Regarding sessions in tests: Weird, we already used sessions before. Did the default phpunit version change again in travis?

I think this is because Yii Request component now complains if you want to set headers but headers have already been sent. Without output buffering enabled this will cause errors in console environment like in unit tests.

@mikehaertl mikehaertl merged commit f681040 into codemix:master Jun 18, 2018
@mikehaertl
Copy link
Collaborator

@cebe Thanks! Just released 1.7.1 containing this fix.

@cebe
Copy link
Contributor Author

cebe commented Jun 18, 2018

Great, thanks for the fast reply!

@cebe cebe deleted the patch-1 branch June 18, 2018 12:14
cebe added a commit to cebe/phd5-app that referenced this pull request Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants