mlutfy / reporterror

Sends you a detailed email when a CiviCRM fatal error occurs.
https://lab.civicrm.org/extensions/reporterror
9 stars 7 forks source link

Failed opening required /vendor/autoload.php #29

Closed magnolia61 closed 6 years ago

magnolia61 commented 6 years ago

Hi Mathieu, I ran into a full fatal error using the current master of this extension:

Error: require_once(): Failed opening required '/var/www/vhosts/xyz/webroot/sites/all/modules/civicrm_extensions/ca.bidon.reporterror/vendor/autoload.php' Thought you'd might want to know. I am using Drupal 7, not with composer.

mlutfy commented 6 years ago

Oops, right, you need to run composer install while in the root directory of the extension, but I should document that, and I'll have to make sure to include it in the release zip/tar.

nganivet commented 6 years ago

@mlutfy Not sure it's a good idea to have end-users have to run composer when installing an extension. Most end-user are not technical enough, and some don't even have ssh access on their webhost, or the option to install third-party software like composer.

mlutfy commented 6 years ago

I agree. This is the master branch, not the tar.gz / release.

nganivet commented 6 years ago

Yes, but we deploy from a git clone, and lots of people click on the 'download' link in github to get a deployable zip, which would also not have the dependencies. I would advise you get the dependencies committed in git so all is self-contained.

mlutfy commented 6 years ago

I think Github supports altering the releases to include assets/libraries. I'll see what I can do. Otherwise, it might be something that should be tied into the civicrm.org extension distribution system, as for Mosaico and others, who have the same issue.

I do not recommend committing the libraries to the repo. I've done it in the past, but I don't think it's the right thing to do (bloat & duplication).

nganivet commented 6 years ago

As another data point, please remember that the c.o distribution system is automated: if a github URL is provided for an extension, anytime a tag is pushed to that repo it will automatically create a release on civicrm.org extensions directory with the download URL for this tag. It would be a shame to break this automation. The more holistic solutions for extension dependencies would be to have core automatically fetch these on extension install - but that would mean shipping composer with core, or adding it as an explicit dependency for CiviCRM, which opens a whole other can of worms. So all in all I am more in favor of committing dependencies in the extension repo, even if this adds bloat (and provided we can manage dependencies conflicts between extensions).

mlutfy commented 6 years ago

No, c.o points to the .zip/tar on Github.

Example: https://civicrm.org/extensions/civicrm-error-handler/213

mlutfy commented 6 years ago

I published a new release, including the vendor libs here: https://github.com/mlutfy/ca.bidon.reporterror/releases/tag/3.1 (c.f. reporterror-3.1.tar.gz)