Prevent adding PHPDoc types instead of native types

PHPDoc types can sometimes be entirely expressed as PHP native types. It
is better because it avoids code duplication and enables type runtime
check.

This will help us slowly migrate away from PHPDoc typing to PHP native typing.
This commit is contained in:
Adrien Crivelli
2023-09-12 23:56:25 +08:00
parent 2a9f2f57b9
commit bb6ae9ce7d
4 changed files with 53 additions and 0 deletions
+17
View File
@@ -61,6 +61,23 @@ jobs:
FAILURE_ACTION: "${{ matrix.experimental == true }}"
run: vendor/bin/phpunit --verbose || $FAILURE_ACTION
phpdoc-types:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
coverage: none
tools: cs2pr
- name: Check PHPDoc types
run: ./bin/check-phpdoc-types
php-cs-fixer:
runs-on: ubuntu-latest
steps: