Skip to content

Commit

Permalink
Merge pull request #29 from gsteel/PHP-8.3
Browse files Browse the repository at this point in the history
Add support for PHP 8.3
  • Loading branch information
Ocramius authored Nov 21, 2023
2 parents a6801f4 + 50b6b54 commit cd2f988
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0"
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
"mikey179/vfsstream": "^1.6.11",
"phpunit/phpunit": "^10.2.2",
"phpunit/phpunit": "^10.4.2",
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.13.1"
"vimeo/psalm": "^5.15.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.13.1@086b94371304750d1c673315321a55d15fc59015">
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<file src="src/Command.php">
<MixedAssignment>
<code>$argument</code>
</MixedAssignment>
</file>
<file src="src/ConfigDiscoveryTrait.php">
<DocblockTypeContradiction>
<code><![CDATA[$this->applicationConfigPath]]></code>
</DocblockTypeContradiction>
<MissingReturnType>
<code>removeConfigCacheFile</code>
</MissingReturnType>
Expand All @@ -20,9 +23,6 @@
<RedundantConditionGivenDocblockType>
<code><![CDATA[isset($this->projectDir)]]></code>
</RedundantConditionGivenDocblockType>
<DocblockTypeContradiction>
<code><![CDATA[$this->applicationConfigPath]]></code>
</DocblockTypeContradiction>
</file>
<file src="test/AutoComposerTest.php">
<InvalidPropertyAssignmentValue>
Expand Down
4 changes: 4 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
findUnusedCode="true"
findUnusedBaselineEntry="true"
findUnusedPsalmSuppress="true"
>
<projectFiles>
<directory name="src"/>
<directory name="bin"/>
<directory name="test"/>
<ignoreFiles>
<directory name="vendor"/>
Expand Down
6 changes: 0 additions & 6 deletions src/AutoComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ class AutoComposer
/** @var resource */
private $errorStream;

/** @var string[] */
private array $expectedValues = [
'0', // production mode
'1', // development mode
];

/**
* @param string $projectDir Location to resolve project from.
* @param null|resource $errorStream Stream to which to write errors; defaults to STDERR
Expand Down
1 change: 1 addition & 0 deletions test/AutoComposerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AutoComposerTest extends TestCase
{
use RemoveCacheFileTrait;

/** @psalm-suppress UnusedProperty */
private vfsStreamContainer $projectDir;

/** @var resource */
Expand Down
24 changes: 24 additions & 0 deletions test/CommandTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

namespace LaminasTest\DevelopmentMode;

use Laminas\DevelopmentMode\Command;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(Command::class)]
final class CommandTest extends TestCase
{
public function testExitCodeWithNoArguments(): void
{
self::assertSame(1, (new Command())([]));
}

public function testExitCodeWithHelpArgument(): void
{
self::assertSame(0, (new Command())(['-h']));
self::assertSame(0, (new Command())(['--help']));
}
}

0 comments on commit cd2f988

Please sign in to comment.