Skip to content

Releases: humbug/php-scoper

0.16.0

30 Jan 17:42
7106c5e

Choose a tag to compare

0.16.0 Pre-release
Pre-release

Breaking Changes

  • files-whitelist has been renamed into exclude-files
  • whitelist-global-constants has been renamed into expose-global-constants
  • whitelist-global-classes has been renamed into expose-global-classes
  • whitelist-global-functions has been renamed into expose-global-functions
  • whitelist has been deprecated in favour of the exclude-* and expose-* entries and will be removed in 0.17.0

Features

  • Bump min PHP version to 7.4 (#474)
  • Improve file whitelist (renamed excluded files) performances (#445)
  • Rework the whole "whitelist" logic to split it into two concepts: exclude and expose. Excluded symbols are treated as PHP internal symbols i.e. left untouched. Exposed symbols are symbols that will remain accessible after scoping. More details in the docs and the following related PRs:
    • Allow to register internal symbols & namespaces (#493, #494, #520, #570) via the config entries exclude-{namespaces, constants, classes, functions}
    • Rename the whitelist-global-{constants, classes, functions} to expose-global-{constants, classes, functions} (#517)
    • Move from whitelist to expose-{namespaces, constants, classes, functions} (#519, #521, #522, #525, #526, #527, #553, #608)
  • Change default expose global symbols from true to false (#523)
  • Fix (some) PHP8.1 compatibility (#528)
  • Remove Composer1 support (#544, #556)
  • Add multi-const statement support (#571)
  • Rename "whitelisted files" to "excluded files" (#611)

Bugfixes

  • Fix polyfills shipped within PHP-Scoper (#481)
  • Fix prefix validation (#490)
  • Fix scoping of typed properties (#499)
  • Fix scoping of NULL (#500)
  • Fix scoping of closures return type (#524)
  • Fix doc link (#531, #385)
  • Fix regex detection (#596)
  • Restrict regex delimiters allowed (#598)

Misc

  • Various Makefile improvements (#476, #588)
  • Various code improvements:
    • Switch to the Safe API when possible (#475)
    • Leverage PHP 7.4 (#478, #491)
    • Integrate FidryConsole (#418)
    • Validate the prefix in the Configuration instead of the command (#482)
    • Refactor AddPrefixCommand (#483)
    • Make prefix non-nullable (#485)
    • Use self instead of this for PHPUnit assertions (#487)
    • Move creation of the config into a dedicated factory class (#488)
    • Move Prefix validation to the Configuration class (#489)
    • Make PHPUnit data providers static (#518)
    • Introduce ScoperFactory (#492)
    • Refactor various classes (#495, #502, #503, #504, #505, #506, #507, #508, #509, #564, #566, #569, #573, #574, #578, #580, #576, #581, #585, #586, #587, #591, #592, #594, #602, #603, #604, #552)
    • Replace PHP-Scoper name resolver by the PHP-Parser one (Part 1) (#496)
    • Introduce static utility method for reflector (#554)
    • Make methods static when possible (#558)
    • Move the prefix, patchers and whitelist out of the Scoper interface (#555)
    • Introduce a Patcher interface (#562)
    • Introduce SymbolsRegistry (#567)
    • Introduce the EnrichedReflector (#575)
    • Introduce NamespaceRegistry (#582)
    • Introduce SymbolsConfiguration (#584)
    • Introduce SymbolRegistry (singular) (#593)
  • Improve the CI (#544, #545, #546, #547, #550, #551, #560, #568)
  • Update composer config to allow plugins (#561, #605)
  • Fix Box (#590)
  • Enrich spec failure message (#599)
  • Update the doc (#610)

0.15.0

10 May 21:02
98c92f2

Choose a tag to compare

0.15.0 Pre-release
Pre-release

Features

  • Not adding prefixes to names after use statements (#457)
  • Switch to jetbrains/phpstorm-stubs stable (#461)
  • Do not prefixes names in the same namespace (#460)

0.14.1

14 Apr 19:54
023b231

Choose a tag to compare

0.14.1 Pre-release
Pre-release

Bugfixes

  • Fix support of parent return type (#466)
  • Update box to version 3.11 and bump composer root version to 0.14.99 (#450)

Misc

  • Fixed filename typo (#458)
  • Fix product name in the Bug Report table (#453)

0.14.0

21 Dec 14:35
6ff13aa

Choose a tag to compare

0.14.0 Pre-release
Pre-release

Features

  • Add PHP 8 support (#446)

Bugfixes

  • Bump dependencies (#426)

0.13.10

29 Nov 14:14
e56b0d9

Choose a tag to compare

0.13.10 Pre-release
Pre-release

Bugfixes

  • Revert "Add versions to hot-patched symbols" but keep fixed Lexer (#437)

Misc

  • Fix PHPStan in Makefile (#441)
  • Upgrade PHPUnit to 9.4 (#443)
  • Bump dependencies (#434)
  • Do not create file with touch (#435)

0.13.9

06 Nov 23:17
d6d7e83

Choose a tag to compare

0.13.9 Pre-release
Pre-release

Bugfixes

  • Update composer/package-versions-deprecated (#428)
  • Fix internal constants (#425)

Misc

  • Update phpstan (#427)
  • Add lint workflow for phpstan and phpcs (#431)
  • Force use statements for global function, constants and classes if they are not colliding (#432)
  • Upgrade Symfony dependencies (#429)

0.13.8

29 Oct 16:18
e4a8d13

Choose a tag to compare

0.13.8 Pre-release
Pre-release

Misc

0.13.7

21 Oct 14:37
bc29944

Choose a tag to compare

0.13.7 Pre-release
Pre-release

Bugfixes

  • Update Reflector with PHP 7.4 & 8.0 symbols (#418)

0.13.6

12 Oct 08:14
3b58345

Choose a tag to compare

0.13.6 Pre-release
Pre-release

Bugfixes

  • Also check for interfaces and traits in existence checks (#417)

0.13.5

16 Sep 13:17
fd78875

Choose a tag to compare

0.13.5 Pre-release
Pre-release

Bugfixes

  • Fix group use bug (#413)