Skip to content

Releases: humbug/php-scoper

0.17.0

13 Feb 19:44
cb23986
Compare
Choose a tag to compare
0.17.0 Pre-release
Pre-release

Features

  • Improve PHP 8.1 support
    • Fix deprecations (#617, #543)
    • Add support for union and intersection types (#644)
  • Add InspectSymbols command (#619)
  • Add support for regexes for excluded symbols (#660)

Bugfixes

  • Patch various symbols not interpreted as internal (#626)
  • Stops the process if says no when PHP-Scoper asks if the output directory can be deleted (#631)
  • Fix autoload generator links (#630)

Docs

  • Document the idiomatic way to include polyfills (#636)
  • Replace incorrect usage of files-whitelist by exclude-files (#651)

Misc

  • Move default file name to the ConfigurationFactory (#621)
  • Prefer newline over writing empty string (#622)
  • Improve tests(#624, #648, #654, #659)
  • Move EnrichedReflector into a factory service (#625)
  • Build the PHAR in multiple PHP versions for better testing (#628)
  • Add Configuration::withPrefix() (#629)
  • Add outdated-fixtures command by (#641)
  • Improve NamespaceRegistry (#645)
  • Simplify TraverserFactory (#653)
  • Introduce a Printer abstraction (#655)
  • Adapt printer API to preserve formatting (#652)

0.16.2

30 Jan 21:53
9aa7488
Compare
Choose a tag to compare
0.16.2 Pre-release
Pre-release

Bugfixes

  • Fix GitHub Actions to publish the PHAR on release

0.16.1

30 Jan 18:26
958e351
Compare
Choose a tag to compare
0.16.1 Pre-release
Pre-release

Bugfixes

  • Fix the CI to allow the PHAR to be published

0.16.0

30 Jan 17:42
7106c5e
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare
0.13.8 Pre-release
Pre-release

Misc