Skip to content

Commit 9fa37d8

Browse files
authored
test: Make the min PHP version test compatibility more complete (#892)
1 parent e5a152c commit 9fa37d8

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
{
2+
"autoload": {
3+
"files": ["src/greet.php"],
4+
"psr-4": {
5+
"App\\": "src"
6+
}
7+
}
28
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
<?php
22

3-
namespace App;
4-
53
require file_exists(__DIR__.'/vendor/scoper-autoload.php')
64
? __DIR__.'/vendor/scoper-autoload.php'
75
: __DIR__.'/vendor/autoload.php';
86

9-
class Greeter {}
10-
11-
echo "OK\n";
7+
greet();

fixtures/set039-min-php-version/scoper.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@
2222
);
2323

2424
return [
25+
'exclude-files' => ['index.php'],
2526
'expose-classes' => ['App\Greeter'],
27+
'expose-functions' => ['greet'],
2628
];
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App;
4+
5+
class Greeter
6+
{
7+
function greet()
8+
{
9+
echo "OK\n";
10+
}
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
use App\Greeter;
4+
5+
function greet() {
6+
(new Greeter())->greet();
7+
}

0 commit comments

Comments
 (0)