-
Notifications
You must be signed in to change notification settings - Fork 9.4k
10058: Tablerate->getCsvFile() fails with non-default PHP upload_tmp_dir #12275
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
Conversation
* @return \Magento\Framework\Filesystem\Directory\ReadInterface | ||
* | ||
*/ | ||
public function getDirectoryReadByPath($path, $driverCode = DriverPool::FILE) |
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.
Unfortunately we cannot add new public methods to this class as it has been marked with @api
would it work if we called getDirectoryRead
here instead of making the new call?
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.
@dmanners, no it wouldn't. It checks it suggested path is one of the /Magento/Framework/App/Filesystem/DirectoryList::getDefaultConfig().
And what if I'll create the pr with a same code to 2.3?
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.
Hmm ok, If that is not possible then I would suggest that 2.3 would be fine for this PR.
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.
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.
How about creating a new class (something like \Magento\Framework\FilesystemV2
) and using that one instead (by injecting it as an extra optional parameter at Magento\OfflineShipping\Model\ResourceModel\Carrier\Tablerate::__construct()
) and deprecating the old one? Would that be deemed acceptable in such a case?
@RomaKis is is possible to still use |
@RomaKis I will close this PR as we now have a pr to 2.3 as the changes required a new function that could not be back ported. If you can think of a may to make it work for 2.2 then please feel free to open a new PR for that branch. |
@dmanners, but why can't we backport it to 2.2? Seems like it doesn't break any backward compatibility http://devdocs.magento.com/guides/v2.0/contributor-guide/backward-compatible-development/. |
@RomaKis adding a public method to a class marked with the |
@dmanners, ok, thanks for clarification :) |
@RomaKis no problem. If you can see a way of getting this change into 2.2 and 2.1 without breaking BC then I would be happy to see a PR for it :) |
Description
Now path for upload_tmp_dir can be any.
2.3 pr: #12376
Fixed Issues (if relevant)
Manual testing scenarios
Expected result
Table rates are updated
Actual result
Receive an error, eg The file “/tmp/var/lib/php/uploads/phphEpJe5” doesn’t exist
Contribution checklist