Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Client's history clear alternative#8704

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
takman1 wants to merge3 commits intosymfony:3.3fromtakman1:patch-7

Conversation

@takman1
Copy link
Contributor

Another way to clear client's history.

Another way to clear client's history.
Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

@takman1 thanks for this contribution!

We generally try to avoid explaining multiple ways of doing the same thing. The problem is that doing it makes users wonder which is the best way and which one should they use in their apps.

So, about this proposal: arerestart() andgetHistory()->clear() equivalent? Does restart() do more things?

Depending on the answers we should:

  • Remove restart() and only explain clear()
  • Reword the explanation of restart() and add clear() as something different
  • Keep restart() and not document clear()

Thanks!

@takman1
Copy link
ContributorAuthor

Hello@javiereguiluz and thanks for your reply.

I get your point on over explaining things.
The point is thatrestart() method does 2 things :

  • Clearing the history
  • Removing all cookies.

IMHO I think we should have 2 examples 1 for each case (history and cookies). The reader gets whta's under the hood.
But keepingrestart() method is also fine as it keeps things simple.

@javiereguiluz
Copy link
Member

I agree with you. We could document thisclear() method and change the existing doc forrestart(). Something like this:

// -- Before --------------------------// delete history$client->restart();// -- After ---------------------------// reinitializes the browser state (history and cookies are deleted)$client->restart();

Precise that client->restart() calls history->clear() and cookieJar->clear()
//deletehistory
//reinitializes the browser state (history and cookies are deleted)
$client->restart();
// which internally calls history->clear() and cookieJar->clear()
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this line:

which internally calls history->clear() and cookieJar->clear()

It explains an internal coding details (which makes docs hard to maintain). And we already explain above that this clears cookies and history, so maybe it's unneeded. Thanks!

Better maintainability with simpler comment.
@javiereguiluz
Copy link
Member

Thanks@takman1.

javiereguiluz added a commit that referenced this pull requestJan 2, 2018
This PR was squashed before being merged into the 3.3 branch (closes#8704).Discussion----------Client's history clear alternativeAnother way to clear client's history.Commits-------153b7f7 Client's history clear alternative
xabbuh pushed a commit that referenced this pull requestJan 2, 2018
This PR was squashed before being merged into the 3.3 branch (closes#8704).Discussion----------Client's history clear alternativeAnother way to clear client's history.Commits-------153b7f7 Client's history clear alternative
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJan 3, 2018
* 2.7:  Improved the example to generate URLs in the console  minorsymfony#8704 Client's history clear alternative (takman1)  use the ref role instead of URLs
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJan 3, 2018
* 2.8:  Fixes and simplifications  Improve routing debug page  Improved the example to generate URLs in the console  minorsymfony#8704 Client's history clear alternative (takman1)  use the ref role instead of URLs
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJan 3, 2018
* 3.3:  Fixes and simplifications  Improve routing debug page  Improved the example to generate URLs in the console  minorsymfony#8704 Client's history clear alternative (takman1)  [Serializer] Add new default normalizers  use the ref role instead of URLs
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJan 3, 2018
* 3.4:  Fixed a typo  Fixes and simplifications  Improve routing debug page  Improved the example to generate URLs in the console  Minor typo  minorsymfony#8704 Client's history clear alternative (takman1)  [Serializer] Add new default normalizers  use the ref role instead of URLs  Update timezone.rst  Update timezone.rst
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJan 3, 2018
* 4.0:  Fixed a typo  Improved the guide about upgrading apps to Flex  Recommend to use PHPUnitBridge instead of PHPUnit  Fixes and simplifications  Improve routing debug page  Improved the example to generate URLs in the console  Minor typo  minorsymfony#8704 Client's history clear alternative (takman1)  [Serializer] Add new default normalizers  use the ref role instead of URLs  Update timezone.rst  Update timezone.rst
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@takman1@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp