-
-
Notifications
You must be signed in to change notification settings - Fork 449
Replace php date functios with carbon
#5131
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
base: main
Are you sure you want to change the base?
Conversation
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
Copilot reviewed 102 out of 102 changed files in this pull request and generated 11 comments.
Comments suppressed due to low confidence (1)
app/code/core/Mage/Index/Model/Observer.php:154
- Using
Carbon::now()->sub()mutates the Carbon instance. This could cause issues if the$nowvariable is reused later. Consider usingCarbon::now()->subSeconds(self::OLD_INDEX_EVENT_THRESHOLD_SECONDS)or callingcopy()first to avoid mutation:$now->copy()->sub($dateInterval).
app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php
Outdated
Show resolved
Hide resolved
|
What would be the benefits? If Zend_Date is replaced, will the current extensions and modules still work or will they all need to be updated? |
|
This PR does not change any Varien_Date or Zend_Date related code. I'd like to have consistent code over core and extension. Starting here. With removing Zend_Date the is a little chance to break extension functionalty. Please note only a few metgods (5 according to docblocks) return Zend_Date. This should be easy to fix in extensions code. Same for Zend_Date as methods paramter. Lets discuss it when removing Zend_Date. |
|



Description (*)
Use rector to replace native date functions with
carbon,(prepare to replace
Zend_Date)Related Pull Requests
Varien_Datewith Carbon date library #4463