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 96e9fddc6a merged branch drak/sessionhandlerinterface (PR #3384)
Commits
-------

2871ea0 Update composer for HttpFoundation's PHP 5.4 forward compatibility.
ff8d740 [Locale] Update documentation for autoloader.
dd2c4aa [HttpFoundation] Documentation.
e585ca7 [HttpFoundation] Added forward compatibility for \SessionHandlerInterface
d339e74 [ClassLoader] Add ability to incrementally register fallbacks.

Discussion
----------

[HttpFoundation] PHP 5.4 forward compatibility  for \Sessionhandlerinterface

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

Utilising the same forward method as in Locale (as requested by @fabpot)

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

by stof at 2012-02-16T20:59:27Z

forward compatibility sent to the master branch, really ?

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

by stof at 2012-02-16T21:00:12Z

Ok, looking at the patch, it is not the same than places where we used the naming "forward compatibility". Sorry

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

by stof at 2012-02-16T21:01:56Z

As this fallback is mandatory to be able to use the component on 5.3, which is our target, please register the fallback in the composer.json file of the component and of the main repo so that it works out of the box when using Composer.

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

by drak at 2012-02-17T02:55:17Z

@stof as a native English speaker I find the terminology used in Symfony2 upside down. "Backward compatible" means compatible with past versions, i.e. legacy.  "Forward compatibility" logically means compatible with future versions - which in this case we are making an interface available in PHP 5.4, available in PHP 5.3.

I will try to adapt my in the context of Sf2's terminology :-)

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

by drak at 2012-02-17T02:56:43Z

Ah I see what you are saying, you mean normally things are made forward compatible from Symfony 2.0 to 2.1, and in this case we're making a native PHP interface forward compatible: so actually we are on the same page :)

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

by drak at 2012-02-17T02:59:00Z

@stof - I took a look at the `composer.json` and I also don't see and handling for the `Locale` component fallback (as written in `autoloader.php.dist`.  Is it even possible in Composer? /cc @Seldaek

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

by stof at 2012-02-17T07:03:44Z

@drak for the Locale, we don't register it through composer as we cannot do it fully: the stub functions are not autoloadable so it will always require some user work to do this. But for the HttpFoundation stub, it is possible as it is autoloadable:

```json
{
    autoload: {
        psr-0: {
            'Symfony\\Component\\HttpFoundation': '',
            '': 'Symfony/Component/HttpFoundation/Resources/stub'
        }
    }
}
```

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

by drak at 2012-02-17T08:11:56Z

Awesome @stof, thanks for the tip.

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

by drak at 2012-02-17T08:18:44Z

@stof do I also need to update the main repo's composer.json file too?

```
"autoload": {
        "psr-0": {
            "Symfony": "src/",
            "": "src/Symfony/Component/HttpFoundation/Resources/stub"
        }
    }

```

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

by Seldaek at 2012-02-17T08:54:46Z

I would use that in the autoload just to avoid file_exists calls for nothing:

```json
            "SessionHandlerInterface": "src/Symfony/Component/HttpFoundation/Resources/stub"
```

The class is part of the "prefix" too.

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

by drak at 2012-02-21T12:32:23Z

This is ready for merge @fabpot

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

by drak at 2012-02-21T16:20:43Z

@fabpot - done.
2012-02-22 10:12:06 +01:00
src/Symfony Update composer for HttpFoundation's PHP 5.4 forward compatibility. 2012-02-22 07:07:18 +05:45
tests [HttpFoundation] Added forward compatibility for \SessionHandlerInterface 2012-02-22 07:07:07 +05:45
.gitignore Added vendor directory to .gitignore 2010-06-24 10:44:28 +02:00
.travis.yml also test PHP 5.3.2, since this is the official lowest supported PHP version 2011-12-26 01:15:21 +01:00
autoload.php.dist Update composer for HttpFoundation's PHP 5.4 forward compatibility. 2012-02-22 07:07:18 +05:45
CHANGELOG-2.0.md updated CHANGELOG for 2.0.9 2012-01-06 07:48:27 +01:00
CHANGELOG-2.1.md merged branch kbond/hinclude (PR #3259) 2012-02-15 00:06:30 +01:00
check_cs [Check CS] don't replace 'else if' on twig files (closes #2961) 2011-12-27 16:10:32 +01:00
composer.json Update composer for HttpFoundation's PHP 5.4 forward compatibility. 2012-02-22 07:07:18 +05:45
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.9 2012-01-06 07:49:05 +01: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 set travis-ci icon to master 2011-11-23 11:36:09 +01:00
UPGRADE-2.1.md merged branch jmikola/patch-1 (PR #3349) 2012-02-14 23:41:40 +01:00
vendors.php Added Propel to the vendors.php script 2012-02-14 00:28:58 +01:00

README

Build Status

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.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.