Skip to content

v1.3.2 #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 50 commits into from
Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
35d4d11
Renaming a variable
dreamsxin Jul 4, 2019
91d52ec
Merge pull request #74 from dreamsxin/issues1660
sergeyklay Jul 4, 2019
0045422
Allow underscore only variables that are longer than 4 characters.
davidofferman Jul 17, 2019
43a2a49
Add PHP 7.4 to Travis build matrix [skip appveyor]
sergeyklay Jul 17, 2019
c094d8e
Fixed PHP 7.4 support
sergeyklay Jul 17, 2019
496d5ec
Improved re2c check
sergeyklay Jul 17, 2019
75a3176
Disable code coverage for PHP 7.4
sergeyklay Jul 17, 2019
0b958f5
Ignore parser.c and scanner.c files
davidofferman Jul 17, 2019
9d1a3b1
Test code for assignment operators
davidofferman Jul 18, 2019
04e962f
Tests for bitwise operators
davidofferman Jul 18, 2019
2790351
Test code to check 'constant' type.
davidofferman Jul 18, 2019
83cd0ba
Merge branch 'development' of https://github.com/davidofferman/php-ze…
davidofferman Jul 18, 2019
f60147e
Updated changelog for recent commits
davidofferman Jul 18, 2019
de9ea05
Merge commit 'f60147e' into development
davidofferman Jul 18, 2019
bdd833a
Add #line directive for code coverage
davidofferman Jul 18, 2019
ca800dc
Merge pull request #75 from davidofferman/development
sergeyklay Jul 18, 2019
f78bc60
Tests for zephir parser (#76)
davidofferman Jul 24, 2019
5fb7e89
Update README.md
niden Sep 5, 2019
846e4c8
Change links to phalcon site
sergeyklay Sep 27, 2019
2254c8a
Fixed .editorconfig
sergeyklay Sep 27, 2019
5fd62ec
Update .gitignore
sergeyklay Sep 27, 2019
3c619c0
Update LDFLAGS to reduce linker warnings
sergeyklay Sep 27, 2019
fd64763
Cleaned up Travis script
sergeyklay Sep 27, 2019
8e97f1e
Merge pull request #77 from phalcon/fix/coverage
sergeyklay Sep 28, 2019
7956064
Patched libtoolto not remove gcno [skip appveyor]
sergeyklay Sep 28, 2019
b4cbe29
Remove no longer needed code to update libtool [skip appveyor]
sergeyklay Sep 28, 2019
b06cce2
Fixed travis config [skip appveyor]
sergeyklay Sep 28, 2019
4062452
Make libtool executable [skip appveyor]
sergeyklay Sep 28, 2019
70680d9
Improved run-tests.sh script [skip appveyor]
sergeyklay Sep 28, 2019
cdb2bec
Remove PHP 7.4 from the allowed failures matrix [skip appveyor]
sergeyklay Sep 28, 2019
229e472
Merge pull request #78 from phalcon/fix/coverage
sergeyklay Sep 28, 2019
6e4f868
Cleaned up test script [skip appveyor]
sergeyklay Sep 28, 2019
fd3d4a5
Remove no longer needed test script [skip appveyor]
sergeyklay Sep 28, 2019
eb57aab
Added valgrind suppression file for PHP >= 7.3 [skip appveyor]
sergeyklay Sep 28, 2019
9c8c51c
Ammend suppresion file [skip appveyor]
sergeyklay Sep 28, 2019
40533d1
Cleaned up travis config [skip appveyor]
sergeyklay Sep 28, 2019
9461c68
Improved after_failure script [skip appveyor]
sergeyklay Sep 28, 2019
484c85e
Improved after_failure script [skip appveyor]
sergeyklay Sep 28, 2019
36b0f03
Always enable coverage [skip appveyor]
sergeyklay Sep 28, 2019
d85a07f
Amended suppression file for PHP 7.3 [skip appveyor]
sergeyklay Sep 29, 2019
fb9965d
Added suppression file for PHP 7.4 [skip appveyor]
sergeyklay Sep 29, 2019
ef835e7
Add latest re2c to build & test matrix [skip appveyor]
sergeyklay Sep 29, 2019
89b73ff
Debug patching PHP tests runner [skip appveyor]
sergeyklay Sep 29, 2019
fa5e2b7
Update re2c installer [skip appveyor]
sergeyklay Sep 29, 2019
2800860
Amended suppression file for PHP 7.4 [skip appveyor]
sergeyklay Sep 29, 2019
c1f83e8
Amended suppression file for PHP 7.4 [skip appveyor]
sergeyklay Sep 29, 2019
e8b7ab1
Improved clean targets [skip appveyor]
sergeyklay Sep 29, 2019
00cf312
Amended lemon docs [skip appveyor]
sergeyklay Sep 29, 2019
414f123
Merge pull request #79 from phalcon/feature/docs [skip appveyor]
sergeyklay Sep 29, 2019
5310b49
Bump version
sergeyklay Sep 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.3.1-{build}
version: 1.3.2-{build}

environment:
matrix:
Expand Down
43 changes: 19 additions & 24 deletions .ci/after-failure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,34 @@
# For the full copyright and license information, please view
# the LICENSE file that was distributed with this source code.

$(phpenv which php) -v
$(phpenv which php) -m

PROJECT_ROOT=$(readlink -enq "$(dirname $0)/../")
cd ${PROJECT_ROOT}

shopt -s nullglob

for i in `find ./tests -name "*.out" 2>/dev/null`; do
echo "-- START ${i}"; cat ${i}; echo "-- END";
done

for i in `find ./tests -name "*.mem" 2>/dev/null`; do
echo "-- START ${i}"; cat ${i}; echo "-- END";
done

if [ -f "./configure.log" ]; then
cat "./configure.log"
fi

ls -al ${PROJECT_ROOT}

export LC_ALL=C

for i in core core.*; do
if [ -f "$i" -a "$(file "$i" | grep -o 'core file')" ]; then
gdb -q $(file "${i}" | grep -oE "'[^ ']+" | sed "s/^'//g") "$i" <<EOF
while IFS= read -r -d '' file
do
(( count++ ))
(>&1 printf ">>> START (%d)\\n%s\\n<<< END (%d)\\n\\n" $count "$(cat "$file")" $count)
done < <(find ./tests -type f \( -name '*.out' -o -name '*.mem' \) -print0)

# for some reason Ubuntu 18.04 on Travis CI doesn't install gdb
function install_gdb() {
if [ "${CI}" = "true" ] && [ "$(command -v gdb 2>/dev/null)" = "" ]
then
(>&1 echo "Install gdb...")
sudo apt-get install --no-install-recommends --quiet --assume-yes gdb 1> /dev/null
fi
}

for i in /tmp/core.php.*; do
install_gdb
(>&1 printf "Found core dump file: %s\\n\\n" "$i")
gdb -q "$(phpenv which php)" "$i" <<EOF
set pagination 0
backtrace full
info registers
x/16i \$pc
thread apply all backtrace
quit
EOF
fi
done
71 changes: 35 additions & 36 deletions .ci/install-re2c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,65 +8,64 @@
# the LICENSE file that was distributed with this source code.

if [ -z ${RE2C_VERSION+x} ]; then
>&2 echo "The RE2C_VERSION value is not set. Stop."
exit 1
>&2 echo "The RE2C_VERSION value is not set. Stop."
exit 1
fi

if [ "${RE2C_VERSION}" == "system" ]; then
echo "Use system re2c. Skip."
exit 0
echo "Use system re2c. Skip."
exit 0
fi

pkgname=re2c
source="https://github.com/skvadrik/${pkgname}/releases/download/${RE2C_VERSION}/${pkgname}-${RE2C_VERSION}.tar.gz"
source="https://github.com/skvadrik/${pkgname}/releases/download/${RE2C_VERSION}/${pkgname}-${RE2C_VERSION}.tar.xz"
downloaddir="${HOME}/.cache/${pkgname}/${pkgname}-${RE2C_VERSION}"
prefix="${HOME}/.local/opt/${pkgname}/${pkgname}-${RE2C_VERSION}"
bindir="${prefix}/bin"

if [ ! -f "${bindir}/re2c" ]; then
if [ ! -d `dirname ${downloaddir}` ]; then
mkdir -p `dirname ${downloaddir}`
fi

cd `dirname ${downloaddir}`
if [ ! -d `dirname ${downloaddir}` ]; then
mkdir -p `dirname ${downloaddir}`
fi
cd "$(dirname "$downloaddir")" || exit 1

if [ ! -f "${pkgname}-${RE2C_VERSION}.tar.gz" ]; then
curl -sSL "$source" -o "${pkgname}-${RE2C_VERSION}.tar.gz"
fi
if [ ! -f "${pkgname}-${RE2C_VERSION}.tar.xz" ]; then
curl -sSL "$source" -o "${pkgname}-${RE2C_VERSION}.tar.xz"
fi

if [ ! -f "${pkgname}-${RE2C_VERSION}.tar.gz" ]; then
>&2 echo "Unable to locate ${pkgname}-${RE2C_VERSION}.tar.gz file. Stop."
exit 1
fi
if [ ! -f "${pkgname}-${RE2C_VERSION}.tar.xz" ]; then
>&2 echo "Unable to locate ${pkgname}-${RE2C_VERSION}.tar.xz file. Stop."
exit 1
fi

if [ ! -d "${downloaddir}" ]; then
mkdir -p "${downloaddir}"
tar -zxf "${pkgname}-${RE2C_VERSION}.tar.gz"
fi
if [ ! -d "${downloaddir}" ]; then
mkdir -p "${downloaddir}"
tar -xf "${pkgname}-${RE2C_VERSION}.tar.xz" || exit 1
fi

if [ ! -d "${downloaddir}" ]; then
>&2 echo "Unable to locate re2c source. Stop."
exit 1
fi
if [ ! -d "${downloaddir}" ]; then
>&2 echo "Unable to locate re2c source. Stop."
exit 1
fi

if [ ! -d "${prefix}" ]; then
mkdir -p "${prefix}"
fi
if [ ! -d "${prefix}" ]; then
mkdir -p "${prefix}"
fi

cd "${downloaddir}"
./configure --prefix="${prefix}"
cd "${downloaddir}" || exit 1
./configure --prefix="${prefix}"

make -j"$(getconf _NPROCESSORS_ONLN)"
make install
make -j"$(getconf _NPROCESSORS_ONLN)"
make install
fi

if [ ! -x "${bindir}/re2c" ]; then
>&2 echo "Unable to locate re2c executable. Stop."
exit 1
>&2 echo "Unable to locate re2c executable. Stop."
exit 1
fi

mkdir -p ${HOME}/bin
ln -s "${bindir}/re2c" ${HOME}/bin/re2c
mkdir -p "${HOME}/bin"
ln -s "${bindir}/re2c" "${HOME}/bin/re2c"

re2c --version
exit 0
40 changes: 0 additions & 40 deletions .ci/run-tests.sh

This file was deleted.

13 changes: 4 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@

# top-most EditorConfig file
root = true
charset = utf-8
trim_trailing_whitespace = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true

[*.{php,phpt,xml,json,w32}]
[*.{yml,m4,sh,md,php,phpt,xml,json,w32}]
indent_style = space

[*.{yml,m4}]
[*.{yml,m4,sh}]
indent_size = 2
indent_style = space

[*.md]
indent_style = space
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*.o
*.lo
*.la
*.profraw

.deps
.libs
acinclude.m4
Expand Down Expand Up @@ -41,6 +43,8 @@ php_test_results_*

# Parser files
/parser/lemon
/parser/parser.c
/parser/scanner.c
/parser/zephir.c
/parser/zephir.h
/parser/zephir.out
Expand Down
65 changes: 43 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
language: php

php:
- 'master'
- '7.4snapshot'
- '7.3'
- '7.2'
- '7.1'
- '7.0'

git:
depth: 1
quiet: true
depth: 5

notifications:
email: false

addons:
apt:
Expand All @@ -17,53 +22,69 @@ addons:
- lcov

env:
global:
- MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
- ZEND_DONT_UNLOAD_MODULES=1
- USE_ZEND_ALLOC=0
- TRAVIS_COMMIT_LOG=`git log --format=fuller -2`
matrix:
- RE2C_VERSION="0.13.6"
- RE2C_VERSION="1.1.1"
- RE2C_VERSION="1.2.1"

matrix:
fast_finish: true
allow_failures:
- php: 'master'

cache:
apt: true
timeout: 604800
directories:
- ${HOME}/.local/opt
- ${HOME}/.cache/re2c
- $HOME/.local/opt
- $HOME/.cache/re2c

before_install:
- phpenv config-rm xdebug.ini || true
- ulimit -c unlimited -S
- ulimit -c unlimited -S || true
- echo '/tmp/core.%e.%p.%t' | sudo tee /proc/sys/kernel/core_pattern

install:
- .ci/install-re2c.sh
- phpize
- aclocal && libtoolize --copy --force && autoheader && autoconf
- |
./configure \
--with-php-config=$(phpenv which php-config) \
--enable-zephir-parser \
--enable-zephir-parser-debug \
--enable-coverage \
LDFLAGS="${LDFLAGS} --coverage" \
CFLAGS="${CFLAGS} -O0 -ggdb -fprofile-arcs -ftest-coverage" \
CXXFLAGS="${CXXFLAGS} -O0 -ggdb -fprofile-arcs -ftest-coverage"
- make -j"$(getconf _NPROCESSORS_ONLN)"
./configure \
--with-php-config=$(phpenv which php-config) \
--enable-zephir-parser \
--enable-zephir-parser-debug \
--enable-coverage
- make

before_script:
- make coverage-initial
- |
if [ "$(php-config --vernum)" -ge "70300" ]; then
echo "Patching PHP tests runner to silence messages about PHP memory leaks ¯\_(ツ)_/¯"

# TODO: Move to makefile
search_str="valgrind -q --tool=.* --trace-children=yes"
add_str="--suppressions=./tests/php-$(php-config --version | cut -d'.' -f1,2).supp"
sed -e "s|[\"']\($search_str\)[\"']|\"\1 $add_str\"|" run-tests.php > tmp.php
mv tmp.php run-tests.php
grep 'valgrind -q --tool=' run-tests.php

echo "Done"
fi

script:
- .ci/run-tests.sh
- make test NO_INTERACTION=1 REPORT_EXIT_STATUS=1 TEST_PHP_ARGS=-m

after_failure:
- echo "$($(phpenv which php) -v)"
- echo "$($(phpenv which php) -m)"
- .ci/after-failure.sh

after_success:
- make coverage-capture
- if [ ! -z "${CODECOV_TOKEN}" ]; then bash <(curl -s https://codecov.io/bash); fi
- bash <(curl -s https://codecov.io/bash)

notifications:
email: false
after_script:
- printf "$TRAVIS_COMMIT_RANGE\n"
- printf "$TRAVIS_COMMIT_LOG\n"
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## [1.3.2] - 2019-09-30
### Changed
- Files `parser.c` and `scanner.c` no longer distributed.
Package maintainer should re-generate they by himself.
[#75](https://github.com/phalcon/php-zephir-parser/pull/75)

### Fixed
- Fixed `return_value` and `this_ptr` naming collision
[phalcon/zephir#1660](https://github.com/phalcon/zephir/issues/1660)
- Fixed underscore only identifiers to allow more than 4 characters
[#75](https://github.com/phalcon/php-zephir-parser/pull/75)
- Update LDFLAGS to reduce linker warnings
- Fixed PHP 7.4 support

## [1.3.1] - 2019-05-01
### Fixed
- Fixed `config.m4` to correct install headers
Expand Down Expand Up @@ -128,7 +142,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.3.1...HEAD
[Unreleased]: https://github.com/phalcon/php-zephir-parser/compare/v1.3.2...HEAD
[1.3.2]: https://github.com/phalcon/php-zephir-parser/compare/v1.3.1...v1.3.2
[1.3.1]: https://github.com/phalcon/php-zephir-parser/compare/v1.3.0...v1.3.1
[1.3.0]: https://github.com/phalcon/php-zephir-parser/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/phalcon/php-zephir-parser/compare/v1.1.4...v1.2.0
Expand Down
Loading