Hello guys,
thank you a lot for creating the integration with SendGrid. The module works well for my Pantheon hosted D7 Commerce site.
When I installed the module, I noticed that you made the "Composer Manager" module a hard dependency in your .info file. I don't see any reason why.
There are many ways to get the PHP library ("fastglass/sendgrid") loaded. For people you like the UI, there is composer manager. For CLi people like me there is the native "composer" command. You could even download that library and put it and load it anywhere you like depending on your structure.
In my current site, I have a global composer.json file in the document root that I use for all my PHP dependencies. I can then install the libraries with the normal composer command. I prefer this solution over the composer manager module as it's easier to troubleshoot and a cleaner approach in my opinion. Other PHP frameworks (Symfony, Laravel) use the same idea.
Therefore, I would highly appreciate, if you could make the "composer manager" module a recommendation on your project page instead of a hard dependency in your module's .info file. Let the developer decide how they want to place the PHP dependency into Drupal.
Cheers,
Johannes
Comment | File | Size | Author |
---|---|---|---|
#14 | remove-composer-manager-requirement-and-db-check.patch | 1.1 KB | wesjones |
#9 | remove-composer-manager-requirement.patch | 464 bytes | longlivelance |
Comments
Comment #2
Perignon CreditAttribution: Perignon commentedHello, Thanks for the feedback.
Composer Manager makes the most logical sense for the module so it will stay a dependency to assist those that are not as much of a developer.
Here is why: Drupal 7 has no support for Composer in core (nothing to run autoload.php). Therefore; composer can only be used in Drupal 7 by either a) hacking core, b) custom module, or c) Composer Manager module. Of those three, Composer Manager is the most logical choice to provide to people installing the module. Without Composer Manager, installation of this module would be difficult to document. Even with Composer Manager, it already is a difficult installation.
If you want the dependency removed, there is nothing in the module code that requires it. You can write a small patch to remove the line from the .info and use drush make.
Lastly, to date this is the only request every received about removing Composer Manager. If there are more people that request this and find this thread then we can start trying to develop some alternatives.
Comment #3
johannez CreditAttribution: johannez as a volunteer commentedHello Brady,
thank you for the the quick response and your explanation.
Too bad, that you think this way, but I understand from a maintainer perspective that it's more involved than simply removing that line from the .info file. Writing documentation for all use cases is a hassle I know too well. As I'm the only guy apparently, who has an issue with this setup, I'm totally fine creating a little patch for myself on that.
Keep up the good work!
Comment #4
kopeboy CreditAttribution: kopeboy commentedI have websites hosted on Omega8.cc (Aegir) and I couldn't install the library.
Can't I just download and place it in all/libraries and not using the composer_manager module?
Running drush @mysite en -y sendgrid_integration went a long way and finally returned errors.
This is at /admin/config/system/composer-manager:
So now I should go and try to install composer-manager on my whole host instance, which is not easy?!
Comment #5
Perignon CreditAttribution: Perignon commentedRight now, the only way to load the module is via Composer Manager. Putting the files in all/libraries will not work as the module isn't built to load those as an option.
I haven't written code for Libraries because I don't use it. I use Composer for my sites any module that uses Libraries I have a private patch to make them work with Composer. Libraries was a great idea at the time, but Composer does dependencies right. I have to maintain PCI-DSS compliance on my sites, composer helps me stay in compliance easier. drush composer-manager update --no-dev and I just updated every library on my website in one simple command.
If someone wants to contribute the code to load the libraries optionally through Libraries I will commit it.
Comment #6
kopeboy CreditAttribution: kopeboy commentedOk, I was able to fix this going into my website files/composer directory and running "composer update"
(cause I found this: https://github.com/omega8cc/boa/issues/900)
So, if you are on Omega8.cc (Aegir in general I think):
drush @yoursite.com en -y composer-manager
cd platforms/028/drupal-7.43.2-prod/yoursite.com/files/composer
composer update
does the job.
PS: thank you for your fast reply! :)
Comment #7
Perignon CreditAttribution: Perignon commentedAwesome! Thanks for giving the steps to fix for Aegir!
Comment #8
Matt B+1 on this feature request. I cannot get composer to work on the platform I am using, it seems to be a great tool for developers but a major headache if you just want to quickly implement a module. Please give us the option of just installing a library.
Comment #9
longlivelance CreditAttribution: longlivelance commentedFor anyone else who needs to use this module without the composer manager requirement, here is a little patch to remove it from the .info file.
Comment #10
pucowanje CreditAttribution: pucowanje as a volunteer commentedI am +100 for this feature and i can't believe this arrogant behavior of developers like you forcing people into composer. It might be, you love composer and there is nothing against that point but there is a good reason for people not using it. Composer is hugely flawed by design. But its made and loved by a bunch of coke heads who think thier stuff is pure gold. So they will never listen to anyone else outside Composer galaxy. If Composer would be so good as everyone says, why is it that Linux distributions had to FIX IT before shipping. Fedora, Debian and Gentoo patched Composer by them self because Composer people responded to its flaws by standard Composer attitude which you can find all over the Composer community: "CLOSED! WON'T FIX".
You kidding right? I came to this project, saw composer as dependency and only had a wish for its removal. I've did a quick search at the issue queue and found 2 other removal requests (next to this one) already existing with WON'T FIX.
Having a Drupal 7 project running with some 90 modules build in the last 3 years and just switching to Sendgrid makes me install composer because you say so.
Comment #11
Perignon CreditAttribution: Perignon commentedSeems you are passionate about this issue (venture to say hostile), as this is open source please feel free to fork the code. I push everything to Github too.
Comment #12
pucowanje CreditAttribution: pucowanje as a volunteer commentedEven if your module is nice, i will not fork the code as i have already switched back to SMTP. I don't have a problem with using a package manager if it would be implemented in a way that makes it obsolete to have additional managers (one for Drupal, one for Linux etc.) to manage to package manager. We need composer manager to manage composer because its developers acting with "closed won't fix" to request of a proper dependency management.
Comment #13
wesjones CreditAttribution: wesjones commentedHey Brady,
Thanks for the great module! We are using the composer_autoload module which conflicts with composer_manager so we are not able to install the sendgrid integration module either. Any chance we may open the idea of removing the dependency?
Comment #14
wesjones CreditAttribution: wesjones commentedHere's a patch to get past the database check if you update the module and run update.php.
Comment #15
Perignon CreditAttribution: Perignon commented@wesjones, You are not using the latest dev code. The dependency was already removed. Closing this as outdated. But I did forget to remove the update 7001 code.
Comment #16
RogerRogers CreditAttribution: RogerRogers commentedI'm trying to get this module installed. I use Composer, but admittedly I'm not expert at Composer with D7. I first tried to follow the README, installed Composer Manager and ran 'drush composer-manager update --no-dev'. It appeared to pull the dependencies (after I jacked up my PHP memory to 2GB). But I still can't enable the sendgrid_integration module due to the dependency message:
I then read through all of the issues relating to Composer. I see you've spent quite a bit of effort on this and I really appreciate that. I'm willing to use whatever approach is suggested, but for some reason I'm stumped.
It sounds like Composer is no longer a hard requirement? If so, I'm not sure how to get this working. I've moved the https://github.com/taz77/sendgrid-php-ng library listed on the sendgrid_integration main page to the Libraries folder (assume that's right?), but no go.
Any advice would be much appreciated. Thanks for making this module available to the Drupal community!
Comment #17
anselal CreditAttribution: anselal commentedI have the same problem here. Cannot enable Sendgrid Integration although I followed the installation instructions.
Any advice ?
Comment #18
markabur CreditAttribution: markabur commentedUsing 7.x-1.3, I kept getting the message below until I installed and enabled Composer Manager, even though Composer Manager is not listed as a requirement anymore.
The message kept coming up even though I had all the dependencies loaded into the sites/all/vendor folder as required by the module (I copied the folder from another project with known working SendGrid integration). As soon as I enabled Composer Manager, SendGrid was able to be enabled.