Merge tag '0.7.3' into branch_0.7.2

This commit is contained in:
Daniel Seifert 2018-07-09 11:11:21 +02:00
bovenliggende 06804d97d6 41c355edb1
commit 21bf9e2922
29 gewijzigde bestanden met toevoegingen van 236 en 254 verwijderingen

Bestand weergeven

@ -1,9 +1,8 @@
language: php
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- nightly
matrix:

Bestand weergeven

@ -17,14 +17,14 @@
],
"bin": ["bin/daux"],
"require": {
"php": ">=7.1.3",
"guzzlehttp/guzzle": "~6.0",
"league/commonmark": "^0.15",
"league/plates": "~3.1",
"myclabs/deep-copy": "^1.5",
"php": ">=5.6",
"symfony/console": "^3.3",
"symfony/http-foundation": "^3.3",
"symfony/process": "^3.3",
"symfony/console": "^4.0",
"symfony/http-foundation": "^4.0",
"symfony/process": "^4.0",
"webuni/commonmark-table-extension": "0.6.*",
"webuni/front-matter": "^1.0.0"
},

312
composer.lock gegenereerd
Bestand weergeven

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "efcf7514a9c5a5385f89f05c9bec4e6b",
"content-hash": "ee84fe336a7944fe271c01b5336bc7f0",
"packages": [
{
"name": "guzzlehttp/guzzle",
@ -406,93 +406,46 @@
],
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2016-10-10T12:19:37+00:00"
},
{
"name": "symfony/console",
"version": "v3.3.10",
"version": "v4.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "116bc56e45a8e5572e51eb43ab58c769a352366c"
"reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/116bc56e45a8e5572e51eb43ab58c769a352366c",
"reference": "116bc56e45a8e5572e51eb43ab58c769a352366c",
"url": "https://api.github.com/repos/symfony/console/zipball/555c8dbe0ae9e561740451eabdbed2cc554b6a51",
"reference": "555c8dbe0ae9e561740451eabdbed2cc554b6a51",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/debug": "~2.8|~3.0",
"php": "^7.1.3",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/dependency-injection": "<3.3"
"symfony/dependency-injection": "<3.4",
"symfony/process": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~3.3",
"symfony/dependency-injection": "~3.3",
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/filesystem": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0"
"symfony/config": "~3.4|~4.0",
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/event-dispatcher": "~3.4|~4.0",
"symfony/lock": "~3.4|~4.0",
"symfony/process": "~3.4|~4.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/filesystem": "",
"symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
"dev-master": "4.0-dev"
}
},
"autoload": {
@ -519,89 +472,33 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2017-10-02T06:42:24+00:00"
},
{
"name": "symfony/debug",
"version": "v3.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd",
"reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd",
"shasum": ""
},
"require": {
"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/http-kernel": "~2.8|~3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Debug\\": ""
},
"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 Debug Component",
"homepage": "https://symfony.com",
"time": "2017-10-02T06:42:24+00:00"
"time": "2018-02-26T15:55:47+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v3.3.10",
"version": "v4.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8"
"reference": "94139989e51193e62a46bc87741ae05c8e8390f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8",
"reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/94139989e51193e62a46bc87741ae05c8e8390f5",
"reference": "94139989e51193e62a46bc87741ae05c8e8390f5",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"php": "^7.1.3",
"symfony/polyfill-mbstring": "~1.1"
},
"require-dev": {
"symfony/expression-language": "~2.8|~3.0"
"symfony/expression-language": "~3.4|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
"dev-master": "4.0-dev"
}
},
"autoload": {
@ -628,20 +525,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2017-10-05T23:10:23+00:00"
"time": "2018-02-22T10:50:29+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.6.0",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"shasum": ""
},
"require": {
@ -653,7 +550,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
},
"autoload": {
@ -687,29 +584,29 @@
"portable",
"shim"
],
"time": "2017-10-11T12:05:26+00:00"
"time": "2018-01-30T19:27:44+00:00"
},
{
"name": "symfony/process",
"version": "v3.3.10",
"version": "v4.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "fdf89e57a723a29baf536e288d6e232c059697b1"
"reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/fdf89e57a723a29baf536e288d6e232c059697b1",
"reference": "fdf89e57a723a29baf536e288d6e232c059697b1",
"url": "https://api.github.com/repos/symfony/process/zipball/6ed08502a7c9559da8e60ea343bdbd19c3350b3e",
"reference": "6ed08502a7c9559da8e60ea343bdbd19c3350b3e",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8"
"php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
"dev-master": "4.0-dev"
}
},
"autoload": {
@ -736,27 +633,30 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2017-10-02T06:42:24+00:00"
"time": "2018-02-19T12:18:43+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.3.10",
"version": "v3.4.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46"
"reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
"reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
"url": "https://api.github.com/repos/symfony/yaml/zipball/6af42631dcf89e9c616242c900d6c52bd53bd1bb",
"reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8"
},
"conflict": {
"symfony/console": "<3.4"
},
"require-dev": {
"symfony/console": "~2.8|~3.0"
"symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
@ -764,7 +664,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
"dev-master": "3.4-dev"
}
},
"autoload": {
@ -791,7 +691,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-10-05T14:43:42+00:00"
"time": "2018-02-16T09:50:28+00:00"
},
{
"name": "webuni/commonmark-table-extension",
@ -924,32 +824,32 @@
"packages-dev": [
{
"name": "doctrine/instantiator",
"version": "1.0.5",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
"reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
"shasum": ""
},
"require": {
"php": ">=5.3,<8.0-DEV"
"php": "^7.1"
},
"require-dev": {
"athletic/athletic": "~0.1.8",
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2.0"
"phpunit/phpunit": "^6.2.3",
"squizlabs/php_codesniffer": "^3.0.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "1.2.x-dev"
}
},
"autoload": {
@ -974,7 +874,7 @@
"constructor",
"instantiate"
],
"time": "2015-06-14T21:17:01+00:00"
"time": "2017-07-22T11:58:36+00:00"
},
{
"name": "mikey179/vfsStream",
@ -1078,29 +978,35 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "3.2.2",
"version": "4.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157"
"reference": "94fd0001232e47129dd3504189fa1c7225010d08"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157",
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
"reference": "94fd0001232e47129dd3504189fa1c7225010d08",
"shasum": ""
},
"require": {
"php": ">=5.5",
"phpdocumentor/reflection-common": "^1.0@dev",
"phpdocumentor/type-resolver": "^0.3.0",
"php": "^7.0",
"phpdocumentor/reflection-common": "^1.0.0",
"phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^4.4"
"doctrine/instantiator": "~1.0.5",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
@ -1119,20 +1025,20 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-08-08T06:39:58+00:00"
"time": "2017-11-30T07:14:17+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.3.0",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773"
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773",
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
@ -1166,20 +1072,20 @@
"email": "me@mikevanriel.com"
}
],
"time": "2017-06-03T08:32:36+00:00"
"time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
"version": "v1.7.2",
"version": "1.7.5",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6"
"reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
"reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401",
"reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401",
"shasum": ""
},
"require": {
@ -1191,7 +1097,7 @@
},
"require-dev": {
"phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8 || ^5.6.5"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
},
"type": "library",
"extra": {
@ -1229,7 +1135,7 @@
"spy",
"stub"
],
"time": "2017-09-04T11:05:03+00:00"
"time": "2018-02-19T10:16:54+00:00"
},
{
"name": "phpunit/php-code-coverage",
@ -1296,16 +1202,16 @@
},
{
"name": "phpunit/php-file-iterator",
"version": "1.4.2",
"version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
@ -1339,7 +1245,7 @@
"filesystem",
"iterator"
],
"time": "2016-10-03T07:40:28+00:00"
"time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@ -1433,29 +1339,29 @@
},
{
"name": "phpunit/php-token-stream",
"version": "1.4.11",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
"reference": "791198a2c6254db10131eecfe8c06670700904db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
"reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
"reference": "791198a2c6254db10131eecfe8c06670700904db",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.3"
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
"phpunit/phpunit": "^6.2.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
"dev-master": "2.0-dev"
}
},
"autoload": {
@ -1478,20 +1384,20 @@
"keywords": [
"tokenizer"
],
"time": "2017-02-27T10:12:30+00:00"
"time": "2017-11-27T05:48:46+00:00"
},
{
"name": "phpunit/phpunit",
"version": "5.7.23",
"version": "5.7.27",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe"
"reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/78532d5269d984660080d8e0f4c99c5c2ea65ffe",
"reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
"reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
"shasum": ""
},
"require": {
@ -1515,8 +1421,8 @@
"sebastian/global-state": "^1.1",
"sebastian/object-enumerator": "~2.0",
"sebastian/resource-operations": "~1.0",
"sebastian/version": "~1.0.3|~2.0",
"symfony/yaml": "~2.1|~3.0"
"sebastian/version": "^1.0.6|^2.0.1",
"symfony/yaml": "~2.1|~3.0|~4.0"
},
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2"
@ -1560,7 +1466,7 @@
"testing",
"xunit"
],
"time": "2017-10-15T06:13:55+00:00"
"time": "2018-02-01T05:50:59+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@ -2136,16 +2042,16 @@
},
{
"name": "webmozart/assert",
"version": "1.2.0",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
"reference": "0df1908962e7a3071564e857d86874dad1ef204a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
"reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
"url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
"reference": "0df1908962e7a3071564e857d86874dad1ef204a",
"shasum": ""
},
"require": {
@ -2182,7 +2088,7 @@
"check",
"validate"
],
"time": "2016-11-23T20:04:58+00:00"
"time": "2018-01-29T19:49:41+00:00"
}
],
"aliases": [],
@ -2191,7 +2097,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.6"
"php": ">=7.1.3"
},
"platform-dev": []
}

Bestand weergeven

@ -10,6 +10,26 @@ class Application extends SymfonyApplication
$this->add(new Generate());
$this->add(new Serve());
$app_name = "daux/daux.io";
$up = '..' . DIRECTORY_SEPARATOR;
$composer = __DIR__ . DIRECTORY_SEPARATOR . $up . $up . $up . $up . $up . 'composer.lock';
$version = "unknown";
if (file_exists($composer)) {
$app = json_decode(file_get_contents($composer));
$packages = $app->packages;
foreach ($packages as $package) {
if ($package->name == $app_name) {
$version = $package->version;
}
}
}
$this->setVersion($version);
$this->setName($app_name);
$this->setDefaultCommand('generate');
}
}

Bestand weergeven

@ -3,6 +3,7 @@
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\Daux;
class DauxCommand extends SymfonyCommand
@ -27,7 +28,7 @@ class DauxCommand extends SymfonyCommand
$keys = explode('.', $key);
while (count($keys) > 1) {
$key = array_shift($keys);
if (! isset($array[$key]) || ! is_array($array[$key])) {
if (!isset($array[$key]) || !is_array($array[$key])) {
$array[$key] = [];
}
$array = &$array[$key];
@ -39,7 +40,7 @@ class DauxCommand extends SymfonyCommand
private function applyConfiguration(array $options, Daux $daux)
{
$values = array_map(
function ($value) {
function($value) {
return array_map("trim", explode('=', $value));
},
$options
@ -50,9 +51,9 @@ class DauxCommand extends SymfonyCommand
}
}
protected function prepareDaux(InputInterface $input)
protected function prepareDaux(InputInterface $input, OutputInterface $output)
{
$daux = new Daux(Daux::STATIC_MODE);
$daux = new Daux(Daux::STATIC_MODE, $output);
// Set the format if requested
if ($input->hasOption('format') && $input->getOption('format')) {

Bestand weergeven

@ -5,6 +5,7 @@ use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Terminal;
use Todaymade\Daux\Daux;
class Generate extends DauxCommand
@ -41,9 +42,9 @@ class Generate extends DauxCommand
$input = new ArgvInput($argv, $this->getDefinition());
}
$daux = $this->prepareDaux($input);
$daux = $this->prepareDaux($input, $output);
$width = $this->getApplication()->getTerminalDimensions()[0];
$width = (new Terminal)->getWidth();
// Instiantiate the processor if one is defined
$this->prepareProcessor($daux, $input, $output, $width);

Bestand weergeven

@ -1,6 +1,7 @@
<?php namespace Todaymade\Daux\Console;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\Daux;
trait RunAction
{
@ -8,23 +9,33 @@ trait RunAction
return function_exists('mb_strlen') ? mb_strlen($content) : strlen($content);
}
protected function runAction($title, OutputInterface $output, $width, \Closure $closure)
protected function runAction($title, $width, \Closure $closure)
{
$output->write($title);
$verbose = Daux::getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE;
Daux::write($title, $verbose);
// 8 is the length of the label + 2 let it breathe
$padding = $width - $this->getLength($title) - 10;
try {
$response = $closure(function ($content) use ($output, &$padding) {
$response = $closure(function ($content) use (&$padding) {
$padding -= $this->getLength($content);
$output->write($content);
Daux::write($content, $verbose);
});
} catch (\Exception $e) {
$output->writeln(str_pad(' ', $padding) . '[ <fg=red>FAIL</fg=red> ]');
$this->status($padding, '[ <fg=red>FAIL</fg=red> ]');
throw $e;
}
$output->writeln(str_pad(' ', $padding) . '[ <fg=green>OK</fg=green> ]');
$this->status($padding, '[ <fg=green>OK</fg=green> ]');
return $response;
}
protected function status($padding, $content)
{
$verbose = Daux::getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE;
$padding = $verbose ? '' : str_pad(' ', $padding);
Daux::writeln($padding . $content);
}
}

Bestand weergeven

@ -30,7 +30,7 @@ class Serve extends DauxCommand
$host = $input->getOption('host');
$port = $input->getOption('port');
$daux = $this->prepareDaux($input);
$daux = $this->prepareDaux($input, $output);
// Daux can only serve HTML
$daux->getParams()->setFormat('html');
@ -40,7 +40,7 @@ class Serve extends DauxCommand
putenv('DAUX_SOURCE=' . $daux->getParams()->getDocumentationDirectory());
putenv('DAUX_THEME=' . $daux->getParams()->getThemesPath());
putenv('DAUX_CONFIGURATION=' . $daux->getParams()->getConfigurationOverrideFile());
putenv('DAUX_EXTENSION=' . DAUX_EXTENSION);
putenv('DAUX_EXTENSION=' . DAUX_EXTENSION);
$base = ProcessUtils::escapeArgument(__DIR__ . '/../../');
$binary = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));

Bestand weergeven

@ -1,6 +1,7 @@
<?php namespace Todaymade\Daux;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\ContentTypes\ContentTypeHandler;
use Todaymade\Daux\Tree\Builder;
use Todaymade\Daux\Tree\Content;
@ -12,6 +13,8 @@ class Daux
const STATIC_MODE = 'DAUX_STATIC';
const LIVE_MODE = 'DAUX_LIVE';
public static $output;
/** @var string */
public $local_base;
@ -44,8 +47,9 @@ class Daux
/**
* @param string $mode
*/
public function __construct($mode)
public function __construct($mode, OutputInterface $output)
{
Daux::$output = $output;
$this->mode = $mode;
$this->local_base = dirname(__DIR__);
@ -236,7 +240,7 @@ class Daux
public function getProcessor()
{
if (!$this->processor) {
$this->processor = new Processor($this, new NullOutput(), 0);
$this->processor = new Processor($this, Daux::getOutput(), 0);
}
return $this->processor;
@ -347,4 +351,37 @@ class Daux
return $this->validExtensions = $this->getContentTypeHandler()->getContentExtensions();
}
public static function getOutput() {
if (!Daux::$output) {
Daux:$output = new NullOutput();
}
return Daux::$output;
}
/**
* Writes a message to the output.
*
* @param string|array $messages The message as an array of lines or a single string
* @param bool $newline Whether to add a newline
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
*/
public static function write($messages, $newline = false, $options = 0) {
Daux::$output->write($messages, $newline, $options);
}
/**
* Writes a message to the output and adds a newline at the end.
*
* @param string|array $messages The message as an array of lines of a single string
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
*/
public static function writeln($messages, $options = 0) {
Daux::write($messages, true, $options);
}
public static function getVerbosity() {
return Daux::getOutput()->getVerbosity();
}
}

Bestand weergeven

@ -25,7 +25,7 @@ class EmbedImages
{
return preg_replace_callback(
"/<img\\s+[^>]*src=['\"]([^\"]*)['\"][^>]*>/",
function ($matches) use ($file, $callback) {
function($matches) use ($file, $callback) {
if ($result = $this->findImage($matches[1], $matches[0], $file, $callback)) {
return $result;
}

Bestand weergeven

@ -19,7 +19,7 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage
->embed(
$content,
$this->file,
function ($src, array $attributes, Entry $file) {
function($src, array $attributes, Entry $file) {
//Add the attachment for later upload
if ($file instanceof Raw) {

Bestand weergeven

@ -79,9 +79,8 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator
$tree = $this->runAction(
'Generating Tree ...',
$output,
$width,
function () use ($params) {
function() use ($params) {
$tree = $this->generateRecursive($this->daux->tree, $params);
$tree['title'] = $this->prefix . $params['title'];

Bestand weergeven

@ -41,7 +41,7 @@ class Publisher
public function run($title, $closure)
{
try {
return $this->runAction($title, $this->output, $this->width, $closure);
return $this->runAction($title, $this->width, $closure);
} catch (BadResponseException $e) {
$this->output->writeLn('<fg=red>' . $e->getMessage() . '</>');
}

Bestand weergeven

@ -114,7 +114,7 @@ class Processor implements DocumentProcessorInterface
// If the node has an ID, no need to generate it, just check it's unique
$attributes = $node->getData('attributes', []);
if (array_key_exists('id', $attributes) && !empty($attributes['id'])) {
$node->data['attributes']['id'] = $this->getUniqueId($document, $attributes['id']);
$node->data['attributes']['id'] = $this->getUniqueId($document, $attributes['id']);
return;
}
@ -139,7 +139,7 @@ class Processor implements DocumentProcessorInterface
}
}
$node->data['attributes']['id'] = $this->getUniqueId($document,'page_'. $this->escaped($text));
$node->data['attributes']['id'] = $this->getUniqueId($document,'page_'. $this->escaped($text));
}
/**

Bestand weergeven

@ -80,9 +80,8 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
$this->runAction(
'Copying Static assets ...',
$output,
$width,
function () use ($destination, $params) {
function() use ($destination, $params) {
$this->ensureEmptyDestination($destination);
$this->copyThemes($destination, $params->getThemesPath());
@ -194,9 +193,8 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
} else {
$this->runAction(
'- ' . $node->getUrl(),
$output,
$width,
function () use ($node, $output_dir, $key, $params, $index_pages) {
function() use ($node, $output_dir, $key, $params, $index_pages) {
if ($node instanceof Raw) {
copy($node->getPath(), $output_dir . DIRECTORY_SEPARATOR . $key);

Bestand weergeven

@ -1,6 +1,7 @@
<?php namespace Todaymade\Daux\Format\HTML;
use League\Plates\Engine;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\Config;
use Todaymade\Daux\Daux;
use Todaymade\Daux\Tree\Content;
@ -43,6 +44,8 @@ class Template
}
$this->engine->addFolder('theme', $theme, true);
Daux::writeln("Starting Template engine with basedir '$base' and theme folder '$theme'.", OutputInterface::VERBOSITY_VERBOSE);
$this->registerFunctions($this->engine);
return $this->engine;
@ -65,6 +68,8 @@ class Template
'tree' => $data['params']['tree'],
]);
Daux::writeln("Rendering template '$name'", OutputInterface::VERBOSITY_VERBOSE);
return $engine->render($name, $data);
}

Bestand weergeven

@ -17,7 +17,7 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage
->embed(
$content,
$this->file,
function ($src, array $attributes, Raw $file) {
function($src, array $attributes, Raw $file) {
$content = base64_encode(file_get_contents($file->getPath()));
$attr = '';
foreach ($attributes as $name => $value) {

Bestand weergeven

@ -74,7 +74,6 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator
return $pdf;
}
/**
* {@inheritdoc}
*/
@ -90,7 +89,6 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator
while ($current) {
$this->runAction(
'Generating ' . $current->getTitle(),
$output,
$width,
function () use ($book, $current, $params) {
$contentType = $this->daux->getContentTypeHandler()->getType($current);

Bestand weergeven

@ -31,12 +31,14 @@ class Server
*/
public static function serve()
{
$daux = new Daux(Daux::LIVE_MODE);
$output = new NullOutput();
$daux = new Daux(Daux::LIVE_MODE, $output);
$daux->initializeConfiguration();
$class = $daux->getProcessorClass();
if (!empty($class)) {
$daux->setProcessor(new $class($daux, new NullOutput(), 0));
$daux->setProcessor(new $class($daux, $output, 0));
}
// Set this critical configuration

Bestand weergeven

@ -32,6 +32,10 @@ class Directory extends Entry implements \ArrayAccess, \IteratorAggregate
continue;
}
if (!$name) {
continue;
}
if ($name[0] == '-') {
if (is_numeric($name[1])) {
$exploded = explode('_', $name);
@ -80,7 +84,7 @@ class Directory extends Entry implements \ArrayAccess, \IteratorAggregate
private function sortBucket($bucket, $final)
{
uasort($bucket, function (Entry $a, Entry $b) {
uasort($bucket, function(Entry $a, Entry $b) {
return strcasecmp($a->getName(), $b->getName());
});

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand weergeven

@ -391,6 +391,7 @@ ul.TableOfContents {
padding-left: 2.25em;
}
// stylelint-disable-next-line selector-max-compound-selectors
li li li li a {
padding-left: 3em;
}