Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Transfer class: code improvements #1020

Merged
merged 3 commits into from
Aug 7, 2024
Merged

Conversation

blackcoder87
Copy link
Member

@blackcoder87 blackcoder87 commented Aug 6, 2024

Description

  • Code style improvements.
  • Remove curlOpt array as the stored cURL options where never used after saving them in that array. The way the options where stored wasn't useful either as a cURL option is "tied" to a specific transfer (transferUrl). This shouldn't affect the functionality as the important function call for cURL is curl_setopt().
  • Remove getVersionsList() as it was only used in newVersionFound() of the transfer class itself and just one time. A second call was unnecessary.
  • Don't set zipFile in newVersionFound(). This caused an error (under PHP 8.2) and looks like it wasn't needed.
  • Verify file right before installing.
  • BS5 vorbereitung #962

Tested the changes by using this new Transfer.php in an install of Ilch 2.1.60 to update it to Ilch 2.2.2 and updating all modules. Tested installing a module and a layout as well.

There is still more work to be done, but I am planning to commit these changes at first.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

This PR has been tested in the following browsers:

  • Chrome
  • Firefox
  • Opera
  • Edge

@blackcoder87 blackcoder87 requested a review from hhunderter August 6, 2024 17:52
@blackcoder87 blackcoder87 mentioned this pull request Aug 7, 2024
5 tasks
@blackcoder87 blackcoder87 merged commit 6d9f0a8 into master Aug 7, 2024
5 checks passed
@blackcoder87 blackcoder87 deleted the cleanup-transfer-class branch August 7, 2024 20:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant