Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Provider\Internet::domainWord() should produce lowercase results #711

Closed
vlakoff opened this issue Sep 29, 2015 · 6 comments
Closed

Provider\Internet::domainWord() should produce lowercase results #711

vlakoff opened this issue Sep 29, 2015 · 6 comments

Comments

@vlakoff
Copy link
Contributor

vlakoff commented Sep 29, 2015

Using $faker->domainName(), I noticed the results were capitalized. companyEmail() is also affected, as it uses domainName().

It is because the underlying domainWord() uses Provider\Person::lastName() (with localization and transliteration), but keeping the initial capital.

I think the expected behaviour is undoubtedly to have lowercase results.

@vlakoff
Copy link
Contributor Author

vlakoff commented Sep 29, 2015

This happens only when intl extension missing. See code of Provider\Internet::transliterate(), and its latest changes.

@fzaninotto
Copy link
Owner

Capital letters are valid in domain names and emails - even if ignored by browsers and mail clients. I wonder what's best for Faker: generate expected output, or unexpected output? I think the latter...

@vlakoff
Copy link
Contributor Author

vlakoff commented Sep 29, 2015

I think the contrary, as it is very uncommon to encounter capital letters. Also just to make clear, they are not simply ignored by clients, the spec is case-insensitivity.

If you want to cover more cases, you might consider:

  • hyphens, which are allowed unless leading/trailing
  • IDN

@fzaninotto
Copy link
Owner

Fixed by #725

@ravage84
Copy link
Contributor

I just tripped over this. Good to see that it is already fixed.

@fzaninotto is there any chance we see a new release (bug fix/patch or minor, I don't care) which contains this fix any time soon?

The last release, v1.5.0, was released quite some time ago and people could make use the those 192 commits integrated since. I'd be happy to help, if I can.

@fzaninotto
Copy link
Owner

@ravage84 not in 2015. If you want to help, well there is a lot to do:

  • review pending PRs
  • generate changelog
  • write a blog post about the new stuff
  • ????
  • profit!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants