2.0.0 - 06 Jan 2026

After year of improvements in a backward compatible way this is the moment we break with this pattern. This release is mostly build thanks to @mspirkov. Who implemented many of the improvements to support generics and remove all legacy.

Please consult the upgrade guide in our docs https://docs.phpdoc.org/components/type-resolver/guides/upgrade-v1-to-v2.html

Full change list:

    Add support for non-empty-array with generics by @mspirkov in #235
    Fix the conversion of lists to strings by @mspirkov in #237
    Replace Collection with GenericType by @mspirkov in #238
    Refactor pseudo-types by @mspirkov in #241
    Analyze tests using PHPStan by @mspirkov in #240
    Remove/phpstan v1 parser by @jaapio in #239
    Remove GenericTemplate class by @mspirkov in #247
    Fix IntMaskOfTest::testToString() by @mspirkov in #246
    Remove aliases for True_ and False_ by @mspirkov in #248
    Update dev dependencies by @mspirkov in #245
    Add support for compound FQSEN to class-string and interface-string by @mspirkov in #249
    Add support for any array keys by @mspirkov in #236
    Add docs for v1 to v2 migration by @jaapio in #250
    Add support for trait string types by @jaapio in #251
    Add support for enum-string by @mspirkov in #252
    Fix PHPUnit coverage report generation by @mspirkov in #253
    Refactor pseudo-types by @mspirkov in #254
    Add 100% test coverage for PseudoTypes by @mspirkov in #255
    Add identifier to the Callable by @mspirkov in #258
    Improve the conversion of Callable to a string by @mspirkov in #259
    Increase test coverage to 96% by @mspirkov in #260
    Refactor types by @mspirkov in #261
    Add support for properties-of and its variations by @mspirkov in #267
    Add support for more pseudo-types by @mspirkov in #271
    Improve the conversion of lists to strings by @mspirkov in #273
    Add support for never-return, never-returns and no-return by @mspirkov in #272
    Add support for open-resource and closed-resource by @mspirkov in #275
    Add support for callable-array by @mspirkov in #276
    Improve the conversion of arrays to strings by @mspirkov in #274

1.12.0 - 24 Nov 2025

    Add AbstractList::getOriginalKeyType() method by @mspirkov in #233

1.11.1 - 21 Nov 2025

    Add tests for DNF types by @mspirkov in #230
    Fix @return annotation for SelfTest::provideToStringData() by @mspirkov in #229
    Make OffsetAccess properties private by @mspirkov in #232

1.11.0 - 20 Nov 2025

    Add support for conditional types, offset access types and key-of, value-of, int-mask, int-mask-of by @mspirkov in #225
    Add support for generics in Static_ and Self_ by @mspirkov in #228
    Add .editorconfig by @mspirkov in #226
    Exclude commits with CS changes from Git Blame by @mspirkov in #227

1.10.1 - 18 Nov 2025

    Correct documentation reference by @DannyvdSluijs in #216
    Fix handling of array shapes without keys by @mspirkov in #224


1.10.0 - 9 Nov 2024

    add support for phpstan/phpdoc-parser 2 by @xabbuh in #212

1.9.0 - 3 Nov 2024

    Add support for non-empty-array notation by @jaapio in #206
    Add support for object and list shape types by @jaapio in #207
    Bump phpDocumentor/.github from 0.5.0 to 0.7 by @dependabot in #209
    build on php 8.4 by @jaapio in #210

1.8.2 - 23 Feb 2024

This new patch version reintroduces php 7.3 support to allow users to use php-parser v5 together with this package. There are no breaking changes or other changes people should be aware of.

    Be able to run examples whatever current directory is by @llaville in #201
    Downgrade to php 7.3 by @jaapio in #203

1.8.1 - 20 Feb 2024

    Make Float_ non-final by @antoinelame in #200

1.8.0 - 11 Jan 2024

This version allows users to get the Item definition of ArrayShape types, and gives you access to the type definition of these item. Using the new ArrayShape::getItems() method.

    Add getter to ArrayShape by @antoinelame in #194

1.7.4 - 11 Jan 2024

This patch ensures this library works with php-parser v5. Due a conflict in the way both libraries were handling the forward compatibility on php 7.4 for language constructs in php 8+. This patch version should not have any impact on the way you are using the library unless you did use the value of the T_NAME_QUALIFIED and T_NAME_FULLY_QUALIFIED constants, and you are running php 7.4

    Update parser token constant values to ints instead of strings by @mukuru-shaun in #197

1.7.3 - 12 Aug 2023

Fixed

    Fix ContextFactory::createForNamespace detects wrong use statement by @maMykola in #192

1.7.2 - 30 May 2023

Fixes

    Change underlying type for StringValue pseudo type by @astronom in #189

1.7.1 - 28 Mar 2023

Fixes

    Fix compound array key support by @jaapio in #188

1.7.0 - 18 Mar 2023

This version of the type resolver contains an internal rewrite of the type parser using phpstan/php-doc-parser. This enables a number of features regarding more advanced type resolving. The interface of the library has not been changed. This version should be fully backward compatible.

Added

    Add non-empty-list pseudo-type by @schodemeiss in #183
    Add callable parameters and return type support by @jaapio
    Add array shape support by @jaapio

Deprecated

    Support for nullable type definitions in compound types see: #184

Fixed

    Update .gitattributes by @williamdes in #177

1.6.2 - 14 Oct 2022

Added

    Upgrade to standardized phpdoc ci by @jaapio in #170
    Upgrade code to php 7.4 level by @jaapio in #171
    Build on php 8.2 by @jaapio in #172

