The "Trashbin" and "WebDav" traits were using each other in a circular dependency ("WebDav" -> "Sharing" -> "Provisioning" -> "BasicStructure" -> "Trashbin" -> "WebDav"). In PHP 7.3 this worked fine, but in PHP 7.4 the fatal error "Trait 'WebDav' not found in .../Trashbin.php" was thrown. To solve this now the "TrashBin" trait no longer explicitly uses "WebDav". However, due to this change, the class using "TrashBin" is now expected to also use "WebDav". As the "Trashbin" trait was not needed by most contexts using the "BasicStructure" trait "Trashbin" was removed from it and added only to those contexts that actually need it. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>tags/v21.0.0beta4
use Avatar; | use Avatar; | ||||
use Download; | use Download; | ||||
use Mail; | use Mail; | ||||
use Trashbin; | |||||
/** @var string */ | /** @var string */ | ||||
private $currentUser = ''; | private $currentUser = ''; |
class FeatureContext implements Context, SnippetAcceptingContext { | class FeatureContext implements Context, SnippetAcceptingContext { | ||||
use Search; | use Search; | ||||
use WebDav; | use WebDav; | ||||
use Trashbin; | |||||
} | } |
* Features context. | * Features context. | ||||
*/ | */ | ||||
class SharingContext implements Context, SnippetAcceptingContext { | class SharingContext implements Context, SnippetAcceptingContext { | ||||
use Sharing; | |||||
use WebDav; | |||||
use Trashbin; | |||||
use AppConfiguration; | use AppConfiguration; | ||||
use CommandLine; | use CommandLine; | ||||
* Trashbin functions | * Trashbin functions | ||||
*/ | */ | ||||
trait Trashbin { | trait Trashbin { | ||||
use WebDav; | |||||
// WebDav trait is expected to be used in the class that uses this trait. | |||||
/** | /** | ||||
* @When User :user empties trashbin | * @When User :user empties trashbin |