This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component/HttpFoundation
Fabien Potencier 2ccee10c51 merged branch stealth35/mime_guesser (PR #1874)
Commits
-------

ea0db2d [HttpFoundation] Remove useless ContentTypeMimeTypeGuesser

Discussion
----------

[2.1] [HttpFoundation] Remove useless ContentTypeMimeTypeGuesser

`mime_content_type` exists just for the compat between the old PHP 5.2
`mime_magic` extension and `file_info` extension

---------------------------------------------------------------------------

by fabpot at 2011/08/19 05:31:25 -0700

I will merge it in 2.1 as some people might rely on it.

---------------------------------------------------------------------------

by stealth35 at 2011/08/19 05:46:02 -0700

ok in the meantime, we can invert the guesser checker :

```php
/**
 * Registers all natively provided mime type guessers
 */
private function __construct()
{
    if (FileBinaryMimeTypeGuesser::isSupported()) {
        $this->register(new FileBinaryMimeTypeGuesser());
    }

    if (FileinfoMimeTypeGuesser::isSupported()) {
        $this->register(new FileinfoMimeTypeGuesser());
    }

    if (ContentTypeMimeTypeGuesser::isSupported()) {
        $this->register(new ContentTypeMimeTypeGuesser());
    }
}
```

---------------------------------------------------------------------------

by stloyd at 2011/08/19 05:48:38 -0700

@stealth35 You should make new PR for change you mentioned above.

---------------------------------------------------------------------------

by stealth35 at 2011/08/19 05:53:12 -0700

@stloyd done PR #1989

EDIT : forget this
2011-08-26 17:49:56 +02:00
..
File [HttpFoundation] Remove useless ContentTypeMimeTypeGuesser 2011-07-31 14:07:00 +02:00
SessionStorage Increase code coverage for: YamlParser, Validators, PhpEngine + Helpers, HttpFoundation 2011-06-16 11:43:27 +02:00
ApacheRequestTest.php [HttpFoundation] fixed ApacheRequest, added tests 2011-03-16 06:13:01 -07:00
CookieTest.php fixed CS 2011-06-08 19:56:59 +02:00
FileBagTest.php [HttpFoundation] changed \LogicException to \InvalidArgumentException 2011-08-26 08:45:12 +02:00
HeaderBagTest.php replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
ParameterBagTest.php fixed CS 2011-06-08 19:56:59 +02:00
RequestMatcherTest.php fixes several bugs 2011-07-19 16:21:58 +02:00
RequestTest.php merged branch schmittjoh/requestMethodOverrideFix (PR #1980) 2011-08-19 14:13:57 +02:00
ResponseHeaderBagTest.php Added the possibility to set cookies with the same name for different domains and paths for Symfony\Component\HttpFoundation\ResponseHeaderBag 2011-07-11 23:03:26 +02:00
ResponseTest.php [HttpFoundation] fixed a unit tests 2011-08-14 10:56:48 +02:00
ServerBagTest.php [HttpFoundation] made PHP_AUTH_PW optional 2011-07-26 09:32:45 +02:00
SessionTest.php updated some missing references 2011-07-15 18:03:17 +02:00