Skip to content

Commit 6a0d1f8

Browse files
authored
1.1.4 (#50)
1 parent ae0124b commit 6a0d1f8

File tree

8 files changed

+113
-6
lines changed

8 files changed

+113
-6
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1.1.3-{build}
1+
version: 1.1.4-{build}
22

33
environment:
44
matrix:

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
sudo: false
2-
31
language: php
42
php:
53
- 'master'

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88

9+
## [1.1.4] - 2018-11-22
10+
### Fixed
11+
- Backport [#49](https://github.com/phalcon/php-zephir-parser/pull/49) from the upstream
12+
913
## [1.1.3] - 2018-11-06
1014
### Changed
1115
- Extremely simplified installation of the extension using standard PHP workflow [#38](https://github.com/phalcon/php-zephir-parser/issues/38)
@@ -86,7 +90,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
8690
### Added
8791
- Initial stable release
8892

89-
[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.3...HEAD
93+
[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.4...HEAD
94+
[1.1.4]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.3...v1.1.4
9095
[1.1.3]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.2...v1.1.3
9196
[1.1.2]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.1...v1.1.2
9297
[1.1.1]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.0...v1.1.1

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.3
1+
1.1.4

parser/parser.php5.lemon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) IMPLEMENTS xx_implements_list(L) x
261261
R = xx_ret_class(I, B, 0, 1, NULL, L, status->scanner_state);
262262
}
263263

264+
xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) EXTENDS IDENTIFIER(E) IMPLEMENTS xx_implements_list(L) xx_class_body(B) . {
265+
R = xx_ret_class(I, B, 0, 1, E, L, status->scanner_state);
266+
}
267+
264268
xx_class_body(R) ::= BRACKET_OPEN BRACKET_CLOSE . {
265269
R = NULL;
266270
}

parser/parser.php7.lemon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) IMPLEMENTS xx_implements_list(L) x
261261
xx_ret_class(&R, I, &B, 0, 1, NULL, &L, status->scanner_state);
262262
}
263263

264+
xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) EXTENDS IDENTIFIER(E) IMPLEMENTS xx_implements_list(L) xx_class_body(B) . {
265+
xx_ret_class(&R, I, &B, 0, 1, E, &L, status->scanner_state);
266+
}
267+
264268
xx_class_body(R) ::= BRACKET_OPEN BRACKET_CLOSE . {
265269
ZVAL_UNDEF(&R);
266270
}

tests/classes/bug48.phpt

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
--TEST--
2+
Final class can extend and implement
3+
--SKIPIF--
4+
<?php include(__DIR__ . '/../skipif.inc'); ?>
5+
--FILE--
6+
<?php
7+
8+
$code =<<<ZEP
9+
namespace Acme;
10+
11+
use Psr\Http\Client\ClientExceptionInterface;
12+
13+
final class ServerException extends \RuntimeException implements ClientExceptionInterface
14+
{
15+
}
16+
ZEP;
17+
18+
$ir = zephir_parse_file($code, '(eval code)');
19+
20+
var_dump($ir);
21+
--EXPECTF--
22+
array(3) {
23+
[0]=>
24+
array(5) {
25+
["type"]=>
26+
string(9) "namespace"
27+
["name"]=>
28+
string(4) "Acme"
29+
["file"]=>
30+
string(11) "(eval code)"
31+
["line"]=>
32+
int(3)
33+
["char"]=>
34+
int(3)
35+
}
36+
[1]=>
37+
array(5) {
38+
["type"]=>
39+
string(3) "use"
40+
["aliases"]=>
41+
array(1) {
42+
[0]=>
43+
array(4) {
44+
["name"]=>
45+
string(40) "Psr\Http\Client\ClientExceptionInterface"
46+
["file"]=>
47+
string(11) "(eval code)"
48+
["line"]=>
49+
int(3)
50+
["char"]=>
51+
int(45)
52+
}
53+
}
54+
["file"]=>
55+
string(11) "(eval code)"
56+
["line"]=>
57+
int(5)
58+
["char"]=>
59+
int(5)
60+
}
61+
[2]=>
62+
array(%d) {
63+
["type"]=>
64+
string(5) "class"
65+
["name"]=>
66+
string(15) "ServerException"
67+
["abstract"]=>
68+
int(0)
69+
["final"]=>
70+
int(1)
71+
["extends"]=>
72+
string(17) "\RuntimeException"
73+
["implements"]=>
74+
array(1) {
75+
[0]=>
76+
array(5) {
77+
["type"]=>
78+
string(8) "variable"
79+
["value"]=>
80+
string(24) "ClientExceptionInterface"
81+
["file"]=>
82+
string(11) "(eval code)"
83+
["line"]=>
84+
int(6)
85+
["char"]=>
86+
int(1)
87+
}
88+
}
89+
["file"]=>
90+
string(11) "(eval code)"
91+
["line"]=>
92+
int(5)
93+
["char"]=>
94+
int(11)
95+
}
96+
}

zephir_parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern zend_module_entry zephir_parser_module_entry;
1515
#define phpext_zephir_parser_ptr &zephir_parser_module_entry
1616

1717
#define PHP_ZEPHIR_PARSER_NAME "Zephir Parser"
18-
#define PHP_ZEPHIR_PARSER_VERSION "1.1.3"
18+
#define PHP_ZEPHIR_PARSER_VERSION "1.1.4"
1919
#define PHP_ZEPHIR_PARSER_AUTHOR "Zephir Team and contributors"
2020
#define PHP_ZEPHIR_PARSER_DESCRIPTION "The Zephir Parser delivered as a C extension for the PHP language."
2121

0 commit comments

Comments
 (0)