Closed (duplicate)
Project:
Drupal core
Version:
8.2.x-dev
Component:
simpletest.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
13 Sep 2016 at 15:02 UTC
Updated:
10 Nov 2018 at 19:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedvaplas created an issue. See original summary.
Comment #2
cilefen commentedComment #3
cilefen commentedIf there are any files in
/sites/simpletest,simpletest_clean_temporary_directories()callsfile_unmanaged_delete_recursive($path, array('Drupal\simpletest\TestBase', 'filePreDeleteCallback'))andTestBasedies on a use statement with this error. I assume this is because the autoloader didn't load in this context.As a workaround, delete all files in /sites/simpletest and try again.
Comment #4
Anonymous (not verified) commented@cilefen, thank you! It works for me.
Comment #5
Anonymous (not verified) commentedComment #6
mile23I can't repro this error on the module uninstall page, and I can't seem to get drush to notice that I have a fully installed D8 site to try and uninstall that way.
The reason it works if you pre-delete the simpletest temp directory is probably related to this: #2745123: Simpletest module crashes on cleanup, uninstall
Comment #7
cilefen commentedI can reproduce this every time. Are there any files in sites/simpletest when you uninstalled?
simpletest_clean_temporary_directories()does nothing if there are no files.Comment #8
mile23I think it might only be from drush, which I can't seem to get working for anything, so I can't try using drush to uninstall.
Comment #9
cilefen commentedUI also.
Comment #10
cilefen commentedOk.. the plot thickens. On one computer with PHP 5.6, fatal, on another with 7.0, perfect uninstall.
Comment #11
Anonymous (not verified) commentedI have it with php 7.0.4 also (8.2.0-rc1).
For reproduce: create empty file "lololo.txt" in 'sites/simpletest' and unistall Testing module.
(Also I attached a zip with one of the real folders that were in my sites/simpletest).
Stack trace and Call Stack:
Comment #12
mile23Thanks!
Yep, that's the one. This is a duplicate of #2745123: Simpletest module crashes on cleanup, uninstall
During uninstall, simpletest cleans up by calling
simpletest_clean_environment().The callback specified to
file_unmanaged_delete_recursive()isTestBase::filePreDeleteCallback().TestBaseis not normally autoloadable during runtime.Comment #13
Metal3d commented#3 works for me, big thanks