Currently, if no database is configured, a whole lot of things don't work out correctly because there are a bunch of places that just assume a datbase is configured and available.
It should be possible to run a Flow installation completely without any database configured. Only if features that inevitably require a database, like Entities, are used, Flow should error out.
Some places that currently use the persistence layer to some extent (not necessarily failing without configured database):
Routing
forwarding to another action inside a Controller
Resources
some ViewHelpers use getIdentifierByObject() calls (though that works generally, it is pretty expensive if it is clear upfront that the object is not an entity)
Authentication with PersistedUsernamePasswordProvider (obviously)
Not sure how to best approach this best, but I could imagine doing some compile-time check if a database is configured and store that information accessibly. If not switch to a mode that avoids using persistence layer where possible and fails with a clear message where not (for example when persistenceManager->persistAll() is called - see #1037).
Currently, if no database is configured, a whole lot of things don't work out correctly because there are a bunch of places that just assume a datbase is configured and available.
It should be possible to run a Flow installation completely without any database configured. Only if features that inevitably require a database, like Entities, are used, Flow should error out.
Some places that currently use the persistence layer to some extent (not necessarily failing without configured database):
getIdentifierByObject()
calls (though that works generally, it is pretty expensive if it is clear upfront that the object is not an entity)Not sure how to best approach this best, but I could imagine doing some compile-time check if a database is configured and store that information accessibly. If not switch to a mode that avoids using persistence layer where possible and fails with a clear message where not (for example when persistenceManager->persistAll() is called - see #1037).