Skip to content

Commit 99a6b44

Browse files
author
Bastian Schwarz
committed
Bootstrap the new phar so the tools can find the classes included in deployer as the sources are in the package but the autoload section is missing
1 parent 1b164f0 commit 99a6b44

4 files changed

Lines changed: 36 additions & 14 deletions

File tree

infection.json5.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
},
1515
"mutators": {
1616
"@default": true
17-
}
17+
},
18+
"bootstrap":"./test/bootstrap.php"
1819
}

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
cacheDirectory=".cache/psalm"
2525
findUnusedBaselineEntry="true"
2626
findUnusedCode="true"
27+
autoloader="./test/bootstrap.php"
2728
>
2829
<projectFiles>
2930
<directory name="src"/>

test/bootstrap.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* Copyright 2023 Bastian Schwarz <bastian@codename-php.de>.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
require_once __DIR__ . '/../vendor/autoload.php';
19+
20+
Phar::loadPhar(__DIR__ . '/../deployer.phar');
21+
require_once 'phar://deployer.phar/vendor/autoload.php';

test/phpunit.dist.xml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--~
3-
~ Copyright 2020 Bastian Schwarz <bastian@codename-php.de>.
2+
<!--
3+
~ Copyright 2023 Bastian Schwarz <bastian@codename-php.de>.
44
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
88
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
9+
~ http://www.apache.org/licenses/LICENSE-2.0
1610
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
1716
-->
1817
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1918
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
2019
colors="true"
21-
bootstrap="./../vendor/autoload.php"
20+
bootstrap="./bootstrap.php"
2221
cacheDirectory="../.cache/phpunit"
2322
>
2423
<coverage>

0 commit comments

Comments
 (0)