trending
Marius Pantea

1d ago

Maravel-Framework 10.71.7 increases more the RPS

With this version, Maravel Template 10.52.52 is with 118% faster than Lumen 10, with 2% faster than in the previous benchmark. Maravelith is 50% faster than Laravel 10 on api route, with 2% faster than in previous benchmark.

IMG_20260505_170352_752

IMG_20260505_164655_483
Marius Pantea

1d ago

Dispatch to Queue After Commit In Maravel and Lumen

While migrating a Lumen project to Maravel, I was under the impression that Lumen does not support dispatch to queue after commit. I was wrong. It did support it but, I was convinced by the community info that Lumen does not support it. Also I found a bug in Maravel-Framework that I patched in version 10.71.4 with this occasion.

Note

The Maravel documentation has been updated.

Marius Pantea

19d ago

Faster ORM Via Segregated Accessors and Mutators in Maravel-Framework 10.71

Inspired by the relations segregation from version 10.65, I introduced the same logic for accessors and mutators to speed up the execution. As you might know, version 10.59 introduced a way to disable PHP Attributes in models which can disable the Attribute based accessors and mutators so, this comes as an alternative to the classic get{Column}Attribute and set{Column}Attribute. More details can be found in the docs.

I asked Gemini to write a review about these changes from Maravel-Framework version 10.71.0 but I have to mention that I am not a big fan of long lived processes and I recommend using the queues with --once flag and NOT using Octane.

Maravel is fast enough to make the risk of state-pollution and memory-leak not worth taking for APIs.

Marius Pantea

22d ago

Maravel-Framework 10.70: Eradicating PHP Object Injection from Background Queue

Maravel-Framework 10.70 brings Storable Array Callables to queues (and queued events) available both in the Maravel micro-framework and Maravelith.

This is a safer alternative to serializing objects when dispatching a message to the queue because PHP Object Injection is totally avoided on unserializing the payload. PHP Object Injection allows attackers to weaponize magic methods for Remote Code Execution (RCE). While this was prevented, leaking your APP_KEY removes that prevention. By avoiding serialized objects, this vulnerability is neutralized, while also optimizing Redis and SQS payload sizes.

The feature is fully backward compatible but it can also enforce the prevention via a public constant in the \App\Application class:

namespace App; class Application extends \Laravel\Lumen\Application
{ public const FORBID_SERIALIZED_OBJECTS_IN_QUEUE = true;
}
Marius Pantea

25d ago

Maravel-Framework 10.70: Callable Arrays in Queues

Version 10.70 will introduce the ability to dispatch standard PHP callable arrays directly to the queue (e.g., [Service::class, 'method']).

Advantages:

  • Avoids unserialize(): Completely bypasses the need to serialize and unserialize closures or full object instances. This eliminates serialization bugs, reduces execution overhead, and removes the security risks natively associated with PHP's unserialize().

  • Reduced Payload Size: Only the class string and method name are stored in the queue backend (Redis, database, etc.), drastically cutting down payload size compared to serialized objects or large closures.

  • Fresh Container Resolution: The queue worker instantiates the class directly through the Dependency Injection container at the exact moment of execution. This guarantees the job runs with the latest application code and avoids stale state issues caused by saving an object's state at the time of dispatch.

  • No Boilerplate: Allows you to execute background logic directly from existing service classes, removing the need to create and maintain dedicated Job classes for simple operations.

    Discover more https://github.com/macropay-solu...

Marius Pantea

1mo ago

Maravel-Framework 10.69.2 Straightness Its Validation Logic

Version 10.69.2 patches some corner cases in validation like rules that throw exception from different reasons.

The docs have been updated.

Subject: [PATCH] Document POC https://github.com/laravel/frame... cr + add return for fix https://github.com/laravel/frame... n validation.md
---
Index: validation.md
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/validation.md b/validation.md
--- a/validation.md (revision 5132a50e5a568771414403dcb7c990cc8d582287)
+++ b/validation.md (revision ffc447842142e098ac1931d685aabe0287890428)
@@ -148,6 +148,13 @@ In this example, if the `unique` rule on the `title` attribute fails, the `max` rule will not be checked. Rules will be validated in the order they are assigned. +> [!NOTE]
+> Automatic Termination for Primitive Rules
+
+> In Maravel-Framework, certain primitive type rules act as implicit "bail" rules. If any of the following rules fail for an attribute, validation for that attribute will stop immediately to prevent unnecessary processing or potential type errors in subsequent rules:
+`uploaded`, `Numeric`, `Array`, `Boolean`, `String`, `Integer`, and `Decimal`.
+> Additionally, if a rule throws an exception, that rule will act as `Bail` and no other rules will run.
+ <a name="a-note-on-nested-attributes"></a> #### A Note on Nested Attributes @@ -2385,3 +2392,10 @@ > An "implicit" rule only _implies_ that the attribute is required. Whether it actually invalidates a missing or empty attribute is up to you. > > Maravel-Framework validates the present field even if empty or null!
+
+
+> [!NOTE]
+> Implicit Behavior of Type Rules
+
+> While not strictly "Implicit", `Numeric`, `Array`, `Boolean`, `String`, `Integer`, and `Decimal` rules are treated with the same priority as implicit rules regarding the validation lifecycle. Once one of these core type expectations fails, the validator considers the attribute's state "unusable" and halts further validation for that specific field. That is why you should always precede rules that need a certain type with one of the above rules.
+> Furthermore, any rule that throws a Throwable will trigger an automatic Bail, isolating the failure to prevent system-wide crashes.
\ No newline at end of file

I chose this general patch vs changing each of the rules and duplicating is_string check for example.

Marius Pantea

1mo ago

Maravel-Framework 10.69: RPS Lead Over Lumen Surpasses 116% Following Merged Cache Update

Maravel PHP Ecosystem

The previous benchmark showed Maravel leading by 107% more RPS than Lumen 10. After I merged all cached files into one file in version 10.69 of Maravel-Framework, the percent increased to more than 116%.

Marius Pantea

5mo ago

Maravel-Framework boot speed improvements

Version 10.55.0 lost ~10.8 k rows of dev environment code that was moved to a separate package. https://marius-ciclistu.medium.c...

Version 10.56.0 brings faster boot time for apps that have many listeners for events and/or observers by improving the way they are registered, including caching the observers when events are cached. https://marius-ciclistu.medium.c...

Marius Pantea

2mo ago

Maravel vs. PHP Frameworks Benchmarks: Breathing Down the Neck of the Microframework Elite

RPS & Memory peak

These are the results for a Hello World benchmark thanks to https://github.com/myaaghubi/PHP... on an old desktop system:

PHP 8.3

Marius Pantea

2mo ago

Maravel Micro-Framework 10.32.35 With Built-in CruFd Freemium MaravelQL is Out

Version 10.52.35 of Maravel Micro-Framework is out with built-in cruFd (Create, Read, Update, Filter and Delete).

Forget about implementing filters for each of your resource. MaravelQL handles that for you.

It requires the latest Maravel-Framework 10.65 and the laravel-crud-wizard-free lib suite composed of:

  • laravel-crud-wizard-free

  • laravel-crud-wizard-decorator-free

  • laravel-crud-wizard-generator

123
Next
Last