Download the PHP package gisostallenberg/curlfile-serializer without Composer
On this page you can find all versions of the php package gisostallenberg/curlfile-serializer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gisostallenberg/curlfile-serializer
More information about gisostallenberg/curlfile-serializer
Files in gisostallenberg/curlfile-serializer
Package curlfile-serializer
Short Description serialize and unserialize a CURLFile
License MIT
Informations about the package curlfile-serializer
CURLFileSerializer
Serialize and unserialize a CURLFile
⚠️ Avoid in new code
This package implements the
Serializableinterface, which is deprecated as of PHP 8.1 and slated for removal: it emits a deprecation notice today and will eventually stop working. Itsunserialize()also doesextract(unserialize($data))— injecting variables into local scope, and running a nestedunserialize()with noallowed_classesguard (an object-injection footgun if the blob is ever untrusted).There is no alternative package, and you cannot serialize a
CURLFiledirectly either — PHP forbids that since 7.4. The job is only round-tripping its three strings, so store those and rebuild the object. On a wrapper class, use the modern__serialize()/__unserialize()magic methods (PHP 7.4+) — no package needed:Or skip the wrapper entirely and persist the three strings yourself. Note that moving to the magic methods changes the stored format, so treat it as a breaking change for any already-persisted data.