Skip to content

add more typing #127

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
merged 55 commits into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
362148e
update .gitignore
ashnazg Jan 13, 2018
98ac691
clear the risky test warnings
ashnazg Jan 13, 2018
a1896d6
ecs now says this checker is a duplicate;
ashnazg Jan 13, 2018
c991522
ecs --fix
ashnazg Jan 13, 2018
f628cc6
list non-camelcased class names to ignore for now
ashnazg Jan 14, 2018
d32b8d1
ecs --fix
ashnazg Jan 14, 2018
56c03dd
other ecs can be ignored
ashnazg Jan 14, 2018
f05b9b2
adjust for happiness of both testcases and ecs
ashnazg Jan 14, 2018
c0ee11f
adjust gitignore for phive usage
ashnazg Jan 31, 2018
617a8b6
loosen reflection-docblock dep; remove explicit reflection-common dep;
ashnazg Jan 31, 2018
e657497
drop test phase back out of 'stages';
ashnazg Jan 31, 2018
180cbd4
add travis_retry;
ashnazg Jan 31, 2018
71b71f7
use phive where possible;
ashnazg Jan 31, 2018
052a5ee
rely on scrunitizer for phpcs
ashnazg Jan 31, 2018
21ef967
adjust a few signatures to accommodate new alpha deps
ashnazg Feb 1, 2018
418bedf
can't install vendor phpunit due to reflection-docblock deps
ashnazg Feb 2, 2018
6fa0469
specify phpunit 6
ashnazg Feb 2, 2018
323b731
add strict typing, return types, and more typehints;
ashnazg Feb 2, 2018
52a4529
additional typing added;
ashnazg Feb 8, 2018
d8bc5cb
rename to containerMock;
ashnazg Feb 8, 2018
671dc2a
add ProjectFactoryStrategy return;
ashnazg Feb 8, 2018
33eff4d
ecs removed many param/return tags that are now explicit in the code;
ashnazg Feb 9, 2018
53f2fc4
adjust some docblocks;
ashnazg Feb 14, 2018
49fc578
bump type-resolver
ashnazg Feb 14, 2018
a2d974a
remove tags;
ashnazg Feb 14, 2018
61d1b7d
add string param typehint;
ashnazg Feb 14, 2018
8d1c210
add Command interface supertype, for Middleware typehinting;
ashnazg Feb 14, 2018
43efcf2
bump php versions
ashnazg Feb 14, 2018
21ba8b5
bump reflection-common
ashnazg Feb 14, 2018
b92477a
add develop branch back
ashnazg Feb 14, 2018
51f94cb
fix phpunit version constraint
ashnazg Feb 14, 2018
347cd91
restore original state of example file... presumably the cs violation…
ashnazg Feb 27, 2018
80d8d78
nullable types for parameter typehints;
ashnazg Feb 27, 2018
23c1637
fix typehint namespacing;
ashnazg Feb 27, 2018
bcd3ebb
use PREFER rather than ONLY;
ashnazg Feb 27, 2018
aaedf5f
update appveyor config format
ashnazg Jun 14, 2018
7d15e83
use ecs v3.x
ashnazg Jun 14, 2018
ef597eb
ignore ecs issues in test file designed to have issues
ashnazg Jun 14, 2018
404ae12
pSafe() no longer a concern... gone since 2012
ashnazg Jun 14, 2018
c7e465d
recognize where nullable types are used, and where they are not;
ashnazg Jun 15, 2018
40b9f7c
no arg required;
ashnazg Jun 15, 2018
e7fe79b
adjust tags to fit usage;
ashnazg Jun 15, 2018
8e0e2a3
add phpstan exceptions for things we cannot fix just yet;
ashnazg Jun 15, 2018
4da641b
can't make both phpstan and ecs happy with == vs ===;
ashnazg Jun 15, 2018
9af9789
completely ignore bad stuff in the test file that's intentionally bad;
ashnazg Jun 15, 2018
a9108fb
bump
ashnazg Jun 15, 2018
3116637
bump
ashnazg Jun 15, 2018
6d0493a
bump
ashnazg Jun 15, 2018
612d655
develop branch is main branch
ashnazg Jun 15, 2018
40c5b05
don't use one-line var docblocks;
ashnazg Jun 15, 2018
89ab71e
only have matches() docblock once, on the parent;
ashnazg Jun 15, 2018
e0b7763
tighten up docblocks and types;
ashnazg Jun 15, 2018
7df651d
getDocComment() doesn't return string, per PhpParser code;
ashnazg Jun 15, 2018
0c20e37
classname collision identified by scrutinizer;
ashnazg Jun 15, 2018
784c95f
restore intentional cs mistakes in test files;
ashnazg Jun 15, 2018
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
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# IDE Shizzle; it is recommended to use a global .gitignore for this but since this is an OSS project we want to make
# it easy to contribute
.idea
vendor
/build/
/nbproject/private/
.buildpath
.project
.settings

