diff --git a/src/ORM/Validation/RelationValidationService.php b/src/Dev/Validation/RelationValidationService.php similarity index 99% rename from src/ORM/Validation/RelationValidationService.php rename to src/Dev/Validation/RelationValidationService.php index 485809161d4..7531f741441 100644 --- a/src/ORM/Validation/RelationValidationService.php +++ b/src/Dev/Validation/RelationValidationService.php @@ -1,6 +1,6 @@ devBuildCheck(); + } + + // Let any extensions make their own database default data $this->extend('requireDefaultRecords', $dummy); } diff --git a/tests/php/ORM/Validation/Freelancer.php b/tests/php/Dev/Validation/Freelancer.php similarity index 93% rename from tests/php/ORM/Validation/Freelancer.php rename to tests/php/Dev/Validation/Freelancer.php index 2028d7864a0..7a00896aecc 100644 --- a/tests/php/ORM/Validation/Freelancer.php +++ b/tests/php/Dev/Validation/Freelancer.php @@ -1,6 +1,6 @@ Member::class, ], [ - 'SilverStripe\ORM\Tests\Validation\Member / Hat : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Hat / Hatter : Relation is not in the expected format (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Member / Hat : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Hat / Hatter : Relation is not in the expected format (needs class.relation format)', ], ], 'ambiguous has_one - incorrect relation name' => [ @@ -89,8 +89,8 @@ public function validateCasesProvider(): array 'Hatter' => Member::class . '.ObviouslyWrong', ], [ - 'SilverStripe\ORM\Tests\Validation\Member / Hat : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Hat / Hatter : Back relation not found', + 'SilverStripe\Dev\Tests\Validation\Member / Hat : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Hat / Hatter : Back relation not found', ], ], 'ambiguous has_one - too many relations' => [ @@ -101,7 +101,7 @@ public function validateCasesProvider(): array 'HatterCopy' => Member::class . '.Hat', ], [ - 'SilverStripe\ORM\Tests\Validation\Member / Hat : Back relation is ambiguous', + 'SilverStripe\Dev\Tests\Validation\Member / Hat : Back relation is ambiguous', ], ], 'invalid has one' => [ @@ -112,7 +112,7 @@ public function validateCasesProvider(): array 'Hat' => Hat::class, ], [ - 'SilverStripe\ORM\Tests\Validation\Member / HomeTeam : Relation SilverStripe\ORM\Tests\Validation\Team.UnnecessaryRelation is not in the expected format (needs class only format).' + 'SilverStripe\Dev\Tests\Validation\Member / HomeTeam : Relation SilverStripe\Dev\Tests\Validation\Team.UnnecessaryRelation is not in the expected format (needs class only format).' ], ], 'ambiguous has_many - no relation name' => [ @@ -123,8 +123,8 @@ public function validateCasesProvider(): array 'FreelancerMembers' => Freelancer::class . '.TemporaryTeam', ], [ - 'SilverStripe\ORM\Tests\Validation\Team / Members : Relation is not in the expected format (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Member / HomeTeam : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Team / Members : Relation is not in the expected format (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Member / HomeTeam : Back relation not found or ambiguous (needs class.relation format)', ], ], 'ambiguous has_many - incorrect relation name' => [ @@ -135,8 +135,8 @@ public function validateCasesProvider(): array 'FreelancerMembers' => Freelancer::class . '.TemporaryTeam', ], [ - 'SilverStripe\ORM\Tests\Validation\Team / Members : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Member / HomeTeam : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Team / Members : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Member / HomeTeam : Back relation not found or ambiguous (needs class.relation format)', ], ], 'ambiguous has_many - too many relations' => [ @@ -148,7 +148,7 @@ public function validateCasesProvider(): array 'FreelancerMembers' => Freelancer::class . '.TemporaryTeam', ], [ - 'SilverStripe\ORM\Tests\Validation\Member / HomeTeam : Back relation is ambiguous', + 'SilverStripe\Dev\Tests\Validation\Member / HomeTeam : Back relation is ambiguous', ], ], 'ambiguous many_many - no relation name' => [ @@ -158,8 +158,8 @@ public function validateCasesProvider(): array 'TeamHats' => Team::class, ], [ - 'SilverStripe\ORM\Tests\Validation\Team / ReserveHats : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Hat / TeamHats : Relation is not in the expected format (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Team / ReserveHats : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Hat / TeamHats : Relation is not in the expected format (needs class.relation format)', ], ], 'ambiguous many_many - incorrect relation name' => [ @@ -169,8 +169,8 @@ public function validateCasesProvider(): array 'TeamHats' => Team::class . '.ObviouslyWrong', ], [ - 'SilverStripe\ORM\Tests\Validation\Team / ReserveHats : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Hat / TeamHats : Back relation not found', + 'SilverStripe\Dev\Tests\Validation\Team / ReserveHats : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Hat / TeamHats : Back relation not found', ], ], 'ambiguous many_many - too many relations' => [ @@ -181,7 +181,7 @@ public function validateCasesProvider(): array 'TeamHatsCopy' => Team::class . '.ReserveHats', ], [ - 'SilverStripe\ORM\Tests\Validation\Team / ReserveHats : Back relation is ambiguous', + 'SilverStripe\Dev\Tests\Validation\Team / ReserveHats : Back relation is ambiguous', ], ], 'ambiguous many_many through - no relation name' => [ @@ -191,8 +191,8 @@ public function validateCasesProvider(): array 'FreelancerTeams' => Team::class, ], [ - 'SilverStripe\ORM\Tests\Validation\Team / Freelancers : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Member / FreelancerTeams : Relation is not in the expected format (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Team / Freelancers : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Member / FreelancerTeams : Relation is not in the expected format (needs class.relation format)', ], ], 'ambiguous many_many through - incorrect relation name' => [ @@ -202,8 +202,8 @@ public function validateCasesProvider(): array 'FreelancerTeams' => Team::class . '.ObviouslyWrong', ], [ - 'SilverStripe\ORM\Tests\Validation\Team / Freelancers : Back relation not found or ambiguous (needs class.relation format)', - 'SilverStripe\ORM\Tests\Validation\Member / FreelancerTeams : Back relation not found', + 'SilverStripe\Dev\Tests\Validation\Team / Freelancers : Back relation not found or ambiguous (needs class.relation format)', + 'SilverStripe\Dev\Tests\Validation\Member / FreelancerTeams : Back relation not found', ], ], 'ambiguous many_many through - too many relations' => [ @@ -214,7 +214,7 @@ public function validateCasesProvider(): array 'FreelancerTeamsCopy' => Team::class . '.Freelancers', ], [ - 'SilverStripe\ORM\Tests\Validation\Team / Freelancers : Back relation is ambiguous', + 'SilverStripe\Dev\Tests\Validation\Team / Freelancers : Back relation is ambiguous', ], ], ]; @@ -245,7 +245,7 @@ public function ignoredClassesProvider(): array Team::class, 'Members', [ - 'allow_rules' => ['app' => 'SilverStripe\ORM\Tests\Validation'], + 'allow_rules' => ['app' => 'SilverStripe\Dev\Tests\Validation'], ], false, ], @@ -253,7 +253,7 @@ public function ignoredClassesProvider(): array Team::class, null, [ - 'allow_rules' => ['app' => 'SilverStripe\ORM\Tests\Validation'], + 'allow_rules' => ['app' => 'SilverStripe\Dev\Tests\Validation'], 'deny_rules' => [Team::class], ], true, @@ -262,7 +262,7 @@ public function ignoredClassesProvider(): array Team::class, 'Members', [ - 'allow_rules' => ['app' => 'SilverStripe\ORM\Tests\Validation'], + 'allow_rules' => ['app' => 'SilverStripe\Dev\Tests\Validation'], 'deny_rules' => [Team::class], ], true, @@ -271,7 +271,7 @@ public function ignoredClassesProvider(): array Team::class, 'Members', [ - 'allow_rules' => ['app' => 'SilverStripe\ORM\Tests\Validation'], + 'allow_rules' => ['app' => 'SilverStripe\Dev\Tests\Validation'], 'deny_relations' => [Team::class . '.Members'], ], true, @@ -280,7 +280,7 @@ public function ignoredClassesProvider(): array Member::class, 'HomeTeam', [ - 'allow_rules' => ['app' => 'SilverStripe\ORM\Tests\Validation'], + 'allow_rules' => ['app' => 'SilverStripe\Dev\Tests\Validation'], 'deny_rules' => [Team::class], 'deny_relations' => [Team::class . '.Members'], ], diff --git a/tests/php/ORM/Validation/Team.php b/tests/php/Dev/Validation/Team.php similarity index 96% rename from tests/php/ORM/Validation/Team.php rename to tests/php/Dev/Validation/Team.php index 095da1b08dd..701423380ab 100644 --- a/tests/php/ORM/Validation/Team.php +++ b/tests/php/Dev/Validation/Team.php @@ -1,6 +1,6 @@