The XP Framework is an all-purpose, object oriented PHP framework.

Overview

XP Framework Core

Build status on GitHub Build status on TravisCI Build status on AppVeyor BSD License Requires PHP 7.0+ Supports PHP 8.0+ Latest Stable Version

This is the XP Framework's development checkout.

Installation

If you just want to use the XP Framework, grab a release using composer require xp-framework/core. If you wish to use this development checkout, clone this repository instead.

Runners

The entry point for software written in the XP Framework is not the PHP interpreter's CLI / web server API but either a command line runner or a specialized web entry point. These runners can be installed by using the following one-liner:

$ cd ~/bin
$ curl -sSL https://baltocdn.com/xp-framework/xp-runners/distribution/downloads/i/installer/setup-8.6.2.sh | sh

Using it

To use the the XP Framework development checkout, put the following in your ~/bin/xp.ini file:

use=/path/to/xp/core

Finally, start xp -v to see it working:

$ xp -v
XP 11.4.3-dev { PHP/8.1.10 & Zend/4.1.10 } @ Windows NT SURFACE 10.0 build 22000 (Windows 10) AMD64
Copyright (c) 2001-2022 the XP group
FileSystemCL<./src/main/php>
FileSystemCL<./src/test/php>
FileSystemCL<./src/main/resources>
FileSystemCL<./src/test/resources>
FileSystemCL<.>

Basic usage

The XP Framework runs scripts or classes.

Hello World

Save the following sourcecode to a file called ageindays.script.php:

<?php namespace examples;

use util\{Date, Dates};
use util\cmd\Console;

$span= Dates::diff(new Date($argv[1]), Date::now());
Console::writeLine('Hey, you are ', $span->getDays(), ' days old');

Now run it:

$ xp ageindays.script.php 1977-12-14
Hey, you are 16015 days old

Alternatively, you can put this code inside a class and give it a static main method. This way, you can use features like inheritance, trait inclusion etcetera. This time, save the code to a file called AgeInDays.class.php.

<?php

use util\{Date, Dates};
use util\cmd\Console;

class AgeInDays {

  public static function main(array $args): int {
    $span= Dates::diff(new Date($args[0]), Date::now());
    Console::writeLine('Hey, you are ', $span->getDays(), ' days old');
    return 0;
  }
}

Note the arguments have shifted by one: If you want the class' name, simply use self::class!

$ xp AgeInDays 1977-12-14
Hey, you are 16015 days old

Contributing

To contribute, use the GitHub way - fork, hack, and submit a pull request! :octocat:

Enjoy!

