Download the PHP package thijsrijpert/php-development-kit without Composer

On this page you can find all versions of the php package thijsrijpert/php-development-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-development-kit

php-development-kit

The PHP Development Kit is a project to port the core interfaces and classes of OpenJDK to PHP.

Project is a Work in Progress and should not be used in production for now.

Standards

The PHP Developement Kit conforms to the following standards:

Usage

All classes that interact with this library should extend TObject or implement IObject

All enums that interact with this library should implement IObject and use the EnumTrait, which makes it compatible with IObject

Object Example (TBoolean, Shortend)

class TBoolean extends TObject implements Serializable, Comparable
{

    /**
     * Create a new boolean wrapper object
     * @param bool $value the value being wrapped
     */
    public function __construct(private readonly bool $value) { }

    /**
     * Returns the value of this Boolean object as a boolean
     * primitive.
     *
     * @return  bool the primitive boolean value of this object.
     */
    public function booleanValue(): bool {
        return $this->value;
    }

    /**
     * Returns a Boolean instance representing the specified
     * boolean value.  If the specified boolean value
     * is true, this method returns Boolean.TRUE;
     * if it is false, this method returns Boolean.FALSE.
     * If a new Boolean instance is not required, this method
     * should generally be used in preference to the constructor
     * {@link #Boolean(boolean)}, as this method is likely to yield
     * significantly better space and time performance.
     *
     * @param  bool|string $b a boolean value.
     * @return TBoolean a Boolean instance representing b.
     * @since  1.4
     */
    public static function valueOf(bool|string $b): TBoolean {
        if (GType::of($b)->isString()) {
            $b = self::parseBoolean($b);
        }
        return $b ? new TBoolean(true) : new TBoolean(false);
    }

    /**
    * Convert the internal value to a string representation
    * @return string the string representation of the internal value
    */
    public function toString(): string {
        return $b ? "true" : "false";
    }

    /**
     * Returns a hash code for this Boolean object.
     *
     * @return int the integer 1231 if this object represents
     * true; returns the integer 1237 if this
     * object represents false.
     */
    public function hashCode(): int {
        return $value ? 1231 : 1237;
    }

    /**
     * Returns true if and only if the argument is not
     * null and is a Boolean object that
     * represents the same boolean value as this object.
     *
     * @param   ?IObject $obj   the object to compare with.
     * @return  bool true if the Boolean objects represent the
     *          same value; false otherwise.
     */
    public function equals(?IObject $obj = null): bool {
        if ($obj === null) {
            return false;
        }
        if ($obj instanceof TBoolean) {
            return $this->value == ($obj->booleanValue());
        }
        return false;
    }
}

Enum Example (GType, Shortend)

enum GType implements IEnum
{

    use EnumTrait;

    case BOOLEAN;
    case INTEGER;
    case FLOAT;
    case STRING;
    case ARRAY;
    case OBJECT;
    case RESOURCE;
    case RESOURCE_CLOSED;
    case NULL;
    case UNKNOWN;

    /*
    * Instance Methods
    */

    /*
    * Class methods
    */
}

Testing

All code should be unit tested before release, the goal is to have 100% test coverage.

Testing is enforced by the pipeline.

Tests should be written assuming execution on a 64-bit machine.

License

This repository uses GPLv2 with class path exception, for more information see:

I am not affiliated with Oracle or OpenJDK in any way.


All versions of php-development-kit with dependencies

PHP Build Version
Package Version
Requires symfony/string Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thijsrijpert/php-development-kit contains the following files

Loading the files please wait ....