Skip to content

Add PHP 8.0 on GitHub action and Fix Psalm issue #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

peter279k
Copy link
Member

Description

Fix and improve some stuffs.

Motivation and context

  • Adding the php-8.0 version test on GitHub action because this framework supports. And it should be verified.
  • Fixing static analysis issue via Psalm:
Scanning files...
Analyzing files...

░░░░░░E░░░░░

ERROR: UnnecessaryVarAnnotation - src/MiddlewarePipeline.php:56:30 - The @var Psr\Http\Server\MiddlewareInterface annotation for $middleware is unnecessary (see https://psalm.dev/212)
                    /** @var MiddlewareInterface $middleware */


ERROR: UnnecessaryVarAnnotation - src/MiddlewarePipeline.php:87:30 - The @var Antidot\Application\Http\Middleware\MiddlewareQueue annotation for $queue is unnecessary (see https://psalm.dev/212)
                    /** @var MiddlewareQueue $queue */


------------------------------
2 errors found
------------------------------
13 other issues found.
You can display them with --show-info=true
------------------------------
Psalm can automatically fix 2 of these issues.
Run Psalm again with 
--alter --issues=UnnecessaryVarAnnotation --dry-run
to see what it can fix.
------------------------------

Checks took 6.79 seconds and used 303.539MB of memory
Psalm was able to infer types for 100% of the codebase
-----------------
100.000% src/Child.php (0 mixed)
100.000% src/Container/Config/ConfigProvider.php (0 mixed)
100.000% src/DriftKernelAdapter.php (0 mixed)
100.000% src/LoopFactory.php (0 mixed)
100.000% src/MiddlewarePipeline.php (0 mixed)
100.000% src/PromiseResponse.php (0 mixed)
100.000% src/ReactApplication.php (0 mixed)
100.000% src/ReactApplicationFactory.php (0 mixed)
100.000% src/RunServerCommandFactory.php (0 mixed)
100.000% src/ServerFactory.php (0 mixed)
100.000% src/SocketFactory.php (0 mixed)
100.000% src/WatchServerCommandFactory.php (0 mixed)

How has this been tested?

N/A

Screenshots (if appropriate)

N/A

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Improvements

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

If you're unsure about any of these, don't hesitate to ask. We're here to help!

@kpicaza kpicaza added enhancement New feature or request hacktoberfest labels Oct 27, 2021
Copy link
Member

@kpicaza kpicaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thanks 💯

@kpicaza kpicaza merged commit 73db6e1 into antidot-framework:2.x.x Oct 27, 2021
@peter279k peter279k deleted the fix_stuffs branch October 27, 2021 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants