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
bin/console script must be update to work with composer install #10957
Comments
Adding link to Slack conversation about this: https://mautic.slack.com/archives/C01E8F6T2HM/p1646176681513219 - thanks for making the bug report @kimtiago :) @nickveenhof @mollux have your team managed to address this issue? It's been reported by a few people now in the community, seemingly a bug in the scaffold setup? cc @jonathandhn |
A QUICK FIXI've found some kind of a fix :
and then docroot/app/autoload.php is edited this way :
You will get a functional console. TROUBLE SHOOTING
|
Yep, we just need to figure out the most elegant way to get this working for everyone using Composer (and to improve our documentation in this area). I wasn't sure if you meant how to edit the file on GitHub or just generally? Here is how to make the PR on the recommended-project repo: https://watch.screencastify.com/v/WNfVUWrs1QMBdRAXdN7O I did a bit of digging in the scaffold and it looks like the actual path for the autoload file is getting determined here: https://github.com/mautic/core-composer-scaffold/blob/833fdb5be95db1767b48d2dc572dac4d0691dbcf/GenerateAutoloadReferenceFile.php#L87 so perhaps this is where we need to tweak? To make a PR there it's exactly the same process as I outlined in the video above, just with the different repository. Hope this might give a few leads at least! I am no expert in this though, so defer to the wisdom of @nickveenhof who put together the original implementation based on the Drupal implementation of Composer. As a side note, I also added some missing detail in this PR to the docs: mautic/mautic-documentation#303 which relates to enabling composer / marketplace in case you have a moment to review it and add an approval so we can get it merged (use Files Changed > Review Changes). |
I'm also having problems with this, effectively the Should this be moved on to the https://github.com/mautic/core-composer-scaffold project? |
Hi, it does not seams to be a scaffold problem (the project works), but a composer recommanded project, that may be solved by both upgrading the composer recommanded project et mautic core files. Still evaluating, seams good to stay here on the base core project.
…________________________________
From: Daniel Harper ***@***.***>
Sent: Wednesday, March 16, 2022 8:28:14 PM
To: mautic/mautic ***@***.***>
Cc: Jonathan Dahan ***@***.***>; Mention ***@***.***>
Subject: Re: [mautic/mautic] bin/console script must be update to work with composer install (Issue #10957)
I'm also having problems with this, effectively the composer create-project mautic/recommended-project:^4 doesn't work as it's not possible to run cron jobs or a scripted install after that point without manually modifying the above files. After modifying they just get overwritten each time you run composer update etc.
Should this be moved on to the https://github.com/mautic/core-composer-scaffold project?
—
Reply to this email directly, view it on GitHub<#10957 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANKTYYUDYLZFZTAIV46GGADVAIY45ANCNFSM5QTT5UYQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi, I've got some news : Disclaimer : You could try on your own, this is not an approved fix
This will both apply the patch on each composer update run, and makes the console usable... Because it's always returning the console chmod to 664 that is not runnable. Now @RCheesley I don't know what to do to distribute the patch to mautic users (or if the patch is the right way to go). If the patch is the way to go, we may bundle it in mautic core file, and then update the recommended project 4 to distribute and install it with composer. ( I don't know if it's futur proof as I can't figure out if it may/can mess up the day the mautic core will upgrade the console file ). EDITED WITH A SECOND PATCH FOR AUTOLOAD |
Hi @jonathandhn - please take a look at our docs on how to create a pull request for Mautic - that is how we distribute things to Mautic users. https://contribute.mautic.org/contributing-to-mautic/developer/code/pull-requests If you need a hand, please ask in #t-product and we'll be able to help! |
Thanks, the true question is that currently no patch are applied, nor provided by mautic, so I need an advice on where to host the patches in the mautic code base for composer to download theme easily and then I could propose a PR to the https://github.com/mautic/recommended-project to distribute the new composer settings. |
This issue has been mentioned on Mautic Community Forums. There might be relevant details there: https://forum.mautic.org/t/console-not-working-after-converting-to-composer-on-4-2/23430/2 |
i apply patch, but when i try run
|
@zaharovrd I think your issue is this issue : #9928 Pierre |
This issue has been mentioned on Mautic Community Forums. There might be relevant details there: https://forum.mautic.org/t/cant-install-mautic-via-composer/23781/1 |
Patches applied + running |
Hi folks, we actually have a PR to fix this: #11039 Please test with the latest version (4.2.2) and report back on the PR so we can merge it. |
Hi @RCheesley , I did a fresh composer install of Mautic v.4.2.2 and the install process was correct. The Mautic application installed, running well. |
Really nice, I'm currently on vacation.
I will PR the need patch next week, except if someone told me something else to do.
It seams my patch change two files ( bin/console & autoloader.php ) while only bin/console still need a patch. I will check and PR as needed.
(PR the full patch inside mautic core code, then PR the mautic4 recommanded project to load the patch already provided by others means).
I will be there on Friday next week for the Friday run.
…________________________________
From: Holbi ***@***.***>
Sent: Thursday, April 28, 2022 2:58:45 PM
To: mautic/mautic ***@***.***>
Cc: Jonathan Dahan ***@***.***>; Mention ***@***.***>
Subject: Re: [mautic/mautic] bin/console script must be update to work with composer install (Issue #10957)
Hi @RCheesley<https://github.com/RCheesley> , I did a fresh composer install of Mautic v.4.2.2 and the install process was correct. The Mautic application installed, running well.
The bin/console was broken without applying @jonathandhn<https://github.com/jonathandhn> 's patch mentioned above.
Applying the patch the cron jobs with bin/console are running without errors.
—
Reply to this email directly, view it on GitHub<#10957 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANKTYYSK47QLSYA3IPJBZHTVHKDQLANCNFSM5QTT5UYQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Mautic Version
4.2.x series
PHP version
7.4
What browsers are you seeing the problem on?
Not relevant
What happened?
I updated my mautic to version 4.2, and everything was ok, but i read about install mautic with composer to work well with marketplace, so i did.
mautic is working, but when trying to use console commands we receive the error in log output
i think its because the folder structure with composer was change
for information, the 'app' folder out of 'docroot' is empty, and i don't know if this folder must have some files
How can we reproduce this issue?
Step 1: Install mautic with composer
Step 2: run any command with console
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: