Skip to content

Commit

Permalink
1.1.4 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay authored Nov 22, 2018
1 parent ae0124b commit 6a0d1f8
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.1.3-{build}
version: 1.1.4-{build}

environment:
matrix:
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
sudo: false

language: php
php:
- 'master'
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.1.4] - 2018-11-22
### Fixed
- Backport [#49](https://github.com/phalcon/php-zephir-parser/pull/49) from the upstream

## [1.1.3] - 2018-11-06
### Changed
- Extremely simplified installation of the extension using standard PHP workflow [#38](https://github.com/phalcon/php-zephir-parser/issues/38)
Expand Down Expand Up @@ -86,7 +90,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Initial stable release

[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.3...HEAD
[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.4...HEAD
[1.1.4]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.3...v1.1.4
[1.1.3]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.2...v1.1.3
[1.1.2]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.0...v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.3
1.1.4
4 changes: 4 additions & 0 deletions parser/parser.php5.lemon
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) IMPLEMENTS xx_implements_list(L) x
R = xx_ret_class(I, B, 0, 1, NULL, L, status->scanner_state);
}

xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) EXTENDS IDENTIFIER(E) IMPLEMENTS xx_implements_list(L) xx_class_body(B) . {
R = xx_ret_class(I, B, 0, 1, E, L, status->scanner_state);
}

xx_class_body(R) ::= BRACKET_OPEN BRACKET_CLOSE . {
R = NULL;
}
Expand Down
4 changes: 4 additions & 0 deletions parser/parser.php7.lemon
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) IMPLEMENTS xx_implements_list(L) x
xx_ret_class(&R, I, &B, 0, 1, NULL, &L, status->scanner_state);
}

xx_class_def(R) ::= FINAL CLASS IDENTIFIER(I) EXTENDS IDENTIFIER(E) IMPLEMENTS xx_implements_list(L) xx_class_body(B) . {
xx_ret_class(&R, I, &B, 0, 1, E, &L, status->scanner_state);
}

xx_class_body(R) ::= BRACKET_OPEN BRACKET_CLOSE . {
ZVAL_UNDEF(&R);
}
Expand Down
96 changes: 96 additions & 0 deletions tests/classes/bug48.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
--TEST--
Final class can extend and implement
--SKIPIF--
<?php include(__DIR__ . '/../skipif.inc'); ?>
--FILE--
<?php

$code =<<<ZEP
namespace Acme;
use Psr\Http\Client\ClientExceptionInterface;
final class ServerException extends \RuntimeException implements ClientExceptionInterface
{
}
ZEP;

$ir = zephir_parse_file($code, '(eval code)');

var_dump($ir);
--EXPECTF--
array(3) {
[0]=>
array(5) {
["type"]=>
string(9) "namespace"
["name"]=>
string(4) "Acme"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(3)
}
[1]=>
array(5) {
["type"]=>
string(3) "use"
["aliases"]=>
array(1) {
[0]=>
array(4) {
["name"]=>
string(40) "Psr\Http\Client\ClientExceptionInterface"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(3)
["char"]=>
int(45)
}
}
["file"]=>
string(11) "(eval code)"
["line"]=>
int(5)
["char"]=>
int(5)
}
[2]=>
array(%d) {
["type"]=>
string(5) "class"
["name"]=>
string(15) "ServerException"
["abstract"]=>
int(0)
["final"]=>
int(1)
["extends"]=>
string(17) "\RuntimeException"
["implements"]=>
array(1) {
[0]=>
array(5) {
["type"]=>
string(8) "variable"
["value"]=>
string(24) "ClientExceptionInterface"
["file"]=>
string(11) "(eval code)"
["line"]=>
int(6)
["char"]=>
int(1)
}
}
["file"]=>
string(11) "(eval code)"
["line"]=>
int(5)
["char"]=>
int(11)
}
}
2 changes: 1 addition & 1 deletion zephir_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern zend_module_entry zephir_parser_module_entry;
#define phpext_zephir_parser_ptr &zephir_parser_module_entry

#define PHP_ZEPHIR_PARSER_NAME "Zephir Parser"
#define PHP_ZEPHIR_PARSER_VERSION "1.1.3"
#define PHP_ZEPHIR_PARSER_VERSION "1.1.4"
#define PHP_ZEPHIR_PARSER_AUTHOR "Zephir Team and contributors"
#define PHP_ZEPHIR_PARSER_DESCRIPTION "The Zephir Parser delivered as a C extension for the PHP language."

Expand Down

0 comments on commit 6a0d1f8

Please sign in to comment.