Fixed

    Fix parsing nullable collections by @hemberger in #168
    Update inaccurate docblock in AbstractList by @Prusias in #174

1.6.1 - 29 Mar 2022

Fixed

    fix for zero IntRange by @voku in #153

CI

    GH Actions: version update for various predefined actions by @jrfnl in #159

1.6.0 - 04 Jan 2022

Added

    Add list pseudo-type by @enumag in #136
    add support for "int<min,max>", "negative-int" and "numeric" by @voku in #139

Fixed

    Throw exception on invalid array start by @jaapio in #147
    GH Actions: version update for ramsey/composer-install by @jrfnl in #144

1.5.1 - 02 Oct 2021

Added

    add support for literal-string, thanks to @voku
    fix "PseudoType" for ArrayKey, thanks to @voku

Fixed

    fix "RuntimeException" for "array-key" and for "class-string", thanks to @voku

1.5.0 - 17 Sep 2021

This version contains various fixes, and adds support for php 8.1 including the new never return type.

Added

    support psalm scalar types #112, thanks to @smoench
    support for never return type #130 thanks to @jaapio

Fixed

    Update .gitattributes #115, thanks to @KasperFranz
    Do not include composer.lock in distribution #118 @kubawerlos
    Allow manual trigger of github actions #120, thanks to @jrfnl
    fix array-offset via "isset"-call #104, thanks to @voku
    GH Actions: simplify Composer caching #121, thanks to @jrfnl
    Tests/ArrayKeyTest: fix incorrect @uses tag #122 thanks to @jrfnl
    GH Actions: actually run the tests on PHP 8.0 + 8.1 #123 thanks to @jrfnl
    CS update after upstream changes #124, thanks to @jrfnl
    GH Actions: don't allow builds against PHP 8.1 to fail #125 @jrfnl

1.4.0 - Sep 17, 2020

Added

    Improved Pseudo type support #113, thanks to @mvriel

Deprecated

    phpDocumentor\Reflection\Types\False_ is replaced by \phpDocumentor\Reflection\PseudoTypes\False_ will be removed in v2
    phpDocumentor\Reflection\Types\True_ is replaced by \phpDocumentor\Reflection\PseudoTypes\True_ will be removed in v2

Fixed

    fix parsing tokens #114, thanks to @xabbuh

1.3.0 - Jun 26, 2020

Added

    Add php 8 support #110 , thanks to @jaapio

1.2.0 - Jun 19, 2020

Added

    Add support for True and False pseudo-types #14, thanks to @jaapio

1.1.0 - Feb 26, 2020

Added

    Add collection syntax support for iterable, #80 thanks to @julienfalque
    Added support for class-string and class-string types, #90 thanks to @othercorey
    Deduplicate double entries in a compound thanks to @mvriel
    Type coverage improvements, thanks to @orklah
    BC check in ci, thanks to @jaapio

Fixed

    Infinite loop could occur when no closing use token found, thanks to @mvriel

1.0.1 - Aug 22, 2019

This version contains a fixed regression regarding namespace alias interpretation.

Fixed

    Fixed #76 ContextFactory incorrect namespace aliases, thanks to @piku235

0.7.2 - Aug 22, 2019 - regression fix release

This version contains a fixed regression regarding namespace alias interpretation.

Fixed

    Fixed #76 ContextFactory incorrect namespace aliases, thanks to @piku235

1.0.0 - Jul 8, 2019

This release doesn't contain any new features since the previous release.
All methods do have the correct typehints and return types now.
The codebase is fully checked with phpstan and psaml.

Added

    QA pipeline

0.7.1 - Oct 12, 2018

Fixed

    Throw exception on unclosed array in type notation

0.7.0 - Aug 22, 2018

Added

    Support for grouped use statements #64 thanks to @ragboyjr

0.6.3 - Aug 9, 2018

bump reflection-common dependency to newest beta

0.6.2 - Jun 14, 2018

bump reflection-common dependency to newest alpha

0.6.1 - Feb 13, 2018

Fixed #55 : ContextFactory::createFromReflector() doesn't work with ReflectionProperty

0.6.0 - Jan 26, 2018

    bump to PHP 7.1 minimum
    add strict typing

0.5.1 - Jan 26, 2018

    added missing pseudo-type alias of float

0.5.0 - Dec 28, 2017

complex type support

Added

    Support of array expression of PSR-5
    Support of collections
    Improved php 7.0 code
    phpstan max level.

0.4.0 - Jul 14, 2017

Improved php 7+ support

Added

    Renamed Mixed to Mixed_
    Renamed Resource to Resource_

Fixed

    HHVM build on travis

0.3 - Jun 4, 2017

New features

Added

    Support for iterable type.
    Support for Nullable type
    Support for parent type
    Travis build for php 7.1

Fixed

    Code highlighting in readme.

0.2.1 - Nov 25, 2016

Last namespace separator is not removed

Because the count function was used to determine the length of the FQNN the
last character was not correctly determined. This was remedied by replacing
the count function with strlen.

0.2 - Jun 10, 2016

Rename Void to Void_ since it is a reserved keyword in PHP7.1

0.1.8 - Mar 29, 2016

0.1.7 - Mar 19, 2016

Fix file_get_contents warning in ContextFactory

0.1.6 - 2 Dec 2015

0.1.5 - 18 Jul 2015

Ignore any tokens within classes when looking for namespaces

0.1.4 - 2 Jul 2015

0.1.3 - 26 Jun 2015

0.1.2 - 26 Jun 2015

0.1.1 - 12 Jun 2015

0.1 - 12 Jun 2015
