Releases: box-project/box
3.0.0-beta.1
Minor release to update the dependencies shipping the required changes fixing the PHP-Scoper BC breaks.
Features
- Update dependencies (#254)
3.0.0-beta.0
Feature
- Deprecate the setting
datetime_format
in favour of the new settingdatetime-format
(#245) - Add a
process
command to apply the compactors and replacement values on a single file (#248) - Add the application pretty version: display the version when outside the PHAR and display the date of the release when from the PHAR (#249)
- Make all settings optionals and nullable (#251)
- When a setting is set to
null
then its default value is picked. It is strictly equivalent to omit the field (#251)
Bugfixes
- The datetime value used for the datetime placeholder is now always in UTC (#245)
Misc
- Add documentation and tests for the replacement map (#245)
BC breaks
- 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)
3.0.0-alpha.7
3.0.0-alpha.6
Features
- Display the number of files included in the PHAR (#224)
- Use PHP-Scoper prefix (#218)
- Allow to disable the main script (#231)
- Allow to build an empty PHAR (#232)
- Log when skipping the requirement checker in the
compile
command output (#233) - Log the dumping of the autoloader (or when skipped) in the
compile
command output (#233) - Allow to exclude Composer files (#235)
- Display files size and limit depth with the
info
command (#236)
Bugfixes
- Fix typos in the warning message (#207)
- Throw an error when a non-existent file or symlink is found via the
composer.json
file (#214) - Disable xdebug in workers (#226)
- Fix the compactors order and compress the
composer.lock
file (#228) - Fix the invalid Composer JSON files when using
composer config --unset
(#227)
Misc
- Remove the eval usage in the requirement checker (#213, #215, #216, #217)
- Rework the documentation (#223)
- Clarify the documentation regarding the dump-autoload setting (#225)
- Makefile improvements (#230)
- Harden the tests (#237)
BC breaks
3.0.0-alpha.5
Features
- Bump the memory limit to avoid failures with low PHP default values (#180, #182, #183)
- Allow the application to be run only from the CLI (#185)
- Requirement checker optimisations (#195)
- Automatically adjust the ulimit for the compression (#200)
- Add a dump autoload configuration setting to allow to disable it (#201)
Bugfixes
- Force the dependencies to be updated on PHP 7.1 to avoid the PHAR to have incompatible code (#177)
- Fix find all files finder: some files were wrongly excluded (#194)
- Apply the blacklist to the retrieved directories from the composer.json (#196)
- Display the file permission in the octal form in the
compile
command logs (#197) - Allow dumping requirements from the composer.json file (#203)
- Gracefully fail when the autoloader could not be dumped (#202)
- Fix the extension required when the PHAR is compressed (#204)
- Fail gracefully when the extension required for the compression algorithm is not loaded (#205)
3.0.0-alpha.4
Bugfixes
- Fix main script failure when bin is a string (#162)
- Fix the main script inclusion: avoid to include it twice (#169)
- Start Amp only if PHP-Scoper is used (#171)
- Fix PHAR minimal requirements: any compressed PHAR requires the
zip
extension (#172)
Misc
- Remove the JS minifier compactor (#173)
- Add more extension polyfills (#175)
- Update dependencies and drop the unneeded ones (#176)
BC breaks
- Remove the JS minifier compactor (#173)
3.0.0-alpha.3
Bugfixes
- Add .requirement-checker artefact which allows Box to be used via a Composer installation again (#155)
- Ignore the symlinks in the
vendor
directory (#157) - Fix files misconfiguration (#158)
- Fix the parallel processing in a renamed PHAR (#160)
BC breaks
- Ignore the symlinks in the
vendor
directory (#157)
3.0.0-alpha.2
A few new features have been added to the compile
command to ease the experience as well as trying to infer as much information as possible from the composer.json
and composer.lock
files in order to avoid as much configuration as a possible.
A brand new requirement checker has also been added to allow PHARs to check that the environment they are being executed in are properly configured for them.
Backward Compatibility (BC) break changes are tracked in UPGRADE.md.
Features
- Allow to add non existent (binary or not) file to the PHAR if the content is provided (#120, #125, #138 )
- Make the scoping prefix unique with using PHP-Scoper (#121)
- Always include the root
composer.json
andcomposer.lock
and expose them from the configuration (#122, #124) - Infer information from the
composer.json
andcomposer.lock
files (#127) - Add a
--no-config
option for thecompile
command which allows to completely ignore any
configuration file found - Make compilation faster in debug mode (#142)
- A new
--no-parallel
option has been added to thecompile
command to not process the files in
parallel instead of doing so only in debug mode (#142) - A new
--no-restart
option has been added to thecompile
command to not restart the PHP process
allow more easily to keep xdebug enabled (#142) - Add a constraint checker in the built PHARs(#116)
Bugfixes
- Fix PHP-Scoper isolated finder not found when using the
finders
setting in the PHP-Scoper configuration (#130) - The verbosity for the
compile
command is now forced to debug earlier when the debug mode is enabled. This ensures the new verbosity set applies to the process restart check (#142) - Fixed missing files when using multiple append (#144)
- Correctly display the compactor class in the scoped PHAR (#147)
Misc changes
- Simplify the PHP-Scoper integration (#121)
- Change debug directory from
.box
to.box_dump
(#136) - 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)
BC breaks
- 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)
3.0.0-alpha1
3.0.0-alpha.0
was the first big milestone, so 3.0.0-alpha1
is in its continuity. The info
command has been greatly improved, a new dev
mode has been added and a good set of bug fixes to stabilise the previous release have been added.
As the project stabilises, the changes are now more scoped and trackable by PRs as you can see in the PR links below.
Features
- Allow
null
for thealgorithm
andcompression
settings (#89) - Add a
dev
mode (#90) - Display the number of files found in the PHAR for the
info
command (#93) - Display the weight of the PHAR for the
info
command (#93) - Display compression
[NONE]
when no compression is found when displaying the list of files contained in the PHAR for theinfo
command (#93) - A percentage of the compression listed is used when multiple compression or partial compression is used for the
info
command (#93) - Restart the process with a different configuration to avoid the user to have to tweak the
phar.readonly
setting (#91) - Dump all files added to the PHAR in debug mode (#108)
- Dump the processed configuration in debug mode (#108)
- Force the debug verbosity for the output when the debug mode is enabled (#108)
- Rework the Composer Orchestrator to no longer rely on the dumped file
scoper-autoload.php
from PHP-Scoper (#94) - Fix the info command for tar GZ & BZ2 compressed PHARs (#112)
- Make the info command able to inspect PHARs with no extension (#112)
Bugfixes
- Fix PHAR aliases: make the PHAR independent of its name or location; Allow the setting by default (#92)
- When no metadata is found for the
info
command, the metadata displayed isNone
(#93) - Calculate the compression by checking the PHAR contents for the
info
command instead of relying on the falsyPhar::isCompressed()
which returns the wrong result when the default PHAR is not used (#93) - Generate the box stub by default (#105)
- Fix the blacklist usage (#106, #110)
- Always exclude box debug directory
.box
from the collected files (#107) - Ignore symlinks which is causing issues with the dumping of the Composer autoloading (#109)
- Do not include the existing PHAR when collecting the files (#111)
Misc changes
- Remove support for the
bootstrap
setting (#88) - No longer accept a string value for the
compactors
setting (#89) - No longer accept a numerical value for the
algorithm
andcompression
settings (#89) info
command tweaks besides the one mentioned above:
BC breaks
- 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)
3.0.0-alpha.0
3.0.0-alpha.0
is marking the first milestone for this fork. The goal of the Box project did not change, but it needed some serious adjustments. The main changes so far:
- Complete internal overhaul
- Make it easier to use: no config file required by default
- Massive performance improvements
- PHP-Scoper integration which allows to isolate the PHAR dependencies
There is a lot more that happened (see the following) and a lot more to come. Now that this milestone has been reached, the next part will be about to polish the edges and work on the next features such as #5, #78 or #13.
Backward Compatibility (BC) break changes are tracked in UPGRADE.md.
Features
- Allow Symfony 4.x components
- Add missing validation for the compression algorithm
compression
to provide a more user-friendly validation - Add more information to logs when building a PHAR:
- Display the configuration file loaded
- Log if remove the previous PHAR file
- Log the replacement values
- Log the registered compactors
- Log the main file path used
- Remove the list of files & binary files paths added and log the number of files added for each category instead
- Log the details of the generated stub or the stub used if a file is given or the
default stub is used:- The shebang line being used
- The banner used
- Log the compression algorithm used
- Log the file permissions used
- Log the generated PHAR size
- Log the time & memory taken by the
build
command
- Add a
working-dir|d
option to thebuild
command to be able to change the working
directory from which the build command is executed - Reduce the number of files added to the PHAR by eliminating the duplicate files upfront
- Process files in parallel
- Allow disabling the shebang line
- Allow to disable the banner
- Allow to build a PHAR without any configuration
- Include all files when no file setting is used
- Exclude dev dependencies when building the PHAR
- Add debug mode which allows to debug the parallel processing or having access to a dump of the files added to the PHAR
- Add a PHP-Scoper integration which allows to isolate the dependnecies bundled in the PHAR
Bugfixes
- Fix Box usage when installed as a global Composer dependency
- Create the necessary directories to create the target
- Fix the usage of the
blackfilter
with absolute path: it now matches the real file paths to know if a file should be excluded or not - Fix the usage of the
blackfilter
with base paths: the base path is now applied to the files listed in the blacklist filter as well files
andfiles-bin
now works with absolute pathsfiles
andfiles-bin
now throws a user-friendly error when a file does not exists or is a directory instead of a filedirectories
anddirectories-bin
now works with absolute pathsdirectories
anddirectories-bin
now throws a user-friendly error when a directory does not exists or is a file instead of a directory- Normalize the paths given for the file options when superfluous spaces are used in the paths (trim the path). Applies
to:base-path
blacklist
files
files-bin
directories
directories-bin
finder
(as well as theFinder::append()
andFinder::exclude()
arguments)finder-bin
(as well as theFinder::append()
andFinder::exclude()
arguments)
- Make main script mandatory (the value, not the setting)
- Normalize the main script path
- Add a friendly error message when an invalid symlink is being used for a file and exclude symlinks whenever possible
Misc changes
- Bump the minimal PHP version from 5.3.3 to 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. Also add a friendly error message when the
configuration is invalid - Dump files in a temporary directory to build the PHAR from and existing directory instead of adding the files
processed contents one by one - Register the main script before the files instead of after
- 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
- Configure
index.php
as the default main script - Rename the command
build
tocompile
Other changes highlights
- Moved Box2 under the Humbug umbrella:
- Change of project
- The new Composer package is now
humbug/box
- Re-organise the project in a more standard structure
- Upgrade autoloading from PSR-0 to PSR-4
- Move
lib/src
tosrc
- Move
lib/test
totests
- Move the
Herrora\Box
namespace toKevinGH\Box
- Dropped the following deprecated packages:
kherge/amend
which has been replaced bypadraic/phar-updater
phine/path
herrora-io/json
herrora-io/phpunit-test-case
- Simplify the usage of the library as a contributor and maintainer by using a
Makefile
- Update PHPUnit configuration
- Set-up PHP-CS-Fixer and fix the CS
- Upgrade from PHPUnit 3.7 to PHPUnit 7.0
- Add e2e tests
- Add Infection for the tests
- Add Blackfire
- Do not allow a string value for the blacklist anymore
- Remove usage of global Box constants:
BOX_PATH
,BOX_SCHEMA_FILE
,BOX_EXTRACT_PATTERN_OPEN
- Leverage
nikic/iter
instead of custom functions - Leverage
Assert
for some checks when retrieving the compactors - Create a dedicated
FileSystem
component