ampproject / ampproject/amp-toolbox-php

Raise PHPStan level for the `amp/common` package to 5

Open
#519 2 comments 0 reactions 0 assignees View on GitHub
Tech Debt WS:Perf
Dominant language
PHP
Stars
74
Forks
25
Avg merge
1d 15h
Merged PRs (30d)
3

Description

## Feature description

The Common package (`ampproject/common`) is currently sitting at and enforcing level 4 of PHPStan static analysis.

There are 2 errors that need to be fixed so that we can raise the level to 5 and enforce this new quality level in Travis CI.

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

* PHPStan does not show any detected errors when run on level 5.

## Implementation brief

* Change the level to `5` in the file `phpstan.neon.dist`.
* Run `composer analyze`.
* Fix detected errors until no more are found.

## QA testing instructions

*

## Demo

*

## Changelog entry

*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with phpstan.neon.dist and the current level-4 configuration, then run composer analyze to identify the two errors that block level 5. Inspect the reported locations and address each issue without changing the requested analysis scope. Done means composer analyze reports no errors at level 5 and the configuration enforces that level in Travis CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.