Skip to content
Permalink
Browse files

Merge pull request #14247 from phalcon/4.0.x

4.0.0-beta.1
  • Loading branch information...
sergeyklay committed Jul 14, 2019
2 parents 87d442d + 591e9c5 commit a0b25edcfc143b780ec69d5b92cae9c0c37c1987
Showing 3,340 changed files with 612,823 additions and 514,578 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
#
# This file is part of the Phalcon Framework.
#
# (c) Phalcon Team <team@phalconphp.com>
#
# For the full copyright and license information, please view the LICENSE.txt
# file that was distributed with this source code.
#

shopt -s nullglob

export LC_ALL=C

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

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

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

if [ -f "${PROJECT_ROOT}/compile-errors.log" ]; then
cat "${PROJECT_ROOT}/compile-errors.log"
fi

for i in core core*; do
if [ -f "$i" -a "$(file "$i" | grep -o 'core file')" ]; then
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
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
#
# This file is part of the Phalcon Framework.
#
# (c) Phalcon Team <team@phalconphp.com>
#
# For the full copyright and license information, please view the LICENSE.txt
# file that was distributed with this source code.
#

set -e +o pipefail

PROJECT_ROOT=$(readlink -enq "$(dirname $0)/../")
LCOV_REPORT=${PROJECT_ROOT}/tests/_output/lcov.info

if [[ -z ${REPORT_COVERAGE+x} ]] || [[ "$REPORT_COVERAGE" != "1" ]]; then
echo -e "\nUploading coverage data is not enabled.\nSkip uploading reports to Codecov.\n"
exit 0
fi

if [[ $(command -v lcov 2>/dev/null) = "" ]]; then
echo -e "lcov does not exist.\nSkip capturing coverage data."
else
# Capture coverage data
lcov \
--quiet \
--no-checksum \
--directory ext \
--base-directory=${PROJECT_ROOT} \
--capture \
--compat-libtool \
--output-file ${LCOV_REPORT}

# Remove files matching non-project patterns
lcov \
--quiet \
--remove ${LCOV_REPORT} "/usr*" \
--remove ${LCOV_REPORT} "${PROJECT_ROOT}/kernel/*" \
--remove ${LCOV_REPORT} "${PROJECT_ROOT}/ext/kernel/*" \
--remove ${LCOV_REPORT} "${HOME}/.phpenv/*" \
--compat-libtool \
--output-file ${LCOV_REPORT}
fi

curl -sSl https://codecov.io/bash -o codecov.sh
chmod +x codecov.sh

if [[ -f "${LCOV_REPORT}" ]]; then
echo -e "Uploading coverage report: ${LCOV_REPORT}...\n"
./codecov.sh -f "${LCOV_REPORT}"
fi
@@ -0,0 +1,99 @@
#!/usr/bin/env bash
#
# This file is part of the Phalcon Framework.
#
# (c) Phalcon Team <team@phalconphp.com>
#
# For the full copyright and license information, please view the LICENSE.txt
# file that was distributed with this source code.
#

PROJECT_ROOT=$(readlink -enq "$(dirname $0)/../")
LCOV_REPORT=${PROJECT_ROOT}/tests/_output/lcov.info

shopt -s nullglob

zephir clean 2>&1 || exit 1
zephir fullclean 2>&1 || exit 1
zephir generate 2>&1 || exit 1

if [[ -z ${CC+x} ]]; then
echo -e "The CC variable is unset or set to the empty string.\nSkip precompiling headers.\n"
else
echo "Creating precompiled headers..."
if [[ "${CC:0:5}" = "clang" ]]; then
_ext="pch"
_option="-emit-pch"
_arg="-cc1"
else
_ext="ghc"
_option=
_arg=
fi

# If a `*.gch' (or a `*.pch') file is not found then the normal header files
# will be used. For more see: http://en.wikipedia.org/wiki/Precompiled_header
for file in `find ./ext/kernel -name "*.h"`; do
${CC} ${_arg} "${file}" -I. -I./ext $(php-config --includes) ${_option} -o "${file}.${_ext}"
done
fi

cd ext

phpize

if [[ ! -z ${REPORT_COVERAGE+x} ]] && [[ "$REPORT_COVERAGE" = "1" ]]; then
# The ltmain.sh which bundled with PHP it's from libtool 1.5.26.
# However, the version of libtool that claims to no longer remove
# ".gcno" profiler information is libtool 2.2.6. The fix is probably
# in later libtool versions as well.
if [[ "$(uname -s 2>/dev/null)" = "Darwin" ]]; then
# macOS
LIBTOOLIZE_BIN=$(command -v glibtoolize 2>/dev/null)
else
# Linux, Gentoo, etc
LIBTOOLIZE_BIN=$(command -v libtoolize 2>/dev/null)
fi

aclocal && ${LIBTOOLIZE_BIN} --copy --force && autoheader && autoconf

