Skip to content

Commit 4705682

Browse files
authored
Release v1.1.1 [win build]
1.1.1
2 parents 0d16308 + 546b07e commit 4705682

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1699
-375
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# --
2-
version: 1.1.0-{build}
1+
version: 1.1.1-{build}
32

43
build: false
54
environment:
@@ -187,6 +186,7 @@ build_script:
187186
- cp %APPVEYOR_BUILD_FOLDER%\CONTRIBUTING.md .\
188187
- cp %APPVEYOR_BUILD_FOLDER%\README.md .\
189188
- cp %APPVEYOR_BUILD_FOLDER%\README.WIN32-BUILD-SYSTEM .\
189+
- cp %APPVEYOR_BUILD_FOLDER%\NO_WARRANTY .\
190190

191191
after_build:
192192
# ==================================================

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ tests/*/*.exp
4343
tests/*/*.log
4444
tests/*/*.sh
4545

46+
# Tests
4647
php_test_results_*
48+
*.out
49+
*.exp
50+
*.diff
51+
*.php
4752

4853
# Parser files
4954
parser/lemon

.travis.yml

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ php:
88
- 5.6
99
- 7.0
1010
- 7.1
11+
- 7.2
1112

1213
git:
1314
depth: 1
@@ -21,43 +22,63 @@ env:
2122
- CFLAGS="-g3 -O0 -Wall -fvisibility=hidden"
2223
- ZEND_DONT_UNLOAD_MODULES=1
2324
- USE_ZEND_ALLOC=0
25+
- REPORT_EXIT_STATUS=1
2426
matrix:
25-
- CC="gcc"
26-
- CC="clang"
27+
# Minimal re2c version
28+
- CC="gcc" RE2C_VERSION="0.13.6"
29+
- CC="clang" RE2C_VERSION="0.13.6"
30+
# Latest stable re2c version
31+
- CC="gcc" RE2C_VERSION="1.0.3"
32+
- CC="clang" RE2C_VERSION="1.0.3"
2733

2834
matrix:
2935
fast_finish: true
3036
allow_failures:
31-
- php: nightly
32-
include:
37+
- php: 7.2
38+
exclude:
3339
- env: CC="gcc"
34-
php: nightly
35-
compiler: gcc
36-
- env: CC="clang"
37-
php: nightly
3840
compiler: clang
41+
- env: CC="clang"
42+
compiler: gcc
3943

4044
cache:
4145
apt: true
42-
timeout: 691200
46+
ccache: true
47+
timeout: 604800
48+
directories:
49+
- $HOME/.ccache
50+
- $HOME/.local/opt/re2c
51+
- $HOME/.cache/re2c
4352

4453
install:
4554
- phpenv config-rm xdebug.ini || true
46-
- bash ./install-development
55+
- bash ./install-re2c $RE2C_VERSION
56+
- bash ./install-development --phpize $(phpenv which phpize) --php-config $(phpenv which php-config)
4757

4858
script:
49-
- valgrind --read-var-info=yes --error-exitcode=1 --fullpath-after= --track-origins=yes --leak-check=full --num-callers=20 --suppressions=$(pwd)/tests/zephir_parser.3.7.0.sup $(phpenv which php) -d variables_order=EGPCS run-tests.php -p $(which php) -d extension=$(pwd)/modules/zephir_parser.so -d variables_order=EGPCS -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
50-
51-
notifications:
52-
email:
53-
recipients:
54-
55-
on_success: change
56-
on_failure: always
59+
- |
60+
valgrind \
61+
--read-var-info=yes \
62+
--error-exitcode=1 \
63+
--fullpath-after= \
64+
--track-origins=yes \
65+
--leak-check=full \
66+
--num-callers=20 \
67+
--run-libc-freeres=no \
68+
--suppressions=$(pwd)/tests/php-leaks.supp \
69+
$(phpenv which php) \
70+
-d variables_order=EGPCS \
71+
run-tests.php \
72+
-p $(which php) \
73+
-d extension=$(pwd)/modules/zephir_parser.so \
74+
-d variables_order=EGPCS \
75+
-g "FAIL,XFAIL,BORK,WARN,SKIP" \
76+
--offline \
77+
--show-diff \
78+
--set-timeout 120
5779
5880
addons:
5981
apt:
6082
packages:
61-
- re2c
6283
- valgrind
6384
- gdb

CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [1.1.1] - 2017-11-09
10+
### Changed
11+
- Improved install scripts
12+
- Refactored tests
13+
- Added re2c check to install script
14+
15+
### Fixed
16+
- Fixed `mod-assign` operator recognition
17+
- Fixed issue with incorrectly used `YYMARKER` and `YYCURSOR` [#31](https://github.com/phalcon/php-zephir-parser/issues/31),
18+
[phalcon/zephir#1591](https://github.com/phalcon/zephir/issues/1591), [phalcon/cphalcon#13140](https://github.com/phalcon/cphalcon/issues/13140)
19+
- Improved scanner by removing reundant rules
20+
921
## [1.1.0] - 2017-10-12
1022
### Added
1123
- Added support syntax assign-bitwise operators [#14](https://github.com/phalcon/php-zephir-parser/issues/14),
@@ -57,7 +69,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
5769
### Added
5870
- Initial stable release
5971

60-
[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.0...HEAD
72+
[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.1...HEAD
73+
[1.1.1]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.0...v1.1.1
6174
[1.1.0]: https://github.com/phalcon/php-zephir-parser/compare/v1.0.3...v1.1.0
6275
[1.0.3]: https://github.com/phalcon/php-zephir-parser/compare/v1.0.2...v1.0.3
6376
[1.0.2]: https://github.com/phalcon/php-zephir-parser/compare/v1.0.1...v1.0.2

NO_WARRANTY

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Zephir Parser is distributed with no warranty whatever. The authors and any
2+
other contributors take no responsibility for the consequences of its use.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ The Zephir Parser delivered as a C extension for the PHP language.
77

88
Supported PHP versions: **5.5**, **5.6**, **7.0**, **7.1**, **7.2**
99

10-
**NOTE:** The `development` branch will always contain the latest **unstable** version.
11-
If you wish to check older versions or formal, tagged release, please switch to the relevant
10+
**NOTE:** The [`development`](https://github.com/phalcon/php-zephir-parser/tree/development)
11+
branch will always contain the latest **unstable** version. If you wish to check older versions
12+
or formal, tagged release, please switch to the relevant
1213
[branch](https://github.com/phalcon/php-zephir-parser/branches)/[tag](https://github.com/phalcon/php-zephir-parser/tags).
1314

1415
## Get Started
@@ -38,7 +39,7 @@ Prerequisite packages are:
3839

3940
* OS: Linux || Solaris || FreeBSD || macOS || Windows
4041
* Compiller: `g++` >= 4.4 || `clang++` >= 3.x || `vc++` >= 11
41-
* [`re2c`](http://re2c.org/) >= 0.13
42+
* [`re2c`](http://re2c.org/) >= 0.13.6
4243

4344
#### Ubuntu
4445

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.1.1

ide/zephir_parser.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<?php
22

33
/*
4-
+--------------------------------------------------------------------------+
5-
| Zephir Parser |
6-
+--------------------------------------------------------------------------+
7-
| Copyright (c) 2013-2017 Zephir Team and contributors |
8-
+--------------------------------------------------------------------------+
9-
| This source file is subject the MIT license, that is bundled with |
10-
| this package in the file LICENSE, and is available through the |
11-
| world-wide-web at the following url: |
12-
| https://zephir-lang.com/license.html |
13-
| |
14-
| If you did not receive a copy of the MIT license and are unable |
15-
| to obtain it through the world-wide-web, please send a note to |
16-
| [email protected] so we can mail you a copy immediately. |
17-
+--------------------------------------------------------------------------+
4+
+--------------------------------------------------------------------------+
5+
| Zephir Parser |
6+
| Copyright (c) 2013-present Zephir Team (https://zephir-lang.com/) |
7+
| |
8+
| This source file is subject the MIT license, that is bundled with this |
9+
| package in the file LICENSE, and is available through the world-wide-web |
10+
| at the following url: http://zephir-lang.com/license.html |
11+
+--------------------------------------------------------------------------+
1812
*/
1913

