- Issue created by @jrglasgow
- 🇺🇸United States jrglasgow Idaho
updated filefield_sources.info.yml and composer.json to include D10 compatibility, including the patch for 📌 deprecated alter hook hook_field_widget_form_alter() Closed: duplicate
- 🇺🇸United States nickspages
Tried this patch with my Drupal 10.0.2 and it did not work.
- 🇺🇸United States loopy1492
I applied the patch for MR5 to 1x-dev and the Upgrade Status module seems happy with the changes on D9.5.3 with php 8.1.
- 🇺🇸United States loopy1492
I applied the patch for MR5 to 1x-dev and the Upgrade Status module seems happy with the changes on D9.5.3 with php 8.1.
@nickspages did the patch just not apply for you or did you receive some other kind of error?
- 🇬🇧United Kingdom alexp999
I'm still seeing 49 errors and 2 warnings with the patch in #2 using upgrade status.
Lots of calls to deprecated functions.
- 🇺🇸United States jrglasgow Idaho
I finally have a D10 environment set up to start testing, I will be making some more changes this week.
- 🇺🇸United States jrglasgow Idaho
this is going to require a major version change as it is not backwards compatible with Drupal 9 or Symfony 4
- 🇺🇸United States jrglasgow Idaho
after looking at this a little bit more I see that the Symfony 4 version of symfony/http-foundation which contained the MimeTypeGuesserInterface which filefield_sources uses is there, but also symfony/mime ^5.3 which contains the same interface (different namespace) is including in drupal/core since 9.2.0, so this module CAN be compatible with ^9.2 | ^10, so we SHOULDN'T necessarily need a major release.
- Status changed to Needs review
over 1 year ago 8:59pm 22 June 2023 - last update
over 1 year ago 15 pass - last update
over 1 year ago Composer require-dev failure - 🇺🇸United States dan.d
This patch seems to be incomplete. There is another issue that needs to be addressed to make this module compatible with D10:
Call to deprecated function file_munge_filename(). Deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Dispatch a \Drupal\Core\File\Event\FileUploadSanitizeNameEvent event instead.
L475 - https://git.drupalcode.org/project/filefield_sources/-/merge_requests/5/...
L596 - https://git.drupalcode.org/project/filefield_sources/-/merge_requests/5/... - last update
over 1 year ago Composer config failure - last update
over 1 year ago Composer config failure - 🇺🇸United States dan.d
I'm posting the updated version of the patch, which seems to be completing the list of deprecations for D10. Any feedback will be appreciated.
- last update
over 1 year ago run-tests.sh fatal error - last update
over 1 year ago 11 pass, 4 fail - last update
over 1 year ago run-tests.sh fatal error - 🇺🇸United States aitala
Testing this on D 9.5.11 and it seems to work nicely.
Thanks,
Eric - 🇨🇦Canada optasy
Tested this on a D10 instance, works ok, README.txt file needs to be renamed to README.md.
out of time, 2 weeks till end of life for drupal 9, this is obsolete.
- Status changed to RTBC
over 1 year ago 4:53pm 26 October 2023 - 🇬🇧United Kingdom robcarr Perthshire, Scotland
Just upgraded a couple of sites to D10 and this patch seems to work fine. Thanks for your work
- Status changed to Needs work
over 1 year ago 4:58pm 26 October 2023 - 🇬🇧United Kingdom robcarr Perthshire, Scotland
Sorry, this module needs some basic work to pass tests. Mostly code formatting...
- 🇬🇧United Kingdom robcarr Perthshire, Scotland
Running the module through PHPCS it's riddled with (mostly trivial) coding standards errors. I'll try and do what I can do work on these, but I struggle with tests, so might need support
Other issue I've noticed is that current formal release (8.x-1.0-alpha5) was released 19 January 2022, whereas Dev release is far older (over 2 years ago: 24 May 2021). So I'm going to base all my updates on the alpha5 branch
- 🇬🇧United Kingdom robcarr Perthshire, Scotland
Patch to look at D10 compatibility and address all coding standards issues. Would welcome a review and maybe some additional work will be required on tests.
Have rolled patch agains 1.0-alpha5 as it's much more current then DEV release.. although I suppose that might fail automated tests in itself - last update
over 1 year ago Patch Failed to Apply - 🇬🇧United Kingdom robcarr Perthshire, Scotland
Previous patch does not apply :(
- 🇨🇦Canada Natkeeran
Applied path #13 patch to 1.0-alpha5 ( D10.1.5, php 8.1) . Throws the following error.
Error: Call to undefined method Drupal\Core\ProxyClass\File\MimeType\MimeTypeGuesser::guess() in filefield_sources_save_file() (line 449 of /var/www/D9-collections3/web/modules/contrib/filefield_sources/filefield_sources.module).
- Assigned to bobi-mel
- last update
over 1 year ago 15 pass - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 2:57pm 2 November 2023 - 🇬🇧United Kingdom jamesdriscoll
8.x-1.0-alpha5 is reporting 55 problems.
I'm happy to test but what's the sequence of patches that need to be applied to get to a 'now fixed' state? (it's clearly more than the mimetype fix) - Status changed to RTBC
about 1 year ago 8:32pm 11 December 2023 - 🇺🇸United States rschwab
I just tested this branch out on a fresh 10.1.7 install and it works just as expected. I tested image, text, and tgz files using upload, remote, reference existing, and attach. The only thing I saw were php warnings that are already noted in #3313074.
+1 for RTBC
- last update
about 1 year ago run-tests.sh fatal error - last update
about 1 year ago 15 pass - Status changed to Needs work
about 1 year ago 10:55pm 11 December 2023 - 🇺🇸United States rschwab
More work is needed to make the test suite happy.
- last update
about 1 year ago 2 pass, 16 fail - last update
about 1 year ago 15 pass - 🇺🇸United States rschwab
For speed and to keep it simple, I'm merging the work from [#3168858] and 📌 Replace deprecated SimpleTest assertions Needs review here.
- last update
about 1 year ago 11 pass, 4 fail - 🇺🇸United States rschwab
As of now all tests are passing, except for 4 failures that would be solved by merging 🐛 Dont use curl, use the drupal client instead RTBC . Once that is resolved this should be ready as well.
- First commit to issue fork.
- last update
about 1 year ago 15 pass - First commit to issue fork.
- last update
about 1 year ago PHPLint Failed - last update
about 1 year ago PHPLint Failed - 🇪🇸Spain uridrupal
The last changes broke the code, there's an extra } that has been deleted
- 🇺🇸United States danheisel
Hoping this patch sorts out the missing curlies from the MR above. I saw two in Remote.php. Seems to be running fine now on my sites.
- last update
about 1 year ago 7 pass, 10 fail - last update
about 1 year ago 15 pass - 🇪🇸Spain uridrupal
Seems patch #35 works fine for me. I have learnt the risk of using a Merge diff as a patch now.
Thanks! - 🇺🇸United States rschwab
I think code standards fixes should go into their own issue so as not to confuse the issue at hand. The commits in #32 and the patch in #35 seem to be mistakenly removing needed code in Remote.php.
- 🇭🇺Hungary szato
Confirmed: patch #35 works, MR5 has syntax error:
PHP Parse error: Unclosed '{' on line 345 in /var/www/html/web/modules/contrib/filefield_sources/src/Plugin/FilefieldSource/Remote.php on line 351
But there is a new 2.0.x branch.
- Status changed to Needs review
about 1 year ago 5:19pm 22 January 2024 - 🇺🇸United States mlncn Minneapolis, MN, USA
Made a 2.0.x branch based on all the work here and danheisel's fix. (Gnuget gave me maintainership a week or so ago; if anyone else has put themselves forward let me know!)
If no fatal errors found i think we can finally mark this fixed and keep anything else in follow-up issues.
- Status changed to Needs work
about 1 year ago 7:05pm 22 January 2024 - 🇺🇸United States rschwab
The code in #32 and the patch in #35 both include removal of code from src/Plugin/FileFieldSource/Remote.php that should not be removed. Changing this to Needs Work. My (probably biased) opinion is to take the code up to #29 and have the two folks making code standards changes in #32 do that work in a separate ticket.
- 🇭🇺Hungary szato
1) diff between MR5 and 2.0.x branch in only the missing closing "}" - fix made in#35:
https://git.drupalcode.org/project/filefield_sources/-/compare/3336268-d...2) @rschwab, if I'm correct, you are talking about the removed code (from file: Remote.php) in this commit:
https://git.drupalcode.org/project/filefield_sources/-/merge_requests/5/...3) @jrglasgow can you please (as an author of the MR) edit the MR and change the target branch to 2.0.x?
- 🇺🇸United States rschwab
To try and make this as easy as possible, I've opened 📌 Restore functions to remote.php Needs review as a child of this issue. Once that and 🐛 Dont use curl, use the drupal client instead RTBC are reviewed and merged I believe this issue will be fully resolved.
- 🇺🇸United States rschwab
Here's a patch for anyone who would like to get this module working in D10. It incorporates the work as of today in the following issues:
- 🐛 Dont use curl, use the drupal client instead RTBC
- 📌 Restore functions to remote.php Needs review
- 🐛 Replace deprecated assertLink() in tests Needs review
- 🐛 Test updates for D10 field edit form Needs review
- 🐛 Fatal error when trying to use File browser RTBC
- 🐛 Make sure $callback is_callable. ( TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "FileSizeLimit" not found or invalid function name ) Needs review
It should apply cleanly against the 2.0.x-dev branch as of today.
- 🇨🇦Canada sseto
Will we get a stable D10 release back soon or should I switch to the dev version and apply the patch from #47?
Thanks!
- 🇺🇸United States edboost
@Sseto: Did you end up trying this? Trying the module with the #47 patch? How did it go?
- 🇺🇸United States jrglasgow Idaho
I updated the fork to be compatible with Drupal 11 (at least removed Drupal 11 deprecations) I haven't yet tested.
PHP Stan still finds a few more issues of deprecations that were just deprecated in Drupal 10.3 (a few weeks ago at this posting) and aren't being removed until Drupal 12. I didn't want to exclude anyone who isn't on Drupal 10.3 yet.
------ ------------------------------------------------------------------------------------------------------ Line filefield_sources.module ------ ------------------------------------------------------------------------------------------------------ 439 Fetching deprecated class constant EXISTS_RENAME of interface Drupal\Core\File\FileSystemInterface: in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\File\FileExists::Rename instead. 446 Fetching deprecated class constant EXISTS_RENAME of interface Drupal\Core\File\FileSystemInterface: in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\File\FileExists::Rename instead. 521 Fetching deprecated class constant EXISTS_REPLACE of interface Drupal\Core\File\FileSystemInterface: in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\File\FileExists::Replace instead. ------ ------------------------------------------------------------------------------------------------------
- 🇳🇮Nicaragua jeremy1606
This patch is giving me a mistake: patch -p1 < filefield_sources_d10compat_3336268.patch
- 🇺🇦Ukraine alex.mazaltov
Looking to the fork implementation for d11 compatibility.
I am wondering if we can generate a patch in an old-school way to test the implementation with alternative commerce Drupal core to make it compatible with d11
- 🇩🇪Germany c-logemann Frankfurt/M, Germany
@alex.mazaltov Do you mean the diff or patch export option of the merge request?
It's at the dropdown menu of the "code" Button on each MR.
For the MR mentioned above it's this:
https://git.drupalcode.org/project/filefield_sources/-/merge_requests/5....
https://git.drupalcode.org/project/filefield_sources/-/merge_requests/5....Example of how to use with Composer patches and lenient:
https://www.drupal.org/project/boost/issues/3428282#comment-15948406 📌 Automated Drupal 11 compatibility fixes for boost Needs review