Comments
  • PHP 8 compatibility

    PHP 8 compatibility

    Looks good after PHP8 was branched off a week ago.

    $ XP_RT=master xp -v
    XP 10.0.0-dev { PHP/8.0.0-dev & Zend/4.0.0-dev } @ Windows NT SLATE 10.0 build 17134...
    Copyright (c) 2001-2019 the XP group
    FileSystemCL<./src/main/php>
    FileSystemCL<./src/test/php>
    FileSystemCL<./src/main/resources>
    FileSystemCL<./src/test/resources>
    ArchiveCL<./test.xar>
    FileSystemCL<.>
    
    $ XP_RT=master xp test src/test/config/unittest/core.ini
    # ...
    
    ♥: 2198/2223 run (25 skipped), 2198 succeeded, 0 failed
    Memory used: 10967.42 kB (11992.66 kB peak)
    Time taken: 4.153 seconds
    
    php 
    opened by thekid 38
  • Restore HHVM support

    Restore HHVM support

    $ XP_RT=hhvm xp -v
    
    Fatal error: Uncaught exception 'Exception' with message 'This version of the XP Framework 
    requires PHP 7.0.0+, have PHP 5.6.99-hhvm'
    
    enhancement php help wanted 
    opened by thekid 21
  • PHP 7 support

    PHP 7 support

    [email protected]:~/devel/xp/core$ XP_RT=7.0 xp -v
    XP 6.0.0-dev { PHP 7.0.0-dev & ZE 2.8.0-dev } @ Linux precise32 3.2.0-23-generic-pae #...
    Copyright (c) 2001-2014 the XP group
    FileSystemCL<.../xp/core/src/main/php/>
    FileSystemCL<.../xp/core/src/test/php/>
    FileSystemCL<.../xp/core/src/main/resources/>
    FileSystemCL<.../xp/core/src/test/resources/>
    FileSystemCL<.../home/vagrant/devel/xp/core/>
    
    [email protected]:~/devel/xp/core$ XP_RT=7.0 unittest src/test/config/unittest/*.ini
    # ...
    OK: 5242/5449 run (207 skipped), 5242 succeeded, 0 failed
    Memory used: 29637.86 kB (40745.29 kB peak)
    Time taken: 2.864 seconds
    

    Looking good for the moment (when php/php-src#848 is applied), keeping this issue for tracking while PHP 7 evolves.

    See also #47 - HHVM support

    wontfix php 
    opened by thekid 11
  • Consistent SSL

    Consistent SSL

    Note: This is the reincarnation of https://github.com/xp-framework/xp-framework/pull/209 /cc @kiesel


    Using self-signed certificates and/or an internal CA yields problems with ext/ldap and and ext/curl:

    $ xp -w '(new \peer\ldap\LDAPConnection("ldaps://ldap.1and1.org"))->connect()'
    Uncaught exception: Exception peer.ConnectException (Cannot connect to ldaps://ldap.1and1.org:636)
      at <main>::ldap_bind() [line 101 of LDAPConnection.class.php] ldap_bind(): Unable to bind to server: Can't contact LDAP server
    

    (With LDAP debugging, we see the reason: TLS certificate verification: Error, self signed certificate in certificate chain)

    $ xp -w '(new \peer\http\HttpConnection("https://bitbucket.1and1.org"))->get()'
    Uncaught exception: Exception io.IOException (60: SSL certificate problem: self signed certificate in certificate chain)
      at peer.http.CurlHttpTransport::send(peer.http.HttpRequest{}, 60, 2) [line 123 of HttpConnection.class.php]
    

    (Here, it's obvious)

    The problem is that these don't use the Windows certificate store which contains the certificate, while ext/openssl does since PHP 5.6.0 - see the Changelog:

    Fallback to Windows CA cert store for peer verification if no openssl.cafile ini directive or "cafile" SSL context option specified in Windows.

    Source: http://php.net/ChangeLog-5.php#5.6.0 and the code

    php 
    opened by thekid 10
  • HHVM support

    HHVM support

    After xp-runners is now basically looking good, this issue gathers all tasks necessary to support HHVM.

    HHVM incompatibilities & bugs

    Various bugs in HHVM need to be addressed, workarounds found and PHP compatibility retained at the same time. Travis CI will be a great help here:)

    Hack language

    HHVM brings Hack language. It features stuff PHP will or might see at some day in the future, e.g. return types, annotations or function types; and others it will probably not, like generics, type aliases, XHP, to name a few. An overview of Hack language features can be found here

    See also #36 - PHP 7 support

    php 
    opened by thekid 10
  • Add enum_exists() as well as UnitEnum and BackedEnum interfaces

    Add enum_exists() as well as UnitEnum and BackedEnum interfaces

    Forwards compatibility with PHP 8.1 enumerations

    • [x] Declare enum_exists() function
    • [x] Declare UnitEnum and BackedEnum interfaces
    • [x] Extend XPClass::isEnum() to also recognize PHP 8.1 enums
    • [x] Extend Enum::valuesOf() and Enum::valuesOf() to return PHP 8.1 enum cases
    • [x] Test all this with a PHP 8.1 version with php/php-src#6489 applied

    See https://wiki.php.net/rfc/enumerations

    enhancement php 
    opened by thekid 9
  • xp core w/o iconv

    xp core w/o iconv

    After having installed xp runners - Mono version - when running xp -v I see:

    # ad @ thinkpad in ~/bin [19:12:02]
    $ xp -v
    Uncaught exception: Error (Call to undefined function xp\iconv())
      at <source> [line 347 of ./class-main.php]
      at <main>('xp.runtime.Version') [line 0 of class-main.php]
    

    Seems my PHP does not have libiconv:

    # ad @ thinkpad in ~/bin [19:12:05] C:255
    $ php -r 'iconv_set_encoding("utf-8");'
    PHP Fatal error:  Uncaught Error: Call to undefined function iconv_set_encoding() in Command line code:1
    Stack trace:
    #0 {main}
      thrown in Command line code on line 1
    
    # ad @ thinkpad in ~/bin [19:14:47] C:255
    $ php -r 'iconv_set_encoding();'
    PHP Fatal error:  Uncaught Error: Call to undefined function iconv_set_encoding() in Command line code:1
    Stack trace:
    #0 {main}
      thrown in Command line code on line 1
    
    # ad @ thinkpad in ~/bin [19:14:50] C:255
    $ php -m
    [PHP Modules]
    Core
    ctype
    curl
    date
    dom
    fileinfo
    filter
    hash
    json
    libxml
    mbstring
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    Phar
    posix
    readline
    Reflection
    session
    SimpleXML
    SPL
    standard
    tokenizer
    xml
    xmlreader
    xmlwriter
    zip
    zlib
    
    [Zend Modules]
    

    After tinkering with the package system a bit, I guess it is not possible to have a distro-packaged PHP w/ iconv on ArchLinux.

    question php 
    opened by kiesel 8
  • Hack language support

    Hack language support

    Adds support for Hack features to XP.

    Example

    [email protected]:/devel/xp/core$ cat Test.class.php
    <?hh
    
    use util\cmd\Console;
    
    class Test extends \lang\Object {
    
      public static function main(array<string> $args): int {
        Console::writeLine('Hello World');
        return 0;
      }
    }
    [email protected]:/devel/xp/core$ xp Test
    Hello World
    

    Feature overview

    See also #47

    enhancement php 
    opened by thekid 7
  • MockProxyBuilder does not respect namespaces

    MockProxyBuilder does not respect namespaces

    When mocking a class that uses a typehint from a namespaced class, the namespace will not correctly be propagated to the mock, resulting in PHP notices when running unittests. The following script is a simple reproducing case:

    <?php 
    
    class Example extends \lang\Object {
    
        public static function main($args) {
            create(new \unittest\mock\MockRepository())->createMock('Example');
            \util\cmd\Console::writeLine(\xp::stringOf(\xp::$errors));
        }
    
        private function acceptLong(\lang\types\Long $long) {
        }
    }
    

    Gives the following output:

    [
      dyn://MockProxy?0 => [
        1 => [
          Declaration of MockProxy?0::acceptLong() should be compatible with that of Example::acceptLong() => [
            class => null
            method => "include"
            cnt => 1
          ]
        ]
      ]
    ]
    

    The MockProxyBuilder generates this source code:

    class MockProxy?0 extends Example implements IMockProxy, IMock {
    private $_h= null;
    
    public function __construct($handler) {
      $this->_h= $handler;
    }
    public function acceptLong(Long $long) { return $this->_h->invoke($this, 'acceptLong', func_get_args()); }
    public function _replayMock() { return $this->_h->invoke($this, '_replayMock', func_get_args()); }
    public function _isMockRecording() { return $this->_h->invoke($this, '_isMockRecording', func_get_args()); }
    public function _isMockReplaying() { return $this->_h->invoke($this, '_isMockReplaying', func_get_args()); }
    public function _verifyMock() { return $this->_h->invoke($this, '_verifyMock', func_get_args()); }
     }
    
    bug php 
    opened by beorgler 7
  • XP 11 compatibility

    XP 11 compatibility

    This issue tracks all libraries compatible with XP 11

    By releasing patch level releases

    xp-framework

    • https://github.com/xp-framework/unittest/releases/tag/v11.3.2
    • https://github.com/xp-framework/networking/releases/tag/v10.2.2
    • https://github.com/xp-framework/http/releases/tag/v10.0.2
    • https://github.com/xp-framework/math/releases/tag/v9.0.1
    • https://github.com/xp-framework/rdbms/releases/tag/v13.0.2
    • https://github.com/xp-framework/ast/releases/tag/v7.7.1
    • https://github.com/xp-framework/collections/releases/tag/v10.0.2
    • https://github.com/xp-framework/tokenize/releases/tag/v9.0.3
    • https://github.com/xp-framework/io-collections/releases/tag/v10.0.2
    • https://github.com/xp-framework/reflection/releases/tag/v1.8.1
    • https://github.com/xp-framework/ftp/releases/tag/v11.0.3

    xp-forge

    • https://github.com/xp-forge/lambda/releases/tag/v3.0.1
    • https://github.com/xp-forge/uri/releases/tag/v2.1.4
    • https://github.com/xp-forge/web/releases/tag/v3.0.1
    • https://github.com/xp-forge/lambda-ws/releases/tag/v1.0.2
    • https://github.com/xp-forge/rest-api/releases/tag/v3.0.2
    • https://github.com/xp-forge/inject/releases/tag/v5.1.1
    • https://github.com/xp-forge/marshalling/releases/tag/v1.1.1
    • https://github.com/xp-forge/sessions/releases/tag/v2.1.2
    • https://github.com/xp-forge/web-auth/releases/tag/v3.0.2
    • https://github.com/xp-forge/google-authenticator/releases/tag/v5.0.1
    • https://github.com/xp-forge/hashing/releases/tag/v2.0.3
    • https://github.com/xp-forge/keepass/releases/tag/v1.0.2
    • https://github.com/xp-forge/credentials/releases/tag/v2.0.2
    • https://github.com/xp-forge/yaml/releases/tag/v6.0.2
    • https://github.com/xp-forge/frontend/releases/tag/v3.6.2
    • https://github.com/xp-forge/handlebars-templates/releases/tag/v1.0.1
    • https://github.com/xp-forge/mongodb/releases/tag/v0.7.1
    • https://github.com/xp-forge/coverage/releases/tag/v1.1.3
    • https://github.com/xp-forge/markdown/releases/tag/v6.0.1

    xp-lang

    • https://github.com/xp-lang/php-compact-methods/releases/tag/v1.1.1
    • https://github.com/xp-lang/xp-records/releases/tag/v1.2.1
    • https://github.com/xp-lang/php-is-operator/releases/tag/v1.1.1

    As part of a major release

    xp-framework

    • https://github.com/xp-framework/zip/releases/tag/v10.0.0
    • https://github.com/xp-framework/logging/releases/tag/v11.0.0
    • https://github.com/xp-framework/compiler/releases/tag/v7.0.0
    • https://github.com/xp-framework/xml/releases/tag/v11.0.0
    • https://github.com/xp-framework/command/releases/tag/v11.0.0
    • https://github.com/xp-framework/csv/releases/tag/v10.0.0

    xp-forge

    • https://github.com/xp-forge/json/releases/tag/v5.0.0
    • https://github.com/xp-forge/mustache/releases/tag/v8.0.0
    • https://github.com/xp-forge/handlebars/releases/tag/v7.0.0
    • https://github.com/xp-forge/rest-client/releases/tag/v3.0.0
    • https://github.com/xp-forge/sequence/releases/tag/v10.0.0
    opened by thekid 6
  • PHP 8 attributes

    PHP 8 attributes

    See https://wiki.php.net/rfc/attributes_v2 - another step forward to full PHP 8 support (see #211). Non-scalar values (which are not supported by PHP) can be written in an inline comment form.

    use unittest\{Test, Values, Assert};
    
    class DemoTest {
    
      <<Test>>
      public function can_create() {
        new Demo();
      }
    
      <<Test>>
      <<Values(
        #[
        #  Demo::$DEFAULT,
        #  new Demo('Live'),
        #]
      )>>
      public function valid($demo) {
        Assert::true($demo->valid());
      }
    }
    
    $t= XPClass::forName(DemoTest::class);
    
    $c= $t->getMethod('can_create');
    $c->getAnnotations();              // ["unittest\Test" => null]
    $c->hasAnnotation(Test::class);    // true
    
    $c= $t->getMethod('valid');
    $c->getAnnotation(Values::class);  // [Demo<"default">, Demo<"live">]
    

    For BC reasons, lowercased annotations are not resolved

    <<author('Timm')>>
    class Test { }
    
    XPClass::forName(Test::class)->getAnnotations(); // ["author" => "Timm"]
    
    enhancement php 
    opened by thekid 6
  • Call toString() even if objects do not implement lang.Value

    Call toString() even if objects do not implement lang.Value

    Idea based on #312, however, I disagree that this is an information disclosure problem. Secret values should use the util.Secret class, see https://github.com/xp-framework/core/issues/312#issuecomment-1215324522

    question 
    opened by thekid 1
  • Add support for compact API documentation

    Add support for compact API documentation

    This pull request makes it possible to generate one-line apidoc comments for XP Compiler.

    Example

    Input using array component types, which PHP doesn't syntactically support:

    function main(array<string> $args): int { ... }
    

    XP Compiler emits this type as array, erasing the component type. However, we still want IDEs and reflective access to pick up the more precise type, so apidoc is emitted. To ensure line number stay intact, we need to emit the comment as a single line on the same line as the function declaration:

    /** @param string[] */ function main(array $args): int { ... }
    
    opened by thekid 0
  • PHP 8.2 compatibility

    PHP 8.2 compatibility

    See https://github.com/xp-framework/core/runs/4460967410?check_suite_focus=true

    • [x] "Creation of dynamic property xp\xar::$context is deprecated" in ::fopen() (class-main.php, line 103, occured once)
    • [x] Creation of dynamic property xp\xar::$context is deprecated" in ::file_exists() (ArchiveClassLoader.class.php, line 137, occured once)
    • [x] Creation of dynamic property xp\xar::$context is deprecated" in ::include() (AbstractClassLoader.class.php, line 80, occured once)
    • [x] Creation of dynamic property xp\xar::$context is deprecated" in ::file_exists() (File.class.php, line 161, occured once)
    • [x] Creation of dynamic property xp\xar::$context is deprecated" in ::fopen() (File.class.php, line 146, occured once)
    • [x] Use of "self" in callables is deprecated" in ::array_map() (ClassLoader.class.php, line 351, occured once)
    • [x] Use of "self" in callables is deprecated" in ::array_map() (ClassLoader.class.php, line 350, occured once)
    • [x] Creation of dynamic property xp\runtime\Script::$context is deprecated" in ::include() (Code.class.php, line 154, occured once)
    • [x] Creation of dynamic property util\Date::$value is deprecated" in util\Date::__sleep() (Date.class.php, line 67, occured once)
    • [x] Creation of dynamic property lang\reflect\Module::$name is deprecated" in lang\reflect\Module::__construct() (Module.class.php, line 21, occured once)
    • [x] Creation of dynamic property lang\reflect\Module::$classLoader is deprecated" in lang\reflect\Module::__construct() (Module.class.php, line 22, occured once)
    • [x] Creation of dynamic property util\UUID::$value is deprecated" in util\UUID::__sleep() (UUID.class.php, line 308, occured once)
    • [x] Creation of dynamic property util\CompositeProperties::$sections is deprecated" in util\CompositeProperties::add() (CompositeProperties.class.php, line 47, occured once)
    php 
    opened by thekid 9
