Skip to content

Commit e1870cd

Browse files
committed
update typerocket core and bump version 5.1.13
1 parent 5cf5784 commit e1870cd

File tree

22 files changed

+1229
-951
lines changed

22 files changed

+1229
-951
lines changed

typerocket-v5.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: TypeRocket - Andromeda
44
Plugin URI: https://typerocket.com/
55
Description: TypeRocket is a framework that joins refined UI elements and modern programming architecture together.
6-
Version: 5.1.12
6+
Version: 5.1.13
77
Requires at least: 6.0
88
Requires PHP: 7.4
99
Author: TypeRocket
@@ -34,7 +34,7 @@ public function __construct()
3434
return;
3535
}
3636

37-
define('TYPEROCKET_PLUGIN_VERSION', '5.1.12');
37+
define('TYPEROCKET_PLUGIN_VERSION', '5.1.13');
3838
define('TYPEROCKET_PLUGIN_INSTALL', __DIR__);
3939

4040
if(!defined('TYPEROCKET_ROOT_WP'))

typerocket/composer.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typerocket/vendor/bin/php-parse

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ if (PHP_VERSION_ID < 80000) {
6666
return $operation ? flock($this->handle, $operation) : true;
6767
}
6868

69+
public function stream_seek($offset, $whence)
70+
{
71+
if (0 === fseek($this->handle, $offset, $whence)) {
72+
$this->position = ftell($this->handle);
73+
return true;
74+
}
75+
76+
return false;
77+
}
78+
6979
public function stream_tell()
7080
{
7181
return $this->position;
@@ -98,7 +108,10 @@ if (PHP_VERSION_ID < 80000) {
98108
}
99109
}
100110

101-
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
111+
if (
112+
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
113+
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
114+
) {
102115
include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
103116
exit(0);
104117
}

