Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
fail-fast: false
matrix:
php:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.4.x-dev"
"dev-master": "3.x-dev"
}
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
Expand Down
15 changes: 12 additions & 3 deletions src/Pimple/Tests/PimpleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Pimple\Container;
use Pimple\ServiceProviderInterface;

/**
* @author Igor Wiedler <igor@wiedler.ch>
Expand Down Expand Up @@ -204,7 +205,14 @@ public function testRawHonorsNullValues()
public function testFluentRegister()
{
$pimple = new Container();
$this->assertSame($pimple, $pimple->register($this->getMockBuilder('Pimple\ServiceProviderInterface')->getMock()));

$stub = new class implements ServiceProviderInterface {
public function register(Container $pimple)
{
}
};

$this->assertSame($pimple, $pimple->register($stub));
}

public function testRawValidatesKeyIsPresent()
Expand Down Expand Up @@ -275,13 +283,13 @@ public function testExtendDoesNotLeakWithFactories()
unset($pimple['foo']);

$p = new \ReflectionProperty($pimple, 'values');
if (PHP_VERSION < 80100) {
if (PHP_VERSION_ID < 80100) {
$p->setAccessible(true);
}
$this->assertEmpty($p->getValue($pimple));

$p = new \ReflectionProperty($pimple, 'factories');
if (PHP_VERSION < 80100) {
if (PHP_VERSION_ID < 80100) {
$p->setAccessible(true);
}
$this->assertCount(0, $p->getValue($pimple));
Expand Down Expand Up @@ -425,6 +433,7 @@ public function testLegacyExtendFailsForKeysNotContainingServiceDefinitions($ser
/**
* @group legacy
* @expectedDeprecation How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "foo" should be protected?
* @dataProvider badServiceDefinitionProvider
*/
#[DataProvider('badServiceDefinitionProvider')]
public function testExtendingProtectedClosureDeprecation($service)
Expand Down