Skip to content

Releases: box-project/box

3.0.0-beta.1

08 Jun 13:22
5aa3c42
Compare
Choose a tag to compare
3.0.0-beta.1 Pre-release
Pre-release

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

31 May 16:15
e831cb5
Compare
Choose a tag to compare
3.0.0-beta.0 Pre-release
Pre-release

Feature

  • Deprecate the setting datetime_format in favour of the new setting datetime-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 and datetime_format are now always evaluated even if the datetime setting is not used or null (#245)
  • The settings datetime-format and datetime_format now throw an exception when the format is invalid (#245)
  • Disabling the shebang requires to set shebang to false instead of null (#251)
  • Disabling the banner requires to set banner to false instead of null (#251)

3.0.0-alpha.7

30 May 18:05
924fa40
Compare
Choose a tag to compare
3.0.0-alpha.7 Pre-release
Pre-release

Features

Bugfixes

  • Fix verify command on PHAR files without the .phar extension (#244)

Misc

  • Add missing doc elements and doc related tests (#240)
  • Skip the tests when they require phar.readonly off but it is on (#241)

3.0.0-alpha.6

27 May 11:54
a040770
Compare
Choose a tag to compare
3.0.0-alpha.6 Pre-release
Pre-release

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

  • The Json compactor now also attempts to compress .lock files (e.g. the composer.lock) (#228)
  • Remove the config JSON imports support (#237)

3.0.0-alpha.5

04 May 22:12
26b3f48
Compare
Choose a tag to compare
3.0.0-alpha.5 Pre-release
Pre-release

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

28 Apr 17:29
d34ee97
Compare
Choose a tag to compare
3.0.0-alpha.4 Pre-release
Pre-release

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

24 Apr 09:27
6b7dc4a
Compare
Choose a tag to compare
3.0.0-alpha.3 Pre-release
Pre-release

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

23 Apr 09:17
db1ea6f
Compare
Choose a tag to compare
3.0.0-alpha.2 Pre-release
Pre-release

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 and composer.lock and expose them from the configuration (#122, #124)
  • Infer information from the composer.json and composer.lock files (#127)
  • Add a --no-config option for the compile 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 the compile 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 the compile 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 to index.phar (#127)
  • When no configuration is provided or when the setting main is omitted, the value found in composer.json#bin will have the priority over the default index.php (#127)
  • When no configuraiton is provided or when the setting output is omitted, the default value will depend in the input value as opposed to systematically default.phar (#127)

BC breaks

  • Change the default PHAR output from default.phar to index.phar (#127)
  • When no configuration is provided or when the setting main is omitted, the value found in composer.json#bin will have the priority
    over the default index.php (#127)
  • When no configuraiton is provided or when the setting output is omitted, the default value will depend in the input value as opposed
    to systematically default.phar (#127)

3.0.0-alpha1

10 Apr 13:54
d442315
Compare
Choose a tag to compare
3.0.0-alpha1 Pre-release
Pre-release

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 the algorithm and compression 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 the info 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 is None (#93)
  • Calculate the compression by checking the PHAR contents for the info command instead of relying on the falsy Phar::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 and compression settings (#89)
  • info command tweaks besides the one mentioned above:
    • Remove support for ZIP and TAR based PHARs (#93)
    • Remove the metadata option to always show its content instead (#93)

BC breaks

  • Remove support for the bootstrap setting (#88)
  • The option compactors no longer accepts a string value (#89)
  • No longer accept number for algorithm (#89)
  • No longer accept integer for compression (#89)
  • The command info no longer supports ZIP & TAR based PHARs (#93)
  • When using the PhpScoper compactor the scoper-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

05 Mar 02:15
f5eec71
Compare
Choose a tag to compare
3.0.0-alpha.0 Pre-release
Pre-release

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 the build 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 and files-bin now works with absolute paths
  • files and files-bin now throws a user-friendly error when a file does not exists or is a directory instead of a file
  • directories and directories-bin now works with absolute paths
  • directories and directories-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 the Finder::append() and Finder::exclude() arguments)
    • finder-bin (as well as the Finder::append() and Finder::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 to compile

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 to src
    • Move lib/test to tests
    • Move the Herrora\Box namespace to KevinGH\Box
  • Dropped the following deprecated packages:
    • kherge/amend which has been replaced by padraic/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