Skip to content

Maravel 10.52#93

Open
macropay-solutions wants to merge 2 commits intomyaaghubi:devfrom
macropay-solutions:Maravel_10.52
Open

Maravel 10.52#93
macropay-solutions wants to merge 2 commits intomyaaghubi:devfrom
macropay-solutions:Maravel_10.52

Conversation

@macropay-solutions
Copy link

Upgrade Maravel from 10.51 to 10.52

@macropay-solutions
Copy link
Author

@myaaghubi Is this how minor upgrades are to be handled or should we create another separate maravel 10.52 folder?

@myaaghubi
Copy link
Owner

@macropay-solutions, it's better to have it separately specialy for major upgrades if there is a considerable performance change. In this case, it is ok.
I may remove the minor version number.
Today is the first day I could login to GitHub since internet cut out in my region.

@macropay-solutions
Copy link
Author

macropay-solutions commented Jan 29, 2026

Maravel has no planned major version update until the end of 2027.

@macropay-solutions
Copy link
Author

@myaaghubi you did not consider doing another repo that would be the optimized version of this one?

Example: Laravel, Maravel, Maravelith could be allowed to run:

php artisan config:cache
php artisan event:cache
php artisan route:cache

And Maravel and Maravelith:

php artisan autowiring:cache

@macropay-solutions
Copy link
Author

macropay-solutions commented Feb 1, 2026

Or maybe alow the creation in this one of those optimized frameworks under a custom name like laravel-12-optimized

@joanhey
Copy link
Contributor

joanhey commented Feb 1, 2026

Sorry, what is that optimized ??

@macropay-solutions
Copy link
Author

macropay-solutions commented Feb 1, 2026

cached routes, cached config, cached method autowire (reflection data), cached events and observers.

@joanhey
Copy link
Contributor

joanhey commented Feb 2, 2026

Yes, I understand you. I didn't read the message before.

But this decision depend of @myaaghubi.

An also is running the bench without OPCache, that no app will do. An more now than in PHP 8.5 come included by default.

@macropay-solutions
Copy link
Author

@joanhey you are present on another benchmark repo but that is for multiple languages. There laravel is fully optimized, with no restrictions. You said we can add Maravel and Maravelith also there but the results are so complex that the visibility is lost in comparison with this repo.

The reason we asked here is because we just released v 10.60.1 of Maravel-Framework that introduces autowiring:cache to avoid reflection at run time for service providers' boot method, controllers' methods and so on. Laravel has octane which gives them a "license to kill" in terms of boot time, or simply put, they don't care about it. But we want full php features and that is impossible if octane or worker in daemon mode is used.

@macropay-solutions
Copy link
Author

@joanhey #82 (comment) this is an example of optimized Maravel with config, route and autowiring cache. Almost double the RPS.

@macropay-solutions
Copy link
Author

macropay-solutions commented Feb 12, 2026

@joanhey @myaaghubi we included the optimizers directly into the template projects with safety net to not block if the optimize commands fail. Maravel and Maravelith are meant to be used optimized by default.

We did it by adding to composer post-autoload-dump:

Maravel 10.52.20:

    "scripts": {
        "post-autoload-dump": [
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan route:cache || echo artisan route:cache failed",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan config:cache || echo artisan config:cache failed",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan autowiring:cache || echo 'autowiring:cache failed'",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan event:cache || echo artisan event:cache failed"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },

Maravelith 10.52.10:

    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan route:cache || echo artisan route:cache failed",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan config:cache || echo artisan config:cache failed",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan autowiring:cache || echo 'autowiring:cache failed'",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan event:cache || echo artisan event:cache failed",
            "[ $COMPOSER_DEV_MODE -eq 0 ] && php artisan view:cache || echo artisan view:cache failed"
        ],
        "post-update-cmd": [
            "[ $COMPOSER_DEV_MODE -eq 1 ] && php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },

This means that if the routes contain closures, they will not be cached. Analog for config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments