Laravel 13.14.0 has been released, bringing a significant enhancement to the JSON Schema library with the introduction of a deserializer. This new feature allows developers to reconstruct Type objects from raw JSON Schema arrays, complementing the existing serializer functionality.
Previously, the JSON Schema library in Laravel primarily supported serialization, enabling the conversion of Type objects into array representations. The addition of JsonSchema::fromArray() by @pushpak1300 now enables the reverse process. This is particularly useful when receiving a JSON Schema definition over the network or from a configuration file and needing to work with it as structured Type objects within the application. The new Deserializer mirrors the Serializer, ensuring a seamless round-trip for schema definitions.
use Illuminate\Support\Facades\JsonSchema;
$type = JsonSchema::fromArray([
'type' => 'object',
'properties' => [
'name' => ['type' => 'string', 'minLength' => 1],
'age' => ['type' => 'integer', 'minimum' => 0],
],
'required' => ['name'],
]);
// $type will be an instance of ObjectType
This functionality ensures that a schema serialized and then deserialized using these methods will result in an equivalent Type object.
Queue Job Attribute Inheritance Fix
@mattiasgeniar addressed an edge case within the queue system concerning attribute inheritance. Previously, child queue classes could not override queue attributes, such as #[Timeout(40)], defined in their parent classes. The fix establishes a clear hierarchy: attributes defined within the same class take precedence over default properties, runtime modifications remain prioritized, and crucially, properties defined in child classes now successfully override inherited queue attributes from parent classes.
Visibility into Pending Jobs
To improve the debugging and monitoring of background tasks, @jackbayliss has added a queue property to the InspectedJob class. This enhancement allows developers to easily identify the specific queue to which a pending job is assigned, supporting both the database and Redis queue drivers.
HTTP Client Caching Improvements
A bug affecting the HTTP client's caching mechanism has been resolved by @Button99. Previously, valid falsy JSON payloads such as false, 0, or null were not being cached correctly. The fix introduces a dedicated boolean flag to track the decoding status, preventing falsy decoded values from being misinterpreted as un-decoded and thus re-decoded on subsequent accesses.
Other Notable Fixes
This release also includes several other important fixes:
Message::embeddata attachment handling has been improved by @miladev95.- The treatment of null headers has been corrected by @GrahamCampbell.
- Compatibility of
Request::createFromBase()with Symfony 8.1 has been ensured by @irabbi360. - The lazy refresh hook is now registered on all connections by @tontonsb.
- The cloud logging formatter has been namespaced by @timacdonald.
- Documentation for
DebounceForhas been updated by @jackbayliss to clarify that it is measured in seconds.
Key Takeaways:
- New
JsonSchema::fromArray()enables deserialization of JSON Schema arrays intoTypeobjects. - Child queue properties now correctly override inherited attributes from parent classes.
- The
InspectedJobclass now includes aqueueproperty for better job inspection. - HTTP client caching now correctly handles falsy JSON payloads.
For more details, refer to the official changelog and the full v13.14.0 release notes.