Download the PHP package sensiolabs/minify-bundle without Composer

On this page you can find all versions of the php package sensiolabs/minify-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package minify-bundle

SensioLabs Minify Bundle

composer require sensiolabs/minify-bundle
[![PHP Version](https://img.shields.io/badge/%C2%A0php-%3E%3D%208.2-777BB4.svg?logo=php&logoColor=white)](https://github.com/sensiolabs/minify-bundle/blob/main/composer.json) [![CI](https://github.com/sensiolabs/minify-bundle/actions/workflows/CI.yaml/badge.svg?color=68c22e)](https://github.com/sensiolabs/minify-bundle/actions) [![Release](https://img.shields.io/github/v/release/sensiolabs/minify-bundle?color=31a6ce)](https://github.com/sensiolabs/minify-bundle/releases) [![Packagist Downloads](https://img.shields.io/packagist/dt/sensiolabs/minify-bundle?color=ce8531)](https://github.com/sensiolabs/minify-bundle/) [![License](https://img.shields.io/github/license/sensiolabs/minify-bundle?color=d3416f)](https://github.com/sensiolabs/minify-bundle/blob/main/LICENSE)

Minify integration

SensioLabs Minify Bundle integrates Minify into Symfony Asset Mapper.

Asset Minifier

✅ Minify CSS and JS files, remove whitespace, comments, and more..

🌍 Reduces the size of your assets by up to 70% (see metrics below).

🚀 Improves the loading time of your website, and the user experience.

Asset Mapper

🎯 Automatically minify assets during the build process.

📦 Stores minified assets in the Symfony cache.

🌿 Download the Minify binary automatically from Github.

Minification

JavaScript

File Original Minified Ratio Gain Compression Time
autocomplete.js 19.88 KB 9.17 KB 46.13% 53.87% 🟩🟩🟩🟩🟩⬜️⬜️⬜️⬜️⬜️ 8 ms
bootstrap.js 145.40 KB 62.20 KB 42.76% 57.24% 🟩🟩🟩🟩🟩🟩⬜️⬜️⬜️⬜️ 10 ms
video.js 2.35 MB 690.10 KB 29.33% 70.67% 🟩🟩🟩🟩🟩🟩🟩⬜️⬜️⬜️ 42 ms
w3c.org js 43.39 KB 19.23 KB 44.34% 55.66% 🟩🟩🟩🟩🟩🟩⬜️⬜️⬜️⬜️ 6 ms

Even gzip compression is more efficient on minified assets (see metrics below).

See transfert comparison (gzip) | File | Original | Minified | Ratio | Gain | Compression | |-----------------|-----------:|----------:|-------:|-------:|---------------------:| | autoComplete.js | 5.59 KB | 2.68 KB | 47.96% | 52.04% | 🟩🟩🟩🟩🟩⬜️⬜️⬜️⬜️⬜️ | | bootstrap.js | 29.92 KB | 12.58 KB | 42.06% | 57.94% | 🟩🟩🟩🟩🟩🟩⬜️⬜️⬜️⬜️ | | video.js | 538.83 KB | 202.62 KB | 37.61% | 62.39% | 🟩🟩🟩🟩🟩🟩⬜️⬜️⬜️⬜️ | | w3c.org.js | 10.44 KB | 5.89 KB | 56.45% | 43.55% | 🟩🟩🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️ |

CSS

File Original Minified Ratio Gain Compression Time
autocomplete.css 3.09 KB 2.51 KB 81.33% 18.67% 🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️ 2 ms
bootstrap.css 281.05 KB 231.89 KB 82.51% 17.49% 🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️ 9 ms
video-js.css 53.37 KB 47.06 KB 88.24% 11.76% 🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️ 4 ms
w3c.org css 111.44 KB 70.37 KB 63.17% 36.83% 🟩🟩🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️ 5 ms
See transfert comparison (gzip) | File | Original | Minified | Ratio | Gain | Compression | |------------------|-----------:|----------:|-------:|-------:|---------------------:| | autoComplete.css | 1.08 KB | 0.89 KB | 82.41% | 17.59% | 🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️ | | bootstrap.css | 33.56 KB | 28.94 KB | 86.08% | 13.92% | 🟩⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️ | | video-js.css | 13.14 KB | 12.72 KB | 96.79% | 3.21% | 🟩⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️ | | w3c.org.css | 21.98 KB | 13.65 KB | 62.13% | 37.87% | 🟩🟩🟩🟩⬜️⬜️⬜️⬜️⬜️⬜️ |

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

With Symfony Flex

Open a command console, enter your project directory and execute:

Without Symfony Flex

How to install without Symfony Flex #### Step 1: Download the Bundle Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle: #### Step 2: Enable the Bundle Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project: Depending on your deployment process, you might want to enable the bundle only in the desired environment(s).

Usage

If you use AssetMapper, run the following command to minify all the assets:

This command is usually run when serving assets in production and the SensioLabs Minify Bundle will hook into it to minify all assets while copying them.

Command Line

You can also minify assets manually with the command line. First, make sure that the binary file used to minify assets is properly installed in your computer:

Then, run the following command to minify assets:

Configuration

AssetMapper

Minify Binary

Local binary

The minification is performed by a binary file that can be installed on your computer/server or downloaded automatically by the bundle. This is the default configuration used by the bundle:

You can customize this configuration to use a local binary:

Credits

Authors

Acknowledgments

This bundle is inspired by the following projects:

Contributors

Special thanks to the Symfony community for their contributions and feedback.

License

The SensioLabs Minify Bundle is released under the MIT license.


All versions of minify-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
psr/log Version ^2|^3
symfony/filesystem Version ^6.4|^7.0
symfony/http-client-contracts Version ^3.5
symfony/process Version ^6.4|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sensiolabs/minify-bundle contains the following files

Loading the files please wait ....