# Build folder and vendor folder are generated code; no need to version this
build/
tools/
temp/
vendor/
*.phar

# By default the phpunit.xml.dist is provided; you can override this using a local config file
phpunit.xml
29 changes: 14 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: php
php:
- 7.1
- 7.2
- nightly
php: [ 7.1, 7.2, nightly ]
sudo: false

env:
Expand All @@ -13,33 +10,35 @@ matrix:
- php: nightly

install:
- composer install --no-interaction --prefer-dist --optimize-autoloader
- travis_retry composer install --no-interaction --prefer-dist --optimize-autoloader
- travis_retry composer global require phpunit/phpunit "^6" # cannot use phpunit.phar or require-dev, because this package is a phpunit dep
- travis_retry wget --no-verbose https://phar.io/releases/phive.phar

script:
- /home/travis/.composer/vendor/bin/phpunit --no-coverage

jobs:
include:
- stage: test
script:
- vendor/bin/phpunit --no-coverage

- stage: coverage
php: 7.1
script:
- vendor/bin/phpunit
- /home/travis/.composer/vendor/bin/phpunit
after_script:
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
- travis_retry php phive.phar --no-progress install --trust-gpg-keys E82B2FB314E9906E php-coveralls/php-coveralls && ./tools/php-coveralls --verbose
- travis_retry wget --no-verbose https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

- stage: lint
php: 7.1
before_script:
- composer create-project symplify/easy-coding-standard temp/ecs
- travis_retry php phive.phar --no-progress install --trust-gpg-keys 8E730BA25823D8B5 phpstan
script:
- temp/ecs/bin/ecs check src tests
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
- ./tools/phpstan analyse src --level max --configuration phpstan.neon
- composer create-project symplify/easy-coding-standard temp/ecs ^3 && temp/ecs/bin/ecs check src tests

cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.phive

notifications:
irc: "irc.freenode.org#phpdocumentor"
Expand Down
51 changes: 25 additions & 26 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ skip_tags: true
branches:
only:
- develop
- master

environment:
matrix:
- PHP_VERSION: '7.1.13'
VC_VERSION: 'VC14'
- PHP_VERSION: '7.2.1'
VC_VERSION: 'VC15'
- php_ver_target: 7.1
- php_ver_target: 7.2
matrix:
fast_finish: false

Expand All @@ -25,31 +22,33 @@ cache:
- '%LOCALAPPDATA%\Composer\files'

init:
- SET PATH=c:\php\%PHP_VERSION%;%PATH%
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- SET ANSICON=121x90 (121x90)


install:
- IF NOT EXIST c:\php mkdir c:\php
- IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION%
- cd c:\php\%PHP_VERSION%
- IF NOT EXIST php-installed.txt appveyor DownloadFile http://windows.php.net/downloads/releases/php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip
- IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%-Win32-%VC_VERSION%-x86.zip -y >nul
- IF NOT EXIST php-installed.txt del /Q *.zip
- IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini
- IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini
- IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini
- IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_curl.dll >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini
- IF NOT EXIST php-installed.txt echo extension=php_fileinfo.dll >> php.ini
- IF NOT EXIST php-installed.txt echo zend.assertions=1 >> php.ini
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://getcomposer.org/composer.phar
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
- IF EXIST c:\tools\php (SET PHP=0)
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- cd c:\tools\php
- IF %PHP%==1 copy /Y php.ini-development php.ini
- IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- IF %PHP%==1 echo zend.assertions=1 >> php.ini
- IF %PHP%==1 echo assert.exception=On >> php.ini
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- cd c:\reflection
- composer install --no-interaction --prefer-dist --no-progress
- composer global require phpunit/phpunit ^6
- composer global config bin-dir --absolute

test_script:
- cd c:\reflection
- vendor/bin/phpunit --no-coverage
- c:\Users\appveyor\AppData\Roaming\Composer\vendor\bin\phpunit --no-coverage
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,16 @@
]
}
},
"minimum-stability": "alpha",
"require": {
"php": ">=7.1",
"psr/log": "~1.0",
"nikic/php-parser": "^3.0",
"phpdocumentor/reflection-docblock": "^4.1",
"phpdocumentor/reflection-common": "^1.0@dev"
"phpdocumentor/reflection-docblock": "^5"
},
"require-dev": {
"mockery/mockery": "~1.0",
"mikey179/vfsStream": "~1.2",
"squizlabs/php_codesniffer": "^2.5",
"phpunit/phpunit": "~6.5",
"phpstan/phpstan": "^0.9.0"
"mikey179/vfsStream": "~1.2"
},
"extra": {
"branch-alias": {
Expand Down
Loading