Skip to content

[3.4] Fix return types declarations #33332

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 21 commits into from
Aug 26, 2019
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ef5ead0
[HttpFoundation] fix return type declarations
nicolas-grekas Aug 21, 2019
c1b7118
[Routing] Fix return type declarations
derrabus Aug 23, 2019
e0d79f7
[Security] Fix return type declarations
derrabus Aug 23, 2019
05fe553
[HttpKernel] Fix return type declarations
nicolas-grekas Aug 23, 2019
9c63be4
[Config] fix return type declarations
derrabus Aug 23, 2019
ca1fad4
[DI] fix return type declarations
derrabus Aug 23, 2019
70feaa4
[Translation] fix return type declarations
derrabus Aug 23, 2019
5072cfc
[Serializer] fix return type declarations
derrabus Aug 23, 2019
5f9aaa7
[Cache] fix return type declarations
nicolas-grekas Aug 24, 2019
28646c7
[Workflow] fix return type declarations
nicolas-grekas Aug 24, 2019
6af0c80
[Process] fix return type declarations
nicolas-grekas Aug 24, 2019
2ea98bb
[Validator] fix return type declarations
nicolas-grekas Aug 24, 2019
2b8ef1d
[DomCrawler] fix return type declarations
nicolas-grekas Aug 24, 2019
73f504c
[Templating] fix return type declarations
nicolas-grekas Aug 24, 2019
523e9b9
[Intl] fix return type declarations
nicolas-grekas Aug 24, 2019
a32a713
[Console] fix return type declarations
nicolas-grekas Aug 24, 2019
8706f18
[Form] fix return type declarations
nicolas-grekas Aug 24, 2019
5f3b4b6
[Bridge/Doctrine] fix return type declarations
nicolas-grekas Aug 24, 2019
07405e2
[PropertyInfo] fix return type declarations
nicolas-grekas Aug 25, 2019
c1d7a88
[BrowserKit] fix return type declarations
nicolas-grekas Aug 25, 2019
2ceb453
[SecurityBundle] fix return type declarations
nicolas-grekas Aug 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[BrowserKit] fix return type declarations
  • Loading branch information
nicolas-grekas committed Aug 26, 2019
commit c1d7a88b575a0acb9af569d4c85002d274f04630
4 changes: 2 additions & 2 deletions src/Symfony/Component/BrowserKit/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ public function setServerParameter($key, $value)
* Gets single server parameter for specified key.
*
* @param string $key A key of the parameter to get
* @param string $default A default value when key is undefined
* @param mixed $default A default value when key is undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want this? At first sight i dont see any test relying on it...

Copy link
Member Author

Choose a reason for hiding this comment

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

on branch 4.4 at least:

  1. Symfony\Component\BrowserKit\Tests\AbstractBrowserTest::testXmlHttpRequest
    Failed asserting that '' is false.

Copy link
Contributor

Choose a reason for hiding this comment

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

hm, i would patch 4.4 instead. It's a type violation IMHO.

Copy link
Member Author

@nicolas-grekas nicolas-grekas Aug 26, 2019

Choose a reason for hiding this comment

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

or a BC break :)
REQUEST_TIME_FLOAT isn't a string either so that forcing a string here wouldn't be good (for the return type I mean)

Copy link
Contributor

Choose a reason for hiding this comment

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

float values can be represented as string :) for now i'd rely on the fact we dont use strict types: https://3v4l.org/3lAC8

getting server parameters as strings seems really valueable IMHO.

Copy link
Member Author

Choose a reason for hiding this comment

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

float to string to float isn't always accurate, we shouldn't take the risk

Copy link
Contributor

Choose a reason for hiding this comment

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

fair enough.. maybe server params arent strings per se 😅

*
* @return string A value of the parameter
* @return mixed A value of the parameter
*/
public function getServerParameter($key, $default = '')
{
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy