File tree 5 files changed +11
-32
lines changed
5 files changed +11
-32
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,7 @@ protected function configure()
22
22
23
23
protected function doExecute (): parent
24
24
{
25
- $ this
26
- ->runCommand ('validate:configuration:component ' )
27
- ->runCommand ('validate:branch:name ' )
28
- ->runCommand ('validate:composer:json ' )
29
- ->runCommand ('validate:composer:lock ' )
30
- ->runCommand ('validate:configuration:initBenchmark ' )
31
- ->runCommand ('validate:configuration:vhost ' );
25
+ $ this ->runCommand ('validate:all ' );
32
26
33
27
foreach (ComponentConfiguration::getEnabledPhpVersions () as $ phpVersion ) {
34
28
$ this ->validateForPhpVersion ($ phpVersion );
Original file line number Diff line number Diff line change 6
6
7
7
use AbstractComponentConfiguration \AbstractComponentConfiguration ;
8
8
use App \{
9
- Command \Validate \ValidateConfigurationComponentCommand ,
9
+ Command \Validate \ValidateConfigurationComponentSourceCodeUrlsCommand ,
10
10
ComponentConfiguration \ComponentConfiguration
11
11
};
12
12
use Symfony \Component \Validator \ConstraintViolationInterface ;
@@ -34,8 +34,7 @@ protected function doExecute(): parent
34
34
if ($ this ->skipSourceCodeUrls () === false ) {
35
35
$ this
36
36
->title ('Configuration of AbstractComponentConfiguration::getSourceCodeUrls() ' )
37
- ->defineSourceCodeUrls ()
38
- ->runCommand ('validate:configuration:component:sourceCodeUrls ' );
37
+ ->defineSourceCodeUrls ();
39
38
}
40
39
41
40
return $ this ;
@@ -88,7 +87,7 @@ protected function getSourceCodeUrls(): array
88
87
];
89
88
90
89
foreach ($ return as &$ url ) {
91
- $ violations = ValidateConfigurationComponentCommand ::validateSourCodeUrl ($ url ['url ' ]);
90
+ $ violations = ValidateConfigurationComponentSourceCodeUrlsCommand ::validateSourCodeUrl ($ url ['url ' ]);
92
91
$ showWarning = false ;
93
92
do {
94
93
if (count ($ violations ) > 0 ) {
@@ -105,7 +104,11 @@ protected function getSourceCodeUrls(): array
105
104
}
106
105
107
106
$ showWarning = true ;
108
- } while (count ($ violations = ValidateConfigurationComponentCommand::validateSourCodeUrl ($ url ['url ' ])) > 0 );
107
+ } while (
108
+ count (
109
+ $ violations = ValidateConfigurationComponentSourceCodeUrlsCommand::validateSourCodeUrl ($ url ['url ' ])
110
+ ) > 0
111
+ );
109
112
}
110
113
111
114
return $ return ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function doExecute(): parent
24
24
->runCommand ('validate:composer:json ' )
25
25
->runCommand ('validate:composer:lock ' )
26
26
->runCommand ('validate:configuration:component ' )
27
+ ->runCommand ('validate:configuration:component:sourceCodeUrls ' )
27
28
->runCommand ('validate:configuration:initBenchmark ' )
28
29
->runCommand ('validate:configuration:responseBody ' )
29
30
->runCommand ('validate:configuration:vhost ' );
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ private function validateEnabledPhpVersions(): self
53
53
$ lockFile = 'composer.lock.php ' . $ phpVersion ;
54
54
$ lockPath = $ this ->getInstallationPath () . '/ ' . $ lockFile ;
55
55
if (is_readable ($ lockPath ) === false ) {
56
- $ this ->error ('File does not exist. ' );
56
+ $ this ->error ('File does not exist. Call "phpbench composer:update" to create it. ' );
57
57
}
58
58
59
59
try {
Original file line number Diff line number Diff line change 11
11
ComponentConfiguration \ComponentConfiguration ,
12
12
PhpVersion \PhpVersion
13
13
};
14
- use Symfony \Component \Validator \{
15
- Constraints \NotBlank ,
16
- Constraints \Type ,
17
- Constraints \Url ,
18
- ConstraintViolationListInterface ,
19
- Validation
20
- };
21
14
22
15
class ValidateConfigurationComponentCommand extends AbstractCommand
23
16
{
24
- public static function validateSourCodeUrl ($ url ): ConstraintViolationListInterface
25
- {
26
- return Validation::createValidator ()->validate (
27
- $ url ,
28
- [
29
- new NotBlank (),
30
- new Type (['type ' => 'string ' ]),
31
- new Url ()
32
- ]
33
- );
34
- }
35
-
36
17
protected function configure ()
37
18
{
38
19
parent ::configure ();
You can’t perform that action at this time.
0 commit comments