-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path to XP7 #298
Comments
Places using $ grep -Hirn xp::null src/main/|cut -d ':' -f 1|sort|uniq
src/main/php/lang.base.php
src/main/php/lang/ClassLoader.class.php
src/main/php/lang/Process.class.php
src/main/php/lang/Wildcard.class.php
src/main/php/lang/XPClass.class.php
src/main/php/unittest/TestResult.class.php
src/main/php/unittest/web/WebTestCase.class.php
src/main/php/util/CompositeProperties.class.php
src/main/php/util/Filters.class.php
src/main/php/util/cmd/Console.class.php |
Places using $ grep -Hirn xp::error src/main/|cut -d ':' -f 1|sort|uniq
src/main/jay/webservices/json/json.jay
src/main/php/io/File.class.php
src/main/php/io/ZipFile.class.php
src/main/php/lang.base.php
src/main/php/lang/types/Character.class.php
src/main/php/lang/types/String.class.php
src/main/php/util/Hashmap.class.php |
_The core functionality |
_The |
On PHP 5.6The above plan states XP 6.6.0 will require PHP 5.6 as its minimum version. This was chosen instead of PHP 5.5 for the following reasons: AvailabilityPHP 5.6 was originally released in late August 2014. By the time XP 6.6.0 is released:
HHVMHHVM 3.5.0 matches PHP 5.6 - see http://3v4l.org/s50F2#vhhvm-341 FeaturesOn top of the following XP-relevant PHP features in PHP 5.5
....it also supports:
...and contains a fix for PHP bug #66608 (Incorrect behavior with nested "finally" blocks). |
_The core functionality |
_The core functionality $ xp -w '$period= ...; return cast($period->endDate(), "util.Date")'
Uncaught exception: Exception lang.ClassCastException (Cannot cast NULL to util.Date)
# ...
$ xp -w '$period= ...; return $period->endDate() ?: Date::now()'
2015-04-25 13:55:47+0200 |
Criticism on the
Maybe we should think about this a bit more before introducing it to the framework |
NamingOn renaming the wrapper types (see the reserving more types and reserving even more types RFCs, the following are now all reserved:
Since class names in PHP are case insensitive this means we'll to rename some prominent classes in the XP Framework: core
wrappers
|
Will be extracted to its own library in upcoming XP6 release. We do not want a dependency just for this... See xp-framework/rfc#298
By removing the class aliasing for lang.types.* in lang.base.php and the wrapperClasss(), unboxed(), boxed() methods from Primitive, the sequence library runs once again with PHP 7: Timm@slate ~/devel/xp/sequence [master]
$ XP_RT=7.0 unittest src/test/php/
# ...
✓: 496/496 run (0 skipped), 496 succeeded, 0 failed
Memory used: 3090.66 kB (3409.80 kB peak)
Time taken: 0.037 seconds The "Object" name has not been reserved yet, though. |
_The wrapper types in lang.types , primitive boxing and unboxing are now deprecated in 6.3.0_. The new wrapper type library is https://github.com/xp-forge/wrappers |
_The core functionality xp::nameOf() is now deprecated in 6.3.0 and will be removed in 6.6.0._ Simply use the new |
_The pre-namespace class loading is no longer supported in 6.4.0_. No more uses(), now more support for package-qualified and global namespace classes as fully qualified class names. |
XP 6.9.0 has been released |
XP 6.10.0 has been released. It contains support for RFC-303 style runners, which bring a new "TL;DR" style for usage messages: |
Switch branchesOne of the next steps will be to switch branches:
|
_Master of xp-framework/core is now at 7.0.0-dev_ |
They no longer exist in XP7 as per xp-framework/rfc#298
✅ Changed all libraries to use |
Interesting PHP 7.1 feature: The |
_Other than xp-framework/core#57, I think we're all set for XP7_ - need to decide whether this should go in or not. |
Decided to implement basic hack language support in xp-framework/core#123 (see also #308) |
Mind changes
I decided against this after finding out Debian wasn't going to provide PHP 7 until 2017. Lots of production systems inside companies are just making the step towards jessie, which gives us PHP 5.6 (/cc @kiesel @mikey179)
This has not happened. I decided to leave this in until XP8, as the
I haven't felt this is necessary after all, also moving this until a later release.
At the moment, there are still some libraries benefiting from generics, so I decided to keep them. It remains to be seen whether e.g. xp-forge/partial has the potential to replace them. Maybe something similar to Hack's type constants? |
This brings us closer to removing reflection from core See xp-framework/rfc#298 (comment)
Coming from XP 6.0, and migrating to current XP 6-master as preparation for XP 7, here's the list of removed core functionality
|
Scope of Change
This RFC describes the path towards XP 7.0
Rationale
Multiple big changes will be introduced. This document holds the roadmap; and what migrations will be necessary when.
Functionality
What needs to change
$instance->getClass()
can be replaced bytypeof($instance)
we need to introduce a shortcut for$instance->getClassName()
as core functionalitynameof()
.null
class and xp::null()uses()
completelyRoadmap
uses()
andraise()
, Libraries: Introduce new better reflection API (https://github.com/xp-forge/mirrors)think about introducing*util.Optional
(from https://github.com/xp-forge/sequence)remote
orrdbms
uses()
andraise()
, now supports namespace-only classes, deprecate usingcreate()
for anything other than generics, deprecatethis()
, long array syntax in both annotations and codedelete()
. Deprecateensure()
which is replaced byfinally
. Libraries: Unittests and logging will be extracted (see RFC #293 and RFC #301).this()
, xp::error() (the latter is not commonly used and can be replaced by exceptions). Libraries: Extract collections libraryseven
branch, refactor code to work without extracted APIs, forward compatible adjustments, cleanupensure()
.Security considerations
Speed impact
Dependencies
Related documents
The text was updated successfully, but these errors were encountered: