Browse Source

[Technique] Mise en place Twig #1213

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
282406c5dc
3 changed files with 262 additions and 85 deletions
  1. +16
    -0
      common/config/main.php
  2. +2
    -1
      composer.json
  3. +244
    -84
      composer.lock

+ 16
- 0
common/config/main.php View File

@@ -96,6 +96,22 @@ return [
'mailerService' => [
'class' => 'common\components\MailerService'
],
'view' => [
'class' => 'yii\web\View',
'renderers' => [
'twig' => [
'class' => 'yii\twig\ViewRenderer',
'cachePath' => '@runtime/Twig/cache',
'options' => [
'auto_reload' => true,
],
'globals' => [
'html' => ['class' => '\yii\helpers\Html'],
],
'uses' => ['yii\bootstrap'],
],
],
],
'urlManagerProducer' => [
'class' => 'producer\components\UrlManagerProducer',
'subDomain' => Yii::getAlias('@producerSubdomain'),

+ 2
- 1
composer.json View File

@@ -36,7 +36,8 @@
"ext-pdo": "*",
"weluse/yii2-mailjet": "^0.2.0",
"ext-json": "*",
"ext-curl": "*"
"ext-curl": "*",
"yiisoft/yii2-twig": "^2.4"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",

+ 244
- 84
composer.lock View File

@@ -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": "cf81ea895f037844a4e20f4780fd7e7e",
"content-hash": "1d287231533b2d1fef1047dd81b0e4d5",
"packages": [
{
"name": "2amigos/yii2-chartjs-widget",
@@ -2051,6 +2051,88 @@
"abandoned": "symfony/mailer",
"time": "2021-10-18T15:26:12+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-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.27.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-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-iconv",
"version": "v1.27.0",
@@ -2464,6 +2546,77 @@
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "twig/twig",
"version": "v3.7.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
},
"require-dev": {
"psr/container": "^1.0|^2.0",
"symfony/phpunit-bridge": "^5.4.9|^6.3"
},
"type": "library",
"autoload": {
"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/v3.7.1"
},
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
"type": "tidelift"
}
],
"time": "2023-08-28T11:09:02+00:00"
},
{
"name": "weluse/yii2-mailjet",
"version": "v0.2.0",
@@ -2973,6 +3126,93 @@
],
"time": "2021-12-30T08:48:48+00:00"
},
{
"name": "yiisoft/yii2-twig",
"version": "2.4.2",
"source": {
"type": "git",
"url": "https://github.com/yiisoft/yii2-twig.git",
"reference": "8b33fe24960ed43e55820cd35df1740869876fa3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-twig/zipball/8b33fe24960ed43e55820cd35df1740869876fa3",
"reference": "8b33fe24960ed43e55820cd35df1740869876fa3",
"shasum": ""
},
"require": {
"php": "^7.2.5|^8.0|^8.1",
"twig/twig": "~3.0",
"yiisoft/yii2": "~2.0.4"
},
"require-dev": {
"cweagans/composer-patches": "^1.7",
"phpunit/phpunit": "4.8.34"
},
"type": "yii2-extension",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
},
"composer-exit-on-patch-failure": true,
"patches": {
"phpunit/phpunit-mock-objects": {
"Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch"
},
"phpunit/php-file-iterator": {
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_path_file_iterator.patch"
},
"phpunit/phpunit": {
"Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch",
"Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch",
"Fix PHP 8.1 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php81.patch"
}
}
},
"autoload": {
"psr-4": {
"yii\\twig\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Alexander Makarov",
"email": "sam@rmcreative.ru"
}
],
"description": "The Twig integration for the Yii framework",
"keywords": [
"renderer",
"twig",
"yii2"
],
"support": {
"forum": "http://www.yiiframework.com/forum/",
"irc": "irc://irc.freenode.net/yii",
"issues": "https://github.com/yiisoft/yii2-twig/issues",
"source": "https://github.com/yiisoft/yii2-twig",
"wiki": "http://www.yiiframework.com/wiki/"
},
"funding": [
{
"url": "https://github.com/yiisoft",
"type": "github"
},
{
"url": "https://opencollective.com/yiisoft",
"type": "open_collective"
},
{
"url": "https://tidelift.com/funding/github/packagist/yiisoft/yii2-twig",
"type": "tidelift"
}
],
"time": "2022-09-04T10:45:53+00:00"
},
{
"name": "yurkinx/yii2-image",
"version": "dev-master",
@@ -5651,88 +5891,6 @@
],
"time": "2022-07-29T07:35:46+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-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.27.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-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.27.0",
@@ -6517,7 +6675,9 @@
"prefer-lowest": false,
"platform": {
"php": ">=7.4",
"ext-pdo": "*"
"ext-pdo": "*",
"ext-json": "*",
"ext-curl": "*"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"

Loading…
Cancel
Save