From 6a9d8b03059e4d38832885745777776598b8b1e0 Mon Sep 17 00:00:00 2001 From: sreenivasulu-paruchuri Date: Thu, 17 Aug 2023 00:37:07 +0530 Subject: [PATCH 01/10] Drupal 10 twig version changes --- composer.json | 4 +- composer.lock | 2229 ------------------------------------------------- 2 files changed, 2 insertions(+), 2231 deletions(-) delete mode 100644 composer.lock diff --git a/composer.json b/composer.json index f77a4061..50f4f1b7 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "repositories": [ { "type": "vcs", - "url": "https://github.com/boltdesignsystem/twig-tools", + "url": "https://github.com/sreenivasulu-paruchuri/twig-tools.git", "no-api": true } ], @@ -33,7 +33,7 @@ "gregwar/image": "^2.0", "nabil1337/case-helper": "^0.1.0", "mexitek/phpcolors": "^0.4.0", - "twig/twig": "^2.14.11" + "twig/twig": "^2.14.11 || ^3.0" }, "require-dev": { "phpunit/phpunit": "^7" diff --git a/composer.lock b/composer.lock deleted file mode 100644 index c909828a..00000000 --- a/composer.lock +++ /dev/null @@ -1,2229 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "1980c5b4004ec83e9dccdaf7d8534f48", - "packages": [ - { - "name": "basaltinc/twig-tools", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/boltdesignsystem/twig-tools", - "reference": "996d2a6e64dde4675b332c1c4abc6352f086d709" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/boltdesignsystem/twig-tools/zipball/996d2a6e64dde4675b332c1c4abc6352f086d709", - "reference": "996d2a6e64dde4675b332c1c4abc6352f086d709", - "shasum": "" - }, - "require": { - "justinrainbow/json-schema": "^5.2", - "symfony/yaml": "^3.2 || ^4.0", - "twig/twig": "^1.0 || ^2.0", - "webmozart/path-util": "^2.3" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "BasaltInc\\TwigTools\\": "src/" - } - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Evan Lovely", - "email": "evanlovely@gmail.com" - } - ], - "time": "2022-03-22T18:03:51+00:00" - }, - { - "name": "gregwar/cache", - "version": "v1.0.12", - "target-dir": "Gregwar/Cache", - "source": { - "type": "git", - "url": "https://github.com/Gregwar/Cache.git", - "reference": "305d0f5a12c0beecbbd7e1de236f59f39e0c0ac3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Gregwar/Cache/zipball/305d0f5a12c0beecbbd7e1de236f59f39e0c0ac3", - "reference": "305d0f5a12c0beecbbd7e1de236f59f39e0c0ac3", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "autoload": { - "psr-0": { - "Gregwar\\Cache": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gregwar", - "email": "g.passault@gmail.com" - } - ], - "description": "A lightweight file-system cache system", - "keywords": [ - "cache", - "caching", - "file-system", - "system" - ], - "time": "2016-09-23T08:16:04+00:00" - }, - { - "name": "gregwar/image", - "version": "v2.0.25", - "target-dir": "Gregwar/Image", - "source": { - "type": "git", - "url": "https://github.com/Gregwar/Image.git", - "reference": "03534d5760cbea5c96e6292041ff81a3bb205c36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Gregwar/Image/zipball/03534d5760cbea5c96e6292041ff81a3bb205c36", - "reference": "03534d5760cbea5c96e6292041ff81a3bb205c36", - "shasum": "" - }, - "require": { - "ext-gd": "*", - "gregwar/cache": "^1.0.6", - "php": "^5.3 || ^7.0" - }, - "require-dev": { - "sllh/php-cs-fixer-styleci-bridge": "~1.0", - "symfony/phpunit-bridge": "^2.7.4 || ^3.0" - }, - "suggest": { - "behat/transliterator": "Transliterator provides ability to set non-latin1 pretty names" - }, - "type": "library", - "autoload": { - "psr-0": { - "Gregwar\\Image": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Grégoire Passault", - "email": "g.passault@gmail.com", - "homepage": "http://www.gregwar.com/" - } - ], - "description": "Image handling", - "homepage": "https://github.com/Gregwar/Image", - "keywords": [ - "gd", - "image" - ], - "time": "2019-03-01T15:55:29+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.9", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "44c6787311242a979fa15c704327c20e7221a0e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/44c6787311242a979fa15c704327c20e7221a0e4", - "reference": "44c6787311242a979fa15c704327c20e7221a0e4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2019-09-25T14:49:45+00:00" - }, - { - "name": "mexitek/phpcolors", - "version": "v0.4", - "source": { - "type": "git", - "url": "https://github.com/mexitek/phpColors.git", - "reference": "89bf30473a68dc8845e46e9db3e536b969e18c11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mexitek/phpColors/zipball/89bf30473a68dc8845e46e9db3e536b969e18c11", - "reference": "89bf30473a68dc8845e46e9db3e536b969e18c11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Arlo Carreon", - "homepage": "http://arlocarreon.com", - "role": "creator" - } - ], - "description": "A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.", - "homepage": "http://mexitek.github.com/phpColors/", - "keywords": [ - "color", - "css", - "design", - "frontend", - "ui" - ], - "time": "2015-09-09T15:43:06+00:00" - }, - { - "name": "michelf/php-markdown", - "version": "1.9.0", - "source": { - "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/c83178d49e372ca967d1a8c77ae4e051b3a3c75c", - "reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": ">=4.3 <5.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Michelf\\": "Michelf/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "https://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "https://daringfireball.net/" - } - ], - "description": "PHP Markdown", - "homepage": "https://michelf.ca/projects/php-markdown/", - "keywords": [ - "markdown" - ], - "time": "2019-12-02T02:32:27+00:00" - }, - { - "name": "nabil1337/case-helper", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/nabil1337/case-helper.git", - "reference": "8cead5fe6470402d127ae0d759168f9778078992" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nabil1337/case-helper/zipball/8cead5fe6470402d127ae0d759168f9778078992", - "reference": "8cead5fe6470402d127ae0d759168f9778078992", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "CaseHelper\\": "src/", - "CaseHelper\\Test\\": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Easily convert between camelCase, PascalCase, kebab-case, snake_case, SCREAMING_SNAKE_CASE, Train-Case, and string case!", - "time": "2014-12-06T02:33:17+00:00" - }, - { - "name": "shudrum/array-finder", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/Shudrum/ArrayFinder.git", - "reference": "42380f01017371b7a1e8e02b0bf12cb534e454d7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Shudrum/ArrayFinder/zipball/42380f01017371b7a1e8e02b0bf12cb534e454d7", - "reference": "42380f01017371b7a1e8e02b0bf12cb534e454d7", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Shudrum\\Component\\ArrayFinder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Julien Martin", - "email": "martin.julien82@gmail.com" - } - ], - "description": "ArrayFinder component", - "homepage": "https://github.com/Shudrum/ArrayFinder", - "time": "2016-02-01T12:23:32+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.4.38", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "bc63e15160866e8730a1f738541b194c401f72bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/bc63e15160866e8730a1f738541b194c401f72bf", - "reference": "bc63e15160866e8730a1f738541b194c401f72bf", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2020-01-16T19:04:26+00:00" - }, - { - "name": "twig/twig", - "version": "v2.15.3", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "ab402673db8746cb3a4c46f3869d6253699f614a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ab402673db8746cb3a4c46f3869d6253699f614a", - "reference": "ab402673db8746cb3a4c46f3869d6253699f614a", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.8" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.15-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - }, - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v2.15.3" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-09-28T08:40:08+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "vimeo/psalm": "<3.6.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2020-02-14T12:15:55+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "time": "2015-12-17T08:42:14+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2019-10-21T16:45:58+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.9.5", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2020-01-17T21:11:47+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" - }, - { - "name": "phar-io/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2018-08-07T13:53:10+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "shasum": "" - }, - "require": { - "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", - "mockery/mockery": "^1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "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": "2020-02-22T12:28:44+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", - "shasum": "" - }, - "require": { - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-02-18T18:59:58+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "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|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2020-03-05T15:02:03+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "6.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-10-31T16:06:48+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2018-09-13T20:33:42+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2019-06-07T04:22:29+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2019-09-17T06:23:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "7.5.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2020-01-08T08:45:45+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "shasum": "" - }, - "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-07-12T15:12:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2019-02-04T06:01:07+00:00" - }, - { - "name": "sebastian/environment", - "version": "4.2.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2019-11-20T08:46:58+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2019-09-14T09:02:43+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" - } - ], - "aliases": [ - { - "package": "basaltinc/twig-tools", - "version": "9999999-dev", - "alias": "1.4.3", - "alias_normalized": "1.4.3.0" - } - ], - "minimum-stability": "stable", - "stability-flags": { - "basaltinc/twig-tools": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.3.0" -} From 31f2d50b8c141f9ffbbacf46385496767a4d1225 Mon Sep 17 00:00:00 2001 From: sreenivasulu-paruchuri Date: Thu, 17 Aug 2023 00:43:07 +0530 Subject: [PATCH 02/10] Drupal 10 twig version changes --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 50f4f1b7..374f10f1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "bolt-design-system/core-php", "description": "Core PHP functionality for the Bolt Design System", - "version": "5.9.1", + "version": "5.9.2", "type": "library", "license": "MIT", "authors": [ From dc0a73576e776dae552f596f716c9250d27a3a46 Mon Sep 17 00:00:00 2001 From: sreenivasulu-paruchuri Date: Thu, 17 Aug 2023 02:18:16 +0530 Subject: [PATCH 03/10] Drupal 10 twig version changes --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 374f10f1..c9e00db5 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ } }, "require": { - "basaltinc/twig-tools": "dev-master as 1.4.3", + "basaltinc/twig-tools": "1.4.5", "michelf/php-markdown": "^1.8.0", "webmozart/path-util": "^2.3", "shudrum/array-finder": "^1.1", From c06a9e15c6f899e5fe20be62a1fbe5e3e678bd6c Mon Sep 17 00:00:00 2001 From: sreenivasulu-paruchuri Date: Thu, 17 Aug 2023 02:34:10 +0530 Subject: [PATCH 04/10] Drupal 10 twig version changes --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c9e00db5..78157a63 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ } }, "require": { - "basaltinc/twig-tools": "1.4.5", + "basaltinc/twig-tools": "1.4.4", "michelf/php-markdown": "^1.8.0", "webmozart/path-util": "^2.3", "shudrum/array-finder": "^1.1", From 957b748ebfadd88179e5543e825241a7fb27947e Mon Sep 17 00:00:00 2001 From: sreenivasulu-paruchuri Date: Tue, 22 Aug 2023 19:30:51 +0530 Subject: [PATCH 05/10] Drupal 10 changes --- src/TwigExtensions/BoltCore.php | 4 ++-- src/TwigFilters.php | 14 ++++++------- src/TwigFunctions.php | 36 ++++++++++++++++----------------- src/TwigRenderer.php | 9 ++++++--- 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/TwigExtensions/BoltCore.php b/src/TwigExtensions/BoltCore.php index 85b9aa58..92c2c997 100644 --- a/src/TwigExtensions/BoltCore.php +++ b/src/TwigExtensions/BoltCore.php @@ -8,7 +8,7 @@ use Twig\Extension\InitRuntimeInterface; use Twig\Extension\GlobalsInterface; use Twig\Extension\AbstractExtension; -class BoltCore extends AbstractExtension implements InitRuntimeInterface, GlobalsInterface { +class BoltCore extends AbstractExtension implements GlobalsInterface { public $data = []; public $isDebug; @@ -34,7 +34,7 @@ function initRuntime(\Twig\Environment $env) { } } - public function getGlobals() { + public function getGlobals(): array { return [ 'bolt' => [ 'data' => $this->data, diff --git a/src/TwigFilters.php b/src/TwigFilters.php index 416e4853..20cf55e4 100644 --- a/src/TwigFilters.php +++ b/src/TwigFilters.php @@ -3,24 +3,24 @@ namespace Bolt; use Bolt; -use \Twig_SimpleFilter; +use Twig\TwigFilter; class TwigFilters { public static function markdown() { - return new Twig_SimpleFilter('markdown', function($string) { + return new TwigFilter('markdown', function($string) { return Utils::convertMarkdown($string); }); } public static function json_decode() { - return new Twig_SimpleFilter('json_decode', function ($json) { + return new TwigFilter('json_decode', function ($json) { return json_decode($json, true); }); } public static function without() { - return new Twig_SimpleFilter('without', function ($element) { + return new TwigFilter('without', function ($element) { if ($element instanceof ArrayAccess) { $filtered_element = clone $element; } @@ -39,13 +39,13 @@ public static function without() { } public static function t() { - return new Twig_SimpleFilter('t', function ($string, $args = []) { + return new TwigFilter('t', function ($string, $args = []) { return strtr($string, $args); }); } public static function rgb2hex() { - return new Twig_SimpleFilter('rgb2hex', function ($rgb) { + return new TwigFilter('rgb2hex', function ($rgb) { $rgb = str_replace('rgb(', '', $rgb); $rgb = str_replace(')', '', $rgb); $rgb = str_replace(' ', '', $rgb); @@ -67,7 +67,7 @@ public static function rgb2hex() { } public static function text_contrast() { - return new Twig_SimpleFilter('text_contrast', function ($color) { + return new TwigFilter('text_contrast', function ($color) { return Colors::calculateTextContrast($color); }); } diff --git a/src/TwigFunctions.php b/src/TwigFunctions.php index 3ac944a5..3cbd8fc8 100644 --- a/src/TwigFunctions.php +++ b/src/TwigFunctions.php @@ -3,7 +3,7 @@ namespace Bolt; use Bolt; -use \Twig_SimpleFunction; +use Twig\TwigFunction; use \Drupal\Core\Template\Attribute; use \BasaltInc\TwigTools; use \Webmozart\PathUtil\Path; @@ -16,7 +16,7 @@ class TwigFunctions { public static function getSpacingScaleSequence() { - return new Twig_SimpleFunction('getSpacingScaleSequence', function($context) { + return new TwigFunction('getSpacingScaleSequence', function($context) { // Mainly just a demo for how to access the global `bolt` data. $data = $context['bolt']['data']['spacing']['scale']; $scaleValues = array_values($data); @@ -29,7 +29,7 @@ public static function getSpacingScaleSequence() { public static function fileExists() { - return new Twig_SimpleFunction('fileExists', function(\Twig\Environment $env, $context, $path) { + return new TwigFunction('fileExists', function(\Twig\Environment $env, $context, $path) { $result = ''; try { @@ -49,7 +49,7 @@ public static function fileExists() { } public static function inlineFile() { - return new Twig_SimpleFunction('inline', function($context, $filename) { + return new TwigFunction('inline', function($context, $filename) { if (!$filename){ return ''; } @@ -87,7 +87,7 @@ public static function inlineFile() { // @todo: integrate with existing Link component // Better Link function - improvement over off the shelf Drupal `Link` function Pattern Lab's Twig Extensions Plugin provided. public static function link() { - return new Twig_SimpleFunction('link', function ($title, $url, $attributes) { + return new TwigFunction('link', function ($title, $url, $attributes) { if (!empty($attributes)) { if (is_array($attributes)) { $attributes = new Attribute($attributes); @@ -101,7 +101,7 @@ public static function link() { // A combination of base64, bgcolor, ratio, and imageSize public static function getImageData() { - return new Twig_SimpleFunction('getImageData', function(\Twig\Environment $env, $relativeImagePath) { + return new TwigFunction('getImageData', function(\Twig\Environment $env, $relativeImagePath) { if (!$relativeImagePath) { return []; } @@ -122,7 +122,7 @@ public static function getImageData() { // Same overall idea as https://jmperezperez.com/medium-image-progressive-loading-placeholder/, we just started working on this a few years prior ^_^ public static function base64() { - return new Twig_SimpleFunction('base64', function(\Twig\Environment $env, $relativeImagePath) { + return new TwigFunction('base64', function(\Twig\Environment $env, $relativeImagePath) { $boltData = Utils::getData($env); $wwwDir = $boltData['config']['wwwDir']; return Images::generate_base64_image_placeholder($relativeImagePath, $wwwDir); @@ -133,7 +133,7 @@ public static function base64() { // Return the aspect ratio of the image passed in public static function ratio() { - return new Twig_SimpleFunction('ratio', function(\Twig\Environment $env, $relativeImagePath, $heightOrWidthRatio = 'width') { + return new TwigFunction('ratio', function(\Twig\Environment $env, $relativeImagePath, $heightOrWidthRatio = 'width') { $boltData = Utils::getData($env); $wwwDir = $boltData['config']['wwwDir']; $value = Images::calculate_image_aspect_ratio($relativeImagePath, $heightOrWidthRatio, $wwwDir); @@ -146,7 +146,7 @@ public static function ratio() { // Originally was required...? Keeping for now till full responsive images solution back up and running public static function imagesize() { - return new Twig_SimpleFunction('imagesize', function(\Twig\Environment $env, $relativeImagePath) { + return new TwigFunction('imagesize', function(\Twig\Environment $env, $relativeImagePath) { $boltData = Utils::getData($env); $wwwDir = $boltData['config']['wwwDir']; return Images::get_image_dimensions($relativeImagePath, $wwwDir); @@ -157,7 +157,7 @@ public static function imagesize() { public static function deep_merge() { - return new Twig_SimpleFunction('deep_merge', function($param1, $param2) { + return new TwigFunction('deep_merge', function($param1, $param2) { $result = array_merge_recursive( $param1, $param2 ); // $result = array_replace_recursive( $param1, $param2 ); return $result; @@ -166,7 +166,7 @@ public static function deep_merge() { // @todo: rename to public_path? we should also look into what'd be required to support `drupal_get_path` public static function publicpath() { - return new Twig_SimpleFunction('publicpath', function($fileName) { + return new TwigFunction('publicpath', function($fileName) { if (function_exists('drupal_get_path')) { return '/' . drupal_get_path('theme', 'bolt') . '/public/' . $fileName; } @@ -178,7 +178,7 @@ public static function publicpath() { // @todo Deprecate & remove this whole `pattern_template` function public static function pattern_template() { - return new Twig_SimpleFunction('pattern_template', function($patternName) { + return new TwigFunction('pattern_template', function($patternName) { switch ($patternName) { case 'button_group': @@ -228,7 +228,7 @@ public static function pattern_template() { // http://www.w3.org/TR/WCAG20/#visual-audio-contrast (1.4.3) // http://www.w3.org/TR/WCAG20/#larger-scaledef public static function color_contrast() { - return new Twig_SimpleFunction('color_contrast', function($color1, $color2) { + return new TwigFunction('color_contrast', function($color1, $color2) { $ratio = Colors::calculateLuminosityRatio($color1, $color2); $contrast["levelAANormal"] = ($ratio >= 4.5 ? 'pass' : 'fail'); @@ -245,7 +245,7 @@ public static function color_contrast() { // Backport the native create_attribute function from Drupal to natively work in Pattern Lab public static function create_attribute() { - return new Twig_SimpleFunction('create_attribute', function($attributes) { + return new TwigFunction('create_attribute', function($attributes) { return is_array($attributes) ? new Attribute($attributes) : $attributes; // print_r(Attribute); }); @@ -253,7 +253,7 @@ public static function create_attribute() { // Returns an up-to-date version of the global `bolt.data` data store public static function getBoltData() { - return new Twig_SimpleFunction('getBoltData', function(\Twig\Environment $env) { + return new TwigFunction('getBoltData', function(\Twig\Environment $env) { $fullManifestPath = TwigTools\Utils::resolveTwigPath($env, '@bolt-data/full-manifest.bolt.json'); $dataDir = dirname($fullManifestPath); return Bolt\Utils::buildBoltData($dataDir); @@ -274,7 +274,7 @@ public static function getBoltData() { */ public static function init() { - return new Twig_SimpleFunction('init', function($context, $schema) { + return new TwigFunction('init', function($context, $schema) { $twigData = array(); $twigData["props"] = new Attribute(Utils::buildPropsArray($context, $schema)); $twigData["data"] = Utils::buildPropsArray($context, $schema, true); @@ -285,7 +285,7 @@ public static function init() { } public static function github_url() { - return new Twig_SimpleFunction('github_url', function(\Twig\Environment $env, $twigPath) { + return new TwigFunction('github_url', function(\Twig\Environment $env, $twigPath) { $filePath = TwigTools\Utils::resolveTwigPath($env, $twigPath); return Utils::gitHubUrl($filePath); }, [ @@ -301,7 +301,7 @@ public static function github_url() { * @return integer - Returns greatest common denominator */ public static function gcd() { - return new Twig_SimpleFunction('gcd', function($a, $b) { + return new TwigFunction('gcd', function($a, $b) { if(is_numeric($a) && is_numeric($b)) { // If either value is a float or is a string containing a float, don't try to get GCD if(is_float($a) || is_float($b) || (is_string($a) && strpos($a, '.')) || (is_string($b) && strpos($b, '.'))) { diff --git a/src/TwigRenderer.php b/src/TwigRenderer.php index d3dc2a3c..843a3242 100644 --- a/src/TwigRenderer.php +++ b/src/TwigRenderer.php @@ -7,6 +7,9 @@ use RecursiveIteratorIterator; use RecursiveDirectoryIterator; use Symfony\Component\Finder\Finder; +use Twig\Loader\FilesystemLoader; +use Twig\Loader\ChainLoader; +use Twig\Extension\DebugExtension; // Twig docs for this: https://twig.symfony.com/doc/1.x/api.html @@ -44,7 +47,7 @@ function __construct(string $twigNamespaceConfigPath, $relativePathRoot, $extraT // Recursively add known Twig directories so none-namespaced Twig references like `./my-template.twig` still work! foreach ($buildLoaderPaths as $path) { - $loader = new \Twig_Loader_Filesystem(dirname(Path::makeAbsolute($path, $this->relativePathRoot))); + $loader = new FilesystemLoader(dirname(Path::makeAbsolute($path, $this->relativePathRoot))); $twigLoaders[] = $loader; } @@ -52,7 +55,7 @@ function __construct(string $twigNamespaceConfigPath, $relativePathRoot, $extraT $twigLoaders = array_merge($twigLoaders, $extraTwigLoaders); } - $loaders = new \Twig_Loader_Chain($twigLoaders); + $loaders = new ChainLoader($twigLoaders); // Create Twig Environment with the `$loaders` just made and some global settings $this->twig = new \Twig\Environment($loaders, [ @@ -73,7 +76,7 @@ function __construct(string $twigNamespaceConfigPath, $relativePathRoot, $extraT foreach ($this->twigExtensions as $twigExtension) { $this->twig->addExtension(new $twigExtension()); } - $this->twig->addExtension(new \Twig_Extension_Debug()); + $this->twig->addExtension(new DebugExtension()); } From 6245a6f52eeade890002503cbb3eb41278ba02ca Mon Sep 17 00:00:00 2001 From: Marcin Religa Date: Thu, 5 Oct 2023 12:24:46 +0200 Subject: [PATCH 06/10] Twig 2.7 deprecations remove --- src/Layout/GridCellNode.php | 9 ++++++--- src/Layout/GridCellTokenParser.php | 8 +++++--- src/Layout/GridTagNode.php | 11 +++++++---- src/Layout/GridTagTokenParser.php | 5 +++-- src/TwigExtensions/BoltCoreCompat.php | 8 ++++---- src/TwigExtensions/BoltExtras.php | 8 ++++---- src/TwigTags.php | 2 -- 7 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/Layout/GridCellNode.php b/src/Layout/GridCellNode.php index 33d0302e..fccbbf19 100644 --- a/src/Layout/GridCellNode.php +++ b/src/Layout/GridCellNode.php @@ -2,8 +2,11 @@ namespace Bolt\Layout; -use \Drupal\Core\Template\Attribute; use Bolt\BoltStringLoader; +use Drupal\Core\Template\Attribute; +use Twig\Environment; +use Twig\Loader\ArrayLoader; +use Twig\Node\Expression\AbstractExpression; // Default attributes and inheritted data all cell components inherit (ex. base CSS class) @@ -96,7 +99,7 @@ static public function cellFunctionToCall(){ */ $attributes = new Attribute($merged_attributes); - $env = new \Twig_Environment(new \Twig_Loader_Array([]), [ + $env = new Environment(new ArrayLoader([]), [ 'debug' => true, 'autoescape' => false, ]); @@ -115,7 +118,7 @@ public function compile(\Twig\Compiler $compiler) { // argument is not an expression (such as, a \Twig_Node_Textbody) // we should trick with output buffering to get a valid argument to pass // to the cellFunctionToCall() function. - if (!($this->getNode('params')->getNode($i) instanceof \Twig_Node_Expression)) { + if (!($this->getNode('params')->getNode($i) instanceof AbstractExpression)) { $compiler->write('ob_start();')->raw(PHP_EOL); $compiler->subcompile($this->getNode('params')->getNode($i)); $compiler->write('$_mytag[] = ob_get_clean();')->raw(PHP_EOL); diff --git a/src/Layout/GridCellTokenParser.php b/src/Layout/GridCellTokenParser.php index 92e2332f..d953397c 100644 --- a/src/Layout/GridCellTokenParser.php +++ b/src/Layout/GridCellTokenParser.php @@ -5,6 +5,8 @@ use \Drupal\Core\Template\Attribute; use Bolt\Layout\GridCellNode; +use Twig\Error\SyntaxError; +use Twig\Node\Node; /** * Represents a Grid Cell node. @@ -49,7 +51,7 @@ public function parse(\Twig\Token $token) { $continue = false; break; default: - throw new \Twig_Error_Syntax(sprintf('Unexpected end of template. Twig was looking for the following tags "endcell" to close the "cell" block started at line %d)', $lineno), -1); + throw new SyntaxError(sprintf('Unexpected end of template. Twig was looking for the following tags "endcell" to close the "cell" block started at line %d)', $lineno), -1); } // you want $body at the beginning of your arguments @@ -61,7 +63,7 @@ public function parse(\Twig\Token $token) { $stream->expect(\Twig\Token::BLOCK_END_TYPE); } - return new GridCellNode(new \Twig_Node($params), $lineno, $this->getTag()); + return new GridCellNode(new Node($params), $lineno, $this->getTag()); } /** @@ -97,4 +99,4 @@ public function decideMyTagFork(\Twig\Token $token) { } } -?> \ No newline at end of file +?> diff --git a/src/Layout/GridTagNode.php b/src/Layout/GridTagNode.php index f4202f59..0be36805 100644 --- a/src/Layout/GridTagNode.php +++ b/src/Layout/GridTagNode.php @@ -2,11 +2,14 @@ namespace Bolt\Layout; -use \Drupal\Core\Template\Attribute; use Bolt\BoltStringLoader; +use Drupal\Core\Template\Attribute; +use Twig\Environment; +use Twig\Loader\ArrayLoader; +use Twig\Node\Expression\AbstractExpression; - // Default attributes and inheritted data all grid components inherit (ex. base CSS class) +// Default attributes and inheritted data all grid components inherit (ex. base CSS class) $GLOBALS['grid_attributes'] = array('class' => array('o-bolt-grid')); // Crude way to track which instance of the component is being referenced so each component's unique data is encapsulated and merged together properly without bleeding over. $GLOBALS['counter'] = 0; @@ -79,7 +82,7 @@ static public function functionToCall(){ // Run the captured attributes through D8's createAttribute function, prior to rendering $attributes = new Attribute($merged_attributes); - $env = new \Twig_Environment(new \Twig_Loader_Array([]), [ + $env = new Environment(new ArrayLoader([]), [ 'debug' => true, 'autoescape' => false, ]); @@ -106,7 +109,7 @@ public function compile(\Twig\Compiler $compiler) { // argument is not an expression (such as, a \Twig_Node_Textbody) // we should trick with output buffering to get a valid argument to pass // to the functionToCall() function. - if (!($this->getNode('params')->getNode($i) instanceof \Twig_Node_Expression)){ + if (!($this->getNode('params')->getNode($i) instanceof AbstractExpression)){ $compiler->write('ob_start();')->raw(PHP_EOL); $compiler->subcompile($this->getNode('params')->getNode($i)); $compiler->write('$_mytag[] = ob_get_clean();')->raw(PHP_EOL); diff --git a/src/Layout/GridTagTokenParser.php b/src/Layout/GridTagTokenParser.php index 2c07ad7c..6d4c9275 100644 --- a/src/Layout/GridTagTokenParser.php +++ b/src/Layout/GridTagTokenParser.php @@ -3,6 +3,7 @@ namespace Bolt\Layout; use Bolt\Layout\GridTagNode; +use Twig\Node\Node; /** * @author Salem Ghoweri @@ -54,7 +55,7 @@ public function parse(\Twig\Token $token) { $stream->expect(\Twig\Token::BLOCK_END_TYPE); } - return new GridTagNode(new \Twig_Node($params), $lineno, $this->getTag()); + return new GridTagNode(new Node($params), $lineno, $this->getTag()); } /** @@ -88,4 +89,4 @@ public function getTag() { public function decideMyTagFork(\Twig\Token $token) { return $token->test(array("grid", "endgrid")); } -} \ No newline at end of file +} diff --git a/src/TwigExtensions/BoltCoreCompat.php b/src/TwigExtensions/BoltCoreCompat.php index d1e16889..f9f9800b 100644 --- a/src/TwigExtensions/BoltCoreCompat.php +++ b/src/TwigExtensions/BoltCoreCompat.php @@ -2,13 +2,13 @@ namespace Bolt\TwigExtensions; -use Bolt; -use Twig_Extension; -use Twig_ExtensionInterface; use BasaltInc\TwigTools; +use Bolt; +use Twig\Extension\AbstractExtension; +use Twig\Extension\ExtensionInterface; // Twig extensions for better Drupal / UI Patterns module compatibility -class BoltCoreCompat extends Twig_Extension implements Twig_ExtensionInterface { +class BoltCoreCompat extends AbstractExtension implements ExtensionInterface { public function getFunctions() { return [ diff --git a/src/TwigExtensions/BoltExtras.php b/src/TwigExtensions/BoltExtras.php index 6f802e54..9bac8570 100644 --- a/src/TwigExtensions/BoltExtras.php +++ b/src/TwigExtensions/BoltExtras.php @@ -2,12 +2,12 @@ namespace Bolt\TwigExtensions; -use Bolt; -use Twig_Extension; -use Twig_ExtensionInterface; use BasaltInc\TwigTools; +use Bolt; +use Twig\Extension\AbstractExtension; +use Twig\Extension\ExtensionInterface; -class BoltExtras extends Twig_Extension implements Twig_ExtensionInterface { +class BoltExtras extends AbstractExtension implements ExtensionInterface { public function getFunctions() { return [ diff --git a/src/TwigTags.php b/src/TwigTags.php index 4203d76f..55cf18c7 100644 --- a/src/TwigTags.php +++ b/src/TwigTags.php @@ -4,8 +4,6 @@ use Bolt\Layout\GridTagTokenParser; use Bolt\Layout\GridCellTokenParser; -use \Twig_SimpleFunction; - class TwigTags { From a8d7f8e2ed69ca6cf4fa8f157153a8ebcc5b397f Mon Sep 17 00:00:00 2001 From: Marcin Religa Date: Thu, 5 Oct 2023 15:01:47 +0200 Subject: [PATCH 07/10] Switch ArrayFinder to repo which supports PHP 8.1 --- composer.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 78157a63..c80223a5 100644 --- a/composer.json +++ b/composer.json @@ -13,13 +13,17 @@ "name": "Evan Lovely" } ], - "repositories": [ - { + "repositories": { + "boltvcs": { "type": "vcs", "url": "https://github.com/sreenivasulu-paruchuri/twig-tools.git", "no-api": true + }, + "shudrum/array-finder": { + "type": "git", + "url": "https://github.com/atomiix/ArrayFinder.git" } - ], + }, "autoload": { "psr-4": { "Bolt\\": "src/" @@ -48,4 +52,4 @@ "vendor/bin/phpunit --colors=always tests" ] } -} \ No newline at end of file +} From 61d21f87b5c1f51f630f1239c6250526bf5d385e Mon Sep 17 00:00:00 2001 From: Marcin Religa Date: Thu, 5 Oct 2023 20:06:35 +0200 Subject: [PATCH 08/10] Bomp repository version --- composer.json | 9 ++------- package.json | 4 ++-- readme.md | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index c80223a5..b325476f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "bolt-design-system/core-php", "description": "Core PHP functionality for the Bolt Design System", - "version": "5.9.2", + "version": "8.0.0", "type": "library", "license": "MIT", "authors": [ @@ -14,11 +14,6 @@ } ], "repositories": { - "boltvcs": { - "type": "vcs", - "url": "https://github.com/sreenivasulu-paruchuri/twig-tools.git", - "no-api": true - }, "shudrum/array-finder": { "type": "git", "url": "https://github.com/atomiix/ArrayFinder.git" @@ -30,7 +25,7 @@ } }, "require": { - "basaltinc/twig-tools": "1.4.4", + "basaltinc/twig-tools": "^1.4.0 || ^8.0", "michelf/php-markdown": "^1.8.0", "webmozart/path-util": "^2.3", "shudrum/array-finder": "^1.1", diff --git a/package.json b/package.json index b80367ce..f3fa730b 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "@bolt/core-php", - "version": "5.9.1", + "version": "8.0.0", "description": "Core PHP Library", "homepage": "https://boltdesignsystem.com", - "repository": "https://github.com/bolt-design-system/bolt/tree/master/packages/core-php", + "repository": "https://gitlab.com/pegadigital/bolt/core-php", "license": "MIT", "scripts": { "setup": "composer run setup" diff --git a/readme.md b/readme.md index 33637e1e..ecb362df 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ This PHP package is for the [Bolt Design System](https://boltdesignsystem.com). -This package gets deployed as [a read-only git repo `bolt-design-system/core-php`](https://github.com/bolt-design-system/core-php), however it's source is at [`bolt-design-system/bolt` in `packages/core-php`](https://github.com/bolt-design-system/bolt/blob/master/packages/core-php), so **don't send PRs to the first repo link, send them to the second repo link!!** +This package gets deployed as [a git repo `bolt-design-system/core-php`](https://gitlab.com/pegadigital/bolt/core-php). # Categories of Twig Extension From f802c41ab791de13cdf6ad6a2e6689417ba5b679 Mon Sep 17 00:00:00 2001 From: Marcin Religa Date: Fri, 6 Oct 2023 09:10:46 +0200 Subject: [PATCH 09/10] Bump repository version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b325476f..eb4060b5 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "basaltinc/twig-tools": "^1.4.0 || ^8.0", "michelf/php-markdown": "^1.8.0", "webmozart/path-util": "^2.3", - "shudrum/array-finder": "^1.1", + "shudrum/array-finder": "dev-master#e54390b430b069e10be4eaf20cc16bb51b652b43 as v1.1.0", "gregwar/image": "^2.0", "nabil1337/case-helper": "^0.1.0", "mexitek/phpcolors": "^0.4.0", From d8d4e3ab2b976a9597288a817bc2f45196d7f3d7 Mon Sep 17 00:00:00 2001 From: Marcin Religa Date: Fri, 6 Oct 2023 09:26:35 +0200 Subject: [PATCH 10/10] Restore repository version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index eb4060b5..b325476f 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "basaltinc/twig-tools": "^1.4.0 || ^8.0", "michelf/php-markdown": "^1.8.0", "webmozart/path-util": "^2.3", - "shudrum/array-finder": "dev-master#e54390b430b069e10be4eaf20cc16bb51b652b43 as v1.1.0", + "shudrum/array-finder": "^1.1", "gregwar/image": "^2.0", "nabil1337/case-helper": "^0.1.0", "mexitek/phpcolors": "^0.4.0",