Bläddra i källkod

Make integration tests work with both PHP 7.3 and 7.4

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
Daniel Calviño Sánchez 3 år sedan
förälder
incheckning
28f2d0ec7a

+ 0
- 1
build/integration/features/bootstrap/BasicStructure.php Visa fil

@@ -47,7 +47,6 @@ trait BasicStructure {
use Avatar;
use Download;
use Mail;
use Trashbin;

/** @var string */
private $currentUser = '';

+ 1
- 0
build/integration/features/bootstrap/FeatureContext.php Visa fil

@@ -35,4 +35,5 @@ require __DIR__ . '/../../vendor/autoload.php';
class FeatureContext implements Context, SnippetAcceptingContext {
use Search;
use WebDav;
use Trashbin;
}

+ 2
- 1
build/integration/features/bootstrap/SharingContext.php Visa fil

@@ -32,7 +32,8 @@ require __DIR__ . '/../../vendor/autoload.php';
* Features context.
*/
class SharingContext implements Context, SnippetAcceptingContext {
use Sharing;
use WebDav;
use Trashbin;
use AppConfiguration;
use CommandLine;


+ 2
- 1
build/integration/features/bootstrap/Trashbin.php Visa fil

@@ -30,7 +30,8 @@ require __DIR__ . '/../../vendor/autoload.php';
* Trashbin functions
*/
trait Trashbin {
use WebDav;

// WebDav trait is expected to be used in the class that uses this trait.

/**
* @When User :user empties trashbin

Laddar…
Avbryt
Spara