PHP5Support for PHP 5.3.12 / 5.4.2at 2012-05-04 in 5.8-SERIES, 5.9-SERIES, PHP5 by friebe With the release of PHP 5.3.12 and PHP 5.4.2, the current 5.8-SERIES's supported PHP versions now include all of PHP 5.2.10 through PHP 5.4.2. The 5.9-SERIES supports all PHP versions between PHP 5.3.0 and PHP 5.4.2. Closures and "this"at 2012-04-08 in PHP5, Language by friebeWhat does the following (plain PHP) do? class Lambda { Well, we'd say it should print Hello World. And that, indeed, is what it does when invoked with PHP 5.4. Unfortunately, with PHP 5.3, this does not work (support for $this was first removed and then re-added again after a lengthy discussion on the php-internals mailing list). To make things , in other languages and platforms, things work even more differently. This is why we've started an RFC on this topic. Its goal is to define consistent behaviour over all platforms XP language runs on. For details, see here. PHP 5.4 supportat 2012-02-26 in PHP5, Announcements by friebe Back in October 2011 we announced preliminary support for PHP 5.4. There have been quite a bit of bugs discovered (and fixed) in PHP since, partially due to the XP Framework's core test suite. You can follow up on the details in this GitHub issue.On Windows platforms, the official RC8 will fail, you have to use this binary provided as a fix for PHP bug #60879! PHP Namespaces and the XP Frameworkat 2012-01-06 in RFCs, PHP5, Examples, 5.9-SERIES by friebeWith the implementation of RFC #0222, we have added optional PHP namespaces support to the XP Framework. Optional means the XP Framework itself will neither depend on PHP 5.3 (still supporting PHP 5.2.10 upward at least for the 5.9-SERIES) nor will it change any of its classes to use them. That doesn't mean you can't use them, though Here's a quick-start guide:
As an example, if we have the following in de/thekid/tools/SQL.class.php: namespace de\thekid\tools;To run this class, use xp de.thekid.tools.SQL ... as you would with a non-namespaced class. RFC #0222: Optional support for PHP 5.3 namespacesat 2011-12-23 in 5.9-SERIES, PHP5, RFCs by friebeScope of Change Support for writing and using classes within PHP 5.3 namespaces will be added to the XP Framework's core. Because PHP namespaces are only available with PHP >= 5.3.0, support will be optional - using XP with PHP 5.2.x just will not offer the feature. Rationale Add benefit of using namespaces in classes. Namespaces allow reusing class names in a separate context, removing the need of class name prefixes and thus increasing overall code readability. Read the full RFC here TDS Protocol implementationat 2011-12-23 in PHP5, Editorial, Databases by friebeOne of the XP Framework's strategies is to keep compatibility over a large number of PHP versions on multiple platforms. For example, the message digest API contains a workaround for certain PHP versions with a broken CRC32b implementation, hiding it transparently from the user. In other places like the lang.Process class, we take care of platform differences, employing OS and feature detection, and even compensating for some implementation vagaries. Constructs like this can be found in various other places in our code base, and while this is definitely not desirable, it at least saves the user from going through this hell, and this way, we support the full range of PHP 5.2.10 through 5.3.8 (inofficially 5.2.0 - 5.5.0-dev also works) on a variety of Windows and Un*x systems. Following this strategy, we go as far as rewriting functionality previously available through a PHP extension to userland implementations: The FTP API (because of limitations in streaming support), the parse_url() function rewrite to work around behaviour changes, userland ini file parsing to support Unicode, a reimplemented MD5-crypt to compensate for a critical bug in crypt() in PHP 5.3.7 and our own MySQL protocol implementation to be able to support old MySQL 4.x instances, to name only a few cases. The TDS protocol implementation supporting connectivity with Microsoft SQL Server and Sybase database servers is the most recent addition to this stack. Though not yet completely finished, we expect to be able to add it to one of the upcoming 5.8 releases. Preliminary PHP 5.4 support addedat 2011-10-30 in PHP5, Announcements, Homepage by friebe With a couple of forward-compatible tweaks, workarounds for PHP bug #60167 and PHP bug #60169 and some test refactoring to account for magic quotes deprecation, the XP Framework now runs with the current PHP 5.4 beta release.You can read about the details here or just jump directly to the diff if you're interested in what was necessary on the code-level. Please note that we'll have to wait for the real PHP 5.4 release until we officially support it. PHP 5.3.2 supportat 2010-03-09 in 5.8-SERIES, PHP5 by friebeFollowing the PHP 5.3.2 release a couple of days ago we now officially support this new PHP version with the upcoming XP 5.7.8-RELEASE. Also tested successfully: The 5.8 development branch. XP Framework & APCat 2010-01-24 in PHP5 by friebeRecently, I got an email from Jan, who has to websites running the XP Framework and who had upgraded his PHP to 5.2.12, asking for assistance with these sites being disfunctional and the following extracts from the web server's error log: [Sun Jan 17 12:46:43 2010] [error] PHP Fatal error: Interface 'Generic' not found After some research work we found out the problem wasn't caused by the new PHP version but instead by the APC extension he had installed. We can reproduce this problem even on the command line, and it seems to be related to PECL bug #16860. The workarounds suggested in this bug that work for some only relieve these problems partially, although a simple site then works the XP core unittests show that there are still problems. The XP Framework team suggests not to use APC with the XP Framework for the time being. PHP 5.3.1 Releasedat 2009-11-20 in PHP5 by friebe The PHP team announced PHP 5.3.1 yesterday wich fixes several security related issues and crashes. Due to all the forward and backward compatibility workarounds and ajdustments the XP Framework offers, we can now extend our version compatibility for the 5.7 series from PHP 5.2.0 - 5.3.1 (including all versions inbetween). |
|