- The requirements checker now logs its output to
stderrinstead ofstdoutper default. SetBOX_REQUIREMENTS_CHECKER_LOG_TO_STDOUT=1to restore the old behaviour.
- Bump to PHP 8.1 #613
- Remove the build command (#623): the
buildcommand has been deprecated since 3.0.0 in favour ofcompile. - Remove support for legacy compactors (#626). Here are the replacements:
Herrera\Box\Compactor\Json->KevinGH\Box\Compactor\JsonHerrera\Box\Compactor\Php->KevinGH\Box\Compactor\Php
- Drop PHP5.3 support for the RequirementChecker - new min is 7.2.4+ (#674). This is to align the project with Composer. It is technically possible to restore support for PHP5.3 but requires some work, see #656 (comment).
- Require sodium & Remove sodium compat layer (#628)
-
Changes to the
Phpcompactor:-
Invalid annotations are no longer recognised as annotations:
/** * @Annotation () * @Namespaced\ Annotation */
Will be transformed into:
/** * @Annotation * @Namespaced */
-
-
The removal of common annotations is enabled by default
-
The setting
annotation#ignoreno longer accepts astringvalue, onlystring[]andnullare allowed -
Upon some annotation parsing failures, the error is thrown to the user in order to identify and fix those cases instead of always silently ignore the error.
-
Annotations can no longer be escaped like so:
/** * \@NotEscaped */
Indeed it will be compacted to:
/** @NotEscaped */
The change from 2.x to 3.x is quite significant but should be really smooth for the user. The main changes are:
- Box is more verbose and provides more useful information during the compilation
- Box is significantly faster (+200%!)
- The configuration is optional
- Box can figure out itself which files to include
- Automatically remove the dev dependencies
- No longer requires a
phar.readonlyorulimitsetting change from the user - Allows to scope the PHAR
- Allows to ship with a requirements checker
A few more features landed as well and a range of settings were added more, the whole list of BC breaks can be found bellow.
- There is some possible BC breaks in how the PHAR is being scoped due to PHP-Scoper introducing a couple of BC breaks (cf. PHP-Scoper 0.8.0 release notes) (#255)
- The datetime value used for the datetime placeholder is now always in UTC (#245)
- The settings
datetime-formatanddatetime_formatare now always evaluated even if thedatetimesetting is not used or null (#245) - The settings
datetime-formatanddatetime_formatnow throw an exception when the format is invalid (#245) - Disabling the shebang requires to set
shebangtofalseinstead ofnull(#251) - Disabling the banner requires to set
bannertofalseinstead ofnull(#251)
- Add missing doc elements and doc related tests (#240)
- Skip the tests when they require
phar.readonlyoff but it is on (#241)
- The
Jsoncompactor now also attempts to compress.lockfiles (e.g. thecomposer.lock) (#228) - Remove the config JSON imports support (#237)
- Remove the JS minifier compactor (#173)
- Ignore the symlinks in the
vendordirectory (#157)
- Change the default PHAR output from
default.phartoindex.phar(#127) - When no configuration is provided or when the setting
mainis omitted, the value found incomposer.json#binwill have the priority over the defaultindex.php(#127) - When no configuraiton is provided or when the setting
outputis omitted, the default value will depend in theinputvalue as opposed to systematicallydefault.phar(#127)
- Remove support for the
bootstrapsetting (#88) - The option
compactorsno longer accepts a string value (#89) - No longer accept
numberforalgorithm(#89) - No longer accept
integerforcompression(#89) - The command
infono longer supports ZIP & TAR based PHARs (#93) - When using the
PhpScopercompactor thescoper-autoload.phpfile is no longer dumped. Instead the whitelist statements are directly appended to the existing autoloader which avoids nay extra work for the user. (#94)
Migration path from kherge/box to humbug/box ^3.0.
- Moved Box2 under the Humbug umbrella:
- Change of project
- The new Composer package is now
humbug/box
- The minimal new PHP version is 7.1
- Bump the minimal Symfony dependencies from 3.0 to 3.4
- Dropped the following commands:
addremoveextractkey:createkey:extract
- Process the configuration when loading it instead of lazily processing it
- Dropped the following deprecated packages:
kherge/amendwhich has been replaced bypadraic/phar-updaterphine/pathherrora-io/jsonherrora-io/phpunit-test-case
- Move the
Herrora\Boxnamespace toKevinGH\Box - The option
configuration|cof the commandbuildhas been changed forconfig|c - Remove support for PHAR used for web purposes, which translates to the removal of the following elements of the
box.json.distconfiguration:mimetypes,mung,not-foundandweb. - The entry
shebanginbox.json.distno longer accept a boolean value or an empty string. To remove the shebang line the valuenullshould be provided. - The output directory specified by
outputis now relative to the base path (base-path) - No longer support git version placeholders in the output path (
output) - The default main script has been changed to
index.php - The main script is now required
- Do not allow a string value for the blacklist (
blacklist) anymore - Remove usage of global Box constants:
BOX_PATH,BOX_SCHEMA_FILE,BOX_EXTRACT_PATTERN_OPEN - Remove support for web PHARs
- Remove support for extractable PHARs
- Make the main script path relative to the base path
- Do not allow a config with no file registered
- Make main script mandatory (the value, not the setting)
- Exclude symlinks from the files collected