Skip to content

[Form] Do not fix URL protocol for relative URLs #42253

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

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

bogkonstantin
Copy link
Contributor

@bogkonstantin bogkonstantin commented Jul 25, 2021

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Tickets Fix #42329
Deprecations? no
License MIT

Example when it doesn't work correctly:
/relative/path
The data will be changed to "http:///relative/path" (3 slashes)

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot carsonbot added the Bug label Jul 25, 2021
@OskarStark
Copy link
Contributor

Can you please add a test case?

Is this bug present in 4.4? If yes, please target 4.4 branch, thank you

@bogkonstantin bogkonstantin changed the base branch from 5.4 to 4.4 July 25, 2021 10:43
@bogkonstantin bogkonstantin changed the base branch from 4.4 to 5.4 July 25, 2021 10:43
@wouterj wouterj removed their request for review July 25, 2021 10:55
@bogkonstantin bogkonstantin changed the base branch from 5.4 to 4.4 July 25, 2021 10:58
@OskarStark OskarStark added this to the 4.4 milestone Jul 25, 2021
@bogkonstantin
Copy link
Contributor Author

@OskarStark sure, done.

@carsonbot carsonbot changed the title Do not fix URL protocol for relative URLs [Form] Do not fix URL protocol for relative URLs Jul 25, 2021
@bogkonstantin
Copy link
Contributor Author

AppVeyor build is failed with:

Symfony\Component\VarDumper\Tests\Server\ConnectionTest::testDump
Symfony\Component\Process\Exception\ProcessTimedOutException: The process "c:\php\php.exe" exceeded the timeout of 9 seconds.

Seems like the Form is not the reason. Can you try to rerun it, guys?

@OskarStark
Copy link
Contributor

You can ignore the AppVeyor build in this case, thanks

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(I rebased and fixed the remaining)

/**
* @dataProvider provideUrlToFix
*/
public function testFixUrl($data)
Copy link
Member

Choose a reason for hiding this comment

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

I suggest avoiding to swap the test and its provider, to avoid merge conflicts between branches

Copy link
Member

Choose a reason for hiding this comment

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

I'm going to deal with the conflicts :)

@nicolas-grekas
Copy link
Member

Thank you @bogkonstantin.

@nicolas-grekas nicolas-grekas merged commit c569ef1 into symfony:4.4 Jan 31, 2022
This was referenced Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants