diff --git a/.github/workflows/php-tests.yml b/.github/workflows/php-tests.yml new file mode 100644 index 0000000..c636afb --- /dev/null +++ b/.github/workflows/php-tests.yml @@ -0,0 +1,44 @@ +name: php tests + +on: + push: + branches: [master] + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: + - 7.2 + - 7.3 + - 7.4 + + name: PHP${{ matrix.php }} + + steps: + - name: Code checkout + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: laravel-font-awesome-php${{ matrix.php }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Install dependencies + run: composer update --no-interaction --prefer-dist --no-suggest + + - name: Run tests + run: | + ./vendor/bin/phpcs -p + ./vendor/bin/phpstan analyse + ./vendor/bin/phpunit diff --git a/.gitignore b/.gitignore index 46113e7..7874627 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/vendor/ +.idea/ +vendor/ .phpunit.result.cache diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index ce8e2f7..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,19 +0,0 @@ -preset: recommended - -risky: true - -disabled: - - align_double_arrow - - concat_without_spaces - - elseif - - phpdoc_align - -enabled: - - native_constant_invocation - - native_function_invocation - - static_lambda - -finder: - exclude: - - vendor - name: "*.php" \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d46fafa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -matrix: - fast_finish: true - include: - - php: 7.2 - - php: 7.3 - - php: 7.4 - -cache: - directories: - - $HOME/.composer/cache - -before_install: - - travis_retry composer self-update - -install: - - travis_retry composer update --no-interaction --prefer-dist --no-suggest - -script: - - vendor/bin/phpunit - - vendor/bin/phpstan analyse diff --git a/composer.json b/composer.json index 33aec1e..472085f 100644 --- a/composer.json +++ b/composer.json @@ -36,13 +36,23 @@ ] } }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/jerodev/code-styles.git" + } + ], "require": { - "illuminate/support": "6.x", - "fortawesome/font-awesome": "^5.12" + "php": "^7.2.5", + "ext-json": "*", + "fortawesome/font-awesome": "^5.12", + "illuminate/support": "7.x" }, "require-dev": { + "jerodev/code-styles": "dev-master", + "orchestra/testbench": "5.x", "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^8.0", - "orchestra/testbench": "4.x" + "squizlabs/php_codesniffer": "^3.5" } } diff --git a/composer.lock b/composer.lock index 2650cc8..3430490 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "751a266821ef52821f1d36e8a10d09e6", + "content-hash": "f21d3cc5676f17d8080d0b3f107d1b01", "packages": [ { "name": "doctrine/inflector", @@ -191,21 +191,22 @@ }, { "name": "egulias/email-validator", - "version": "2.1.13", + "version": "2.1.17", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "834593d5900615639208417760ba6a17299e2497" + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/834593d5900615639208417760ba6a17299e2497", - "reference": "834593d5900615639208417760ba6a17299e2497", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">=5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { "dominicsayers/isemail": "^3.0.7", @@ -244,66 +245,20 @@ "validation", "validator" ], - "time": "2019-12-30T08:14:25+00:00" - }, - { - "name": "erusev/parsedown", - "version": "1.7.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2019-12-30T22:54:17+00:00" + "time": "2020-02-13T22:36:52+00:00" }, { "name": "fortawesome/font-awesome", - "version": "5.12.0", + "version": "5.12.1", "source": { "type": "git", "url": "https://github.com/FortAwesome/Font-Awesome.git", - "reference": "d8db3d032d22e7a5e21f3b40905b7867be19bb02" + "reference": "0d1f27efb836eb2ab994ba37221849ed64a73e5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/d8db3d032d22e7a5e21f3b40905b7867be19bb02", - "reference": "d8db3d032d22e7a5e21f3b40905b7867be19bb02", + "url": "https://api.github.com/repos/FortAwesome/Font-Awesome/zipball/0d1f27efb836eb2ab994ba37221849ed64a73e5c", + "reference": "0d1f27efb836eb2ab994ba37221849ed64a73e5c", "shasum": "" }, "type": "library", @@ -353,49 +308,51 @@ "icon", "svg" ], - "time": "2019-12-10T22:52:13+00:00" + "time": "2020-02-05T14:36:40+00:00" }, { "name": "laravel/framework", - "version": "v6.9.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "60610be97ca389fa4b959d4d13fb3690970d9fb7" + "reference": "cbd46c70bc747af5f80a4a257ff58fd533e3f815" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/60610be97ca389fa4b959d4d13fb3690970d9fb7", - "reference": "60610be97ca389fa4b959d4d13fb3690970d9fb7", + "url": "https://api.github.com/repos/laravel/framework/zipball/cbd46c70bc747af5f80a4a257ff58fd533e3f815", + "reference": "cbd46c70bc747af5f80a4a257ff58fd533e3f815", "shasum": "" }, "require": { "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", "egulias/email-validator": "^2.1.10", - "erusev/parsedown": "^1.7", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", + "league/commonmark": "^1.3", "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12|^2.0", - "nesbot/carbon": "^2.0", + "monolog/monolog": "^2.0", + "nesbot/carbon": "^2.17", "opis/closure": "^3.1", - "php": "^7.2", + "php": "^7.2.5", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.3.4", - "symfony/debug": "^4.3.4", - "symfony/finder": "^4.3.4", - "symfony/http-foundation": "^4.3.4", - "symfony/http-kernel": "^4.3.4", - "symfony/process": "^4.3.4", - "symfony/routing": "^4.3.4", - "symfony/var-dumper": "^4.3.4", - "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^3.3" + "symfony/console": "^5.0", + "symfony/error-handler": "^5.0", + "symfony/finder": "^5.0", + "symfony/http-foundation": "^5.0", + "symfony/http-kernel": "^5.0", + "symfony/mime": "^5.0", + "symfony/process": "^5.0", + "symfony/routing": "^5.0", + "symfony/var-dumper": "^5.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "vlucas/phpdotenv": "^4.0", + "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" @@ -426,6 +383,7 @@ "illuminate/routing": "self.version", "illuminate/session": "self.version", "illuminate/support": "self.version", + "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", "illuminate/view": "self.version" @@ -434,16 +392,15 @@ "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3", + "guzzlehttp/guzzle": "^6.3|^7.0", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.2.3", + "mockery/mockery": "^1.3.1", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "^5.0", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/cache": "^4.3", - "true/punycode": "^2.1" + "symfony/cache": "^5.0" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", @@ -454,24 +411,27 @@ "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers.", "filp/whoops": "Required for friendly error pages in development (^2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0).", - "laravel/tinker": "Required to use the tinker console command (^1.0).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.3|^7.0).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "mockery/mockery": "Required to use mocking (^1.3.1).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -499,20 +459,94 @@ "framework", "laravel" ], - "time": "2019-12-19T18:16:22+00:00" + "time": "2020-03-03T22:20:03+00:00" + }, + { + "name": "league/commonmark", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "8015f806173c6ee54de25a87c2d69736696e88db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/8015f806173c6ee54de25a87c2d69736696e88db", + "reference": "8015f806173c6ee54de25a87c2d69736696e88db", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.1", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan-shim": "^0.11.5", + "phpunit/phpunit": "^7.5", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "time": "2020-02-28T18:53:50+00:00" }, { "name": "league/flysystem", - "version": "1.0.63", + "version": "1.0.64", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0", "shasum": "" }, "require": { @@ -524,7 +558,7 @@ }, "require-dev": { "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" + "phpunit/phpunit": "^5.7.26" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -583,7 +617,7 @@ "sftp", "storage" ], - "time": "2020-01-04T16:30:31+00:00" + "time": "2020-02-05T18:14:17+00:00" }, { "name": "monolog/monolog", @@ -668,16 +702,16 @@ }, { "name": "nesbot/carbon", - "version": "2.28.0", + "version": "2.31.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8" + "reference": "bbc0ab53f41a4c6f223c18efcdbd9bc725eb5d2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e2bcbcd43e67ee6101d321d5de916251d2870ca8", - "reference": "e2bcbcd43e67ee6101d321d5de916251d2870ca8", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbc0ab53f41a4c6f223c18efcdbd9bc725eb5d2d", + "reference": "bbc0ab53f41a4c6f223c18efcdbd9bc725eb5d2d", "shasum": "" }, "require": { @@ -688,7 +722,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "dev-php-7.1-compatibility", + "phpmd/phpmd": "^2.8", "phpstan/phpstan": "^0.11", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" @@ -734,7 +768,7 @@ "datetime", "time" ], - "time": "2019-12-16T16:30:25+00:00" + "time": "2020-03-01T11:11:58+00:00" }, { "name": "opis/closure", @@ -946,6 +980,52 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, { "name": "psr/log", "version": "1.1.2", @@ -1043,16 +1123,16 @@ }, { "name": "ramsey/uuid", - "version": "3.9.2", + "version": "3.9.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb" + "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7779489a47d443f845271badbdcedfe4df8e06fb", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", + "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", "shasum": "" }, "require": { @@ -1126,7 +1206,7 @@ "identifier", "uuid" ], - "time": "2019-12-17T08:18:51+00:00" + "time": "2020-02-21T04:36:14+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -1192,41 +1272,41 @@ }, { "name": "symfony/console", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0" + "reference": "d29e2d36941de13600c399e393a60b8cfe59ac49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/82437719dab1e6bdd28726af14cb345c2ec816d0", - "reference": "82437719dab1e6bdd28726af14cb345c2ec816d0", + "url": "https://api.github.com/repos/symfony/console/zipball/d29e2d36941de13600c399e393a60b8cfe59ac49", + "reference": "d29e2d36941de13600c399e393a60b8cfe59ac49", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/service-contracts": "^1.1|^2" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1237,7 +1317,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1264,20 +1344,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-17T10:32:23+00:00" + "time": "2020-02-24T15:05:31+00:00" }, { "name": "symfony/css-selector", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "19d29e7098b7b2c3313cb03902ca30f100dcb837" + "reference": "a0b51ba9938ccc206d9284de7eb527c2d4550b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/19d29e7098b7b2c3313cb03902ca30f100dcb837", - "reference": "19d29e7098b7b2c3313cb03902ca30f100dcb837", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/a0b51ba9938ccc206d9284de7eb527c2d4550b44", + "reference": "a0b51ba9938ccc206d9284de7eb527c2d4550b44", "shasum": "" }, "require": { @@ -1317,82 +1397,25 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", - "reference": "5c4c1db977dc70bb3250e1308d3e8c6341aa38f5", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-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": "2019-12-16T14:46:54+00:00" + "time": "2020-02-04T09:41:09+00:00" }, { "name": "symfony/error-handler", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1" + "reference": "24a938d9913f42d006ee1ca0164ea1f29c1067ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/6d7d7712a6ff5215ec26215672293b154f1db8c1", - "reference": "6d7d7712a6ff5215ec26215672293b154f1db8c1", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/24a938d9913f42d006ee1ca0164ea1f29c1067ec", + "reference": "24a938d9913f42d006ee1ca0164ea1f29c1067ec", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "^4.4", + "php": "^7.2.5", + "psr/log": "^1.0", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { @@ -1402,7 +1425,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1429,41 +1452,41 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", - "time": "2019-12-16T14:46:54+00:00" + "time": "2020-02-29T10:07:09+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f" + "reference": "b45ad88b253c5a9702ce218e201d89c85d148cea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b45ad88b253c5a9702ce218e201d89c85d148cea", + "reference": "b45ad88b253c5a9702ce218e201d89c85d148cea", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" + "php": "^7.2.5", + "symfony/event-dispatcher-contracts": "^2" }, "conflict": { - "symfony/dependency-injection": "<3.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^3.4|^4.0|^5.0" + "symfony/stopwatch": "^4.4|^5.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1472,7 +1495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1499,33 +1522,33 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2020-02-22T20:09:08+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.7", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18" + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5", + "psr/event-dispatcher": "^1" }, "suggest": { - "psr/event-dispatcher": "", "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1557,29 +1580,29 @@ "interoperability", "standards" ], - "time": "2019-09-17T09:54:03+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/finder", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e" + "reference": "6251f201187ca9d66f6b099d3de65d279e971138" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e", + "url": "https://api.github.com/repos/symfony/finder/zipball/6251f201187ca9d66f6b099d3de65d279e971138", + "reference": "6251f201187ca9d66f6b099d3de65d279e971138", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1606,35 +1629,35 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-11-17T21:56:56+00:00" + "time": "2020-02-14T07:43:07+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62" + "reference": "6f9c2ba72f4295d7ce6cf9f79dbb18036291d335" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/fcae1cff5b57b2a9c3aabefeb1527678705ddb62", - "reference": "fcae1cff5b57b2a9c3aabefeb1527678705ddb62", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6f9c2ba72f4295d7ce6cf9f79dbb18036291d335", + "reference": "6f9c2ba72f4295d7ce6cf9f79dbb18036291d335", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/mime": "^4.3|^5.0", + "php": "^7.2.5", + "symfony/mime": "^4.4|^5.0", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^3.4|^4.0|^5.0" + "symfony/expression-language": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1661,59 +1684,65 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-12-19T15:57:49+00:00" + "time": "2020-02-14T07:43:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2" + "reference": "021d7d54e080405678f2d8c54cb31d0bb03b4520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fe310d2e95cd4c356836c8ecb0895a46d97fede2", - "reference": "fe310d2e95cd4c356836c8ecb0895a46d97fede2", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/021d7d54e080405678f2d8c54cb31d0bb03b4520", + "reference": "021d7d54e080405678f2d8c54cb31d0bb03b4520", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "psr/log": "~1.0", - "symfony/error-handler": "^4.4", - "symfony/event-dispatcher": "^4.4", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9" }, "conflict": { - "symfony/browser-kit": "<4.3", - "symfony/config": "<3.4", - "symfony/console": ">=5", - "symfony/dependency-injection": "<4.3", - "symfony/translation": "<4.2", - "twig/twig": "<1.34|<2.4,>=2" + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "^4.3|^5.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0", - "symfony/css-selector": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^4.3|^5.0", - "symfony/dom-crawler": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/finder": "^3.4|^4.0|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/routing": "^3.4|^4.0|^5.0", - "symfony/stopwatch": "^3.4|^4.0|^5.0", - "symfony/templating": "^3.4|^4.0|^5.0", - "symfony/translation": "^4.2|^5.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", "symfony/translation-contracts": "^1.1|^2", - "twig/twig": "^1.34|^2.4|^3.0" + "twig/twig": "^2.4|^3.0" }, "suggest": { "symfony/browser-kit": "", @@ -1724,7 +1753,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1751,20 +1780,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-12-19T16:23:40+00:00" + "time": "2020-02-29T10:41:30+00:00" }, { "name": "symfony/mime", - "version": "v5.0.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79" + "reference": "9b3e5b5e58c56bbd76628c952d2b78556d305f3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/0e6a4ced216e49d457eddcefb61132173a876d79", - "reference": "0e6a4ced216e49d457eddcefb61132173a876d79", + "url": "https://api.github.com/repos/symfony/mime/zipball/9b3e5b5e58c56bbd76628c952d2b78556d305f3c", + "reference": "9b3e5b5e58c56bbd76628c952d2b78556d305f3c", "shasum": "" }, "require": { @@ -1813,20 +1842,20 @@ "mime", "mime-type" ], - "time": "2019-11-30T14:12:50+00:00" + "time": "2020-02-04T09:41:09+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -1838,7 +1867,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1871,20 +1900,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36" + "reference": "926832ce51059bb58211b7b2080a88e0c3b5328e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/a019efccc03f1a335af6b4f20c30f5ea8060be36", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/926832ce51059bb58211b7b2080a88e0c3b5328e", + "reference": "926832ce51059bb58211b7b2080a88e0c3b5328e", "shasum": "" }, "require": { @@ -1896,7 +1925,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1930,26 +1959,26 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -1957,7 +1986,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -1992,20 +2021,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -2017,7 +2046,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2051,20 +2080,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -2073,7 +2102,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2106,20 +2135,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -2128,7 +2157,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2164,29 +2193,29 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" + "reference": "fd4a86dd7e36437f2fc080d8c42c7415d828a0a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "url": "https://api.github.com/repos/symfony/process/zipball/fd4a86dd7e36437f2fc080d8c42c7415d828a0a8", + "reference": "fd4a86dd7e36437f2fc080d8c42c7415d828a0a8", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2213,38 +2242,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-12-06T10:06:46+00:00" + "time": "2020-02-08T17:00:58+00:00" }, { "name": "symfony/routing", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "628bcafae1b2043969378dcfbf9c196539a38722" + "reference": "d6ca39fd05c1902bf34d724ba06fb8044a0b46de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/628bcafae1b2043969378dcfbf9c196539a38722", - "reference": "628bcafae1b2043969378dcfbf9c196539a38722", + "url": "https://api.github.com/repos/symfony/routing/zipball/d6ca39fd05c1902bf34d724ba06fb8044a0b46de", + "reference": "d6ca39fd05c1902bf34d724ba06fb8044a0b46de", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "conflict": { - "symfony/config": "<4.2", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" }, "require-dev": { "doctrine/annotations": "~1.2", "psr/log": "~1.0", - "symfony/config": "^4.2|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -2256,7 +2285,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2289,7 +2318,7 @@ "uri", "url" ], - "time": "2019-12-12T12:53:52+00:00" + "time": "2020-02-25T14:24:11+00:00" }, { "name": "symfony/service-contracts", @@ -2351,42 +2380,43 @@ }, { "name": "symfony/translation", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "f7669f48a9633bf8139bc026c755e894b7206677" + "reference": "e9b93f42a1fd6aec6a0872d59ee5c8219a7d584b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/f7669f48a9633bf8139bc026c755e894b7206677", - "reference": "f7669f48a9633bf8139bc026c755e894b7206677", + "url": "https://api.github.com/repos/symfony/translation/zipball/e9b93f42a1fd6aec6a0872d59ee5c8219a7d584b", + "reference": "e9b93f42a1fd6aec6a0872d59ee5c8219a7d584b", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6|^2" + "symfony/translation-contracts": "^2" }, "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/http-kernel": "<4.4", - "symfony/yaml": "<3.4" + "symfony/config": "<4.4", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "1.0" + "symfony/translation-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/finder": "~2.8|~3.0|~4.0|^5.0", - "symfony/http-kernel": "^4.4", - "symfony/intl": "^3.4|^4.0|^5.0", + "symfony/config": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/intl": "^4.4|^5.0", "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -2396,7 +2426,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2423,7 +2453,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-12-12T12:53:52+00:00" + "time": "2020-02-04T07:41:34+00:00" }, { "name": "symfony/translation-contracts", @@ -2484,32 +2514,31 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.2", + "version": "v5.0.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99" + "reference": "3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/be330f919bdb395d1e0c3f2bfb8948512d6bdd99", - "reference": "be330f919bdb395d1e0c3f2bfb8948512d6bdd99", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9", + "reference": "3a37aeb1132d1035536d3d6aa9cb06c2ff9355e9", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", + "symfony/console": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.34|^2.4|^3.0" + "twig/twig": "^2.4|^3.0" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -2522,7 +2551,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2556,7 +2585,7 @@ "debug", "dump" ], - "time": "2019-12-18T13:41:29+00:00" + "time": "2020-02-26T22:30:10+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -2609,30 +2638,35 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.0", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156" + "reference": "32bd5ca5a4170f88e27073353013d210a3354ae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1bdf24f065975594f6a117f0f1f6cabf1333b156", - "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/32bd5ca5a4170f88e27073353013d210a3354ae9", + "reference": "32bd5ca5a4170f88e27073353013d210a3354ae9", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "phpoption/phpoption": "^1.5", + "php": "^5.5.9 || ^7.0", + "phpoption/phpoption": "^1.7.2", "symfony/polyfill-ctype": "^1.9" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.3", + "ext-filter": "*", "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -2662,7 +2696,56 @@ "env", "environment" ], - "time": "2019-09-10T21:37:39+00:00" + "time": "2020-03-01T23:56:01+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "a3801f5facf187a28cc2cae7b98a540c36406dc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/a3801f5facf187a28cc2cae7b98a540c36406dc4", + "reference": "a3801f5facf187a28cc2cae7b98a540c36406dc4", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/", + "voku\\tests\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "time": "2020-02-06T21:46:48+00:00" } ], "packages-dev": [ @@ -2820,6 +2903,41 @@ ], "time": "2016-01-20T08:20:44+00:00" }, + { + "name": "jerodev/code-styles", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/jerodev/code-styles.git", + "reference": "d3e9152a0685753ea9ab2d254b3d970ccc0c6197" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jerodev/code-styles/zipball/d3e9152a0685753ea9ab2d254b3d970ccc0c6197", + "reference": "d3e9152a0685753ea9ab2d254b3d970ccc0c6197", + "shasum": "" + }, + "require": { + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "license": [ + "private" + ], + "authors": [ + { + "name": "jerodev", + "email": "jeroen@deviaene.eu" + } + ], + "description": "phpcs configurations for projects", + "support": { + "source": "https://github.com/jerodev/code-styles/tree/master", + "issues": "https://github.com/jerodev/code-styles/issues" + }, + "time": "2020-03-03T18:13:16+00:00" + }, { "name": "mockery/mockery", "version": "1.3.1", @@ -2887,16 +3005,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.4", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -2931,33 +3049,33 @@ "object", "object graph" ], - "time": "2019-12-15T19:12:40+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { "name": "orchestra/testbench", - "version": "v4.4.1", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "39799813d491c1abbf97e3f909801efb3e6f3a4b" + "reference": "3847c2230b45fb16a445b95b628ccd3517e39625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/39799813d491c1abbf97e3f909801efb3e6f3a4b", - "reference": "39799813d491c1abbf97e3f909801efb3e6f3a4b", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/3847c2230b45fb16a445b95b628ccd3517e39625", + "reference": "3847c2230b45fb16a445b95b628ccd3517e39625", "shasum": "" }, "require": { - "laravel/framework": "^6.4", - "mockery/mockery": "^1.2.3", - "orchestra/testbench-core": "^4.4.1", - "php": ">=7.2", - "phpunit/phpunit": "^8.3" + "laravel/framework": "^7.0.1", + "mockery/mockery": "^1.3.1", + "orchestra/testbench-core": "^5.0.1", + "php": ">=7.2.5", + "phpunit/phpunit": "^8.4 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -2981,43 +3099,44 @@ "orchestral", "testing" ], - "time": "2019-11-22T22:36:07+00:00" + "time": "2020-03-03T14:33:51+00:00" }, { "name": "orchestra/testbench-core", - "version": "v4.5.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "b92e31c5b101fc87bc5c3137610151dcae82f0e3" + "reference": "2bf166beb0a7407acd312ffb75bf4917ec9a41e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/b92e31c5b101fc87bc5c3137610151dcae82f0e3", - "reference": "b92e31c5b101fc87bc5c3137610151dcae82f0e3", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/2bf166beb0a7407acd312ffb75bf4917ec9a41e5", + "reference": "2bf166beb0a7407acd312ffb75bf4917ec9a41e5", "shasum": "" }, "require": { - "fzaninotto/faker": "^1.4", - "php": ">=7.2" + "fzaninotto/faker": "^1.9.1", + "php": ">=7.2.5" }, "require-dev": { - "laravel/framework": "^6.9", + "laravel/framework": "^7.0", "laravel/laravel": "dev-master", - "mockery/mockery": "^1.2.3", - "phpunit/phpunit": "^8.3 || ^9.0" + "mockery/mockery": "^1.3.1", + "orchestra/canvas": "^5.0", + "phpunit/phpunit": "^8.4 || ^9.0" }, "suggest": { - "laravel/framework": "Required for testing (^6.9).", - "mockery/mockery": "Allow using Mockery for testing (^1.2.3).", - "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^4.0).", - "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^4.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^8.3)." + "laravel/framework": "Required for testing (^7.0).", + "mockery/mockery": "Allow using Mockery for testing (^1.3.1).", + "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^5.0).", + "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^5.0).", + "phpunit/phpunit": "Allow using PHPUnit for testing (^8.4 || ^9.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3046,7 +3165,7 @@ "orchestral", "testing" ], - "time": "2019-12-31T01:37:59+00:00" + "time": "2020-03-03T14:02:06+00:00" }, { "name": "phar-io/manifest", @@ -3204,41 +3323,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3249,33 +3365,36 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -3299,28 +3418,28 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "v1.10.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.2", @@ -3362,20 +3481,69 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-01-20T15:57:02+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "0.4.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "928179efc5368145a8b03cb20d58cb3f3136afae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/928179efc5368145a8b03cb20d58cb3f3136afae", + "reference": "928179efc5368145a8b03cb20d58cb3f3136afae", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "require-dev": { + "consistence/coding-standard": "^3.5", + "ergebnis/composer-normalize": "^2.0.2", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^6.3", + "slevomat/coding-standard": "^4.7.2", + "symfony/process": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "time": "2020-01-25T20:42:48+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.4", + "version": "0.12.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "100a25ba8561223f6bf5a5ff4204f951c0ec007c" + "reference": "37bdd26a80235d0f9045b49f4151102b7831cbe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/100a25ba8561223f6bf5a5ff4204f951c0ec007c", - "reference": "100a25ba8561223f6bf5a5ff4204f951c0ec007c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/37bdd26a80235d0f9045b49f4151102b7831cbe2", + "reference": "37bdd26a80235d0f9045b49f4151102b7831cbe2", "shasum": "" }, "require": { @@ -3401,7 +3569,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-06T06:38:17+00:00" + "time": "2020-03-02T22:29:43+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3657,16 +3825,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.1", + "version": "8.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2" + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7870c78da3c5e4883eaef36ae47853ebb3cb86f2", - "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018b6ac3c8ab20916db85fa91bf6465acb64d1e0", + "reference": "018b6ac3c8ab20916db85fa91bf6465acb64d1e0", "shasum": "" }, "require": { @@ -3736,7 +3904,7 @@ "testing", "xunit" ], - "time": "2019-12-25T14:49:39+00:00" + "time": "2020-01-08T08:49:49+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4353,6 +4521,98 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "6.1.5", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "d767b5e302ff096327466c97fec3cb57f6d16086" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/d767b5e302ff096327466c97fec3cb57f6d16086", + "reference": "d767b5e302ff096327466c97fec3cb57f6d16086", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpstan/phpdoc-parser": "0.3.5 - 0.4.3", + "squizlabs/php_codesniffer": "^3.5.4" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "0.6.2", + "grogy/php-parallel-lint": "1.1.0", + "phing/phing": "2.16.3", + "phpstan/phpstan": "0.11.19|0.12.9", + "phpstan/phpstan-phpunit": "0.11.2|0.12.6", + "phpstan/phpstan-strict-rules": "0.11.1|0.12.2", + "phpunit/phpunit": "7.5.18|8.5.2" + }, + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "time": "2020-02-05T21:17:34+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.4", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dceec07328401de6211037abbb18bda423677e26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26", + "reference": "dceec07328401de6211037abbb18bda423677e26", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2020-01-30T22:20:29+00:00" + }, { "name": "theseer/tokenizer", "version": "1.1.3", @@ -4395,16 +4655,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -4439,14 +4699,19 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "jerodev/code-styles": 20 + }, "prefer-stable": true, "prefer-lowest": false, - "platform": [], + "platform": { + "php": "^7.2.5", + "ext-json": "*" + }, "platform-dev": [] } diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..902eb7b --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,7 @@ + + + + + src + tests + diff --git a/phpstan.neon b/phpstan.neon index e6b27a2..46b0f47 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,6 +3,3 @@ parameters: paths: - src - tests - ignoreErrors: - # Ignore Laravel/Lumen incompatibilites - - '#Cannot access offset [^\s]+ on Illuminate\\Contracts\\Foundation\\Application#' diff --git a/phpunit.xml b/phpunit.xml index aa6f328..415b914 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,4 +5,4 @@ ./tests - \ No newline at end of file + diff --git a/readme.md b/readme.md index f90e180..f538d0c 100644 --- a/readme.md +++ b/readme.md @@ -1,17 +1,18 @@ -# Font Awesome Blade directives for Laravel -[![Latest Stable Version](https://poser.pugx.org/jerodev/laravel-font-awesome/v/stable?format=flat-square)](https://packagist.org/packages/jerodev/laravel-font-awesome) -[![License](https://poser.pugx.org/jerodev/laravel-font-awesome/license?format=flat-square)](https://packagist.org/packages/jerodev/laravel-font-awesome) -[![Travis (.com)](https://img.shields.io/travis/com/jerodev/laravel-font-awesome.svg?style=flat-square)](https://travis-ci.com/jerodev/laravel-font-awesome) -[![StyleCI](https://github.styleci.io/repos/193088933/shield?branch=master)](https://github.styleci.io/repos/193088933) -[![Scrutinizer code quality (GitHub/Bitbucket)](https://img.shields.io/scrutinizer/quality/g/jerodev/laravel-font-awesome/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/jerodev/laravel-font-awesome/?branch=master) +# Font Awesome Blade component for Laravel +[![Latest Stable Version](https://poser.pugx.org/jerodev/laravel-font-awesome/v/stable)](https://packagist.org/packages/jerodev/laravel-font-awesome) +[![License](https://poser.pugx.org/jerodev/laravel-font-awesome/license)](https://packagist.org/packages/jerodev/laravel-font-awesome) +![PHP tests](https://github.com/jerodev/laravel-font-awesome/workflows/php%20tests/badge.svg) + +> This version of the package only works with Laravel 7.x and up.
+> For other Laravel versions, refer to [version 2.0 of this package](readme_old.md). This package will render font awesome icons in your views on the server side. This removes the need to add extra JavaScript or webfont resources on the client side and in doing so reduces the size of your website significantly. -This is achieved by replacing the icons with their svg counterpart before sending the response to the client. +This is achieved by injecting the icons as their svg counterpart before sending the rendered view to the client. -``` html +```html -@fas('circle') + @@ -23,12 +24,8 @@ This is achieved by replacing the icons with their svg counterpart before sendin | Requirement | Version | | --- | --- | -| PHP | >= 7.2 | -| Laravel | 6.x | - -### Laravel 5.x - -For Laravel 5.6 and up, use version v1.x of this package +| PHP | >= 7.2.5 | +| Laravel | 7.x | ## Installation @@ -46,8 +43,6 @@ The package will be auto-discovered by Laravel. If you disabled auto-discovery, ### Middleware -> :warning: Since version 2.0, the middleware is no longer automatically injected. You will have to add this to the routes where needed. - This package includes a middleware, [`InjectStyleSheet`](src/Middleware/InjectStyleSheet.php), that injects a minimal stylesheet into your views on render. The middleware can be added to your routes [as documented by Laravel](https://laravel.com/docs/master/middleware#assigning-middleware-to-routes): @@ -58,33 +53,34 @@ Route::middleware(InjectStyleSheet::class)->group(static function () { }); ``` -### Views +### Rendering -To use Font Awesome icons in your view there are a few new blade directives. +This package uses the new [blade components](https://laravel.com/docs/7.x/blade#components) added in Laravel 7. +Using the `x-{component}` tags, the icons can be rendered, the name of the component can be changed in [the configuration](#configuration). -``` php -// Let the package discover the best library for this icon. -@fa('laravel') +```html + + -// Define the library that should be used. -@far('circle') // Regular -@fas('circle') // Solid -@fab('laravel') // Brands + + + + ``` -When using the `@fa()` directive. The package will scan the different Font Awesome libraries and use the first library where it finds the icon. +When using the `` component without the `library` attribute, the package will scan the different Font Awesome libraries and use the first library where it finds the icon. The order in which the libraries are scanned is `regular`, `brands`, `solid`. But this can be modified in the [configuration](#configuration). -### Parameters +### Attributes -The `@fa()` function can take three parameters of which only the first is required. +The `` component takes three possible attributes of which only the `name` is required. -| Parameter | Type | Description | +| Attribute | Type | Description | | --- | --- | --- | | `name` | string | The name of the icon | -| `css_class` | string | Extra css classes to be appended to the svg output | -| `force_svg_href` | bool | Force the output to be an [svg href link](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href#use) if possible. Can be useful in loops. +| `library` | string | The font awesome library to find the icon in | +| `class` | string | Extra css classes to be appended to the svg output | ## Configuration @@ -94,5 +90,6 @@ The package contains a few configuration options that can be modified by first p | Key | Type | Default value | Description | | --- | --- | --- | --- | +| `component_name` | string | `fa` | The name under which the component will be registered. Changing this value will also change the tag to be used in blade views. | | `libraries` | string[] | `['regular', 'brands', 'solid']` | The icon libraries that will be available. This is also the order in which the libraries will be searched for icons. | | `svg_href` | bool| `true` | Use [svg href links](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href#use) for consecutive icons. | diff --git a/readme_old.md b/readme_old.md new file mode 100644 index 0000000..afc7262 --- /dev/null +++ b/readme_old.md @@ -0,0 +1,98 @@ +# Font Awesome Blade directives for Laravel +[![Latest Stable Version](https://poser.pugx.org/jerodev/laravel-font-awesome/v/stable)](https://packagist.org/packages/jerodev/laravel-font-awesome) +[![License](https://poser.pugx.org/jerodev/laravel-font-awesome/license)](https://packagist.org/packages/jerodev/laravel-font-awesome) + +> This version of the package is meant for Laravel versions below 6.x.
+> For Laravel 7 and up, you should install [v3.0](readme.md). + +This package will render font awesome icons in your views on the server side. This removes the need to add extra JavaScript or webfont resources on the client side and in doing so reduces the size of your website significantly. + +This is achieved by replacing the icons with their svg counterpart before sending the response to the client. + +``` html + +@fas('circle') + + + + + +``` + +## Requirements + +| Requirement | Version | +| --- | --- | +| PHP | >= 7.2 | +| Laravel | 6.x | + +### Laravel 5.x + +For Laravel 5.6 and up, use version v1.x of this package + +## Installation + +Install the package using [Composer](https://getcomposer.org/). + + composer require jerodev/laravel-font-awesome:2.x + +### Service Provider + +The package will be auto-discovered by Laravel. If you disabled auto-discovery, you should add the following provider to your `config/app.php` file. + + \Jerodev\LaraFontAwesome\FontAwesomeServiceProvider::class, + +## Usage + +### Middleware + +> :warning: Since version 2.0, the middleware is no longer automatically injected. You will have to add this to the routes where needed. + +This package includes a middleware, [`InjectStyleSheet`](src/Middleware/InjectStyleSheet.php), that injects a minimal stylesheet into your views on render. + +The middleware can be added to your routes [as documented by Laravel](https://laravel.com/docs/master/middleware#assigning-middleware-to-routes): + +```php +Route::middleware(InjectStyleSheet::class)->group(static function () { + // Create routes here. +}); +``` + +### Views + +To use Font Awesome icons in your view there are a few new blade directives. + +``` php +// Let the package discover the best library for this icon. +@fa('laravel') + +// Define the library that should be used. +@far('circle') // Regular +@fas('circle') // Solid +@fab('laravel') // Brands +``` + +When using the `@fa()` directive. The package will scan the different Font Awesome libraries and use the first library where it finds the icon. + +The order in which the libraries are scanned is `regular`, `brands`, `solid`. But this can be modified in the [configuration](#configuration). + +### Parameters + +The `@fa()` function can take three parameters of which only the first is required. + +| Parameter | Type | Description | +| --- | --- | --- | +| `name` | string | The name of the icon | +| `css_class` | string | Extra css classes to be appended to the svg output | +| `force_svg_href` | bool | Force the output to be an [svg href link](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href#use) if possible. This will disable static rendering, but allows to use `use:href` tags in rendering of loops. + +## Configuration + +The package contains a few configuration options that can be modified by first publishing the config file using the command below. This will create a `fontawesome.php` file in your `config` folder. + + php artisan vendor:publish --provider="Jerodev\LaraFontAwesome\FontAwesomeServiceProvider" + +| Key | Type | Default value | Description | +| --- | --- | --- | --- | +| `libraries` | string[] | `['regular', 'brands', 'solid']` | The icon libraries that will be available. This is also the order in which the libraries will be searched for icons. | +| `svg_href` | bool| `true` | Use [svg href links](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href#use) for consecutive icons. | diff --git a/src/BladeRenderer.php b/src/BladeRenderer.php deleted file mode 100644 index 077c086..0000000 --- a/src/BladeRenderer.php +++ /dev/null @@ -1,87 +0,0 @@ -isStatic()) { - return resolve(IconRenderer::class)->renderSvg( - $icon->getName(true), - $icon->getCssClasses(true), - $icon->getLibrary(true) - ); - } - - return \implode([ - 'renderSvg({$icon->getName()}, {$icon->getCssClasses()}, {$icon->getLibrary()}); ?>", - ]); - } - - /** - * Parse a blade expression to an icon object. - * - * @param string $expression - * @param string|null $library - * - * @return Icon - */ - private static function parseExpression(string $expression, ?string $library = null): Icon - { - $part = ''; - $parts = []; - $in_string = null; - - for ($i = 0; $i < \strlen($expression); $i++) { - $char = $expression[$i]; - - if ($char === ',' && \is_null($in_string)) { - $parts[] = \trim($part); - $part = ''; - continue; - } - - if (\in_array($char, ['\'', '"'])) { - if ($in_string === $char) { - $in_string = null; - } else { - $in_string = $char; - } - } - - $part .= $char; - } - - $parts[] = \trim($part); - - $icon = new Icon($parts[0], $library ? "'{$library}'" : 'null'); - switch (\count($parts)) { - case 3: - $icon->setForceSvgHref(\filter_var($parts[2], \FILTER_VALIDATE_BOOLEAN)); - // Fallthrough - - case 2: - $icon->setCssClasses($parts[1]); - } - - return $icon; - } -} diff --git a/src/Components/FontAwesomeBladeComponent.php b/src/Components/FontAwesomeBladeComponent.php new file mode 100644 index 0000000..35e8351 --- /dev/null +++ b/src/Components/FontAwesomeBladeComponent.php @@ -0,0 +1,110 @@ +cache = $cache; + $this->svgParser = $svgParser; + + $this->name = $this->getCleanIconName($name); + $this->library = $library; + $this->class = $class; + } + + public function render() + { + // Blade components might be evaluated multiple times. + // We need to make sure the output stays the same for consecutive renders of the same component. + if ($this->renderedCache === null) { + if (\config('fontawesome.svg_href') && $this->cache->has($this->name, $this->library)) { + $svg = new Svg( + $this->cache->getIconId($this->name, $this->library), + $this->class, + $this->cache->get($this->name, $this->library) + ); + + return $svg->renderAsHref(); + } + + $svg = $this->findSvg(); + $svg->css_classes = $this->class; + + $this->cache->put($this->name, $this->library, $svg->view_box); + $this->renderedCache = $svg->render(); + } + + return new DummyView($this->renderedCache); + } + + private function findSvg(): Svg + { + $svg = null; + $path_str = \config('fontawesome.icon_path') . "%s/{$this->name}.svg"; + + foreach (\config('fontawesome.libraries') as $folder) { + if ($this->library !== null && $folder !== $this->library) { + continue; + } + + $path = \sprintf($path_str, $folder); + if (\file_exists($path)) { + $svg = \trim(\file_get_contents($path)); + break; + } + } + + if ($svg === null) { + throw new UnknownIconException($this->name, $this->library); + } + + return $this->svgParser->parseXml( + $this->cache->getIconId($this->name, $this->library), + $svg + ); + } + + private function getCleanIconName(string $icon): string + { + $icon = \trim($icon); + + // Remove library specification prefix from the string. + if (\substr($icon, 0, 2) === 'fa' && ($spos = \strpos($icon, ' ')) !== false) { + $icon = \substr($icon, $spos + 1); + } + + // Remove 'fa-' from the start of the string. + if (\substr($icon, 0, 3) === 'fa-') { + $icon = \substr($icon, 3); + } + + return \strtolower($icon); + } +} diff --git a/src/Exceptions/MalformedViewBoxException.php b/src/Exceptions/MalformedViewBoxException.php new file mode 100644 index 0000000..c2f4901 --- /dev/null +++ b/src/Exceptions/MalformedViewBoxException.php @@ -0,0 +1,13 @@ + \config_path('fontawesome.php'), ]); $this->mergeConfigFrom( - __DIR__ . '/config/fontawesome.php', 'fontawesome' + __DIR__ . '/config/fontawesome.php', + 'fontawesome' ); - $this->registerBladeDirectives(); - $this->registerIconRenderer(); + $this->registerComponents(); + $this->registerDependencies(); } - private function registerBladeDirectives() + private function registerComponents(): void { - $this->app['blade.compiler']->directive('fa', static function ($expression) { - return BladeRenderer::renderGeneric($expression); - }); - - foreach (\config('fontawesome.libraries') as $library) { - $this->app['blade.compiler']->directive('fa' . $library[0], static function ($expression) use ($library) { - return BladeRenderer::renderGeneric($expression, $library); - }); - } + Blade::component( + FontAwesomeBladeComponent::class, + $this->app->get('config')->get('fontawesome.component_name') + ); } - private function registerIconRenderer() + private function registerDependencies(): void { - $this->app->singleton(IconRenderer::class); + $this->app->singleton(IconViewBoxCache::class); + $this->app->singleton(SvgParser::class); } } diff --git a/src/IconRenderer.php b/src/IconRenderer.php deleted file mode 100644 index 8413ca8..0000000 --- a/src/IconRenderer.php +++ /dev/null @@ -1,105 +0,0 @@ -svgParser = $svgParser; - } - - /** - * Render a Font Awesome icon as an svg. - * - * @param string $icon The name of the icon. - * @param string|null $css_classes Extra css classes to add to the svg. - * @param string|null $library The icon library to use. - * - * @return string|null - */ - public function renderSvg(string $icon, ?string $css_classes = null, ?string $library = null): ?string - { - $icon = $this->normalizeIconName($icon); - - $icon_id = 'fa' . ($library ? $library[0] : null) . "-{$icon}"; - if (\config('fontawesome.svg_href') && \array_key_exists($icon_id, $this->rendered_icons)) { - $svg = new Svg($icon_id, $css_classes); - $svg->view_box = $this->rendered_icons[$icon_id]; - - return $svg->renderAsHref(); - } - - $svg_str = $this->loadSvg($icon, $library); - if ($svg_str !== null) { - $svg = $this->svgParser->parseXml($icon_id, $svg_str); - $svg->css_classes = $css_classes; - - $this->rendered_icons[$icon_id] = $svg->view_box; - - return $svg->render(); - } - - return null; - } - - /** - * Find the svg file for this icon and return its content. - * - * @param string $icon The name of the icon. - * @param string|null $library The icon library to use. - * - * @return string|null - */ - private function loadSvg(string $icon, ?string $library = null): ?string - { - $svg = null; - $path_str = \config('fontawesome.icon_path') . "%s/$icon.svg"; - - foreach (\config('fontawesome.libraries') as $folder) { - if ($library !== null && $folder !== $library) { - continue; - } - - $path = \sprintf($path_str, $folder); - if (\file_exists($path)) { - $svg = \trim(\file_get_contents($path)); - break; - } - } - - return $svg; - } - - /** - * Format an icon name to the one used in the Font Awesome repository. - * - * @param string $icon The icon name to normalize. - * - * @return string - */ - public function normalizeIconName(string $icon): string - { - $icon = \trim($icon); - - // Remove library specification prefix from the string. - if (\substr($icon, 0, 2) === 'fa' && ($spos = \strpos($icon, ' ')) !== false) { - $icon = \substr($icon, $spos + 1); - } - - // Remove 'fa-' from the start of the string. - if (\substr($icon, 0, 3) === 'fa-') { - $icon = \substr($icon, 3); - } - - return \strtolower($icon); - } -} diff --git a/src/IconViewBoxCache.php b/src/IconViewBoxCache.php new file mode 100644 index 0000000..ec903d3 --- /dev/null +++ b/src/IconViewBoxCache.php @@ -0,0 +1,29 @@ +cache[$this->getIconId($icon, $library)] ?? null; + } + + public function has(string $icon, ?string $library = null): bool + { + return $this->get($icon, $library) !== null; + } + + public function getIconId(string $icon, ?string $library = null): string + { + return 'fa' . ($library ? $library[0] : null) . "-{$icon}"; + } + + public function put(string $icon, ?string $library, array $viewBox) + { + $this->cache[$this->getIconId($icon, $library)] = $viewBox; + } +} diff --git a/src/Middleware/InjectStyleSheet.php b/src/Middleware/InjectStyleSheet.php index 43139c7..f570f42 100644 --- a/src/Middleware/InjectStyleSheet.php +++ b/src/Middleware/InjectStyleSheet.php @@ -11,10 +11,13 @@ final class InjectStyleSheet { public function handle(Request $request, Closure $next) { + if (\config('fontawesome.font_awesome_css') === false) { + return $next($request); + } + $response = $next($request); - if ( - $response instanceof RedirectResponse + if ($response instanceof RedirectResponse || ($response->headers->has('Content-Type') && \strpos($response->headers->get('Content-Type'), 'html') === false) || $request->getRequestFormat() !== 'html' || $response->getContent() === false @@ -29,7 +32,7 @@ public function handle(Request $request, Closure $next) private function injectStyleSheet(SymfonyBaseResponse $response) { $content = $response->getContent(); - $content = \str_replace('', '', $content); + $content = \str_replace('', '', $content); $response->setContent($content); return $response; diff --git a/src/Models/DummyView.php b/src/Models/DummyView.php new file mode 100644 index 0000000..a04499b --- /dev/null +++ b/src/Models/DummyView.php @@ -0,0 +1,28 @@ +make('view'), + new FileEngine(), + $renderedView, + '' + ); + } + + public function render(?callable $callback = null) + { + return $this->view; + } +} diff --git a/src/Models/Icon.php b/src/Models/Icon.php deleted file mode 100644 index e353f1b..0000000 --- a/src/Models/Icon.php +++ /dev/null @@ -1,133 +0,0 @@ -name = $name; - $this->library = $library; - $this->cssClasses = 'null'; - $this->forceSvgHref = false; - } - - /** - * Indicates whether the icon contains any variables or expressions. - * - * @return bool - */ - public function isStatic(): bool - { - if ($this->forceSvgHref) { - return false; - } - - $values = [ - $this->name, - $this->library, - $this->cssClasses, - ]; - foreach ($values as $value) { - if ($value[0] === '$') { - return false; - } - - $in_double_quote_string = false; - $in_string = false; - $last_char = null; - for ($i = 0; $i < \strlen($value); $i++) { - $char = $value[$i]; - - switch ($char) { - case '"': - if (!$in_string) { - $in_double_quote_string = !$in_double_quote_string; - } - break; - - case '\'': - if (!$in_double_quote_string) { - $in_string = !$in_string; - } - break; - - case '$': - if (!$in_string && !$in_double_quote_string) { - return false; - } - if ($in_double_quote_string && $last_char !== '\\') { - return false; - } - break; - } - - $last_char = $char; - } - } - - return true; - } - - public function setForceSvgHref(bool $force = true): void - { - $this->forceSvgHref = $force; - } - - public function setCssClasses(string $cssClasses): void - { - if ($cssClasses) { - $this->cssClasses = $cssClasses; - } - } - - public function getName(bool $clean = false): ?string - { - if ($clean) { - return $this->cleanValue($this->name); - } - - return $this->name; - } - - public function getLibrary(bool $clean = false): ?string - { - if ($clean) { - return $this->cleanValue($this->library); - } - - return $this->library; - } - - public function getCssClasses(bool $clean = false): ?string - { - if ($clean) { - return $this->cleanValue($this->cssClasses); - } - - return $this->cssClasses; - } - - private function cleanValue(string $value): ?string - { - $value = \trim($value, '\'"'); - - if ($value === 'null' || \strlen($value) === 0) { - return null; - } - - return $value; - } -} diff --git a/src/Models/Svg.php b/src/Models/Svg.php index b166e1f..7c4ee3c 100644 --- a/src/Models/Svg.php +++ b/src/Models/Svg.php @@ -2,6 +2,8 @@ namespace Jerodev\LaraFontAwesome\Models; +use Jerodev\LaraFontAwesome\Exceptions\MalformedViewBoxException; + final class Svg { /** @var string|null */ @@ -16,12 +18,11 @@ final class Svg /** @var int[]|null */ public $view_box; - public function __construct(string $icon_id, ?string $css_classes = null) + public function __construct(string $icon_id, ?string $css_classes = null, ?array $view_box = null) { $this->icon_id = $icon_id; $this->css_classes = $css_classes; - - $this->view_box = null; + $this->view_box = $view_box; } public function render(): string @@ -36,20 +37,41 @@ public function render(): string $svg_viewBox = ' viewBox="' . \implode(' ', $this->view_box) . '"'; } - return "renderCssClasses()}\"{$svg_viewBox}>{$symbol_start}path}\" />{$symbol_end}"; + $css = $this->renderCssClasses(); + if ($css !== '') { + $css = " class=\"{$css}\""; + } + + return "{$symbol_start}path}\"/>{$symbol_end}"; } public function renderAsHref(): string { - return "renderCssClasses()}\">icon_id}\"/>"; + $css = $this->renderCssClasses(); + if ($css !== '') { + $css = " class=\"{$css}\""; + } + + return "icon_id}\"/>"; } + /** + * @return string + * @throws MalformedViewBoxException + */ private function renderCssClasses(): string { + if ($this->view_box === null || \count($this->view_box) !== 4) { + throw new MalformedViewBoxException($this->icon_id, $this->view_box); + } + $classes = \array_filter(\explode(' ', $this->css_classes)); - $classes[] = 'svg-inline--fa'; - $classes[] = 'fa-w-' . ($this->view_box[2] / $this->view_box[3] * 16); - return \implode(' ', \array_unique($classes)); + if (\config('fontawesome.font_awesome_css')) { + $classes[] = 'svg-inline--fa'; + $classes[] = 'fa-w-' . \round($this->view_box[2] / $this->view_box[3] * 16); + } + + return \trim(\implode(' ', \array_unique($classes))); } } diff --git a/src/SvgParser.php b/src/SvgParser.php index 6718edd..e504ff2 100644 --- a/src/SvgParser.php +++ b/src/SvgParser.php @@ -2,10 +2,9 @@ namespace Jerodev\LaraFontAwesome; -use Exception; use Jerodev\LaraFontAwesome\Models\Svg; -class SvgParser +final class SvgParser { public function parseXml(string $icon_id, string $xml): Svg { @@ -20,15 +19,9 @@ public function parseXml(string $icon_id, string $xml): Svg private function parseViewBox(string $str): array { - $view_box = \array_map(static function (string $part) { + return \array_map(static function (string $part) { return \intval($part); }, \explode(' ', $str)); - - if (\count($view_box) !== 4) { - throw new Exception("ViewBox should contain 4 numeric values split by spaces. Got \"{$str}\""); - } - - return $view_box; } private function getAttribute(string $xml, string $attribute): ?string diff --git a/src/config/fontawesome.php b/src/config/fontawesome.php index f15fc03..5556204 100644 --- a/src/config/fontawesome.php +++ b/src/config/fontawesome.php @@ -2,6 +2,17 @@ return [ + /* + |-------------------------------------------------------------------------- + | Component name + |-------------------------------------------------------------------------- + | + | The name of the component to use in blade templates. + | + */ + + 'component_name' => 'fa', + /* |-------------------------------------------------------------------------- | Path to svg libraries @@ -40,11 +51,24 @@ | DOM, this way the svg code only needs to be loaded once if used multiple | times. | - | Very old browser might not support this feature: + | Only very old browser might not support this feature: | https://caniuse.com/#feat=mdn-svg_elements_use_href | */ 'svg_href' => true, + /* + |-------------------------------------------------------------------------- + | Use Font Awesome css + |-------------------------------------------------------------------------- + | + | Whether to add the font awesome css to the svg tags in your dom. + | This is recommended, but if you want full control of how your svgs look + | it can be easier to disable this so you can style it all yourself. + | + */ + + 'font_awesome_css' => true, + ]; diff --git a/tests/BladeRendererTest.php b/tests/BladeRendererTest.php deleted file mode 100644 index b65ea63..0000000 --- a/tests/BladeRendererTest.php +++ /dev/null @@ -1,108 +0,0 @@ -assertEquals( - '', - $render - ); - } - - public function testStaticFabRenderWithoutClass(): void - { - $render = BladeRenderer::renderGeneric('\'laravel\'', 'brands'); - - $this->assertEquals( - '', - $render - ); - } - - public function testFabRenderWithVariable(): void - { - $render = BladeRenderer::renderGeneric('$expression', 'brands'); - - $this->assertStringEndsWith('($expression, null, \'brands\'); ?>', $render); - } - - public function testFabRenderWithVariableAndClass(): void - { - $render = BladeRenderer::renderGeneric('$expression, \'spin\'', 'brands'); - - $this->assertStringEndsWith('($expression, \'spin\', \'brands\'); ?>', $render); - } - - public function testRenderWithVariableClass(): void - { - $render = BladeRenderer::renderGeneric('\'laravel\', $class', 'brands'); - - $this->assertStringEndsWith('(\'laravel\', $class, \'brands\'); ?>', $render); - } - - public function testStaticFarRender(): void - { - $render = BladeRenderer::renderGeneric('\'circle\'', 'regular'); - - $this->assertEquals( - '', - $render - ); - } - - public function testStaticFasRender(): void - { - $render = BladeRenderer::renderGeneric('\'circle\'', 'solid'); - - $this->assertEquals( - '', - $render - ); - } - - /** - * @dataProvider variableRenderingDataProvider - * - * @param string[] $input - * @param string $expected - */ - public function testVariableRendering(array $input, string $expected): void - { - $render = BladeRenderer::renderGeneric(...$input); - - $this->assertStringEndsWith("($expected); ?>", $render); - } - - public function variableRenderingDataProvider() - { - yield [ - [ - '$var, \'foo,bar\'', - 'brands', - ], - '$var, \'foo,bar\', \'brands\'', - ]; - - yield [ - ['"fa-$var"'], - '"fa-$var", null, null', - ]; - - yield [ - ['$laravel'], - '$laravel, null, null', - ]; - - yield [ - ['$laravel, null, true'], - '$laravel, null, null', - ]; - } -} diff --git a/tests/ComponentRenderTest.php b/tests/ComponentRenderTest.php new file mode 100644 index 0000000..e40f4c2 --- /dev/null +++ b/tests/ComponentRenderTest.php @@ -0,0 +1,79 @@ +createComponent('circle'); + $component->class = 'foo'; + + $this->assertEquals( + '', + $component->render() + ); + } + + public function testSimpleIconRender(): void + { + $component = $this->createComponent('circle'); + + $this->assertEquals( + '', + $component->render() + ); + } + + public function testRenderMultipleLibraries(): void + { + $cache = new IconViewBoxCache(); + $component_1 = $this->createComponent('circle', $cache); + $component_2 = $this->createComponent('circle', $cache); + $component_2->library = 'solid'; + $component_3 = $this->createComponent('circle', $cache); + + $this->assertFalse($this->isHrefRender($component_1->render())); + $this->assertFalse($this->isHrefRender($component_2->render())); + $this->assertTrue($this->isHrefRender($component_3->render())); + } + + public function testRenderSpecificLibrary(): void + { + $component = $this->createComponent('circle'); + $component->library = 'solid'; + + $this->assertEquals( + '', + $component->render() + ); + } + + public function testUseHrefForConsecutiveIcons(): void + { + $cache = new IconViewBoxCache(); + $component_1 = $this->createComponent('circle', $cache); + $component_2 = $this->createComponent('circle', $cache); + + $this->assertStringContainsString('render()); + $this->assertStringNotContainsString('render()); + } + + private function createComponent(string $icon, ?IconViewBoxCache $cache = null, ?SvgParser $svgParser = null): FontAwesomeBladeComponent + { + return new FontAwesomeBladeComponent( + $cache ?? new IconViewBoxCache(), + $svgParser ?? new SvgParser(), + $icon + ); + } + + private function isHrefRender(string $xml): bool + { + return \strpos($xml, ''; - $circle = $this->iconRenderer->renderSvg('circle', 'foo-bar'); - - $this->assertEquals($expected, $circle); - } - - public function testRenderWithLibrary() - { - $expected = ''; - $circle = $this->iconRenderer->renderSvg('circle', null, 'solid'); - - $this->assertEquals($expected, $circle); - } - - /** - * @dataProvider svgTestCaseProvider - */ - public function testResolveSvg(string $icon, ?string $result) - { - $this->assertEquals( - $result ? $this->svgParser->parseXml('fa-' . $this->iconRenderer->normalizeIconName($icon), $result)->render() : null, - $this->iconRenderer->renderSvg($icon) - ); - } - - public static function svgTestCaseProvider(): array - { - return [ - ['building', \trim(\file_get_contents(__DIR__ . '/../vendor/fortawesome/font-awesome/svgs/regular/building.svg'))], - ['fa-laravel', \trim(\file_get_contents(__DIR__ . '/../vendor/fortawesome/font-awesome/svgs/brands/laravel.svg'))], - ['fa fa-circle', \trim(\file_get_contents(__DIR__ . '/../vendor/fortawesome/font-awesome/svgs/regular/circle.svg'))], - ['far fa-square', \trim(\file_get_contents(__DIR__ . '/../vendor/fortawesome/font-awesome/svgs/regular/square.svg'))], - ['foo-bar', null], - ]; - } -} diff --git a/tests/MiddlewareTest.php b/tests/MiddlewareTest.php index 3bd549a..1958b21 100644 --- a/tests/MiddlewareTest.php +++ b/tests/MiddlewareTest.php @@ -8,7 +8,7 @@ use Jerodev\LaraFontAwesome\Middleware\InjectStyleSheet; use Symfony\Component\HttpFoundation\Response as SymfonyBaseResponse; -class MiddlewareTest extends TestCase +final class MiddlewareTest extends TestCase { /** @var InjectStyleSheet */ private $middleware; diff --git a/tests/SvgParserTest.php b/tests/SvgParserTest.php new file mode 100644 index 0000000..bd7b38a --- /dev/null +++ b/tests/SvgParserTest.php @@ -0,0 +1,53 @@ +svgParser = \resolve(SvgParser::class); + } + + /** + * @dataProvider svgParsingProvider + * @param string $input The svg string to parse. + * @param array $expected An array containing `viewBox`, `path_start` and `path_end`. + */ + public function testSvgParsing(string $input, array $expected): void + { + $parsed = $this->svgParser->parseXml('icon', $input); + + $this->assertEquals($expected['viewBox'], $parsed->view_box); + $this->assertStringStartsWith($expected['path_start'], $parsed->path); + $this->assertStringEndsWith($expected['path_end'], $parsed->path); + } + + public function svgParsingProvider() + { + yield [ + \trim(\file_get_contents(__DIR__ . '/../vendor/fortawesome/font-awesome/svgs/brands/laravel.svg')), + [ + 'viewBox' => [0, 0, 512, 512], + 'path_start' => 'M504.4,115', + 'path_end' => '.4v91.39h0Z', + ], + ]; + + yield [ + \trim(\file_get_contents(__DIR__ . '/../vendor/fortawesome/font-awesome/svgs/solid/laugh-beam.svg')), + [ + 'viewBox' => [0, 0, 496, 512], + 'path_start' => 'M248 8C111', + 'path_end' => '.1 8.4 15.9 18z', + ], + ]; + } +} diff --git a/tests/SvgRenderTest.php b/tests/SvgRenderTest.php new file mode 100644 index 0000000..1b0073e --- /dev/null +++ b/tests/SvgRenderTest.php @@ -0,0 +1,68 @@ +expectException(MalformedViewBoxException::class); + + $svg = new Svg('fa-href'); + $svg->view_box = [0, 0]; + $svg->render(); + } + + public function testRenderHref(): void + { + $svg = new Svg('fa-href'); + $svg->view_box = [0, 0, 512, 512]; + + $this->assertEquals( + '', + $svg->renderAsHref() + ); + } + + public function testRenderHrefWithoutCssClasses(): void + { + $this->app['config']->set('fontawesome.font_awesome_css', false); + + $svg = new Svg('fa-href'); + $svg->view_box = [0, 0, 512, 512]; + + $this->assertEquals( + '', + $svg->renderAsHref() + ); + } + + public function testRenderSvg(): void + { + $svg = new Svg('fa-href'); + $svg->view_box = [0, 0, 512, 512]; + $svg->path = 'foo bar'; + + $this->assertEquals( + '', + $svg->render() + ); + } + + public function testRenderSvgWithoutCssClasses(): void + { + $this->app['config']->set('fontawesome.font_awesome_css', false); + + $svg = new Svg('fa-href'); + $svg->view_box = [0, 0, 512, 512]; + $svg->path = 'foo bar'; + + $this->assertEquals( + '', + $svg->render() + ); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php index f4141f3..2bb2053 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -14,6 +14,9 @@ protected function getEnvironmentSetUp($app) // Tests assume svg_href is on by default $app['config']->set('fontawesome.svg_href', true); + + // Tests assume font_awesome_css is on by default + $app['config']->set('fontawesome.font_awesome_css', true); } protected function getPackageProviders($app)