This article shows an example of framework decoupling. You'll find a more elaborate discussion in my latest book, https://leanpub.com/recipes-for-decoupling.

However, these frameworks may sometimes require you to expose your internal entities or model objects.

Maybe you don't work with Symfony, so here's the outline of the general solution: Instead of passing your actual User entity or model to the framework, pass an object that matches the API that the framework expects (e.g.

Define your own implementation for the interface of the service that normally returns the security user to the framework (e.g.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners