hi,

I have been taking a look at this module during the last days and it does not seem good practice to put the path to the library into a variable. I haven't gotten it to work locally that way.

So I went ahead and implemented the libraries API into this. That way other modules can use the library too and there is no need to tinker in the code. Just upload the library to /sites/all/libraries/swiftmailer.

I have also implemented load functions and I have rewritten the swiftmailer_validate_library function to use the functionality provided in libaries API.

I have also removed the return TRUE that was there and effectively turned of the validation of the library.

This is actually the first time I am contributing code to a drupal project so go gentle on me ;)

Matt.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DragonEye created an issue. See original summary.

matthias_bauw’s picture

this is the patch file

matthias_bauw’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: libraryload-2620822-2.patch, failed testing.

matthias_bauw’s picture

test failed :) Well that's no surprise. I have removed 2 lines of code that weren't necessary but were left behind while debugging.

This one will probably fail too

matthias_bauw’s picture

Status: Needs work » Needs review

The last submitted patch, 2: libraryload-2620822-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 5: libraryload-2620822-5.patch, failed testing.

matthias_bauw’s picture

Ok I hope nobody minds me just trying some things out as this is all new to me. I changed the test file to install the libraries dependency

matthias_bauw’s picture

Status: Needs work » Needs review

The last submitted patch, 2: libraryload-2620822-2.patch, failed testing.

The last submitted patch, 5: libraryload-2620822-5.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 9: libraryload-2620822-9.patch, failed testing.

matthias_bauw’s picture

Status: Needs work » Needs review
FileSize
4.52 KB

ok another attempt, changed the order in wich modules are installed in test, maybe that is the reason why it fails.

#nevergiveup

Matt.

Status: Needs review » Needs work

The last submitted patch, 14: libraryload-2620822-14.patch, failed testing.

matthias_bauw’s picture

The last submitted patch, 14: libraryload-2620822-14.patch, failed testing.

matthias_bauw’s picture

Status: Needs work » Closed (won't fix)
matthias_bauw’s picture

Priority: Critical » Minor
sbrattla’s picture

Hi DragonEye,

Thanks for taking the time to contribute to this module. I see you've submitted a patch a few times. How are things progressing?

matthias_bauw’s picture

not very well and I have come to a conclusion that it's probably not necessary what i was doing. Well I came to the conclusion quite early but I was trying to get that test passed :)

The idea of implementing the libraries API is probably not the best since you can use composer to install the swiftmailer library. The weird thing is that I couldn't get it to work locally. No matter what I tried, it wouldn't load. So I tried to see if my drupal installation was to blame. I am trying to reinstall my drupal 8 and I'm gonna see if I can get the module to load just by using composer to download the library.

matthias_bauw’s picture

hmm... very strange. I have started a blank install on D8. I have installed swiftmailer library through composer and mail system and again I am getting the error
Fatal error: Class 'Swift_Message' not found in /wwwroot/gollum/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 176

The idea can't be to change the path in the code if you ask me. That would require me to change it every time I install a new version.