- The requirements checker now logs its output to
stderr
instead ofstdout
per default. SetBOX_REQUIREMENTS_CHECKER_LOG_TO_STDOUT=1
to restore the old behaviour.
- Bump to PHP 8.1 #613
- Remove the build command (#623): the
build
command 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\Json
Herrera\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
Php
compactor:-
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#ignore
no longer accepts astring
value, onlystring[]
andnull
are 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.readonly
orulimit
setting 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-format
anddatetime_format
are now always evaluated even if thedatetime
setting is not used or null (#245) - The settings
datetime-format
anddatetime_format
now throw an exception when the format is invalid (#245) - Disabling the shebang requires to set
shebang
tofalse
instead ofnull
(#251) - Disabling the banner requires to set
banner
tofalse
instead ofnull
(#251)
- Add missing doc elements and doc related tests (#240)
- Skip the tests when they require
phar.readonly
off but it is on (#241)
- The
Json
compactor now also attempts to compress.lock
files (e.g. thecomposer.lock
) (#228) - Remove the config JSON imports support (#237)
- Remove the JS minifier compactor (#173)
- Ignore the symlinks in the
vendor
directory (#157)
- Change the default PHAR output from
default.phar
toindex.phar
(#127) - When no configuration is provided or when the setting
main
is omitted, the value found incomposer.json#bin
will have the priority over the defaultindex.php
(#127) - When no configuraiton is provided or when the setting
output
is omitted, the default value will depend in theinput
value as opposed to systematicallydefault.phar
(#127)
- Remove support for the
bootstrap
setting (#88) - The option
compactors
no longer accepts a string value (#89) - No longer accept
number
foralgorithm
(#89) - No longer accept
integer
forcompression
(#89) - The command
info
no longer supports ZIP & TAR based PHARs (#93) - When using the
PhpScoper
compactor thescoper-autoload.php
file 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:
add
remove
extract
key:create
key:extract
- Process the configuration when loading it instead of lazily processing it
- Dropped the following deprecated packages:
kherge/amend
which has been replaced bypadraic/phar-updater
phine/path
herrora-io/json
herrora-io/phpunit-test-case
- Move the
Herrora\Box
namespace toKevinGH\Box
- The option
configuration|c
of the commandbuild
has 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.dist
configuration:mimetypes
,mung
,not-found
andweb
. - The entry
shebang
inbox.json.dist
no longer accept a boolean value or an empty string. To remove the shebang line the valuenull
should be provided. - The output directory specified by
output
is 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