2014
/**
21-
* Parses a file and returning an intermediate array representation.
15+
* Parses a file and returning an intermediate representation.
16+
*
17+
* Example:
18+
* <code>
19+
* function parse_file(string $file_path): array {
20+
* return zephir_parse_file(file_get_contents($file_path), $file_path);
21+
* }
22+
* </code>
2223
*
2324
* @param string $content
2425
* @param string $filepath

install

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,72 @@
66
# This source file is subject the MIT license, that is bundled with this
77
# package in the file LICENSE, and is available through the world-wide-web
88
# at the following url: http://zephir-lang.com/license.html
9-
10-
# Available params:
11-
# --phpize
12-
# --php-config
139
#
14-
# Example:
15-
# ./install --phpize /usr/bin/phpize5.6 --php-config /usr/bin/php-config5.6
16-
17-
set -e
10+
# Available options:
11+
# --phpize <PATH> Path to custom `phpize' executable
12+
# --php-config <PATH> Path to custom `php-config' executable
13+
#
14+
# Available env. vars:
15+
# RE2C_BIN Path to custom `re2c'
16+
#
17+
# Usage:
18+
#
19+
# Build and install extension using default PHP's paths:
20+
# ./install-development
21+
#
22+
# Build and install extension using custom PHP's paths:
23+
# ./install-development --phpize /usr/bin/phpize5.6 --php-config /usr/bin/php-config5.6
1824

1925
CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
2026

21-
GCC_BIN=$(command -v gcc 2>/dev/null)
22-
RE2C_BIN=${RE2C_BIN:-$(command -v re2c 2>/dev/null)}
27+
GCC_BIN=`command -v gcc 2>/dev/null || true`
28+
RE2C_BIN=${RE2C_BIN:-`command -v re2c 2>/dev/null || true`}
2329

2430
if [ x"$RE2C_BIN" = x ]; then
25-
echo -e "error: unable to locate the re2c"
26-
exit 1
31+
echo -e "error: unable to locate the re2c"
32+
exit 1
2733
fi
2834

2935
if [ x"$GCC_BIN" = x ]; then
3036
echo -e "error: unable to locate the gcc"
3137
exit 1
3238
fi
3339

40+
re2c_vernum=`re2c --vernum 2>/dev/null`
41+
if test -z "$re2c_vernum"; then
42+
echo "error: unable to locate the re2c"
43+
exit 1
44+
fi
45+
46+
if test "$re2c_vernum" -lt "1306"; then
47+
echo "error: minimal required version of re2c is 0.13.6"
48+
exit 1
49+
fi
50+
3451
# Check best compilation flags for compiler
3552
export CC=gcc
3653
export CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer"
3754

3855
# Set defaults
39-
PHPIZE_BIN=$(command -v phpize 2>/dev/null)
40-
PHPCONFIG_BIN=$(command -v php-config 2>/dev/null)
56+
PHPIZE_BIN=`command -v phpize 2>/dev/null || true`
57+
PHPCONFIG_BIN=`command -v php-config 2>/dev/null || true`
4158

4259
# Translate long options to short
4360
for arg in "$@"; do
44-
shift
45-
case "$arg" in
46-
"--phpize") set -- "$@" "-i" ;;
47-
"--php-config") set -- "$@" "-c" ;;
48-
*) set -- "$@" "$arg"
49-
esac
61+
shift
62+
case "$arg" in
63+
"--phpize") set -- "$@" "-i" ;;
64+
"--php-config") set -- "$@" "-c" ;;
65+
*) set -- "$@" "$arg"
66+
esac
5067
done
5168

5269
# Options switcher
5370
while getopts i:c: opts; do
54-
case ${opts} in
55-
i) PHPIZE_BIN=${OPTARG} ;;
56-
c) PHPCONFIG_BIN=${OPTARG} ;;
57-
esac
71+
case ${opts} in
72+
i) PHPIZE_BIN=${OPTARG} ;;
73+
c) PHPCONFIG_BIN=${OPTARG} ;;
74+
esac
5875
done
5976

6077
PHP_FULL_VERSION=`${PHPCONFIG_BIN} --version`
@@ -113,7 +130,7 @@ rm -f \
113130
parser.php7.out \
114131
config.h.in~
115132

116-
${RE2C_BIN} -o scanner.c scanner.re
133+
${RE2C_BIN} --no-generation-date -o scanner.c scanner.re
117134

118135
# Compile lemon
119136
${CC} lemon.c -o lemon
@@ -147,7 +164,6 @@ if [ -f Makefile ]; then
147164
${PHPIZE_BIN} --clean
148165
fi
149166

150-
# Perform the compilation
151167
${PHPIZE_BIN}
152168

153169
# For some reason the libtool script being generated by autogen contains lines referring
@@ -156,18 +172,22 @@ export echo=echo
156172

157173
# Detect Gentoo Linux
158174
if [ -f /etc/gentoo-release ]; then
159-
LIBTOOLIZE_BIN=$(command -v libtoolize 2>/dev/null)
160-
aclocal && ${LIBTOOLIZE_BIN} --force && autoheader && autoconf
175+
LIBTOOLIZE_BIN=`command -v libtoolize 2>/dev/null || true`
176+
aclocal && ${LIBTOOLIZE_BIN} --force && autoheader && autoconf
161177
fi
162178

163179
# Detect macOS
164180
if [ "$(uname -s 2>/dev/null)" = "Darwin" ]; then
165-
LIBTOOLIZE_BIN=$(command -v glibtoolize 2>/dev/null)
166-
aclocal && ${LIBTOOLIZE_BIN} --force && autoheader && autoconf
181+
LIBTOOLIZE_BIN=`command -v glibtoolize 2>/dev/null || true`
182+
aclocal && ${LIBTOOLIZE_BIN} --force && autoheader && autoconf
167183
fi
168184

169-
./configure --silent --with-php-config=${PHPCONFIG_BIN} --enable-zephir_parser
185+
./configure \
186+
--silent \
187+
--with-php-config=${PHPCONFIG_BIN} \
188+
--enable-zephir_parser
170189

190+
# Perform the compilation
171191
make -s -j"$(getconf _NPROCESSORS_ONLN)"
172192
make -s install
173193

@@ -195,4 +215,3 @@ rm -f \
195215
config.h.in~
196216

197217
echo -e "\nThanks for compiling Zephir Parser!\nBuild succeed: Please restart your web server to complete the installation\n"
198-

0 commit comments

Comments
 (0)