CFLAGS=`echo "${CFLAGS}" | sed -e 's/-O[0-9s]*//g'`
CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's/-O[0-9s]*//g'`
LDFLAGS=`echo "${LDFLAGS}" | sed -e 's/--coverage//g'`

LDFLAGS="${LDFLAGS} --coverage"
CFLAGS="${CFLAGS} -O0 -ggdb -fprofile-arcs -ftest-coverage"
CXXFLAGS="${CXXFLAGS} -O0 -ggdb -fprofile-arcs -ftest-coverage"
fi

./configure --silent --with-php-config=$(phpenv which php-config) --enable-phalcon CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"

make -j"$(getconf _NPROCESSORS_ONLN)" > /dev/null 2> ${PROJECT_ROOT}/compile-errors.log
make install

phpenv config-add ${PROJECT_ROOT}/.ci/phalcon.ini

cd ..

if [[ ! -z ${REPORT_COVERAGE+x} ]] && [[ "$REPORT_COVERAGE" = "1" ]]; then
if [[ $(command -v lcov 2>/dev/null) = "" ]]; then
echo -e "lcov does not exist.\nSkip capturing coverage data.\n"
else
# Reset all execution counts to zero
lcov \
--quiet \
--directory ext \
--base-directory=${PROJECT_ROOT} \
--zerocounters 2>&1 >/dev/null

# Capture coverage data
lcov \
--quiet \
--directory ext \
--base-directory=${PROJECT_ROOT} \
--capture \
--compat-libtool \
--initial \
--output-file ${LCOV_REPORT} 2>&1 >/dev/null
fi
fi
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# This file is part of the Phalcon Framework.
#
# (c) Phalcon Team <team@phalconphp.com>
#
# For the full copyright and license information, please view the
# LICENSE.txt file that was distributed with this source code.

# Export tests environment variables
source tests/_ci/environment
export $(cut -d= -f1 tests/_ci/environment)

# Export build environment variables
export PHP_MAJOR="$(php -r 'echo phpversion();' | cut -d '.' -f 1)"
export PHP_MINOR="$(php -r 'echo phpversion();' | cut -d '.' -f 2)"
export PHP_VERNUM="$(php-config --vernum)"
export PHP_PEAR_PHP_BIN=$(phpenv which php)
@@ -0,0 +1,64 @@
#!/usr/bin/env bash
#
# This file is part of the Phalcon Framework.
#
# (c) Phalcon Team <team@phalconphp.com>
#
# For the full copyright and license information, please view the
# LICENSE.txt file that was distributed with this source code.

PHP_INI="$(phpenv root)/versions/$(phpenv version-name)/etc/php.ini"

# Install latest APC(u)
printf "\n" | pecl install --force apcu_bc 1> /dev/null
# See https://pear.php.net/bugs/bug.php?id=21007
awk '/extension.*apcu?\.so"?/{$0=""}1' "${PHP_INI}" > php.ini.patch && mv php.ini.patch "${PHP_INI}"
cat <<EOT >> $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/apcu.ini
[apc]
extension = "apcu.so"
extension = "apc.so"
apc.enabled = 1
apc.enable_cli = 1
EOT

# Install latest memcached
printf "\n" | pecl install --force memcached 1> /dev/null
echo 'extension="memcached.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/memcached.ini

# Install latest msgpack
printf "\n" | pecl install --force msgpack 1> /dev/null
# echo 'extension="msgpack.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/msgpack.ini

# Install latest xdebug
phpenv config-rm xdebug.ini 2>&1 >/dev/null || true
if [[ "$PHP_VERNUM" -lt "70300" ]]; then
printf "\n" | pecl install --force xdebug 1> /dev/null
awk '/zend_extension.*xdebug.so"?/{$0=""}1' "${PHP_INI}" > php.ini.patch && mv php.ini.patch "${PHP_INI}"
echo 'zend_extension="xdebug.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
fi

# Install latest igbinary, imagick, psr and yaml
printf "\n" | pecl install --force igbinary 1> /dev/null
printf "\n" | pecl install --force imagick 1> /dev/null
printf "\n" | pecl install --force psr 1> /dev/null
printf "\n" | pecl install --force yaml 1> /dev/null
printf "\n" | pecl install --force mongodb 1> /dev/null

# Install redis
redis_ext=`$(phpenv which php-config) --extension-dir`/redis.so
if [[ ! -f "${redis_ext}" ]]; then
printf "\n" | pecl install --force redis 1> /dev/null
fi

if [[ "$(php -m | grep redis | wc -l)" = "0" ]] && [[ -f "${redis_ext}" ]];
then
echo 'extension="redis.so"' > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/redis.ini"
fi

# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: noet sw=4 ts=4
# vim<600: noet sw=4 ts=4

This file was deleted.

File renamed without changes.

0 comments on commit a0b25ed

Please sign in to comment.
You can’t perform that action at this time.