diff --git a/composer.json b/composer.json index 89da853..2bb5d6e 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "hce/microframework-core", - "version": "1.4.5", + "version": "1.5.0", "description": "microframework core files", "authors": [ { diff --git a/composer.lock b/composer.lock index 4ca7f0e..39744d5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,29 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9cae5a10969f900224bfc360d787bce7", - "content-hash": "6aa77ef8e76258530ca9ffc3d1ee5da3", + "content-hash": "9bf5d7d562d9ae36f5d1811feae44316", "packages": [ { "name": "cssjanus/cssjanus", - "version": "v1.1.2", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/cssjanus/php-cssjanus.git", - "reference": "b7efe237794856acec641cb82dcd6613c1aba2b4" + "reference": "0fd44d8a3f1f0f10bfb500b6b595240bf6415ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cssjanus/php-cssjanus/zipball/b7efe237794856acec641cb82dcd6613c1aba2b4", - "reference": "b7efe237794856acec641cb82dcd6613c1aba2b4", + "url": "https://api.github.com/repos/cssjanus/php-cssjanus/zipball/0fd44d8a3f1f0f10bfb500b6b595240bf6415ffa", + "reference": "0fd44d8a3f1f0f10bfb500b6b595240bf6415ffa", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.4" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.8.*", - "phpunit/phpunit": "3.7.*", + "phpunit/phpunit": "4.8.*", "squizlabs/php_codesniffer": "2.3.*" }, "type": "library", @@ -40,37 +39,37 @@ "Apache-2.0" ], "description": "Convert CSS stylesheets between left-to-right and right-to-left.", - "time": "2015-06-15 17:20:16" + "time": "2017-03-14T20:57:08+00:00" }, { "name": "doctrine/inflector", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", + "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -107,30 +106,31 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2017-07-22T12:18:28+00:00" }, { "name": "illuminate/container", - "version": "v5.3.16", + "version": "v5.5.17", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "8047b47e1f731c975d9aa0fe0b269064d3f1346d" + "reference": "a7095697649494ced03d33cf4e756ccee94f8ab2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/8047b47e1f731c975d9aa0fe0b269064d3f1346d", - "reference": "8047b47e1f731c975d9aa0fe0b269064d3f1346d", + "url": "https://api.github.com/repos/illuminate/container/zipball/a7095697649494ced03d33cf4e756ccee94f8ab2", + "reference": "a7095697649494ced03d33cf4e756ccee94f8ab2", "shasum": "" }, "require": { - "illuminate/contracts": "5.3.*", - "php": ">=5.6.4" + "illuminate/contracts": "5.5.*", + "php": ">=7.0", + "psr/container": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -150,29 +150,31 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2016-10-02 01:14:30" + "time": "2017-08-14T18:00:01+00:00" }, { "name": "illuminate/contracts", - "version": "v5.3.16", + "version": "v5.5.17", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "ce5d73c6015b2054d32f3f8530767847b358ae4e" + "reference": "d9e269284eba43bd2e9e8d1f1ba12362b00ec096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/ce5d73c6015b2054d32f3f8530767847b358ae4e", - "reference": "ce5d73c6015b2054d32f3f8530767847b358ae4e", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/d9e269284eba43bd2e9e8d1f1ba12362b00ec096", + "reference": "d9e269284eba43bd2e9e8d1f1ba12362b00ec096", "shasum": "" }, "require": { - "php": ">=5.6.4" + "php": ">=7.0", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -192,32 +194,32 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2016-09-26 20:36:27" + "time": "2017-09-19T13:09:37+00:00" }, { "name": "illuminate/events", - "version": "v5.3.16", + "version": "v5.5.17", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "cb29124d4eaba8a60bad40e95e3d8b199d040d77" + "reference": "4879769619e0ea8a720885ba802e315c822eb246" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/cb29124d4eaba8a60bad40e95e3d8b199d040d77", - "reference": "cb29124d4eaba8a60bad40e95e3d8b199d040d77", + "url": "https://api.github.com/repos/illuminate/events/zipball/4879769619e0ea8a720885ba802e315c822eb246", + "reference": "4879769619e0ea8a720885ba802e315c822eb246", "shasum": "" }, "require": { - "illuminate/container": "5.3.*", - "illuminate/contracts": "5.3.*", - "illuminate/support": "5.3.*", - "php": ">=5.6.4" + "illuminate/container": "5.5.*", + "illuminate/contracts": "5.5.*", + "illuminate/support": "5.5.*", + "php": ">=7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -237,27 +239,27 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2016-08-12 14:24:30" + "time": "2017-08-27T02:05:29+00:00" }, { "name": "illuminate/filesystem", - "version": "v5.3.16", + "version": "v5.5.17", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "4e51db2fd32c9dc66d759180889d820df38f7ee0" + "reference": "9e45ea9a64787455944bca2c6588cf2da085c360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/4e51db2fd32c9dc66d759180889d820df38f7ee0", - "reference": "4e51db2fd32c9dc66d759180889d820df38f7ee0", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/9e45ea9a64787455944bca2c6588cf2da085c360", + "reference": "9e45ea9a64787455944bca2c6588cf2da085c360", "shasum": "" }, "require": { - "illuminate/contracts": "5.3.*", - "illuminate/support": "5.3.*", - "php": ">=5.6.4", - "symfony/finder": "3.1.*" + "illuminate/contracts": "5.5.*", + "illuminate/support": "5.5.*", + "php": ">=7.0", + "symfony/finder": "~3.3" }, "suggest": { "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", @@ -267,7 +269,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -287,41 +289,41 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2016-09-07 02:03:25" + "time": "2017-09-13T13:01:30+00:00" }, { "name": "illuminate/support", - "version": "v5.3.16", + "version": "v5.5.17", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "aa685c61c88a69b2e0e86310e65ef5ad2ebf2448" + "reference": "132b06edaab3808f63943004911d58785f164ab4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/aa685c61c88a69b2e0e86310e65ef5ad2ebf2448", - "reference": "aa685c61c88a69b2e0e86310e65ef5ad2ebf2448", + "url": "https://api.github.com/repos/illuminate/support/zipball/132b06edaab3808f63943004911d58785f164ab4", + "reference": "132b06edaab3808f63943004911d58785f164ab4", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "ext-mbstring": "*", - "illuminate/contracts": "5.3.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" + "illuminate/contracts": "5.5.*", + "nesbot/carbon": "^1.20", + "php": ">=7.0" }, "replace": { "tightenco/collect": "self.version" }, "suggest": { "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (3.1.*).", - "symfony/var-dumper": "Required to use the dd function (3.1.*)." + "symfony/process": "Required to use the composer class (~3.3).", + "symfony/var-dumper": "Required to use the dd function (~3.3)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -344,35 +346,35 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2016-10-02 01:14:47" + "time": "2017-10-17T12:18:29+00:00" }, { "name": "illuminate/view", - "version": "v5.3.16", + "version": "v5.5.17", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "c50858c381a13113645de26f3fdce3c4587ba08a" + "reference": "9c5590c2752f1ca0b0e62f6bca7bdea781a4f3d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/c50858c381a13113645de26f3fdce3c4587ba08a", - "reference": "c50858c381a13113645de26f3fdce3c4587ba08a", + "url": "https://api.github.com/repos/illuminate/view/zipball/9c5590c2752f1ca0b0e62f6bca7bdea781a4f3d2", + "reference": "9c5590c2752f1ca0b0e62f6bca7bdea781a4f3d2", "shasum": "" }, "require": { - "illuminate/container": "5.3.*", - "illuminate/contracts": "5.3.*", - "illuminate/events": "5.3.*", - "illuminate/filesystem": "5.3.*", - "illuminate/support": "5.3.*", - "php": ">=5.6.4", - "symfony/debug": "3.1.*" + "illuminate/container": "5.5.*", + "illuminate/contracts": "5.5.*", + "illuminate/events": "5.5.*", + "illuminate/filesystem": "5.5.*", + "illuminate/support": "5.5.*", + "php": ">=7.0", + "symfony/debug": "~3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -392,7 +394,7 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2016-09-18 15:39:12" + "time": "2017-10-16T16:47:50+00:00" }, { "name": "jenssegers/blade", @@ -440,7 +442,7 @@ "template", "view" ], - "time": "2016-03-21 11:33:58" + "time": "2016-03-21T11:33:58+00:00" }, { "name": "justinrainbow/json-schema", @@ -506,20 +508,20 @@ "json", "schema" ], - "time": "2016-06-02 10:59:52" + "time": "2016-06-02T10:59:52+00:00" }, { "name": "leafo/scssphp", - "version": "v0.6.6", + "version": "v0.6.7", "source": { "type": "git", "url": "https://github.com/leafo/scssphp.git", - "reference": "6fdfe19d2b13a3f12ba0792227f0718809ce4e4d" + "reference": "562213cd803e42ea53b0735554794c4022d8db89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leafo/scssphp/zipball/6fdfe19d2b13a3f12ba0792227f0718809ce4e4d", - "reference": "6fdfe19d2b13a3f12ba0792227f0718809ce4e4d", + "url": "https://api.github.com/repos/leafo/scssphp/zipball/562213cd803e42ea53b0735554794c4022d8db89", + "reference": "562213cd803e42ea53b0735554794c4022d8db89", "shasum": "" }, "require": { @@ -559,31 +561,35 @@ "scss", "stylesheet" ], - "time": "2016-09-11 01:34:11" + "time": "2017-02-23T05:07:33+00:00" }, { "name": "matthiasmullie/minify", - "version": "1.3.38", + "version": "1.3.55", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "de4bcf23b6a3291bd828ce800aab834304eb50c5" + "reference": "21084eb9e6c117f5236969532d00ed2750cd1617" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/de4bcf23b6a3291bd828ce800aab834304eb50c5", - "reference": "de4bcf23b6a3291bd828ce800aab834304eb50c5", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/21084eb9e6c117f5236969532d00ed2750cd1617", + "reference": "21084eb9e6c117f5236969532d00ed2750cd1617", "shasum": "" }, "require": { "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.0", + "matthiasmullie/path-converter": "~1.1", "php": ">=5.3.0" }, "require-dev": { + "friendsofphp/php-cs-fixer": "~2.0", "matthiasmullie/scrapbook": "~1.0", "phpunit/phpunit": "~4.8" }, + "suggest": { + "psr/cache-implementation": "Cache implementation to use with Minify::cache" + }, "bin": [ "bin/minifycss", "bin/minifyjs" @@ -606,7 +612,7 @@ "role": "Developer" } ], - "description": "CSS & JS minifier", + "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", "homepage": "http://www.minifier.org", "keywords": [ "JS", @@ -615,20 +621,20 @@ "minifier", "minify" ], - "time": "2016-10-13 11:49:22" + "time": "2017-10-25T11:13:12+00:00" }, { "name": "matthiasmullie/path-converter", - "version": "1.0.8", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "7c36e5cafa95dd20008d19b153b506cffa8c2848" + "reference": "08551ec1b156e923c242a10ab484bd4d6ead6631" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/7c36e5cafa95dd20008d19b153b506cffa8c2848", - "reference": "7c36e5cafa95dd20008d19b153b506cffa8c2848", + "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/08551ec1b156e923c242a10ab484bd4d6ead6631", + "reference": "08551ec1b156e923c242a10ab484bd4d6ead6631", "shasum": "" }, "require": { @@ -664,36 +670,88 @@ "paths", "relative" ], - "time": "2016-04-27 10:38:05" + "time": "2017-01-26T08:54:49+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.3", + "name": "nesbot/carbon", + "version": "1.22.1", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "c0125896dbb151380ab47e96c621741e79623beb" + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c0125896dbb151380ab47e96c621741e79623beb", - "reference": "c0125896dbb151380ab47e96c621741e79623beb", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", + "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">=5.3.0", + "symfony/translation": "~2.6 || ~3.0" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "~4.0 || ~5.0" }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.23-dev" + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2017-01-16T07:55:07+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -701,18 +759,20 @@ ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "csprng", - "pseudorandom", - "random" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2016-10-17 15:23:22" + "time": "2017-02-14T16:28:37+00:00" }, { "name": "psr/log", @@ -759,37 +819,84 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-01-02T13:31:39+00:00" }, { "name": "symfony/debug", - "version": "v3.1.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8" + "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/e2b3f74a67fc928adc3c1b9027f73e1bc01190a8", - "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8", + "url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", + "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.8|~3.0", "symfony/http-kernel": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -816,29 +923,29 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-09-06 11:02:40" + "time": "2017-10-02T06:42:24+00:00" }, { "name": "symfony/finder", - "version": "v3.1.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f" + "reference": "773e19a491d97926f236942484cb541560ce862d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/205b5ffbb518a98ba2ae60a52656c4a31ab00c6f", - "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f", + "url": "https://api.github.com/repos/symfony/finder/zipball/773e19a491d97926f236942484cb541560ce862d", + "reference": "773e19a491d97926f236942484cb541560ce862d", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -865,7 +972,131 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-09-28 00:11:12" + "time": "2017-10-02T06:42:24+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2017-10-11T12:05:26+00:00" + }, + { + "name": "symfony/translation", + "version": "v3.3.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "409bf229cd552bf7e3faa8ab7e3980b07672073f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/409bf229cd552bf7e3faa8ab7e3980b07672073f", + "reference": "409bf229cd552bf7e3faa8ab7e3980b07672073f", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/yaml": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/yaml": "~3.3" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2017-10-02T06:42:24+00:00" } ], "packages-dev": [], diff --git a/readme.md b/readme.md index 6bcf310..f68e107 100644 --- a/readme.md +++ b/readme.md @@ -1,11 +1,17 @@ # it.hce.microframework.core -### a lightweight framework designed for prototyping + +> a lightweight framework designed for prototyping ## Install + * `php composer.phar create-project hce/microframework projectName` + or + * `composer.phar create-project hce/microframework projectName` + then + * `cd projectName` * `npm install` * Point your webserver to `projectName/public` folder @@ -13,4 +19,5 @@ then * Set `cache` as writable folder ## Documentation -Please refer to [it.hce.microframework](https://github.com/HCESrl/it.hce.microframework) repository documentation. \ No newline at end of file + +Please refer to [it.hce.microframework](https://github.com/HCESrl/it.hce.microframework) repository documentation. diff --git a/src/MicroFramework.php b/src/MicroFramework.php index 9b17065..2c51b64 100644 --- a/src/MicroFramework.php +++ b/src/MicroFramework.php @@ -95,28 +95,22 @@ public static function printProject($folder = 'static/', $exclude = ['css', 'js' // clean the destination folder self::cleanupDirectory($destinationFolder); - echo "\033[34m finished writing resources \033[0m\n"; // creates the static folders and files self::createDirIfNotExists($destinationFolder . '/css/'); self::createDirIfNotExists($destinationFolder . '/js/'); - // write the whole resource pack ResourcesFactory::writeResources(true, $destinationFolder); ResourcesFactory::writeResources(false, $destinationFolder); - $directory = new RecursiveDirectoryIterator(PathHelper::getPublicPath()); $iterator = new RecursiveIteratorIterator($directory); $result = new RegexIterator($iterator, '/^.+\.json$/i', RecursiveRegexIterator::GET_MATCH); - - echo "\033[34m starting iterator \033[0m\n"; - foreach ($result as $key => $value) { echo "\033[34m processing $key \033[0m\n"; // write each controller in a sub directory diff --git a/src/factories/FallbackSassFactory.php b/src/factories/FallbackSassFactory.php new file mode 100644 index 0000000..b7ed9b1 --- /dev/null +++ b/src/factories/FallbackSassFactory.php @@ -0,0 +1,112 @@ +compiler = new Compiler(); + + //load the minifier + $this->minifier = new CSS(); + + // set rtl + $this->rtl = $rtl; + + if ($this->rtl) { + // load main.rtl.scss + if (!file_exists(PathHelper::getResourcesPath(self::mainRtlScssPath))) { + throw new MicroFrameworkException('main.rtl.scss not found'); + } + + $this->mainRtl = file_get_contents(PathHelper::getResourcesPath(self::mainRtlScssPath)); + } + // load main.scss + if (!file_exists(PathHelper::getResourcesPath(self::mainScssPath))) { + throw new MicroFrameworkException('main.scss not found'); + } + + $this->main = file_get_contents(PathHelper::getResourcesPath(self::mainScssPath)); + } + + /** + * Collects the needed files + */ + public function collect() + { + $this->compiler->setImportPaths(PathHelper::getResourcesPath(self::scssPath)); + } + + /** + * Compiles SCSS + * @return string the compiled css + */ + public function compile() + { + $compiledSass = $this->compiler->compile($this->main); + + if ($this->rtl) { + $compiledSass = $this->rightToLeft($compiledSass); + $rtlSass = $this->compiler->compile($this->mainRtl); + $compiledSass = $compiledSass . $rtlSass; + } + + // minify the result + return $this->compiledCss = $this->minify($compiledSass); + } + + private function rightToLeft($compiledSass) + { + return CSSJanus::transform($compiledSass); + } + + private function minify($compiledSass) + { + $this->minifier->add($compiledSass); + return $this->minifier->minify(); + } + + /** + * Writes the loaded SCSS in a given css file (overwrite) + * @param $file + * @throws MicroFrameworkException + */ + public function write($file) + { + if ((!file_exists($file) && is_writable(dirname($file))) || is_writable($file)) { + file_put_contents($file, $this->compiledCss); + } else { + if((!file_exists($file) && !is_writable(dirname($file))) ){ + throw new MicroFrameworkException($file . ' does not exist and directory is not writable'); + } else if(!is_writable($file)){ + throw new MicroFrameworkException($file . ' is not writable'); + } else { + throw new MicroFrameworkException("Unknown error trying to write $file "); + } + } + } +} diff --git a/src/factories/JavascriptFactory.php b/src/factories/JavascriptFactory.php index afdb552..4a01e8a 100644 --- a/src/factories/JavascriptFactory.php +++ b/src/factories/JavascriptFactory.php @@ -54,9 +54,9 @@ public function getStaticJSLastEditDate() { $files = $this->getStaticJSFileList(); $time = 0; - foreach($files as $key => $value){ + foreach($files as $key => $value) { $modTime = filemtime($value); - if($modTime > $time){ + if ($modTime > $time) { $time = $modTime; } } @@ -119,12 +119,12 @@ public function write($file) if ((!file_exists($file) && is_writable(dirname($file))) || is_writable($file)) { file_put_contents($file, $this->output()); } else { - if((!file_exists($file) && !is_writable(dirname($file))) ){ + if((!file_exists($file) && !is_writable(dirname($file)))) { throw new MicroFrameworkException($file . ' does not exist and directory is not writable'); - } else if(!is_writable($file)){ - throw new MicroFrameworkException($file . ' is not writable'); + } else if (!is_writable($file)) { + throw new MicroFrameworkException($file . ' is not writable'); } else { - throw new MicroFrameworkException("Unknown error trying to write $file "); + throw new MicroFrameworkException("Unknown error trying to write $file"); } } } diff --git a/src/factories/ResourcesFactory.php b/src/factories/ResourcesFactory.php index 4a2565b..d3acddf 100644 --- a/src/factories/ResourcesFactory.php +++ b/src/factories/ResourcesFactory.php @@ -30,7 +30,7 @@ public static function writeResources($rtl = false, $destinationFolder = false) */ public static function writeCSS($rtl = false, $destinationFolder = false) { - if($destinationFolder){ + if ($destinationFolder) { $targetCssPath = $destinationFolder . ($rtl ? self::rtlFilePath : self::cssFilePath); } else { $targetCssPath = PathHelper::getPublicPath($rtl ? self::rtlFilePath : self::cssFilePath); @@ -39,7 +39,7 @@ public static function writeCSS($rtl = false, $destinationFolder = false) if (!PathHelper::isResourceLocked($targetCssPath)) { // Write minified CSS to main.css - self::$sassFactory = new SassFactory($rtl); + self::$sassFactory = self::getWorkingSassFactory($rtl); self::$sassFactory->collect(); self::$sassFactory->compile(); self::$sassFactory->write($targetCssPath); @@ -51,12 +51,12 @@ public static function writeCSS($rtl = false, $destinationFolder = false) */ public static function writeJS($destinationFolder) { - if($destinationFolder){ - + if ($destinationFolder) { $targetJsPath = $destinationFolder. (self::jsFilePath); } else { $targetJsPath = PathHelper::getPublicPath(self::jsFilePath); } + self::$jsFactory = new JavascriptFactory(); $modTimeTarget = filemtime($targetJsPath); @@ -64,14 +64,20 @@ public static function writeJS($destinationFolder) $staticFileModTime = self::$jsFactory->getStaticJSLastEditDate(); $compontentsFileModTime = PathHelper::getLastEditDate(PathHelper::getComponentsPath(), '/^.+\.js$/i') ; - if (!PathHelper::isResourceLocked($targetJsPath) - && ($staticFileModTime > $modTimeTarget || $compontentsFileModTime > $modTimeTarget) - - ) { + && ($staticFileModTime > $modTimeTarget + || $compontentsFileModTime > $modTimeTarget)) { // Write minified JS to main.js self::$jsFactory->collectJS(); self::$jsFactory->write($targetJsPath); } } + + private static function getWorkingSassFactory ($rtl = false) { + if (extension_loaded('sass')) { + return new SassFactory($rtl); + } + + return new FallbackSassFactory($rtl); + } } diff --git a/src/factories/SassFactory.php b/src/factories/SassFactory.php index 61fc1a7..a4fd68f 100644 --- a/src/factories/SassFactory.php +++ b/src/factories/SassFactory.php @@ -4,10 +4,9 @@ use CSSJanus; +use Sass; use it\hce\microframework\core\exceptions\MicroFrameworkException; use it\hce\microframework\core\helpers\PathHelper; -use Leafo\ScssPhp\Compiler; -use MatthiasMullie\Minify\CSS; class SassFactory { @@ -18,7 +17,6 @@ class SassFactory private $compiler; private $main; private $mainRtl; - private $minifier; private $compiledCss; /** @@ -29,10 +27,10 @@ class SassFactory public function __construct($rtl = false) { // load the compiler - $this->compiler = new Compiler(); + $this->compiler = new Sass(); - //load the minifier - $this->minifier = new CSS(); + // set minification + $this->compiler->setStyle(Sass::STYLE_COMPRESSED); // set rtl $this->rtl = $rtl; @@ -45,7 +43,8 @@ public function __construct($rtl = false) $this->mainRtl = file_get_contents(PathHelper::getResourcesPath(self::mainRtlScssPath)); } - // load main.scss + + // load main.scss if (!file_exists(PathHelper::getResourcesPath(self::mainScssPath))) { throw new MicroFrameworkException('main.scss not found'); } @@ -58,25 +57,29 @@ public function __construct($rtl = false) */ public function collect() { - $this->compiler->setImportPaths(PathHelper::getResourcesPath(self::scssPath)); + $this->compiler->setIncludePath(PathHelper::getResourcesPath(self::scssPath)); } /** * Compiles SCSS + * @throws MicroFrameworkException * @return string the compiled css */ public function compile() { - $compiledSass = $this->compiler->compile($this->main); + try { + $compiledSass = $this->compiler->compile($this->main); + + if ($this->rtl) { + $compiledSass = $this->rightToLeft($compiledSass); + $rtlSass = $this->compiler->compile($this->mainRtl); + $compiledSass = $compiledSass . $rtlSass; + } - if ($this->rtl) { - $compiledSass = $this->rightToLeft($compiledSass); - $rtlSass = $this->compiler->compile($this->mainRtl); - $compiledSass = $compiledSass . $rtlSass; + return $this->compiledCss = $compiledSass; + } catch (Exception $e) { + throw new MicroFrameworkException($e->getMessage()); } - - // minify the result - return $this->compiledCss = $this->minify($compiledSass); } private function rightToLeft($compiledSass) @@ -84,12 +87,6 @@ private function rightToLeft($compiledSass) return CSSJanus::transform($compiledSass); } - private function minify($compiledSass) - { - $this->minifier->add($compiledSass); - return $this->minifier->minify(); - } - /** * Writes the loaded SCSS in a given css file (overwrite) * @param $file