-
Notifications
You must be signed in to change notification settings - Fork 314
Composer migrate deps #585
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
Composer migrate deps #585
Conversation
|
@labmecanicatec Thanks for the PR. Can you resolve the CI issues? Let me know if you need any assistance. Thanks! |
|
Hi @JohnVillalovos , I would appreciate any help you can give me, the truth is I am new to collaborating with repositories. |
composer.json
Outdated
| "phpmailer/phpmailer": "^6.10", | ||
| "claviska/simpleimage": "^4.2" | ||
| "claviska/simpleimage": "^4.2", | ||
| "mashape/unirest-php": "3.0.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be: "mashape/unirest-php": "^3.0"
Or would it break something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to resolve the composer validate --strict error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't break anything. But how do I fix the commit messages?
|
@labmecanicatec To fix the commit messages look at: https://github.com/LibreBooking/app/blob/develop/CONTRIBUTING.md#commit-message-guidelines So for example on the first commit. Could change the current commit message title from: "add MobileDetect via Composer" to "fix: add MobileDetect via Composer" The commit message: "refactor: use Composer version of MobileDetect library" is good 👍 And "delete unused Mobile_Detect.php (replaced by Composer version)" could be "refactor: delete unused Mobile_Detect.php" The "(replaced by Composer version)" would probably be best in the commit body. And do the same thing for the rest. If you want I could take a stab at updating all the commit messages. I could do it later on today. Just let me know. I'm happy to do it. |
It has been replaced by the Composer version.
Replaced by bacon/bacon-qr-code library via Composer
Replaced by mibe/feedwriter library via Composer
Replaces icalreader
Replaced by sabre/vobject library via Composer
It replaces 'is_email'
Replaced by egulias/email-validator library via Composer
Replaced by Composer version
Native PHP random functions are used instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates various manually included libraries to Composer-managed dependencies and updates application code to use new namespaces and APIs.
- Removed legacy
lib/externallibrary copies and added Composer packages for HTTP (Unirest), image processing, QR codes, feeds, iCal parsing, email validation, mailing, and randomness. - Updated
require_onceloading to use Composer autoload andusestatements, and adjusted method calls to match new library APIs. - Refactored presenters, pages, services, and the payment gateway to align with updated dependencies and PHP 8.1+ requirements.
Reviewed Changes
Copilot reviewed 66 out of 66 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/external/Unirest/… | Deleted old Unirest source; now use mashape/unirest-php |
| lib/external/SimpleImage/SimpleImage.php | Removed legacy SimpleImage; replaced by claviska/simpleimage |
| lib/external/FeedWriter/FeedItem.php | Deleted old FeedWriter item; now use mibe/feedwriter |
| lib/Graphics/namespace.php | Dropped manual QR generator include |
| lib/Graphics/QRGenerator.php | Removed old PHPQRCode wrapper |
| lib/Graphics/ImageFactory.php | Switched to claviska\SimpleImage and wrapped fromFile |
| lib/Graphics/Image.php | Updated wrapper to call bestFit and toFile on new SimpleImage |
| lib/Email/EmailService.php | Migrated to PHPMailer 6 namespace, configurable transport |
| lib/Common/Validators/EmailValidator.php | Replaced is_email with egulias/email-validator |
| lib/Common/Helpers/String.php | Removed random library include |
| composer.json | Added new dependency entries for all migrated libraries |
| Presenters/Admin/ManageResourcesPresenter.php | Replaced old QRGenerator with BaconQrCode, updated case block style |
| Presenters/Admin/Import/ICalImportPresenter.php | Switched from icalreader to sabre/vobject reader |
| Pages/Page.php | Updated Mobile_Detect to Detection\MobileDetect |
| Pages/Export/AtomSubscriptionPage.php | Swapped FeedWriter for \FeedWriter\ATOM, updated feed output call |
| Domain/PaymentGateway.php | Removed Unirest include, updated PayPal sandbox URL, Stripe catches |
Comments suppressed due to low confidence (2)
Presenters/Admin/ManageResourcesPresenter.php:907
- The variable
$urlis undefined here; this will trigger a notice. It should likely use$qrPath(or another defined variable) instead of$url.
$this->page->ShowQRCode($url, $resource->GetName());
lib/Graphics/ImageFactory.php:23
- [nitpick] The inline comment is in Spanish; consider translating comments to English to keep the codebase language consistent.
$image->fromFile($pathToImage); // método correcto en la nueva versión
| } | ||
| return $path = "$path/$fileName"; | ||
| ; | ||
| return $path = "$path/$fileName";; |
Copilot
AI
Jun 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Unnecessary assignment and double semicolon. Simplify this to return "$path/$fileName";.
| return $path = "$path/$fileName";; | |
| return "$path/$fileName"; |
Replaced by Composer version
Replaced by Composer version
JohnVillalovos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MobilDetec, phpqrcode, feedwriter, icalreader, is_email, PHPMailer, SimpleImage, and Unirest libraries are migrated or replaced via Composer