xp-framework/rfc — Issue #92: Add support for PHP 5 in the XP framework
Author: kiesel
Created: 2011-10-17 15:53:21+00:00
State: closed
Labels: framework, implemented

Scope of Change
====
The XP framework will add support for PHP 5 from a certain release date on.
Support for PHP 4 will continue until a not yet defined point in the future
in form of security or bug fixes.

Version numbers are bumped to 5.0.0. A 5-x version number indicates that
XP is only running on PHP 5.2.0 or greater.

Rationale
====
XP framework for PHP4 has been written with PHP5's features in mind,
planning to migrate to PHP5 as soon as it was released.

To increase stability and development speed and to gain advantage of some
of the new features / APIs that PHP5 does offer, support for PHP 5 is
required.

Functionality
====

Repository layout
----

A new directory next to skeleton/ will be introduced that contains a fully
working, migrated copy of all classes of the framework. Also, another tree
of files will be added with files that cannot be automatically converted,
like the source files of the XP framework core.

The new directory layout in the repository looks like that:

```
trunk/
skeleton/
ports/
classes/
dist/
web/
util/
branches/
xp4/
skeleton/
ports/
classes/
dist/
web/
util/

```

First, files from trunk/ will be copied (branched) to branches/xp4. Second,
all classes in skeleton and ports/classes will be migrated to their PHP5
versions.

The xp4 branch will only receive security updates or bugfixes. It's status will
be changed to "bugfix only, no development". The trunk version (PHP5) will be
the officially supported XP version.

In the initial migration, all projects in ports/dist are excluded. They continue
to exist in branches/xp4 and can be migrated step by step into trunk again
once they're manually migrated and checked.

Third-party applications
----
Third-party applications - or in general - applications that base on
version 4 of the XP framework are not required to support both branches.
The co-existance of PHP4- and PHP5-versions targets a
seamless traversion from PHP4 to PHP5 for just these applications.

Application developers may decide to switch from 4 to 5 at one point.

Security considerations
====
n/a

Speed impact
====
n/a

Dependencies
====

Related documents
====