-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APP_ENV=dev is nor working - tag 5.0.4 #82
Comments
A composer installation isn't really for development on local. Please use https://www.mautic.org/blog/developer/local-mautic-development-with-ddev instead. |
@escopecz , I really hope you’re joking about that 😅 I can't think of any other system or framework that suggests not using Composer for local development. It's 2024, not 2004. If we can't use Composer locally, it means something has gone seriously wrong. Ddev is no excuse for that. |
Another thing is that we should re-open the issue and see what the community has to say about it... it's not very inclusive for open projects to shut down discussion so early 🤔 ? |
Well, in recent years developers should be using Docker Compose (or DDEV for PHP projects) to develop in and of course Git is still a thing. And yes, you'll need Composer to install dependencies either way. However, there are no dev dependencies in this composer.json as it's meant for production. The dev dependencies are here: https://github.com/mautic/mautic/blob/5.x/composer.json#L27-L48 So you can either follow Mautic's normal development process which is very simple and powerful to use or you can figure out how to use this repository for development. I can see you have a team here so I can't wait what you folks come up with! The issue is open, please disucss. |
@escopecz
Then I hit the wall with the errors throwing when generating the cache, which is why this issue exists. I would really appreciate help here. |
I understand there are issues when you want to develop on a composer project that is meant for production. I still don't understand why anyone would want to do that when the rest of the community is developing on top of https://github.com/mautic/mautic repository and there is an amazing development environment prepared as well (DDEV). Even Acquia recently went from their custom dev docker environment to DDEV. So please, help us understand the why behind your issue. |
DDEV and Composer versions have different structures. For example, if I need to patch with the proper composer patch I need to have the composer and be as close to the production as possible. Also, I am using a company wrapper with all of the tools that we use for stage and production deployment. On top of this, we have a multi-tenant implementation added that will need different setup and deployment processes when using DDEV. We work like this on every project and have issues only with Mautic. |
Ok, let's leave this issue open for others with the same needs to come up with the solution for your workflow. I'd look at how the other projects do this and improve this repo or create a new one for |
I have tried to run Mautic (
mautic/recommended-project
) in Symfony dev mode with debug toolbar and without caching but it is not working.At first, I found out that I was missing the whole
require-dev
section incomposer.json
so I copied it frommautic/mautic
projects composer (same tag) - linkAfter installing the required packages I was struggling with
IpRestrictMiddleware
which restricts theAPP_ENV=dev
to only local IPs but it checks simply usingin_array
so when using docker I cannot provide the exact IP (it changes) and I cannot use mask or wildcard or anything like this withMAUTIC_CUSTOM_DEV_HOSTS
env.Fortunately, there is
DDEV_TLD
env that is allowing me to skip this but can it respect0.0.0.0
and addresses with*
like10.10.10.*
?Then there was a problem loading assets in
APP_ENV=dev
fromnode_modules
as this folder is above the document root (docroot
).I have "fixed" this by mounting
node_modules
insidedocroot
in docker but this is a hack. Something likeNow the
APP_ENV=dev
sort of works but often throws an error similar to the one below.With
APP_ENV=dev
working like this I am forced to useAPP_ENV=prod
and basicallyrm
the cache folder whenever I write something and want to check the site.The text was updated successfully, but these errors were encountered: