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.
Go to file
Fabien Potencier ef9439dc72 merged branch gimler/master (PR #1894)
Commits
-------

86f888f fix https default port check

Discussion
----------

fix https default port check

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

by Abhoryo at 2011/08/03 03:26:15 -0700

I think it's better to delete $httpsPort variable from the prototype and use only $httpPort variable.

public function urlRedirectAction($path, $permanent = false, $scheme = null, $httpPort = 80)
...
        $port = '';
        if (('http' === $scheme && 80 != $httpPort)  || ('https' === $scheme && 443 != $httpPort)) {
            $port = ':'.$httpPort;
        }

But if this method is already used with the $httpsPort variable elsewhere, your change is ok with me.

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

by gimler at 2011/08/03 04:52:08 -0700

You can use different ports for http and https so when you call the function $scheme = null than it use the $request->getScheme() so you must add both ports so i think it is not a good idea to merge the http and https vars.

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

by gimler at 2011/08/03 04:53:17 -0700

damn sorry i have accidentally close the pull request ;(

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

by stof at 2011/08/03 05:13:24 -0700

I agree with @gimler. Merging them as a single parameter does not make sense here

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

by Abhoryo at 2011/08/03 05:33:12 -0700

I've juste think it's weird to set a useless parameter ($httpPort) when you want to use the last parameter ($httpsPort).
And I don't think someone want http protocole on 433 or https on 80 ?

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

by stof at 2011/08/03 05:35:16 -0700

@Abhoryo what if you are using this controller in a general way, without knowing by advance if the handled request is a secure one ? You need both parameters.
If you need to change the https port by keeping the default http port, you indeed need to pass it but blame PHP: it does not support named parameters.

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

by Abhoryo at 2011/08/03 06:02:18 -0700

Ok, right.
2011-08-13 10:54:56 +02:00
src/Symfony merged branch gimler/master (PR #1894) 2011-08-13 10:54:56 +02:00
tests [DomCrawler] fix finding charset in addContent 2011-08-10 13:41:07 +04:00
.gitignore Added vendor directory to .gitignore 2010-06-24 10:44:28 +02:00
autoload.php.dist fixed autoloader when tests are run on a machine without intl installed 2011-07-20 14:27:10 +02:00
check_cs fixed root search path to include only './src' and './tests' 2011-06-08 18:11:05 +02:00
CONTRIBUTORS.md fixed name 2011-07-27 23:12:39 +02:00
LICENSE added the LICENSE file for the YAML component 2011-02-18 11:52:11 +01:00
phpunit.xml.dist [Security] cleaned up opt-in to benchmark test 2011-03-06 20:06:13 +01:00
README.md updated the README file 2011-05-24 17:27:37 +02:00
UPDATE.ja.md updated translation of UPDATE file (Japanese RC5 added) 2011-07-30 02:08:25 +09:00
UPDATE.md updated UPDATE file 2011-07-22 17:45:02 +02:00
vendors.php updated Twig dep 2011-07-17 16:00:18 +02:00

README

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.2 and up.

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.