Skip to content

Commit

Permalink
Static Analysis Improvements & General Maintenance
Browse files Browse the repository at this point in the history
- Removes irrelevant dot files
- Update export-ignores
- Stop ignoring platform requirements on PHP 8.1
- Update Psalm and Laminas Coding Standard to most recent versions
- Solve nearly all psalm issues (Except 2) 💪
- Various other minor improvements

Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Jul 27, 2022
1 parent dc99b68 commit e8b048b
Show file tree
Hide file tree
Showing 24 changed files with 541 additions and 530 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/docs/ export-ignore
/mkdocs.yml export-ignore
/phpcs.xml export-ignore
/psalm.xml export-ignore
/psalm-baseline.xml export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
/.psr-container.php.stub
/renovate.json
/.laminas-ci.json
/TODO.md
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/.phpcs-cache
/.phpunit.result.cache
/clover.xml
/coveralls-upload.json
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
Expand Down
3 changes: 0 additions & 3 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
{
"ignore_php_platform_requirements": {
"8.1": true
}
}
24 changes: 24 additions & 0 deletions .psr-container.php.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

namespace Psr\Container {
/**
* Provides automatic type inference for Psalm when retrieving a service from a container using a FQCN
*/
interface ContainerInterface
{
/**
* @param string|class-string $id
* @return bool
*/
public function has(string $id);

/**
* @template T
* @psalm-param string|class-string<T> $id
* @psalm-return ($id is class-string ? T : mixed)
*/
public function get(string $id);
}
}
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.2.0",
"laminas/laminas-coding-standard": "~2.3.0",
"laminas/laminas-diactoros": "^2.2",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.16.1",
"vimeo/psalm": "^4.10"
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.24.0"
},
"suggest": {
"mezzio/mezzio-csrf": "^1.0 || ^1.0-dev for CSRF protection capabilities",
Expand Down
Loading

0 comments on commit e8b048b

Please sign in to comment.