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
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch", "version-update:semver-minor"]

- package-ecosystem: "composer"
directory: "/vendor-bin/tools"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch", "version-update:semver-minor"]
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
sa:
uses: ray-di/.github/.github/workflows/static-analysis.yml@v1
with:
php_version: 8.2
php_version: 8.4
has_crc_config: true
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"require": {
"php": "^8.2",
"aura/router": "^3.2",
"doctrine/annotations": "^1.7",
"nyholm/psr7": "^1.3",
"bear/app-meta": "^1.6",
"bear/package": "^1.19",
Expand Down
29 changes: 0 additions & 29 deletions psalm-baseline.xml

This file was deleted.

1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpSets(php81: true)
->withPhpSets(php82: true)
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0);
7 changes: 0 additions & 7 deletions src/Provide/Router/Annotation/RequestHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
namespace BEAR\Package\Provide\Router\Annotation;

use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Ray\Di\Di\Qualifier;

/**
* @Annotation
* @Target("METHOD")
* @Qualifier
* @NamedArgumentConstructor
*/
#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_PARAMETER), Qualifier]
final class RequestHeaders
{
Expand Down
1 change: 1 addition & 0 deletions src/Provide/Router/AuraRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct(
/**
* {@inheritdoc}
*
* @psalm-param Server $server
* @phpstan-param array{REQUEST_METHOD: string, REQUEST_URI: string} $server
*/
public function match(array $globals, array $server): RouterMatch
Expand Down
4 changes: 2 additions & 2 deletions src/Provide/Router/RouterContainerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class RouterContainerProvider implements ProviderInterface
{
private readonly RouterContainer $routerContainer;

/** @psalm-suppress UnusedVariable */
public function __construct(AbstractAppMeta $appMeta, #[Named('aura_router_file')] string $routerFile = '')
{
$this->routerContainer = new RouterContainer();
$routerFile = $routerFile === '' ? $appMeta->appDir . '/var/conf/aura.route.php' : $routerFile;
// $map is required in $routerFile
$map = $this->routerContainer->getMap();
$map = $this->routerContainer->getMap(); // used in $routerFile scope via require
if (! file_exists($routerFile)) {
throw new InvalidRouterFilePathException($routerFile);
}
Expand Down
19 changes: 12 additions & 7 deletions src/Provide/Router/WebServerRequestHeaderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@
/** @implements ProviderInterface<array<string, string>> */
class WebServerRequestHeaderProvider implements ProviderInterface
{
/**
* @return array<string, string>
*
* @psalm-suppress MixedInferredReturnType
* @psalm-suppress MixedReturnStatement
*/
/** @return array<string, string> */
public function get(): array
{
return function_exists('getallheaders') ? getallheaders() : $this->getAllHeaders(); // @phpstan-ignore-line
// @codeCoverageIgnoreStart
if (function_exists('getallheaders')) {
/** @var array<string, string> $headers */
$headers = getallheaders();

return $headers;
}

// @codeCoverageIgnoreEnd

return $this->getAllHeaders();
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/Provide/Router/AuraRouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class AuraRouterTest extends TestCase

protected function setUp(): void
{
parent::setUp();
$routerContainer = new RouterContainer();
$map = $routerContainer->getMap();
$this->map = $map;
Expand Down
7 changes: 5 additions & 2 deletions vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
"phpmd/phpmd": "^2.9",
"phpmetrics/phpmetrics": "^2.7",
"phpstan/phpstan": "^1.8",
"psalm/plugin-phpunit": "^0.13",
"psalm/plugin-phpunit": "^0.19",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.2"
"vimeo/psalm": "^5.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "8.3.99"
}
}
}
Loading
Loading