typerocket/vendor/composer/installed.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@
137137
},
138138
{
139139
"name": "nikic/php-parser",
140-
"version": "v4.14.0",
141-
"version_normalized": "4.14.0.0",
140+
"version": "v4.15.1",
141+
"version_normalized": "4.15.1.0",
142142
"source": {
143143
"type": "git",
144144
"url": "https://github.com/nikic/PHP-Parser.git",
145-
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
145+
"reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900"
146146
},
147147
"dist": {
148148
"type": "zip",
149-
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
150-
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
149+
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
150+
"reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
151151
"shasum": ""
152152
},
153153
"require": {
@@ -158,7 +158,7 @@
158158
"ircmaxell/php-yacc": "^0.0.7",
159159
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
160160
},
161-
"time": "2022-05-31T20:59:12+00:00",
161+
"time": "2022-09-04T07:30:47+00:00",
162162
"bin": [
163163
"bin/php-parse"
164164
],
@@ -190,7 +190,7 @@
190190
],
191191
"support": {
192192
"issues": "https://github.com/nikic/PHP-Parser/issues",
193-
"source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
193+
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1"
194194
},
195195
"install-path": "../nikic/php-parser"
196196
},
@@ -2720,17 +2720,17 @@
27202720
},
27212721
{
27222722
"name": "typerocket/core",
2723-
"version": "v5.1.36",
2724-
"version_normalized": "5.1.36.0",
2723+
"version": "v5.1.37",
2724+
"version_normalized": "5.1.37.0",
27252725
"source": {
27262726
"type": "git",
27272727
"url": "https://github.com/TypeRocket/core.git",
2728-
"reference": "c589a9710285ada75dabcd5f123ae45935583697"
2728+
"reference": "719408206172763b84dea589571b5150afa2f609"
27292729
},
27302730
"dist": {
27312731
"type": "zip",
2732-
"url": "https://api.github.com/repos/TypeRocket/core/zipball/c589a9710285ada75dabcd5f123ae45935583697",
2733-
"reference": "c589a9710285ada75dabcd5f123ae45935583697",
2732+
"url": "https://api.github.com/repos/TypeRocket/core/zipball/719408206172763b84dea589571b5150afa2f609",
2733+
"reference": "719408206172763b84dea589571b5150afa2f609",
27342734
"shasum": ""
27352735
},
27362736
"require": {
@@ -2744,7 +2744,7 @@
27442744
"require-dev": {
27452745
"phpunit/phpunit": "^9.5"
27462746
},
2747-
"time": "2022-09-03T00:23:16+00:00",
2747+
"time": "2022-09-07T19:54:00+00:00",
27482748
"type": "library",
27492749
"installation-source": "dist",
27502750
"autoload": {
@@ -2773,7 +2773,7 @@
27732773
"support": {
27742774
"docs": "https://typerocket.com/docs/v5/",
27752775
"issues": "https://github.com/TypeRocket/core/issues",
2776-
"source": "https://github.com/TypeRocket/core/tree/v5.1.36"
2776+
"source": "https://github.com/TypeRocket/core/tree/v5.1.37"
27772777
},
27782778
"install-path": "../typerocket/core"
27792779
},

typerocket/vendor/composer/installed.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => 'typerocket/typerocket',
44
'pretty_version' => 'dev-main',
55
'version' => 'dev-main',
6-
'reference' => '8af26d78efedd20566140445c9d388c3834a0913',
6+
'reference' => '5cf578426d2f799bc7448fd3cc035723ea45ea64',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -29,9 +29,9 @@
2929
'dev_requirement' => true,
3030
),
3131
'nikic/php-parser' => array(
32-
'pretty_version' => 'v4.14.0',
33-
'version' => '4.14.0.0',
34-
'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1',
32+
'pretty_version' => 'v4.15.1',
33+
'version' => '4.15.1.0',
34+
'reference' => '0ef6c55a3f47f89d7a374e6f835197a0b5fcf900',
3535
'type' => 'library',
3636
'install_path' => __DIR__ . '/../nikic/php-parser',
3737
'aliases' => array(),
@@ -368,9 +368,9 @@
368368
'dev_requirement' => true,
369369
),
370370
'typerocket/core' => array(
371-
'pretty_version' => 'v5.1.36',
372-
'version' => '5.1.36.0',
373-
'reference' => 'c589a9710285ada75dabcd5f123ae45935583697',
371+
'pretty_version' => 'v5.1.37',
372+
'version' => '5.1.37.0',
373+
'reference' => '719408206172763b84dea589571b5150afa2f609',
374374
'type' => 'library',
375375
'install_path' => __DIR__ . '/../typerocket/core',
376376
'aliases' => array(),
@@ -379,7 +379,7 @@
379379
'typerocket/typerocket' => array(
380380
'pretty_version' => 'dev-main',
381381
'version' => 'dev-main',
382-
'reference' => '8af26d78efedd20566140445c9d388c3834a0913',
382+
'reference' => '5cf578426d2f799bc7448fd3cc035723ea45ea64',
383383
'type' => 'library',
384384
'install_path' => __DIR__ . '/../../',
385385
'aliases' => array(),

typerocket/vendor/nikic/php-parser/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ PHP Parser
33

44
[![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
55

6-
This is a PHP 5.2 to PHP 8.1 parser written in PHP. Its purpose is to simplify static code analysis and
6+
This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and
77
manipulation.
88

9-
[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1).
9+
[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2).
1010

1111
[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).
1212

@@ -222,4 +222,4 @@ Component documentation:
222222
* Parent and sibling references
223223

224224
[doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc
225-
[doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc
225+
[doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc

typerocket/vendor/nikic/php-parser/grammar/php7.y

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ type_expr:
571571
type { $$ = $1; }
572572
| '?' type { $$ = Node\NullableType[$2]; }
573573
| union_type { $$ = Node\UnionType[$1]; }
574-
| intersection_type { $$ = Node\IntersectionType[$1]; }
574+
| intersection_type { $$ = $1; }
575575
;
576576

577577
type:
@@ -585,34 +585,52 @@ type_without_static:
585585
| T_CALLABLE { $$ = Node\Identifier['callable']; }
586586
;
587587

588+
union_type_element:
589+
type { $$ = $1; }
590+
| '(' intersection_type ')' { $$ = $2; }
591+
;
592+
588593
union_type:
589-
type '|' type { init($1, $3); }
590-
| union_type '|' type { push($1, $3); }
594+
union_type_element '|' union_type_element { init($1, $3); }
595+
| union_type '|' union_type_element { push($1, $3); }
596+
;
597+
598+
union_type_without_static_element:
599+
type_without_static { $$ = $1; }
600+
| '(' intersection_type_without_static ')' { $$ = $2; }
591601
;
592602

593603
union_type_without_static:
594-
type_without_static '|' type_without_static { init($1, $3); }
595-
| union_type_without_static '|' type_without_static { push($1, $3); }
604+
union_type_without_static_element '|' union_type_without_static_element { init($1, $3); }
605+
| union_type_without_static '|' union_type_without_static_element { push($1, $3); }
596606
;
597607

598-
intersection_type:
608+
intersection_type_list:
599609
type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); }
600-
| intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type
610+
| intersection_type_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type
601611
{ push($1, $3); }
602612
;
603613

604-
intersection_type_without_static:
614+
intersection_type:
615+
intersection_type_list { $$ = Node\IntersectionType[$1]; }
616+
;
617+
618+
intersection_type_without_static_list:
605619
type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
606620
{ init($1, $3); }
607-
| intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
621+
| intersection_type_without_static_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static
608622
{ push($1, $3); }
609623
;
610624

625+
intersection_type_without_static:
626+
intersection_type_without_static_list { $$ = Node\IntersectionType[$1]; }
627+
;
628+
611629
type_expr_without_static:
612630
type_without_static { $$ = $1; }
613631
| '?' type_without_static { $$ = Node\NullableType[$2]; }
614632
| union_type_without_static { $$ = Node\UnionType[$1]; }
615-
| intersection_type_without_static { $$ = Node\IntersectionType[$1]; }
633+
| intersection_type_without_static { $$ = $1; }
616634
;
617635

618636
optional_type_without_static:

typerocket/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,20 @@ public static function normalizeType($type) {
178178
}
179179

180180
$builtinTypes = [
181-
'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed', 'never',
181+
'array',
182+
'callable',
183+
'bool',
184+
'int',
185+
'float',
186+
'string',
187+
'iterable',
188+
'void',
189+
'object',
190+
'null',
191+
'false',
192+
'mixed',
193+
'never',
194+
'true',
182195
];
183196

184197
$lowerType = strtolower($type);

typerocket/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function emulate(string $code, array $tokens): array
3333

3434
/**
3535
* @param mixed[] $tokens
36-
* @return mixed[]|null
36+
* @return array|string|null
3737
*/
3838
private function getPreviousNonSpaceToken(array $tokens, int $start)
3939
{

typerocket/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,17 @@ public function getKeywordToken(): int
2020
{
2121
return \T_READONLY;
2222
}
23-
}
23+
24+
protected function isKeywordContext(array $tokens, int $pos): bool
25+
{
26+
if (!parent::isKeywordContext($tokens, $pos)) {
27+
return false;
28+
}
29+
// Support "function readonly("
30+
return !(isset($tokens[$pos + 1]) &&
31+
($tokens[$pos + 1][0] === '(' ||
32+
($tokens[$pos + 1][0] === \T_WHITESPACE &&
33+
isset($tokens[$pos + 2]) &&
34+
$tokens[$pos + 2][0] === '(')));
35+
}
36+
}

0 commit comments

Comments
 (0)