Skip to content

Conversation

@LukeTowers
Copy link
Member

WIP

@what-the-diff
Copy link

what-the-diff bot commented Feb 21, 2023

  • Added a constant DISK to the class.
  • Changed fromPost and fromFile methods return type hinting static instead of void, also added nullable types for parameters in both functions.
  • Removed unused setDataAttribute method as it is not used anywhere else in the codebase or called by any other classes/methods etc...
    5-6: Fixed typos within comments above each function where 'return' was spelt incorrectly as 'retunr'. This has since been fixed correctly now though :)

@LukeTowers LukeTowers added this to the 1.3.0 milestone Apr 25, 2024
@github-actions
Copy link

This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this is still being worked on, please respond and we will re-open this pull request.
If this pull request is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

LukeTowers and others added 5 commits April 10, 2025 14:16
…tant

Also renamed getDiskName() to a more accurate generateFilenameForDisk() & removed its side effect. getDiskName() now returns the name of the disk to use for the current file.
@LukeTowers LukeTowers modified the milestones: 1.3.0, 1.2.8 Apr 10, 2025
@LukeTowers LukeTowers marked this pull request as ready for review April 10, 2025 20:52
@LukeTowers LukeTowers merged commit a8013d4 into develop Apr 10, 2025
10 checks passed
@LukeTowers LukeTowers deleted the wip/use-native-disk-methods branch April 10, 2025 20:58
@mjauvin
Copy link
Member

mjauvin commented Apr 10, 2025

@LukeTowers has this been tested extensively?

@LukeTowers
Copy link
Member Author

@mjauvin should be minimal impact, just requires the other PR that I'm finalizing right now for the metadata support

@mjauvin
Copy link
Member

mjauvin commented Apr 10, 2025

@mjauvin should be minimal impact, just requires the other PR that I'm finalizing right now for the metadata support

I would feel a lot more confident with some unit tests, this is used extensively in my projects

@LukeTowers
Copy link
Member Author

@mjauvin see wintercms/winter@94ad5e8 for the changes required on the system module. These changes are relatively minor and should be non-breaking; but the changes in wintercms/winter#844 are going to need some more testing

@mjauvin
Copy link
Member

mjauvin commented Apr 11, 2025

@LukeTowers I get the following when updating to latest dev-develop:

In File.php line 48:
                                                                                                                                                              
  Declaration of System\Models\File::getPath($fileName = null) must be compatible with Winter\Storm\Database\Attach\File::getPath(?string $fileName = null):  
   string in /var/www/vhosts/wn.r4l.com/public_html/modules/system/models/File.php on line 48                                                                                                                                                     

Oh, never mind, I had not updated the system module...

@LukeTowers
Copy link
Member Author

All good now @mjauvin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that implement a new feature or substantial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants