Masonite 4.x to 5.x

Masonite 5 brings new changes ... TODO

Python Version

Masonite 5 adds support for Python 3.11.

Install Masonite 5

First step of the upgrade guide is to uninstall Masonite 4 and install Masonite 5:

pip uninstall masonite
pip install masonite==5.0.0

Import Path Changes

The import path has changed for the following:

- from masonite.essentials.helpers import hashid
+ from masonite.helpers import hashid

- from masonite.essentials.middleware import HashIDMiddleware
+ from masonite.hashid.middleware import HashIDMiddleware

Config Changes

Cache

Rename memcache driver to memcached to the config/cache.py file.

Providers

Two new providers have been created, that you will need to add them in config/providers.pyfile.

Cache

Memcached driver name has been fixed. It was called Memcache as its real name is Memcached. When using this driver you will now need to access it like this:

or via the facade:

Helpers

All Masonite helpers can now be imported from helpers module to ease development experience.

A new helper to access application container app has been introduced ! More information in Helpers documentation.

Last updated