gulp-phug 1.3.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +26 -0
  2. package/index.js +16 -3
  3. package/package.json +1 -1
  4. package/support/bootstrap.php +6 -0
  5. package/support/composer.json +1 -1
  6. package/support/composer.lock +14 -14
  7. package/support/vendor/composer/installed.json +15 -15
  8. package/support/vendor/composer/installed.php +17 -17
  9. package/support/vendor/composer/platform_check.php +2 -3
  10. package/support/vendor/phug/phug/.github/workflows/coverage.yml +12 -22
  11. package/support/vendor/phug/phug/.github/workflows/multi-tester.yml +7 -5
  12. package/support/vendor/phug/phug/.github/workflows/split.yml +12 -12
  13. package/support/vendor/phug/phug/.github/workflows/style.yml +2 -2
  14. package/support/vendor/phug/phug/.github/workflows/tests.yml +3 -4
  15. package/support/vendor/phug/phug/.multi-tester.yml +11 -13
  16. package/support/vendor/phug/phug/composer.json +8 -8
  17. package/support/vendor/phug/phug/src/Phug/Ast/Ast/Node.php +2 -2
  18. package/support/vendor/phug/phug/src/Phug/Ast/composer.json +1 -1
  19. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/AbstractNodeCompiler.php +4 -4
  20. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/Element/BlockElement.php +3 -3
  21. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AssignmentListNodeCompiler.php +1 -1
  22. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AssignmentNodeCompiler.php +1 -1
  23. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AttributeListNodeCompiler.php +1 -1
  24. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AttributeNodeCompiler.php +1 -1
  25. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/BlockNodeCompiler.php +3 -3
  26. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/CaseNodeCompiler.php +1 -1
  27. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/CodeNodeCompiler.php +2 -2
  28. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/CommentNodeCompiler.php +1 -1
  29. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ConditionalNodeCompiler.php +1 -1
  30. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/DoNodeCompiler.php +1 -1
  31. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/DoctypeNodeCompiler.php +1 -1
  32. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/DocumentNodeCompiler.php +1 -1
  33. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/EachNodeCompiler.php +1 -1
  34. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ElementNodeCompiler.php +1 -1
  35. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ExpressionNodeCompiler.php +1 -1
  36. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/FilterNodeCompiler.php +1 -1
  37. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ForNodeCompiler.php +1 -1
  38. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ImportNodeCompiler.php +1 -1
  39. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/KeywordNodeCompiler.php +1 -1
  40. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/MixinCallNodeCompiler.php +1 -1
  41. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/MixinNodeCompiler.php +1 -1
  42. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/TextNodeCompiler.php +1 -1
  43. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/VariableNodeCompiler.php +1 -1
  44. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/WhenNodeCompiler.php +1 -1
  45. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/WhileNodeCompiler.php +1 -1
  46. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/YieldNodeCompiler.php +1 -1
  47. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompilerInterface.php +4 -4
  48. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler.php +2 -2
  49. package/support/vendor/phug/phug/src/Phug/Compiler/CompilerInterface.php +2 -2
  50. package/support/vendor/phug/phug/src/Phug/Compiler/composer.json +5 -5
  51. package/support/vendor/phug/phug/src/Phug/DependencyInjection/composer.json +2 -2
  52. package/support/vendor/phug/phug/src/Phug/Event/composer.json +1 -1
  53. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/AbstractElement.php +1 -1
  54. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/AbstractFormat.php +2 -2
  55. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AbstractValueElement.php +3 -3
  56. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AnonymousBlockElement.php +1 -1
  57. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AssignmentElement.php +5 -5
  58. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AttributeElement.php +3 -3
  59. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/CodeElement.php +3 -3
  60. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/KeywordElement.php +3 -3
  61. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/MarkupElement.php +4 -4
  62. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/VariableElement.php +5 -5
  63. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Event/FormatEvent.php +1 -1
  64. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/HtmlFormat.php +1 -1
  65. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/XhtmlFormat.php +1 -1
  66. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/XmlFormat.php +1 -1
  67. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/FormatInterface.php +1 -1
  68. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Partial/PatternTrait.php +1 -1
  69. package/support/vendor/phug/phug/src/Phug/Formatter/composer.json +4 -4
  70. package/support/vendor/phug/phug/src/Phug/Invoker/composer.json +4 -4
  71. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/AbstractToken.php +1 -1
  72. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/AttributeScanner.php +1 -1
  73. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/IndentationScanner.php +1 -1
  74. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/TokenInterface.php +1 -1
  75. package/support/vendor/phug/phug/src/Phug/Lexer/composer.json +3 -3
  76. package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node.php +5 -5
  77. package/support/vendor/phug/phug/src/Phug/Parser/Parser/State.php +4 -4
  78. package/support/vendor/phug/phug/src/Phug/Parser/ParserException.php +1 -1
  79. package/support/vendor/phug/phug/src/Phug/Parser/composer.json +4 -4
  80. package/support/vendor/phug/phug/src/Phug/Phug/Phug/Partial/PluginEnablerTrait.php +1 -1
  81. package/support/vendor/phug/phug/src/Phug/Phug/composer.json +4 -4
  82. package/support/vendor/phug/phug/src/Phug/Reader/Reader.php +4 -4
  83. package/support/vendor/phug/phug/src/Phug/Reader/composer.json +2 -2
  84. package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Task/TasksGroup.php +1 -1
  85. package/support/vendor/phug/phug/src/Phug/Renderer/composer.json +5 -5
  86. package/support/vendor/phug/phug/src/Phug/Util/CompatibilityUtil/TestCaseUntyped.php +5 -5
  87. package/support/vendor/phug/phug/src/Phug/Util/Util/SandBox.php +1 -1
  88. package/support/vendor/phug/phug/src/Phug/Util/composer.json +2 -2
package/README.md CHANGED
@@ -23,12 +23,38 @@ module.exports = {
23
23
  };
24
24
  ```
25
25
 
26
+ ## Options
27
+
28
+ ### `debug`
29
+
30
+ Type: `boolean`, default: `false`
31
+
32
+ Compiles templates in Phug's debug mode. Debug output adds profiler calls and `PUG_DEBUG` markers to every line, which let Phug's own renderer map runtime errors back to `.pug` line numbers. It also makes the compiled PHP depend on the Phug runtime, so the server must have Phug installed (see [Using with WordPress](#using-with-wordpress)).
33
+
34
+ With debug off, the compiled PHP is self-contained and runs without Phug.
35
+
36
+ ```js
37
+ .pipe(pug({ debug: true }))
38
+ ```
39
+
40
+ When the option is not set, the plugin reads the `GULP_PHUG_DEBUG` environment variable (`1`, `true`, `yes` or `on` enable it). The option takes precedence over the variable.
41
+
42
+ ```bash
43
+ GULP_PHUG_DEBUG=1 npx gulp
44
+ ```
45
+
46
+ ## Requirements
47
+
48
+ PHP 7.1 or later must be available on your `PATH` (Phug 2 dropped support for older versions).
49
+
26
50
  ## Development Setup
27
51
 
28
52
  Uses `composer` which can be installed via Homebrew with `brew install composer`.
29
53
 
30
54
  ## Using with WordPress
31
55
 
56
+ The compiled templates need Phug on the server only when compiled with `debug: true`. Without debug mode, WordPress can include them directly and these steps are unnecessary.
57
+
32
58
  1. Install [`composer`](https://getcomposer.org) (PHP's package manager) on your system;
33
59
  2. Create a folder `mu-plugins` inside `wp-content`;
34
60
  3. Create a folder `phug-renderer` inside `mu-plugins/`;
package/index.js CHANGED
@@ -5,13 +5,26 @@ const path = require('path');
5
5
 
6
6
  const PLUGIN_NAME = 'gulp-phug';
7
7
 
8
+ const isTruthy = (value) => /^(1|true|yes|on)$/i.test(String(value).trim());
9
+
10
+ // Explicit option first, then the GULP_PHUG_DEBUG environment variable, then off.
11
+ const resolveDebug = (options) => {
12
+ if (options.debug !== undefined) return Boolean(options.debug);
13
+ if (process.env.GULP_PHUG_DEBUG !== undefined) return isTruthy(process.env.GULP_PHUG_DEBUG);
14
+ return false;
15
+ };
16
+
8
17
  const compile = (file, callback, options) => {
9
18
  let args = [
10
19
  '-d', 'error_reporting=E_ERROR',
11
20
  path.join(__dirname, 'support', 'vendor', 'phug', 'phug', 'phug'),
12
21
  'compileFile', file.path,
22
+ '--bootstrap', path.join(__dirname, 'support', 'bootstrap.php'),
13
23
  ];
14
- let command = spawn( 'php', args);
24
+ let env = Object.assign({}, process.env, {
25
+ GULP_PHUG_DEBUG: resolveDebug(options) ? '1' : '0',
26
+ });
27
+ let command = spawn( 'php', args, { env });
15
28
  let stdout = [];
16
29
  let stderr = [];
17
30
 
@@ -25,14 +38,14 @@ const compile = (file, callback, options) => {
25
38
 
26
39
  command.on('error', function(error) {
27
40
  let err = new PluginError(PLUGIN_NAME, `Failed to spawn PHP: ${error.message}`);
28
- return callback(err, file);
41
+ return callback(err);
29
42
  });
30
43
 
31
44
  command.on('close', function(code) {
32
45
  if (code > 0) {
33
46
  let errorMessage = Buffer.concat(stderr).toString() || Buffer.concat(stdout).toString();
34
47
  let err = new PluginError(PLUGIN_NAME, errorMessage);
35
- return callback(err, file);
48
+ return callback(err);
36
49
  }
37
50
  file.contents = Buffer.concat(stdout);
38
51
  file.path = file.path.replace(/\.(jade|jd|pug)$/, '.php');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gulp-phug",
3
- "version": "1.3.5",
3
+ "version": "2.0.0",
4
4
  "description": "Pug to PHP template compiler using phug",
5
5
  "main": "index.js",
6
6
  "bin": "./support/vendor/phug/phug/phug",
@@ -0,0 +1,6 @@
1
+ <?php
2
+
3
+ // Loaded by the phug CLI via --bootstrap before compiling.
4
+ // gulp-phug passes its settings through environment variables.
5
+
6
+ \Phug\Phug::setOption('debug', getenv('GULP_PHUG_DEBUG') === '1');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "require": {
3
- "phug/phug": "^1.13.0"
3
+ "phug/phug": "^2.0"
4
4
  }
5
5
  }
@@ -4,25 +4,25 @@
4
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
5
  "This file is @generated automatically"
6
6
  ],
7
- "content-hash": "5953c95ec74bbcd2f17a3a37dc86973f",
7
+ "content-hash": "c4e45c9db2dd80e69d63c3f4f6bd5cf2",
8
8
  "packages": [
9
9
  {
10
10
  "name": "phug/phug",
11
- "version": "1.13.0",
11
+ "version": "2.0.1",
12
12
  "source": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/phug-php/phug.git",
15
- "reference": "6c7b618adabd1b4c14a0733920fac561449ecd8c"
15
+ "reference": "0260cba390265e2d087a7a4a083072dbaa9de0eb"
16
16
  },
17
17
  "dist": {
18
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/phug-php/phug/zipball/6c7b618adabd1b4c14a0733920fac561449ecd8c",
20
- "reference": "6c7b618adabd1b4c14a0733920fac561449ecd8c",
19
+ "url": "https://api.github.com/repos/phug-php/phug/zipball/0260cba390265e2d087a7a4a083072dbaa9de0eb",
20
+ "reference": "0260cba390265e2d087a7a4a083072dbaa9de0eb",
21
21
  "shasum": ""
22
22
  },
23
23
  "require": {
24
- "php": ">=5.5.0",
25
- "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
24
+ "php": "^7.1 || ^8.0",
25
+ "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0"
26
26
  },
27
27
  "replace": {
28
28
  "phug/ast": "self.version",
@@ -40,17 +40,17 @@
40
40
  },
41
41
  "require-dev": {
42
42
  "cebe/markdown": "^1.1",
43
- "js-phpize/js-phpize-phug": "^1.2 || ^2.2.1",
43
+ "js-phpize/js-phpize-phug": "^2.2.1",
44
44
  "nodejs-php-fallback/coffeescript": "^1.0.1",
45
45
  "nodejs-php-fallback/less": "^1.0.5",
46
46
  "nodejs-php-fallback/stylus": "^1.0.4",
47
47
  "nodejs-php-fallback/uglify": "^1.0.4",
48
- "phpunit/php-code-coverage": "^2.2.4 || ^4.0.8 || ^5.3.2 || ^6.1.4 || ^7.0.15 || ^9.2.28",
48
+ "phpunit/php-code-coverage": "^6.1.4 || ^7.0.17 || ^9.2.32",
49
49
  "phpunit/php-invoker": "^1.1.4 || ^3.1.1",
50
- "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^8.5.34 || ^9.6.13",
51
- "pug-php/pug": "^2.7.3 || ^3.4.1",
50
+ "phpunit/phpunit": "^7.5.20 || ^8.5.52 || ^9.6.34",
51
+ "pug-php/pug": "^3.4.1",
52
52
  "pug-php/pug-filter-coffee-script": "^1.3.1",
53
- "squizlabs/php_codesniffer": "^3.7.2"
53
+ "squizlabs/php_codesniffer": "^3.13.5"
54
54
  },
55
55
  "bin": [
56
56
  "phug"
@@ -59,7 +59,7 @@
59
59
  "extra": {
60
60
  "branch-alias": {
61
61
  "dev-facade": "0.4.x-dev",
62
- "dev-master": "1.x-dev"
62
+ "dev-master": "2.x-dev"
63
63
  }
64
64
  },
65
65
  "autoload": {
@@ -132,7 +132,7 @@
132
132
  "type": "tidelift"
133
133
  }
134
134
  ],
135
- "time": "2024-03-19T14:40:12+00:00"
135
+ "time": "2026-03-15T18:02:06+00:00"
136
136
  },
137
137
  {
138
138
  "name": "symfony/deprecation-contracts",
@@ -2,22 +2,22 @@
2
2
  "packages": [
3
3
  {
4
4
  "name": "phug/phug",
5
- "version": "1.13.0",
6
- "version_normalized": "1.13.0.0",
5
+ "version": "2.0.1",
6
+ "version_normalized": "2.0.1.0",
7
7
  "source": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/phug-php/phug.git",
10
- "reference": "6c7b618adabd1b4c14a0733920fac561449ecd8c"
10
+ "reference": "0260cba390265e2d087a7a4a083072dbaa9de0eb"
11
11
  },
12
12
  "dist": {
13
13
  "type": "zip",
14
- "url": "https://api.github.com/repos/phug-php/phug/zipball/6c7b618adabd1b4c14a0733920fac561449ecd8c",
15
- "reference": "6c7b618adabd1b4c14a0733920fac561449ecd8c",
14
+ "url": "https://api.github.com/repos/phug-php/phug/zipball/0260cba390265e2d087a7a4a083072dbaa9de0eb",
15
+ "reference": "0260cba390265e2d087a7a4a083072dbaa9de0eb",
16
16
  "shasum": ""
17
17
  },
18
18
  "require": {
19
- "php": ">=5.5.0",
20
- "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
19
+ "php": "^7.1 || ^8.0",
20
+ "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0"
21
21
  },
22
22
  "replace": {
23
23
  "phug/ast": "self.version",
@@ -35,19 +35,19 @@
35
35
  },
36
36
  "require-dev": {
37
37
  "cebe/markdown": "^1.1",
38
- "js-phpize/js-phpize-phug": "^1.2 || ^2.2.1",
38
+ "js-phpize/js-phpize-phug": "^2.2.1",
39
39
  "nodejs-php-fallback/coffeescript": "^1.0.1",
40
40
  "nodejs-php-fallback/less": "^1.0.5",
41
41
  "nodejs-php-fallback/stylus": "^1.0.4",
42
42
  "nodejs-php-fallback/uglify": "^1.0.4",
43
- "phpunit/php-code-coverage": "^2.2.4 || ^4.0.8 || ^5.3.2 || ^6.1.4 || ^7.0.15 || ^9.2.28",
43
+ "phpunit/php-code-coverage": "^6.1.4 || ^7.0.17 || ^9.2.32",
44
44
  "phpunit/php-invoker": "^1.1.4 || ^3.1.1",
45
- "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^8.5.34 || ^9.6.13",
46
- "pug-php/pug": "^2.7.3 || ^3.4.1",
45
+ "phpunit/phpunit": "^7.5.20 || ^8.5.52 || ^9.6.34",
46
+ "pug-php/pug": "^3.4.1",
47
47
  "pug-php/pug-filter-coffee-script": "^1.3.1",
48
- "squizlabs/php_codesniffer": "^3.7.2"
48
+ "squizlabs/php_codesniffer": "^3.13.5"
49
49
  },
50
- "time": "2024-03-19T14:40:12+00:00",
50
+ "time": "2026-03-15T18:02:06+00:00",
51
51
  "bin": [
52
52
  "phug"
53
53
  ],
@@ -55,10 +55,10 @@
55
55
  "extra": {
56
56
  "branch-alias": {
57
57
  "dev-facade": "0.4.x-dev",
58
- "dev-master": "1.x-dev"
58
+ "dev-master": "2.x-dev"
59
59
  }
60
60
  },
61
- "installation-source": "dist",
61
+ "installation-source": "source",
62
62
  "autoload": {
63
63
  "psr-0": {
64
64
  "": "./src/Phug/Phug/"
@@ -3,7 +3,7 @@
3
3
  'name' => '__root__',
4
4
  'pretty_version' => 'dev-master',
5
5
  'version' => 'dev-master',
6
- 'reference' => 'b9d4340f5051d2c0e76af9aee6fba5960b8d55f4',
6
+ 'reference' => 'd77b76d06214607375d31d5d933979740fa6d099',
7
7
  'type' => 'library',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
13
  '__root__' => array(
14
14
  'pretty_version' => 'dev-master',
15
15
  'version' => 'dev-master',
16
- 'reference' => 'b9d4340f5051d2c0e76af9aee6fba5960b8d55f4',
16
+ 'reference' => 'd77b76d06214607375d31d5d933979740fa6d099',
17
17
  'type' => 'library',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),
@@ -22,61 +22,61 @@
22
22
  'phug/ast' => array(
23
23
  'dev_requirement' => false,
24
24
  'replaced' => array(
25
- 0 => '1.13.0',
25
+ 0 => '2.0.1',
26
26
  ),
27
27
  ),
28
28
  'phug/compiler' => array(
29
29
  'dev_requirement' => false,
30
30
  'replaced' => array(
31
- 0 => '1.13.0',
31
+ 0 => '2.0.1',
32
32
  ),
33
33
  ),
34
34
  'phug/dependency-injection' => array(
35
35
  'dev_requirement' => false,
36
36
  'replaced' => array(
37
- 0 => '1.13.0',
37
+ 0 => '2.0.1',
38
38
  ),
39
39
  ),
40
40
  'phug/event' => array(
41
41
  'dev_requirement' => false,
42
42
  'replaced' => array(
43
- 0 => '1.13.0',
43
+ 0 => '2.0.1',
44
44
  ),
45
45
  ),
46
46
  'phug/facade' => array(
47
47
  'dev_requirement' => false,
48
48
  'replaced' => array(
49
- 0 => '1.13.0',
49
+ 0 => '2.0.1',
50
50
  ),
51
51
  ),
52
52
  'phug/formatter' => array(
53
53
  'dev_requirement' => false,
54
54
  'replaced' => array(
55
- 0 => '1.13.0',
55
+ 0 => '2.0.1',
56
56
  ),
57
57
  ),
58
58
  'phug/invoker' => array(
59
59
  'dev_requirement' => false,
60
60
  'replaced' => array(
61
- 0 => '1.13.0',
61
+ 0 => '2.0.1',
62
62
  ),
63
63
  ),
64
64
  'phug/lexer' => array(
65
65
  'dev_requirement' => false,
66
66
  'replaced' => array(
67
- 0 => '1.13.0',
67
+ 0 => '2.0.1',
68
68
  ),
69
69
  ),
70
70
  'phug/parser' => array(
71
71
  'dev_requirement' => false,
72
72
  'replaced' => array(
73
- 0 => '1.13.0',
73
+ 0 => '2.0.1',
74
74
  ),
75
75
  ),
76
76
  'phug/phug' => array(
77
- 'pretty_version' => '1.13.0',
78
- 'version' => '1.13.0.0',
79
- 'reference' => '6c7b618adabd1b4c14a0733920fac561449ecd8c',
77
+ 'pretty_version' => '2.0.1',
78
+ 'version' => '2.0.1.0',
79
+ 'reference' => '0260cba390265e2d087a7a4a083072dbaa9de0eb',
80
80
  'type' => 'library',
81
81
  'install_path' => __DIR__ . '/../phug/phug',
82
82
  'aliases' => array(),
@@ -85,19 +85,19 @@
85
85
  'phug/reader' => array(
86
86
  'dev_requirement' => false,
87
87
  'replaced' => array(
88
- 0 => '1.13.0',
88
+ 0 => '2.0.1',
89
89
  ),
90
90
  ),
91
91
  'phug/renderer' => array(
92
92
  'dev_requirement' => false,
93
93
  'replaced' => array(
94
- 0 => '1.13.0',
94
+ 0 => '2.0.1',
95
95
  ),
96
96
  ),
97
97
  'phug/util' => array(
98
98
  'dev_requirement' => false,
99
99
  'replaced' => array(
100
- 0 => '1.13.0',
100
+ 0 => '2.0.1',
101
101
  ),
102
102
  ),
103
103
  'symfony/deprecation-contracts' => array(
@@ -19,8 +19,7 @@ if ($issues) {
19
19
  echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
20
  }
21
21
  }
22
- trigger_error(
23
- 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
- E_USER_ERROR
22
+ throw new \RuntimeException(
23
+ 'Composer detected issues in your platform: ' . implode(' ', $issues)
25
24
  );
26
25
  }
@@ -19,7 +19,7 @@ jobs:
19
19
  name: PHP
20
20
 
21
21
  steps:
22
- - uses: actions/checkout@v2
22
+ - uses: actions/checkout@v6
23
23
 
24
24
  - name: Setup PHP
25
25
  uses: shivammathur/setup-php@v2
@@ -32,21 +32,13 @@ jobs:
32
32
 
33
33
  - name: Cache Composer packages
34
34
  id: composer-cache
35
- uses: actions/cache@v2
35
+ uses: actions/cache@v5
36
36
  with:
37
37
  path: vendor
38
38
  key: ${{ runner.os }}-${{ matrix.setup }}-coverage-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
39
39
  restore-keys: |
40
40
  ${{ runner.os }}-${{ matrix.setup }}-coverage-${{ matrix.php }}-
41
41
 
42
- - name: Code Climate Test Reporter Preparation
43
- run: |
44
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
45
- chmod +x ./cc-test-reporter
46
- ./cc-test-reporter before-build
47
- env:
48
- CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
49
-
50
42
  - name: Install dependencies
51
43
  if: steps.composer-cache.outputs.cache-hit != 'true'
52
44
  run: |
@@ -57,15 +49,13 @@ jobs:
57
49
  - name: Run test suite
58
50
  run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml --default-time-limit=3
59
51
 
60
- - name: Code Climate Test Reporter
61
- if: ${{ env.CC_TEST_REPORTER_ID != '' }}
62
- run: |
63
- cp coverage.xml clover.xml
64
- bash <(curl -s https://codecov.io/bash)
65
- ./cc-test-reporter after-build --coverage-input-type clover --exit-code 0
66
- composer config version 1.9.0
67
- # composer require codacy/coverage
68
- # vendor/bin/codacycoverage clover coverage.xml
69
- env:
70
- CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
71
- # CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
52
+ - name: Coverage - Qltysh
53
+ uses: qltysh/qlty-action/coverage@v2
54
+ with:
55
+ token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
56
+ files: clover.xml
57
+
58
+ - name: Coverage - Codecov
59
+ uses: codecov/codecov-action@v5
60
+ with:
61
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -12,13 +12,13 @@ jobs:
12
12
 
13
13
  strategy:
14
14
  matrix:
15
- php: ['7.4', '8.2']
15
+ php: ['8.2', '8.4']
16
16
  setup: ['stable']
17
17
 
18
18
  name: PHP ${{ matrix.php }}
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v2
21
+ - uses: actions/checkout@v6
22
22
 
23
23
  - name: Setup PHP
24
24
  uses: shivammathur/setup-php@v2
@@ -28,7 +28,7 @@ jobs:
28
28
 
29
29
  - name: Cache Composer packages
30
30
  id: composer-cache
31
- uses: actions/cache@v2
31
+ uses: actions/cache@v5
32
32
  with:
33
33
  path: vendor
34
34
  key: ${{ runner.os }}-multi-test-v2-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
@@ -38,9 +38,11 @@ jobs:
38
38
  - name: Install dependencies
39
39
  if: steps.composer-cache.outputs.cache-hit != 'true'
40
40
  run: |
41
- composer config version 1.9.0
42
- composer require kylekatarnls/multi-tester:^2.5.2 --dev --no-update --no-interaction
41
+ composer remove cebe/markdown js-phpize/js-phpize-phug nodejs-php-fallback/coffeescript nodejs-php-fallback/less nodejs-php-fallback/stylus nodejs-php-fallback/uglify phpunit/phpunit phpunit/php-code-coverage phpunit/php-invoker pug-php/pug pug-php/pug-filter-coffee-script squizlabs/php_codesniffer --dev --no-update --no-interaction
42
+ composer require kylekatarnls/multi-tester:^2.6.0 --dev --no-update --no-interaction
43
43
  composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction
44
44
 
45
45
  - name: Run test suites
46
46
  run: vendor/bin/multi-tester --verbose
47
+ env:
48
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v6
15
15
 
16
16
  - name: Setup PHP
17
17
  uses: shivammathur/setup-php@v2
@@ -19,23 +19,23 @@ jobs:
19
19
  php-version: 8.2
20
20
  tools: composer:v2
21
21
 
22
- - name: Cache Composer packages
23
- id: composer-cache
24
- uses: actions/cache@v2
25
- with:
26
- path: vendor
27
- key: split-${{ hashFiles('**/composer.lock') }}
28
- restore-keys: |
29
- split-
22
+ # - name: Cache Composer packages
23
+ # id: composer-cache
24
+ # uses: actions/cache@v5
25
+ # with:
26
+ # path: vendor
27
+ # key: split-${{ hashFiles('**/composer.lock') }}
28
+ # restore-keys: |
29
+ # split-
30
30
 
31
31
  - name: Install dependencies
32
32
  if: steps.composer-cache.outputs.cache-hit != 'true'
33
33
  run: |
34
34
  test -f composer.json && mv composer.json composer.json.save -f
35
- composer require phug/split --no-interaction
35
+ composer require "phug/split:^1.5.1" --no-interaction
36
36
  test -f composer.json.save && mv composer.json.save composer.json -f
37
37
 
38
38
  - name: Split monorepository
39
- run: vendor/bin/split update --git-credentials=$REPOSITORY_CREDENTIALS
39
+ run: vendor/bin/split update --git-credentials=$SPLIT_REPOSITORY_CREDENTIALS
40
40
  env:
41
- REPOSITORY_CREDENTIALS: ${{ secrets.REPOSITORY_CREDENTIALS }}
41
+ SPLIT_REPOSITORY_CREDENTIALS: ${{ secrets.SPLIT_REPOSITORY_CREDENTIALS }}
@@ -19,7 +19,7 @@ jobs:
19
19
  name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
20
20
 
21
21
  steps:
22
- - uses: actions/checkout@v2
22
+ - uses: actions/checkout@v6
23
23
 
24
24
  - name: Setup PHP
25
25
  uses: shivammathur/setup-php@v2
@@ -29,7 +29,7 @@ jobs:
29
29
 
30
30
  - name: Cache Composer packages
31
31
  id: composer-cache
32
- uses: actions/cache@v2
32
+ uses: actions/cache@v5
33
33
  with:
34
34
  path: vendor
35
35
  key: style-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
@@ -13,13 +13,13 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
16
+ php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
17
17
  setup: ['lowest', 'stable', 'next']
18
18
 
19
19
  name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
20
20
 
21
21
  steps:
22
- - uses: actions/checkout@v2
22
+ - uses: actions/checkout@v6
23
23
 
24
24
  - name: Setup PHP
25
25
  uses: shivammathur/setup-php@v2
@@ -30,7 +30,7 @@ jobs:
30
30
 
31
31
  - name: Cache Composer packages
32
32
  id: composer-cache
33
- uses: actions/cache@v2
33
+ uses: actions/cache@v5
34
34
  with:
35
35
  path: vendor
36
36
  key: php-${{ matrix.php }}-${{ runner.os }}-${{ matrix.setup }}-${{ hashFiles('**/composer.lock') }}
@@ -41,7 +41,6 @@ jobs:
41
41
  if: steps.composer-cache.outputs.cache-hit != 'true'
42
42
  run: |
43
43
  composer config version 1.9.0
44
- ${{ matrix.php >= 7.2 && matrix.php < 8 && matrix.setup == 'lowest' && 'composer require --no-update "phpunit/phpunit:^5.7.27||^6.5.14||^7.5.20" --no-interaction;' || '' }}
45
44
  ${{ matrix.php >= 8 && 'composer require --no-update phpunit/phpunit:^8.5.14 --no-interaction;' || '' }}
46
45
  composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }} --no-interaction
47
46
 
@@ -10,9 +10,7 @@ pug/bemto:
10
10
  autoload:
11
11
  - cp -r vendor/phug/phug vendor/phug/compiler
12
12
  - cp -r vendor/phug/phug vendor/phug/formatter
13
- - composer self-update 1.10.17
14
13
  - composer dump-autoload --optimize --no-interaction --quiet
15
- - composer self-update --2
16
14
 
17
15
  pug-php/pug-assets:
18
16
  install:
@@ -24,17 +22,17 @@ pug-php/pug-minify:
24
22
  - composer config --no-plugins allow-plugins.nodejs-php-fallback/nodejs-php-fallback true
25
23
  - composer install --no-interaction
26
24
 
27
- pug/slim:
28
- install:
29
- - composer config --no-plugins allow-plugins.nodejs-php-fallback/nodejs-php-fallback true
30
- - composer install --no-interaction
31
-
32
- pug/twig:
33
- autoload:
34
- - cp -r vendor/phug/phug vendor/phug/compiler
35
- - composer self-update 1.10.17
36
- - composer dump-autoload --optimize --no-interaction --quiet
37
- - composer self-update --2
25
+ #pug/slim:
26
+ # install:
27
+ # - composer config --no-plugins allow-plugins.nodejs-php-fallback/nodejs-php-fallback true
28
+ # - composer install --no-interaction
29
+
30
+ #pug/twig:
31
+ # autoload:
32
+ # - cp -r vendor/phug/phug vendor/phug/compiler
33
+ # - composer self-update 1.10.17
34
+ # - composer dump-autoload --optimize --no-interaction --quiet
35
+ # - composer self-update --2
38
36
 
39
37
  ci-pug/ci-pug:
40
38
  install:
@@ -23,22 +23,22 @@
23
23
  },
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
- "php": ">=5.5.0",
27
- "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
26
+ "php": "^7.1 || ^8.0",
27
+ "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0"
28
28
  },
29
29
  "require-dev": {
30
30
  "cebe/markdown": "^1.1",
31
- "js-phpize/js-phpize-phug": "^1.2 || ^2.2.1",
31
+ "js-phpize/js-phpize-phug": "^2.2.1",
32
32
  "nodejs-php-fallback/coffeescript": "^1.0.1",
33
33
  "nodejs-php-fallback/less": "^1.0.5",
34
34
  "nodejs-php-fallback/stylus": "^1.0.4",
35
35
  "nodejs-php-fallback/uglify": "^1.0.4",
36
- "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^8.5.34 || ^9.6.13",
37
- "phpunit/php-code-coverage": "^2.2.4 || ^4.0.8 || ^5.3.2 || ^6.1.4 || ^7.0.15 || ^9.2.28",
36
+ "phpunit/phpunit": "^7.5.20 || ^8.5.52 || ^9.6.34",
37
+ "phpunit/php-code-coverage": "^6.1.4 || ^7.0.17 || ^9.2.32",
38
38
  "phpunit/php-invoker": "^1.1.4 || ^3.1.1",
39
- "pug-php/pug": "^2.7.3 || ^3.4.1",
39
+ "pug-php/pug": "^3.4.1",
40
40
  "pug-php/pug-filter-coffee-script": "^1.3.1",
41
- "squizlabs/php_codesniffer": "^3.7.2"
41
+ "squizlabs/php_codesniffer": "^3.13.5"
42
42
  },
43
43
  "replace": {
44
44
  "phug/ast": "self.version",
@@ -82,7 +82,7 @@
82
82
  "bin": ["phug"],
83
83
  "extra": {
84
84
  "branch-alias": {
85
- "dev-master": "1.x-dev",
85
+ "dev-master": "2.x-dev",
86
86
  "dev-facade": "0.4.x-dev"
87
87
  }
88
88
  },