Releases(v11.4.2)
  • v11.4.2(Sep 3, 2022)

    Bugfixes

    • Merged PR #316: Make Type::named() consistent with reflection for nullable union types, see https://wiki.php.net/rfc/union_types_v2#nullable_union_types (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v11.4.1(Aug 28, 2022)

  • v11.4.0(Aug 17, 2022)

    Features

    • Merged PR #314: Delay expansion of values in property files until values are read. This fixes potential information disclosure problems in string representations of util.Property instances, see #312. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v11.3.1(Aug 15, 2022)

  • v11.3.0(Jul 23, 2022)

  • v11.2.0(Jun 12, 2022)

    Bugfixes

    • Merged PR #309: Use AES-128-CBC instead of DES (in util.Secret); the latter is considered legacy (@thekid)
    • Fixed compatibility with PHP 8.2 for invalid timezones. PHP now reverts to UTC and displays a startup warning if the timezone name is unknown. (@thekid)

    Features

    • Added PHP 8.2 true, false and null types, mapping them to bool and void, respectively. See https://wiki.php.net/rfc/true-type and https://wiki.php.net/rfc/null-false-standalone-types (@thekid)
    • Replaced strcmp() with the <=> operator in the util.Bytes and io.Path classes, removing function call overhead (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v11.1.2(Jan 22, 2022)

  • v11.1.1(Dec 24, 2021)

  • v10.15.1(Dec 24, 2021)

    Bugfixes

    • Backported PR #306 from XP 11: Correctly support qualified annotation names and trailing commas in grouped annotations (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v11.1.0(Dec 8, 2021)

    Features

    • Improved script loading performance by deferring requiring modules until class loading time. See xp-runners/reference#85 (@thekid)
    • Added preliminary PHP 8.2 support by fixing various issues throughout the code base. Compatibility is tracked in issue #304 (@thekid)
    • Cast given argument to string in io.streams.MemoryInputStream. Passing null will no longer yield warnings in PHP 8.1 (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v11.0.0(Oct 21, 2021)

    This major release cleans up deprecated and unused features, and takes the next step of phasing out XP annotation syntax in favor of PHP 8's attributes.

    Heads up!

    • Merged PR #299: Remove xp::errorAt(). If necessary, access the static xp::$errors map directly (@thekid)
    • Merged PR #298: Remove Runtime::halt() and SystemExit - functionality was never used in any library (@thekid)
    • Merged PR #274: Compact maps with a single key/value pair into one line (@thekid)
    • Merged PR #297: Remove generic application and service exceptions, these classes we unused. (@thekid)
    • Merged PR #296: Remove lang.Runtime::loadLibrary() - the PHP function dl() has been regarded more or less deprecated and has been removed from various SAPIs in the past, see https://www.php.net/dl (@thekid)
    • Merged PR #295: Remove lang.Thread and lang.IllegalThreadStateException, these were Un*x only, wrapping ext/pcntl library functions (@thekid)
    • Merged PR #294: Remove resource provider and import facility - @thekid
    • Merged PR #293: Remove deprecated timezone methods - @thekid
    • Removed deprecated io.streams.MemoryInputStream::getBytes() method (@thekid)
    • Merged PR #292: Remove deprecated reader and writer methods from io.streams (@thekid)
    • Removed deprecated lang.Primitive::$DOUBLE (replaced by FLOAT) (@thekid)
    • Merged PR #291: Remove io.FileUtil - replaced by the io.Files class (@thekid)
    • Merged PR #290: Remove util.PropertyManager - replaced by libraries such as xp-forge/inject (@thekid)
    • Merged PR #289: Remove util.DateUtil and util.DateMath - replaced by the util.Dates class (@thekid)
    • Merged PR #288: Remove util.Calendar class - superseded by the timezone aware API by util.TimeZoneTransition (@thekid)
    • Merged PR #287: Remove util.Component and util.Visitor - these classes were unused (@thekid)
    • Merged PR #286: Remove util.Configurable and util.ConfigurationException, unused except for the anti-pattern class rdbms.ConnectionManager. (@thekid)
    • Renamed master branch to main - @thekid

    RFCs

    • Implemented 2nd part of xp-framework/rfc#335: Drop annotation key/value pair syntax, see PR #237. Use PHP 8 named arguments instead! (@thekid)
    • Implemented 2nd part of xp-framework/rfc#336: Deprecating XP annotation syntax. This will raise E_USER_DEPRECATED warnings, see PR #284 (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.15.0(Oct 21, 2021)

  • v10.14.0(Sep 26, 2021)

    Features

    • Merged PR #282: Allow overwriting descriptors passed to proc_open() in lang.Process constructor and newInstance(). This can be used for redirection or passing through standard I/O. (@thekid)
    • Merged PR #281: Add lang.CommandLine::resolve(). This method resolves given commands against the system path and returns all found executables, much like Windows' where or POSIX' which -a commands. It supersedes lang.Process::resolve(), which becomes deprecated. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.13.1(Sep 15, 2021)

    Bugfixes

    • Fixed lang.Environment::variables() to return the complete environment even if the php.ini setting variables_order does not include S. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.13.0(Sep 11, 2021)

    Features

    • Merged PR #278: Add support for PHP 8.1 readonly properties - @thekid

    RFCs

    • Implemented xp-framework/rfc#340: Virtual properties reflection. See PR #275 for implementation details. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.12.4(Aug 22, 2021)

  • v10.12.3(Aug 21, 2021)

    Bugfixes

    • Fixed error date.timezone not configured properly when running on AWS. Their default value for the TZ environment variable is :UTC, which PHP fails to recognize as a valid timezone (while UTC works). (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.12.2(Aug 21, 2021)

    10.12.2 / 2021-08-21

    Bugfixes

    • Fixed class parser when encountering double-quoted strings containing variables in the complex (curly) syntay, e.g. "runtime-{$name}", see https://www.php.net/manual/en/language.types.string.php (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.12.1(Aug 5, 2021)

    Bugfixes

    • Prevent resolving types returned by the PHP reflection API by calling the * context function - they already come resolved. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.12.0(Aug 4, 2021)

    Features

    • Merged PR #277: Add support for PHP 8.1 intersection types - @thekid

    Bugfixes

    • Fixed parsing use statements with multiple imports separated by commas, e.g. use ArrayObject, Traversable;. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.11.1(Jul 25, 2021)

    Bugfixes

    • Fixed lang.XPClass::getDeclaredFields() throwing an exception - @thekid
    • Fixed issue #276: PHP 8.1: offset* / getIterator signature. Made codebase compatible with PHP 8.1 (while keeping PHP 7 support!) by adding the #[ReturnTypeWillChange] in relevant places. (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.11.0(Jun 4, 2021)

    Features

    • Merged PR #273: Fall back to wmic command line tool if com_dotnet extension is not loaded (@thekid)
    • Merged PR #272: Add Environment::platform() and Environment::path() (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.10.0(Apr 25, 2021)

    Features

    • Merged PR #271: Pass NULL to Properties::expanding() to ignore expansion (@thekid)
    • Merged PR #267: Support PHP 8.1 never type in reflection - @thekid
    Source code(tar.gz)
    Source code(zip)
  • v10.9.1(Apr 24, 2021)

    Bugfixes

    • Make XP work when iconv extension is not available but mbstring is, offering a degraded and not 100% compatible experience, see #270 (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.9.0(Mar 20, 2021)

    Features

    • Generated util.MimeType from the media type database over at https://github.com/jshttp/mime-db, which in turn consists of lists compiled from IANA registrations, Apache and Nginx. See issue #264 (@thekid)

    Bugfixes

    • Fixed issue #265: Environment::variables() empty on certain environments by replacing $_ENV by $_SERVER, see PR #266 (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.8.1(Mar 14, 2021)

  • v10.8.0(Mar 10, 2021)

    Features

    • Merged PR #261, adding forward compatibility with PHP 8.1 enumerations. Adds enum_exists() as well as UnitEnum and BackedEnum interfaces, see https://wiki.php.net/rfc/enumerations (@thekid)

    Bugfixes

    • Fixed issue #262: xar command - compile error - @thekid
    Source code(tar.gz)
    Source code(zip)
  • v10.7.0(Mar 6, 2021)

    Features

    • Merged PR #259: Support reflective access to non-constant expressions for parameter defaults (@thekid)

    Bugfixes

    • Fixed issue #260: Failed tests on Ubuntu 20.04 - @thekid
    Source code(tar.gz)
    Source code(zip)
  • v10.6.1(Mar 6, 2021)

    Bugfixes

    • Fixed issue #258: PHP 8.1 passing null to scalar arguments deprecated See https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg (@thekid)
    Source code(tar.gz)
    Source code(zip)
  • v10.6.0(Jan 18, 2021)

    Features

    • Merged PR #253: Add support for nullable types (via lang.Nullable) (@thekid)
    • Merged PR #256: Make it possible to pass a default resolver (*) to Type::resolve() (@thekid)
    Source code(tar.gz)
    Source code(zip)
Owner
XP-Framework
XP-Framework
Object-Oriented API for PHP streams

Streamer Streamer is an Object-Oriented API for PHP streams. Why should I use Streams? A stream is a flow of bytes from one container to the other. Yo

Francois Zaninotto 268 Jun 10, 2022
PHP FFmpeg - An Object Oriented library to convert video/audio files with FFmpeg / AVConv

PHP FFmpeg An Object Oriented library to convert video/audio files with FFmpeg / AVConv. Check another amazing repo: PHP FFMpeg extras, you will find

Alchemy 8 May 4, 2021
A simple Object Oriented wrapper for Linear API, written with PHP.

PHP Linear API A simple Object Oriented wrapper for Linear API, written with PHP. NOTE You should take a look Linear GraphQL API Schema for all nodes

Mustafa KÜÇÜK 6 Sep 2, 2022
An object oriented wrapper around PHP's built-in server.

Statix Server Requirements PHP 8 minumum Installation composer require statix/server Basic Usage To get started, ensure the vendor autoload script is

Statix PHP 107 Sep 8, 2022
PHP Unoconv - An Object Oriented library which allow easy to use file conversion with Unoconv.

An Object Oriented library which allow easy to use file conversion with Unoconv. Install The recommended way to install PHP-Unoconv is thr

Alchemy 68 Jun 14, 2022
Strings Package provide a fluent, object-oriented interface for working with multibyte string

Strings Package provide a fluent, object-oriented interface for working with multibyte string, allowing you to chain multiple string operations together using a more readable syntax compared to traditional PHP strings functions.

Glowy PHP 14 Mar 12, 2022
Provides an object-oriented API to query in-memory collections in a SQL-style.

POQ - PHP Object Query Install composer require alexandre-daubois/poq 1.0.0-beta2 That's it, ready to go! ?? Usage Here is the set of data we're going

Alexandre Daubois 15 Aug 22, 2022
A horrendous PM plugin to manually load all the chunks in your world without logging on. Only for the sole purpose of aiding in PM4 -> DF world conversion.

ChunkLoader A horrendous PM plugin to manually load all the chunks in your world without logging on. Only for the sole purpose of aiding in PM4 -> DF

null 2 Aug 10, 2022
An article about alternative solution for convert object into a JSON Object for your api.

Do we really need a serializer for our JSON API? The last years I did build a lot of JSON APIs but personally was never happy about the magic of using

Alexander Schranz 1 Feb 1, 2022
Your alter ego object. Takes the best of object and array worlds.

Supporting Opensource formapro\values is an MIT-licensed open source project with its ongoing development made possible entirely by the support of com

FormaPro 31 Jun 25, 2021
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Fresns 33 Sep 2, 2022
A multi-purpose web-shell that simplifies running shell commands on webserver

This webshell can be used for multi-purposed especially most if you want to manage your web server but you are in an emergency , so why not use a webshell:)

urchinsec 4 Feb 5, 2022
Purpose of plugin

Overview Purpose of plugin The magento/composer-root-update-plugin Composer plugin resolves changes that need to be made to the root project composer.

Magento 51 Sep 9, 2022
A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products. Comes with a SDK and command-line tool. Works anywhere that PHP runs.

CubicleSoft 28 Sep 14, 2022
:globe_with_meridians: List of all countries with names and ISO 3166-1 codes in all languages and data formats.

symfony upgrade fixer • twig gettext extractor • wisdom • centipede • permissions handler • extraload • gravatar • locurro • country list • transliter

Saša Stamenković 5k Sep 28, 2022
A simple but extensible economy engine for PocketMine-MP, using label-oriented APIs.

Capital A simple but very extensible economy plugin for PocketMine-MP. How is Capital different from other economy plugins? Capital introduces a label

Jonathan Chan Kwan Yin 33 Aug 13, 2022
Allows generate class files parse from json and map json to php object, including multi-level and complex objects;

nixihz/php-object Allows generate class files parse from json and map json to php object, including multi-level and complex objects; Installation You

zhixin 2 Sep 9, 2022
PHP library that helps to map any input into a strongly-typed value object structure.

Valinor • PHP object mapper with strong type support Valinor is a PHP library that helps to map any input into a strongly-typed value object structure

Team CuyZ 664 Sep 20, 2022
FUGIO: Automatic Exploit Generation for PHP Object Injection Vulnerabilities

FUGIO FUGIO is the first automatic exploit generation (AEG) tool for PHP object injection (POI) vulnerabilities. When exploiting a POI vulnerability,

KAIST Web Security and Privacy Lab 38 Sep 25, 2022