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

Prevent direct access and triggered deprecation warning for "word" me… #302

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

pimjansen
Copy link

@pimjansen pimjansen commented Apr 5, 2021

What is the reason for this PR?

Deprecation warnings are thrown from core methods while direct accessing properties which is not allowed anymore since 1.14

Author's checklist

Summary of changes

The internal methods now call the function instead of accessing the properties directly.

Review checklist

  • All checks have passed
  • Changes are approved by maintainer

@tanthammar
Copy link

I think the safeEmailDomain also needs (), I got a lot of warnings about that to. Couldn't figure where it came from.

Copy link
Member

@bram-pkg bram-pkg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!


$submit = $element->ownerDocument->createElement(static::INPUT_TAG);
$submit->setAttribute('type', 'submit');
$submit->setAttribute('value', $this->generator->word);
$submit->setAttribute('value', $this->generator->word());

$submit = $element->ownerDocument->createElement(static::FORM_TAG);
$submit->setAttribute('action', $this->generator->safeEmailDomain);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add method call here too, on safeEmailDomain?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah will review the core methods quickly to see what else we hit

@bram-pkg bram-pkg self-assigned this Apr 15, 2021
@bram-pkg bram-pkg added bug Something isn't working enhancement New feature or request labels Apr 15, 2021
@bram-pkg bram-pkg merged commit 83d2932 into FakerPHP:main Apr 15, 2021
@pimjansen pimjansen deleted the feature/deprecation-notice-word branch April 15, 2021 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

randomHtml error
3 participants