- Issue created by @satane
- Merge request !7148Remove deprecated code in File module (core/module/file) โ (Closed) created by satane
- Status changed to Needs review
8 months ago 2:21am 22 March 2024 - ๐ณ๐จNew Caledonia satane
Cleanup all deprecated calls, except those in *Test.php files.
Not sure if classes related to "Tests legacy deprecated functions in file.module." should just be totally deleted or left there?
- FileSaveUploadTest.php
- FileUploadHandlerTest.php
- LegacyFileModuleTest.php
- LegacyFileThemeTest.php
- LegacyValidateTest.php
- LegacyValidatorTest.php
- ๐ณ๐จNew Caledonia satane
Merging pipeline made obvious we had to clean Test classes and even entirely delete Legacy ones, so there.
That said, there are still some unit testing errors which I can't figure out entirely.
There's still a call to a function isValid() which I removed as it was marked as deprecated.
See core/modules/file/src/Upload/FileUploadHandler.php:195But now unit testing shows plenty of errors.
I'm stopping here for now, feel free to jump in. - Status changed to Needs work
8 months ago 1:27pm 22 March 2024 - ๐บ๐ธUnited States smustgrave
Possible the deprecation was tested and those tests would need to be removed too.
But if removing this function breaks things we may need to re-look at if some replacements were missed when it was first deprecated
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
kim.pepper โ made their first commit to this issueโs fork.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
I've cleaned up some the left over deprecation code. However, I think I've hit a bug with the Validatable config job.
Unable to install modules: module 'help_topics' is obsolete.
- First commit to issue fork.
- ๐ซ๐ทFrance andypost
Added fix to see if test will pass, probably it needs separate issue (follow-up) after ๐ Remove deprecated help_topics module Needs review
but still not clear why nobody reported this earlier
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
#9 created a separate issue ๐ Validatable config should skip obsolete modules Needs review
- Status changed to Needs review
8 months ago 11:49am 28 March 2024 - Status changed to RTBC
8 months ago 1:13pm 28 March 2024 - ๐บ๐ธUnited States smustgrave
Removal appears complete.
Applied the MR and searched core/module/file folder for deprecated and 11.0 and all instances have been removed.
- Status changed to Needs work
8 months ago 10:20pm 28 March 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Thanks for working on this - looking good, just a couple of missed spots.
- Status changed to Needs review
8 months ago 11:42pm 31 March 2024 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Addressed feedback.
Coming back to this after a long while, I am wondering why we didn't deprecate
hook_file_validate()
at the time? - Status changed to RTBC
8 months ago 2:49pm 1 April 2024 - ๐บ๐ธUnited States smustgrave
Appears feedback from @longwave has been addressed.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Created ๐ Deprecate hook_file_validate() Active
- Status changed to Needs work
8 months ago 11:21pm 1 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
This should remove hook_file_validation from file.api.php .... it is deprecated we do
$errors = array_merge($errors, $this->moduleHandler->invokeAllDeprecated('Use file validation events instead. See https://www.drupal.org/node/3363700', 'file_validate', [$file]));
And this change is removing that line so the hook is no longer trigger so it should remove it from file.api.php.
- Status changed to Needs review
8 months ago 3:43am 2 April 2024 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Removed
hook_file_validate()
and doc references to callingfile_validate()
- Status changed to RTBC
8 months ago 8:09am 2 April 2024 - Status changed to Fixed
8 months ago 8:24am 2 April 2024 -
alexpott โ
committed 08c0efdf on 11.x
Issue #3432882 by kim.pepper, Satane, andypost, alexpott, longwave:...
-
alexpott โ
committed 08c0efdf on 11.x
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
We need to revert this as the changes made in ๐ Create an UploadedFile validator and deprecate error checking methods on UploadedFileInterface RTBC need a rework prior to 10.3.0 being released.
- Status changed to Postponed
8 months ago 12:53pm 2 April 2024 -
alexpott โ
committed 5ad1751e on 11.x
Revert "Issue #3432882 by kim.pepper, Satane, andypost, alexpott,...
-
alexpott โ
committed 5ad1751e on 11.x
- Status changed to Active
7 months ago 5:59am 11 April 2024 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
This is unblocked now that ๐ \Drupal\file\Upload\FileUploadHandler::handleFileUpload() should alway check that the uploaded file is valid Fixed is in.
- Status changed to Needs work
7 months ago 6:46am 22 April 2024 - Status changed to Needs review
7 months ago 4:25am 23 April 2024 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Cleaned up after a few merge conflicts.
- Status changed to Needs work
7 months ago 9:41am 23 April 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Missed one, otherwise this looks good to me:
core/modules/file/src/Plugin/rest/resource/FileUploadResource.php: @\trigger_error(__METHOD__ . ' is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \Drupal\file\Upload\FileUploadLocationTrait::getUploadLocation() instead. See https://www.drupal.org/node/3406099', E_USER_DEPRECATED);
- ๐ฎ๐ณIndia pradhumanjainOSL
pradhumanjain2311 โ made their first commit to this issueโs fork.
- Status changed to Needs review
7 months ago 11:28am 23 April 2024 - Status changed to RTBC
7 months ago 3:06pm 23 April 2024 - ๐บ๐ธUnited States smustgrave
Was about to do the same beat me to it! Tests all green and deprecation appears to be removed here.
- Status changed to Fixed
7 months ago 3:36pm 23 April 2024 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
MR needs to be closed.
Automatically closed - issue fixed for 2 weeks with no activity.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
We missed a few methods on
\Drupal\file\Upload\InputStreamUploadedFile
Created ๐ [11.x] Remove deprecated methods in InputStreamUploadedFile Active