Download the PHP package mamuz/squeezer without Composer
On this page you can find all versions of the php package mamuz/squeezer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mamuz/squeezer
More information about mamuz/squeezer
Files in mamuz/squeezer
Package squeezer
Short Description PHP library minifier
License MIT
Homepage https://github.com/mamuz/Squeezer
Informations about the package squeezer
Squeezer
Squeezer is a minifier for php class files. It will parse your directories to find valid classes, interfaces and traits and squeeze them to one file. Autoloading in php is quite nice but also expensive. Sometimes too expensive for production. Using a minified file reduces the execution time of your application but increases the memory usage. Take care which directories or packages you want to squeeze. For production you should only squeeze used packages.
Installation
The recommended way to install
mamuz/squeezer
is through
composer by adding dependency to your composer.json
:
Features
- Minify classes, interfaces and traits to one compressed file.
- Validates availability of class dependencies.
- Removing comments and docblocks is optional to keep interoperability to annotation parser.
- PHP files with more than one class, interface or trait declarations will be skipped.
- PHP files with
include
,include_once
,require
orrequire_once
statements will be skipped. - PHP files with function calls to handle files like
fopen
ormkdir
will be skipped. - PHP files with a
declare
statement will be skipped.
Usage
Run this command line to squeeze your library without comments to classes.min.php
:
For instance, we are using a typical ZendFramework Application, but you can adapt this command to each environment
After that you can include classes.min.php
inside your index.php
, but before loading composer autoloader.
For instance...
Use this command to get synopsis about all arguments
All versions of squeezer with dependencies
nikic/php-parser Version ~1.3
symfony/console Version ~2.5|~3.0
symfony/finder Version ~2.5|~3.0