diff --git a/composer.json b/composer.json index fe2254d4f..160e85c4e 100644 --- a/composer.json +++ b/composer.json @@ -26,15 +26,16 @@ "require": { "php": ">=7.2", "onelogin/php-saml": "2.10.2", - "monolog/monolog": "1.18.2", - "johnpbloch/wordpress": ">=5.5.1", + "monolog/monolog": "1.26.0", + "johnpbloch/wordpress": ">=5.7.0", "obojobo/obo-stats": "0.0.3", - "obojobo/rocketD": "0.0.3", + "obojobo/rocketd": "0.0.3", "obojobo-themes/obojobo": "0.0.3", - "wpackagist-plugin/table-of-contents-plus": ">=1601", - "wpackagist-plugin/page-list": ">=5.1", - "wpackagist-plugin/w3-total-cache": ">=0.9.6", - "mrclay/minify": "2.3.0", + "wpackagist-plugin/table-of-contents-plus": ">=2002", + "wpackagist-plugin/page-list": ">=5.2", + "wpackagist-plugin/w3-total-cache": ">=2.1.1", + "mrclay/minify": "3.0.11", + "intervention/httpauth": "^2.0", "eher/oauth": "1.0.7", "silexlabs/amfphp": "2.2.2" }, diff --git a/composer.lock b/composer.lock index 00b31c026..88e6327f6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e6b3937f7847e0edef6e92b02095e553", + "content-hash": "61bd049b5347580ffe84207ceb8a2113", "packages": [ { "name": "composer/installers", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca" + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca", - "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca", + "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", + "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d", "shasum": "" }, "require": { @@ -28,17 +28,18 @@ "shama/baton": "*" }, "require-dev": { - "composer/composer": "1.6.* || 2.0.*@dev", - "composer/semver": "1.0.* || 2.0.*@dev", - "phpunit/phpunit": "^4.8.36", - "sebastian/comparator": "^1.2.4", + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^4.2 || ^5", "symfony/process": "^2.3" }, "type": "composer-plugin", "extra": { "class": "Composer\\Installers\\Plugin", "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -76,6 +77,7 @@ "Porto", "RadPHP", "SMF", + "Starbug", "Thelia", "Whmcs", "WolfCMS", @@ -116,6 +118,7 @@ "phpbb", "piwik", "ppi", + "processwire", "puppet", "pxcms", "reindex", @@ -136,12 +139,16 @@ "url": "https://packagist.com", "type": "custom" }, + { + "url": "https://github.com/composer", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/composer/composer", "type": "tidelift" } ], - "time": "2020-04-07T06:57:05+00:00" + "time": "2021-01-14T11:07:16+00:00" }, { "name": "eher/oauth", @@ -176,22 +183,78 @@ "description": "OAuth 1 PHP Library", "time": "2012-12-13T23:48:10+00:00" }, + { + "name": "intervention/httpauth", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/Intervention/httpauth.git", + "reference": "3d67894b28b9ff3887fb9e4474c6b81ca5614543" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/httpauth/zipball/3d67894b28b9ff3887fb9e4474c6b81ca5614543", + "reference": "3d67894b28b9ff3887fb9e4474c6b81ca5614543", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Intervention\\Httpauth\\HttpauthServiceProvider" + ], + "aliases": { + "Httpauth": "Intervention\\Httpauth\\Facades\\Httpauth" + } + } + }, + "autoload": { + "psr-4": { + "Intervention\\Httpauth\\": "src/Intervention/Httpauth" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@olivervogel.com", + "homepage": "http://olivervogel.com/" + } + ], + "description": "HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration", + "homepage": "https://github.com/Intervention/httpauth", + "keywords": [ + "Authentication", + "http", + "laravel" + ], + "time": "2019-09-09T11:59:51+00:00" + }, { "name": "johnpbloch/wordpress", - "version": "5.5.1", + "version": "5.7.0", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress.git", - "reference": "0973abd5c01ecce0b60bc1c81a6dd072827de930" + "reference": "22ea3c6aa631e296c528f58a67371fb2a5e674f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/0973abd5c01ecce0b60bc1c81a6dd072827de930", - "reference": "0973abd5c01ecce0b60bc1c81a6dd072827de930", + "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/22ea3c6aa631e296c528f58a67371fb2a5e674f2", + "reference": "22ea3c6aa631e296c528f58a67371fb2a5e674f2", "shasum": "" }, "require": { - "johnpbloch/wordpress-core": "5.5.1", + "johnpbloch/wordpress-core": "5.7.0", "johnpbloch/wordpress-core-installer": "^1.0 || ^2.0", "php": ">=5.6.20" }, @@ -213,20 +276,20 @@ "cms", "wordpress" ], - "time": "2020-09-01T19:07:41+00:00" + "time": "2021-03-09T20:32:28+00:00" }, { "name": "johnpbloch/wordpress-core", - "version": "5.5.1", + "version": "5.7.0", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "fa5bcb1579eae33baef6c04355f8d6657e5bd349" + "reference": "8b057056692ca196aaa7a7ddd915f29426922c6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/fa5bcb1579eae33baef6c04355f8d6657e5bd349", - "reference": "fa5bcb1579eae33baef6c04355f8d6657e5bd349", + "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/8b057056692ca196aaa7a7ddd915f29426922c6d", + "reference": "8b057056692ca196aaa7a7ddd915f29426922c6d", "shasum": "" }, "require": { @@ -234,7 +297,7 @@ "php": ">=5.6.20" }, "provide": { - "wordpress/core-implementation": "5.5.1" + "wordpress/core-implementation": "5.7.0" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -254,7 +317,7 @@ "cms", "wordpress" ], - "time": "2020-09-01T19:07:35+00:00" + "time": "2021-03-09T20:32:23+00:00" }, { "name": "johnpbloch/wordpress-core-installer", @@ -306,18 +369,70 @@ ], "time": "2020-04-16T21:44:57+00:00" }, + { + "name": "marcusschwarz/lesserphp", + "version": "v0.5.5", + "source": { + "type": "git", + "url": "https://github.com/MarcusSchwarz/lesserphp.git", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": ">=4.8.35 <8" + }, + "bin": [ + "plessc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.1-dev" + } + }, + "autoload": { + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + }, + { + "name": "Marcus Schwarz", + "email": "github@maswaba.de", + "homepage": "https://www.maswaba.de" + } + ], + "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", + "homepage": "http://leafo.net/lessphp/", + "time": "2021-03-10T17:56:57+00:00" + }, { "name": "monolog/monolog", - "version": "1.18.2", + "version": "1.26.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "064b38c16790249488e7a8b987acf1c9d7383c09" + "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/064b38c16790249488e7a8b987acf1c9d7383c09", - "reference": "064b38c16790249488e7a8b987acf1c9d7383c09", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33", + "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33", "shasum": "" }, "require": { @@ -328,17 +443,16 @@ "psr/log-implementation": "1.0.0" }, "require-dev": { - "aws/aws-sdk-php": "^2.4.9", + "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", + "phpstan/phpstan": "^0.12.59", "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3" + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -349,16 +463,11 @@ "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", - "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { "Monolog\\": "src/Monolog" @@ -382,36 +491,114 @@ "logging", "psr-3" ], - "time": "2016-04-02T13:12:58+00:00" + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2020-12-14T12:56:38+00:00" + }, + { + "name": "mrclay/jsmin-php", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/mrclay/jsmin-php.git", + "reference": "bb05febc9440852d39899255afd5569b7f21a72c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mrclay/jsmin-php/zipball/bb05febc9440852d39899255afd5569b7f21a72c", + "reference": "bb05febc9440852d39899255afd5569b7f21a72c", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "JSMin\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Clay", + "email": "steve@mrclay.org", + "role": "Developer" + }, + { + "name": "Ryan Grove", + "email": "ryan@wonko.com", + "role": "Developer" + } + ], + "description": "Provides a modified port of Douglas Crockford's jsmin.c, which removes unnecessary whitespace from JavaScript files.", + "homepage": "https://github.com/mrclay/jsmin-php/", + "keywords": [ + "compress", + "jsmin", + "minify" + ], + "time": "2018-12-06T15:03:38+00:00" }, { "name": "mrclay/minify", - "version": "2.3.0", + "version": "3.0.11", "source": { "type": "git", "url": "https://github.com/mrclay/minify.git", - "reference": "f4cb31135d288f951bb0af1f23a03d4c00ba9446" + "reference": "f1572a580a8ab29c5c7df4319c4787c74f7dcb3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mrclay/minify/zipball/f4cb31135d288f951bb0af1f23a03d4c00ba9446", - "reference": "f4cb31135d288f951bb0af1f23a03d4c00ba9446", + "url": "https://api.github.com/repos/mrclay/minify/zipball/f1572a580a8ab29c5c7df4319c4787c74f7dcb3e", + "reference": "f1572a580a8ab29c5c7df4319c4787c74f7dcb3e", "shasum": "" }, "require": { "ext-pcre": "*", - "php": ">=5.2.1" + "intervention/httpauth": "^2.0|^3.0", + "marcusschwarz/lesserphp": "^0.5.1", + "monolog/monolog": "~1.1|~2.0", + "mrclay/jsmin-php": "~2", + "mrclay/props-dic": "^2.2|^3.0", + "php": "^5.3.0 || ^7.0 || ^8.0", + "tubalmartin/cssmin": "~4" }, "require-dev": { - "tubalmartin/cssmin": "~2.4.8" + "firephp/firephp-core": "~0.4.0", + "leafo/scssphp": "^0.3 || ^0.6 || ^0.7", + "meenie/javascript-packer": "~1.1", + "phpunit/phpunit": "^4.8.36", + "tedivm/jshrink": "~1.1.0" }, "suggest": { - "tubalmartin/cssmin": "Support minify with CSSMin (YUI PHP port)" + "firephp/firephp-core": "Use FirePHP for Log messages", + "meenie/javascript-packer": "Keep track of the Packer PHP port using Composer" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, "autoload": { "classmap": [ - "min/lib/" + "lib/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -425,9 +612,60 @@ "role": "Developer" } ], - "description": "Minify is a PHP5 app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers", - "homepage": "http://code.google.com/p/minify/", - "time": "2016-03-08T11:49:57+00:00" + "description": "Minify is a PHP app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers", + "homepage": "https://github.com/mrclay/minify", + "time": "2021-03-11T11:58:14+00:00" + }, + { + "name": "mrclay/props-dic", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/mrclay/Props.git", + "reference": "0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mrclay/Props/zipball/0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843", + "reference": "0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "pimple/pimple": "~3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-0": { + "Props\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Steve Clay", + "email": "steve@mrclay.org", + "homepage": "http://www.mrclay.org/" + } + ], + "description": "Props is a simple DI container that allows retrieving values via custom property and method names", + "keywords": [ + "container", + "dependency injection", + "dependency injection container", + "di", + "di container" + ], + "time": "2019-11-26T17:56:10+00:00" }, { "name": "obojobo-themes/obojobo", @@ -551,6 +789,100 @@ ], "time": "2016-11-15T15:34:53+00:00" }, + { + "name": "pimple/pimple", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "86406047271859ffc13424a048541f4531f53601" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/86406047271859ffc13424a048541f4531f53601", + "reference": "86406047271859ffc13424a048541f4531f53601", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "require-dev": { + "symfony/phpunit-bridge": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "https://pimple.symfony.com", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2021-03-06T08:28:00+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2021-03-05T17:36:06+00:00" + }, { "name": "psr/log", "version": "1.1.3", @@ -628,6 +960,59 @@ "description": "Simple Remoting for Web Applications", "time": "2016-01-26T14:48:49+00:00" }, + { + "name": "tubalmartin/cssmin", + "version": "v4.1.1", + "source": { + "type": "git", + "url": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port.git", + "reference": "3cbf557f4079d83a06f9c3ff9b957c022d7805cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tubalmartin/YUI-CSS-compressor-PHP-port/zipball/3cbf557f4079d83a06f9c3ff9b957c022d7805cf", + "reference": "3cbf557f4079d83a06f9c3ff9b957c022d7805cf", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.2" + }, + "require-dev": { + "cogpowered/finediff": "0.3.*", + "phpunit/phpunit": "4.8.*" + }, + "bin": [ + "cssmin" + ], + "type": "library", + "autoload": { + "psr-4": { + "tubalmartin\\CssMin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Túbal Martín", + "homepage": "http://tubalmartin.me/" + } + ], + "description": "A PHP port of the YUI CSS compressor", + "homepage": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port", + "keywords": [ + "compress", + "compressor", + "css", + "cssmin", + "minify", + "yui" + ], + "time": "2018-01-15T15:26:51+00:00" + }, { "name": "wpackagist-plugin/page-list", "version": "5.2", @@ -666,15 +1051,15 @@ }, { "name": "wpackagist-plugin/w3-total-cache", - "version": "0.15.0", + "version": "2.1.2", "source": { "type": "svn", "url": "https://plugins.svn.wordpress.org/w3-total-cache/", - "reference": "tags/0.15.0" + "reference": "tags/2.1.2" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/plugin/w3-total-cache.0.15.0.zip" + "url": "https://downloads.wordpress.org/plugin/w3-total-cache.2.1.2.zip" }, "require": { "composer/installers": "~1.0" diff --git a/internal/config/minify.php b/internal/min/config.php similarity index 84% rename from internal/config/minify.php rename to internal/min/config.php index 50b2b545c..d61a5526f 100644 --- a/internal/config/minify.php +++ b/internal/min/config.php @@ -6,6 +6,13 @@ * @package Minify */ + +/** + * Enable the static serving feature + */ +$min_enableStatic = false; + + /** * Allow use of the Minify URI Builder app. Only set this to true while you need it. */ @@ -26,12 +33,8 @@ /** - * Set to true to log messages to FirePHP (Firefox Firebug addon). + * Set to true to log messages to FirePHP (Firefox Firebug addon) and PHP's error_log * Set to false for no error logging (Minify may be slightly faster). - * @link http://www.firephp.org/ - * - * If you want to use a custom error logger, set this to your logger - * instance. Your object should have a method log(string $message). */ $min_errorLogger = false; @@ -56,34 +59,36 @@ * will have to load extra code to guess. Some examples below: */ //$min_cachePath = 'c:\\WINDOWS\\Temp'; -$min_cachePath = \AppCfg::DIR_BASE.'internal/templates/compiled/'; +// $min_cachePath = \AppCfg::DIR_BASE.'internal/templates/compiled/'; +$min_cachePath = '/tmp'; //$min_cachePath = preg_replace('/^\\d+;/', '', session_save_path()); + /** * To use APC/Memcache/ZendPlatform for cache storage, require the class and * set $min_cachePath to an instance. Example below: */ -//require dirname(__FILE__) . '/lib/Minify/Cache/APC.php'; //$min_cachePath = new Minify_Cache_APC(); /** * Leave an empty string to use PHP's $_SERVER['DOCUMENT_ROOT']. * - * On some servers, this value may be misconfigured or missing. If so, set this + * On some servers, this value may be misconfigured or missing. If so, set this * to your full document root path with no trailing slash. * E.g. '/home/accountname/public_html' or 'c:\\xampp\\htdocs' * - * If /min/ is directly inside your document root, just uncomment the + * If /min/ is directly inside your document root, just uncomment the * second line. The third line might work on some Apache servers. */ $min_documentRoot = ''; +//$min_documentRoot = dirname(dirname(__DIR__)); //$min_documentRoot = substr(__FILE__, 0, -15); //$min_documentRoot = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT']; /** - * Cache file locking. Set to false if filesystem is NFS. On at least one + * Cache file locking. Set to false if filesystem is NFS. On at least one * NFS system flock-ing attempts stalled PHP for 30 seconds! */ $min_cacheFileLocking = true; @@ -92,9 +97,9 @@ /** * Combining multiple CSS files can place @import declarations after rules, which * is invalid. Minify will attempt to detect when this happens and place a - * warning comment at the top of the CSS output. To resolve this you can either - * move the @imports within your CSS files, or enable this option, which will - * move all @imports to the top of the output. Note that moving @imports could + * warning comment at the top of the CSS output. To resolve this you can either + * move the @imports within your CSS files, or enable this option, which will + * move all @imports to the top of the output. Note that moving @imports could * affect CSS values (which is why this option is disabled by default). */ $min_serveOptions['bubbleCssImports'] = false; @@ -113,9 +118,9 @@ /** - * To use CSSmin (Túbal Martín's port of the YUI CSS compressor), uncomment the following line: + * To use the CSS compressor that shipped with 2.x, uncomment the following line: */ -//$min_serveOptions['minifiers']['text/css'] = array('Minify_CSSmin', 'minify'); +//$min_serveOptions['minifiers'][Minify::TYPE_CSS] = array('Minify_CSS', 'minify'); /** @@ -130,8 +135,8 @@ * particular directories below DOCUMENT_ROOT, set this here. * You will still need to include the directory in the * f or b GET parameters. - * - * // = shortcut for DOCUMENT_ROOT + * + * // = shortcut for DOCUMENT_ROOT */ $min_serveOptions['minApp']['allowDirs'] = array('//assets/js', '//assets/css'); @@ -156,8 +161,8 @@ * If you minify CSS files stored in symlink-ed directories, the URI rewriting * algorithm can fail. To prevent this, provide an array of link paths to * target paths, where the link paths are within the document root. - * - * Because paths need to be normalized for this to work, use "//" to substitute + * + * Because paths need to be normalized for this to work, use "//" to substitute * the doc root in the link paths (the array keys). E.g.: * * array('//symlink' => '/real/target/path') // unix @@ -169,17 +174,17 @@ /** * If you upload files from Windows to a non-Windows server, Windows may report - * incorrect mtimes for the files. This may cause Minify to keep serving stale + * incorrect mtimes for the files. This may cause Minify to keep serving stale * cache files when source file changes are made too frequently (e.g. more than * once an hour). - * - * Immediately after modifying and uploading a file, use the touch command to + * + * Immediately after modifying and uploading a file, use the touch command to * update the mtime on the server. If the mtime jumps ahead by a number of hours, - * set this variable to that number. If the mtime moves back, this should not be + * set this variable to that number. If the mtime moves back, this should not be * needed. * - * In the Windows SFTP client WinSCP, there's an option that may fix this - * issue without changing the variable below. Under login > environment, + * In the Windows SFTP client WinSCP, there's an option that may fix this + * issue without changing the variable below. Under login > environment, * select the option "Adjust remote timestamp with DST". * @link http://winscp.net/eng/docs/ui_login_environment#daylight_saving_time */ @@ -187,11 +192,10 @@ /** - * Path to Minify's lib folder. If you happen to move it, change - * this accordingly. + * Advanced: you can replace some of the PHP classes Minify uses to serve requests. + * To do this, assign a callable to one of the elements of the $min_factories array. + * + * You can see the default implementations (and what gets passed in) in index.php. */ -$min_libPath = \AppCfg::DIR_BASE.'internal/vendor/mrclay/minify/min/lib'; - - -// try to disable output_compression (may not have an effect) -ini_set('zlib.output_compression', '0'); +//$min_factories['minify'] = ... a callable accepting a Minify\App object +//$min_factories['controller'] = ... a callable accepting a Minify\App object diff --git a/internal/min/groupsConfig.php b/internal/min/groupsConfig.php new file mode 100644 index 000000000..cc80538fb --- /dev/null +++ b/internal/min/groupsConfig.php @@ -0,0 +1,19 @@ + array('//minify/quick-test.js'), +// 'testCss' => array('//minify/quick-test.css'), +// 'js' => array('//js/file1.js', '//js/file2.js'), +// 'css' => array('//css/file1.css', '//css/file2.css'), +); diff --git a/internal/min/index.php b/internal/min/index.php new file mode 100644 index 000000000..28e33119c --- /dev/null +++ b/internal/min/index.php @@ -0,0 +1,4 @@ +runServer(); diff --git a/minify.php b/minify.php index 5332f4311..dd84b0ff4 100644 --- a/minify.php +++ b/minify.php @@ -1,4 +1,2 @@ \AppCfg::DIR_BASE.'internal/config/minify.php']; -require(\AppCfg::DIR_BASE.'internal/vendor/mrclay/minify/min/index.php'); +require_once("internal/min/index.php"); \ No newline at end of file