Download the PHP package outragelib/unserialize without Composer

On this page you can find all versions of the php package outragelib/unserialize. 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 unserialize

unserialize

So, PHP has a way to unserialise stuff. But, due to a certain method that was employed to fix a bug with unserialising data that might cause crashes and/or RCEs, one cannot change how an object is serialised... until now.

I'm not particularly that great with how the internals of PHP work (so I couldn't say... make this a plugin) but what I have done instead for you absolutely insane folk is to have this as a class, which one can import using composer - and unserialise between objects that have used __sleep or __wakeup in the past, along with objects that for whatever reason no longer use the Serializable interface.

The method of use is exactly the same as normal serialize, as so:

<?php

class A
{
    public $hello = "world";
}

$serialized = serialize(new A());

$object = (new \OUTRAGElib\Unserialize\Parser())->unserialize($serialized);

Of course, one would not notice any difference in this scenario, but, what if due to development reasons the class was changed to implement Serializable? Any call to unserialize would normally return false but this library is able to work around this.

In addition, in case one would like to just have a new copy of the serialized output, call the \OUTRAGElib\Unserialize\Parser::parse method - it behaves the same as the unserialize method but without actually turning string into object code.

I haven't yet got around to adding in some tests but this script will happily unserialize a very large document rather quickly, given the excessive overheads of literally tokenising something several times.

Anyhow, I'm releasing this with the MIT licence - but if you do actually find this useful (instead of what I'm planning on using this for) feel free to give me a shout, I'll be pleased with that.

(Fixes PHP bug: https://bugs.php.net/bug.php?id=76606)


All versions of unserialize with dependencies

PHP Build Version
Package Version
Requires nette/tokenizer Version ^3.0@dev
myclabs/php-enum Version ^1.6
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 outragelib/unserialize contains the following files

Loading the files please wait ....