Skip to content

Commit 2f55ebb

Browse files
authored
Merge pull request #13626 from phalcon/3.4.x
3.4.2
2 parents caeac66 + 3b55639 commit 2f55ebb

File tree

358 files changed

+15277
-16954
lines changed

Some content is hidden

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

358 files changed

+15277
-16954
lines changed

.editorconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ insert_final_newline = true
1111
indent_style = space
1212
indent_size = 4
1313

14-
[*.{c,h,awk,w32,bat,mk,Makefile,frag,zep,lemon,re}]
14+
[*.{c,h,awk,w32,bat,mk,Makefile,frag,zep,lemon,re,sh}]
1515
charset = utf-8
1616
end_of_line = lf
1717
indent_size = 4
@@ -20,7 +20,7 @@ tab_width = 4
2020
trim_trailing_whitespace = true
2121
insert_final_newline = true
2222

23-
[*.{yml,m4,sh,json,xml}]
23+
[*.{yml,m4,json,xml}]
2424
charset = utf-8
2525
end_of_line = lf
2626
indent_size = 2

.github/stale.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ daysUntilClose: 1
99

1010
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
1111
exemptLabels:
12+
- "Bug - Low"
13+
- "Bug - Medium"
14+
- "Bug - High"
1215
- WIP
1316
- Locked
1417

.travis.yml

+63-116
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
language: php
2+
php:
3+
- 'master'
4+
- '7.3'
5+
- '7.2'
6+
- '7.1'
7+
- '7.0'
8+
- '5.6'
29

3-
dist: trusty
4-
sudo: false
10+
git:
11+
depth: 1
512

6-
php:
7-
- 5.5
8-
- 5.6
9-
- 7.0
10-
- 7.1
11-
- 7.2
12-
- nightly
13+
branches:
14+
only:
15+
- master
16+
- /^(3|4)\.\d+\.(\d+|x)$/
17+
18+
addons:
19+
apt:
20+
packages:
21+
- beanstalkd
22+
- gdb
23+
- lcov
1324

1425
matrix:
1526
fast_finish: true
1627
allow_failures:
17-
- php: nightly
18-
19-
git:
20-
depth: 1
28+
- php: 'master'
2129

2230
cache:
23-
# See: https://github.com/travis-ci/travis-ci/issues/8714
24-
edge: true
2531
apt: true
26-
ccache: true
2732
timeout: 604800
2833
directories:
29-
- .temp
30-
- $HOME/beanstalk
31-
- $HOME/.ccache
32-
- $HOME/.composer/cache
33-
- $HOME/pear
34-
- $HOME/.local/opt/re2c
35-
- $HOME/.cache/re2c
34+
- ${HOME}/beanstalk
35+
- ${HOME}/.composer/cache
36+
- ${HOME}/pear
37+
- ${HOME}/.local/opt
3638

3739
services:
3840
- beanstalkd
@@ -42,130 +44,75 @@ services:
4244

4345
env:
4446
global:
45-
- CC="ccache gcc"
46-
- PATH="$PATH:$HOME/bin"
47-
- ZEPHIR_PARSER_VERSION="v1.1.2"
48-
- RE2C_VERSION="1.0.3"
47+
- CC="gcc"
48+
- ZEPHIR_VERSION="0.10.14"
49+
- RE2C_VERSION="1.1.1"
4950
- REPORT_EXIT_STATUS=1
5051
- NO_INTERACTION=1
5152
- TEST_PHP_ARGS="--show-diff"
52-
# Generating a valgrind log
53-
# For more see: https://bugs.php.net/bugs-getting-valgrind-log.php
54-
#
55-
# Uncomment to correctly show the stack frames for extensions compiled as shared libraries
56-
# - ZEND_DONT_UNLOAD_MODULES=1
57-
# Uncomment to disable Zend memory manager before running PHP with valgrind
58-
# - USE_ZEND_ALLOC=0
53+
- CFLAGS="-g -O0 -Wall -std=gnu90"
54+
- BACKEND="ZendEngine3"
55+
- PATH="${HOME}/bin:${HOME}/.composer/vendor/bin:${PATH}"
56+
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
5957

6058
before_install:
61-
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
59+
- '[[ -z "${GH_TOKEN}" ]] || composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"'
6260
- export PHP_MAJOR="$(`phpenv which php` -r 'echo phpversion();' | cut -d '.' -f 1)"
6361
- export PHP_MINOR="$(`phpenv which php` -r 'echo phpversion();' | cut -d '.' -f 2)"
64-
- bash tests/_ci/pear_setup.sh
65-
- bash tests/_ci/setup_dbs.sh
66-
# Setting up test the environment
67-
- source $TRAVIS_BUILD_DIR/tests/_ci/environment
68-
- export $(cut -d= -f1 $TRAVIS_BUILD_DIR/tests/_ci/environment)
62+
- export PHP_VERNUM="$(`phpenv which php-config` --vernum)"
63+
- '[[ "${PHP_MAJOR}" == "7" ]] || export BACKEND="ZendEngine2"'
64+
- ./tests/_ci/pear-setup.sh
65+
- ./tests/_ci/setup-dbs.sh
66+
- source ./tests/_ci/environment
67+
- export $(cut -d= -f1 ./tests/_ci/environment)
6968

7069
install:
71-
- composer install -q -n --no-ansi --no-progress --dev --prefer-dist --no-suggest #--ignore-platform-reqs
72-
# We'll do this in future for the all 7.x series
73-
- |
74-
if [ "${PHP_MAJOR}.${PHP_MINOR}" = "7.3" ]; then
75-
composer remove -q -n --no-ansi --no-progress --dev doctrine/instantiator
76-
composer remove -q -n --no-ansi --no-progress --dev phpdocumentor/reflection-docblock
77-
composer remove -q -n --no-ansi --no-progress --dev phpunit/phpunit
78-
composer require -q -n --no-ansi --no-progress --dev --prefer-source --no-suggest phpunit/phpunit:^6.4
79-
fi
80-
- bash tests/_ci/install_prereqs_$PHP_MAJOR.sh
81-
- bash tests/_ci/install-re2c $RE2C_VERSION
82-
- bash tests/_ci/install_zephir_parser.sh
83-
- bash tests/_ci/install_zephir.sh
84-
# We still need this until end of support of PHP 5.x
70+
- ./tests/_ci/install-prereqs-$PHP_MAJOR.sh
71+
- ./tests/_ci/install-re2c.sh
72+
- travis_retry composer install ${DEFAULT_COMPOSER_FLAGS}
73+
- travis_retry composer global require "phalcon/zephir:${ZEPHIR_VERSION}"
74+
- ( cd ${HOME}/.composer/vendor/phalcon/zephir; ./install-nosudo )
75+
- zephir generate --backend=${BACKEND}
76+
- ./tests/_ci/precompile-headers.sh
8577
- |
86-
if [ "${PHP_MAJOR}" = "7" ]; then
87-
zephir generate --backend=ZendEngine3
88-
else
89-
zephir generate --backend=ZendEngine2
90-
fi
91-
# Use `-g -O0' for debug purposes
92-
- export CFLAGS="-g3 -O1 -std=gnu90 -Wall"
93-
- cd ${TRAVIS_BUILD_DIR}/ext
94-
# Creating precompiled headers.
95-
# If a `*.gch' file is not found then the normal header files will be used.
96-
# For more see: http://en.wikipedia.org/wiki/Precompiled_header
97-
- |
98-
for file in `find kernel -name "*.h"`; do
99-
echo -e "Creating a precompiled header: ext/${file} => ext/${file}.ghc ...";
100-
$CC "$file" -I. $(php-config --includes) -o "$file.ghc";
101-
done
102-
# You may need to remove all `&> /dev/null' and `--silent' for debug purposes
103-
- $(phpenv which phpize) &> /dev/null
104-
- ./configure --silent --with-php-config=$(phpenv which php-config) --enable-phalcon &> /dev/null
105-
- make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null
106-
- make --silent install
107-
- phpenv config-add $TRAVIS_BUILD_DIR/tests/_ci/phalcon.ini
108-
# We use this file as our custom PHP config
109-
- phpenv config-add $TRAVIS_BUILD_DIR/tests/_ci/ci.ini
110-
# Some debug info is located here
111-
- ls -al `$(phpenv which php-config) --extension-dir`
112-
- $(phpenv which php) -v
113-
- $(phpenv which php) -m
114-
- $(phpenv which php) --ri phalcon
78+
cd ext
79+
phpize
80+
./configure --with-php-config=$(phpenv which php-config) --enable-phalcon
81+
make -j"$(getconf _NPROCESSORS_ONLN)" > ../compile.log 2> ../compile-errors.log
82+
make install
83+
cd ..
84+
- phpenv config-add ./tests/_ci/phalcon.ini
85+
- phpenv config-add ./tests/_ci/ci.ini
11586

11687
before_script:
11788
- ulimit -c unlimited -S || true
118-
# Uncomment for debug purposes
119-
# - echo '/tmp/core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern &> /dev/null
120-
# attempt to workaroung "ptrace: Operation not permitted"
121-
# - sudo chmod +s $(which gdb)
89+
# see: https://github.com/sebastianbergmann/phpunit/pull/3359
90+
- '[[ "${PHP_VERNUM}" -lt 70300 ]] || export USE_ZEND_ALLOC=1'
12291

12392
script:
124-
- cd $TRAVIS_BUILD_DIR
12593
# To avoud this:
12694
# sh: 1: /home/travis/build/phalcon/cphalcon/libtool: not found
127-
- ln -s $TRAVIS_BUILD_DIR/ext/libtool $TRAVIS_BUILD_DIR/libtool
95+
- ln -s ${TRAVIS_BUILD_DIR}/ext/libtool ${TRAVIS_BUILD_DIR}/libtool
12896
# Syntax recognize tests
12997
- |
130-
$(phpenv which php) $TRAVIS_BUILD_DIR/ext/run-tests.php \
98+
$(phpenv which php) "${TRAVIS_BUILD_DIR}/ext/run-tests.php" \
13199
-p $(phpenv which php) \
132100
-g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" \
133101
--offline \
134102
--show-diff \
135103
--set-timeout 120
136-
# Run code style tests
137104
- vendor/bin/phpcs
138-
# Legacy unit tests
139105
# We'll drop or rewrite them for Phalcon 4.x
140-
- |
141-
if [ "${PHP_MAJOR}.${PHP_MINOR}" != "7.2" ] && [ "${PHP_MAJOR}.${PHP_MINOR}" != "7.3" ]; then
142-
vendor/bin/phpunit --bootstrap tests/_ci/phpunit.php --debug unit-tests/
143-
fi
106+
- '[[ "${PHP_VERNUM}" -lt 70200 ]] || vendor/bin/phpunit --bootstrap tests/_ci/phpunit.php unit-tests/'
144107
- vendor/bin/codecept build
145108
# TODO: Add `cli' suite and refactor current cli-tests
146109
- vendor/bin/codecept run -v -n tests/integration/
147110
- vendor/bin/codecept run -v -n tests/unit/
148-
# Legacy tests (PHP 5.x) only.
149-
# We'll drop them for Phalcon 4.x
150-
- |
151-
if [ "$PHP_MAJOR" == 5 ]; then
152-
phpenv config-rm xdebug.ini || true;
153-
vendor/bin/codecept run -v -n tests/unit5x/;
154-
fi
155111

156-
# Uncomment for debug purposes
157-
# after_failure:
158-
# - bash tests/_ci/after_failure.sh
112+
after_failure:
113+
- ./tests/_ci/after-failure.sh
159114

160115
notifications:
161-
# Stop spam me. I already live on Travis CI and GitHub
162-
email:
163-
on_success: never
164-
on_failure: never
116+
email: false
117+
165118

166-
addons:
167-
apt:
168-
packages:
169-
- beanstalkd
170-
# Uncomment for debug
171-
# - gdb

CHANGELOG-3.4.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# [3.4.2](https://github.com/phalcon/cphalcon/releases/tag/v3.4.2) (2018-12-02)
2+
- Added missing Volt tags to array helper in `Phalcon\Mvc\View\Engine\Volt\Compiler::functionCall` [#13447](https://github.com/phalcon/cphalcon/issues/13447)
3+
- Added the ability to explicitly define nullable columns (especially timestamp ones) [#13099](https://github.com/phalcon/cphalcon/issues/13099)
4+
- Refactored `Phalcon\Db\Adapter\Pdo::query` to use PDO's `prepare` and `execute` and `Phalcon\Db\Adapter::fetchAll` to use PDO's `fetchAll`
5+
- Fixed `Phalcon\Validation\Validator\Numericality` to accept float numbers on locales with comma decimal point [#13450](https://github.com/phalcon/cphalcon/issues/13450)
6+
- Fixed `Phalcon\Tag` so it unsets `parameters` before passing options array to `self::renderAttributes`
7+
- Fixed `Phalcon\Http\Response::setFileToSend` filename; when file downloaded it had an extra `_`
8+
- Fixed `Phalcon\Mvc\Model\Query::execute` to properly bind parameters to sub queries [#11605](https://github.com/phalcon/cphalcon/issues/11605)
9+
- Fixed `Phalcon\Http\Request::getJsonRawBody` [#13501](https://github.com/phalcon/cphalcon/issues/13501). It will now return false when the body content is empty, as well as when it encounters an error whilst decoding the JSON content
10+
- Fixed `Phalcon\Validation::preChecking` to allow use `Phalcon\Db\RawValue` as an empty container for `isAllowEmpty` option [#13549](https://github.com/phalcon/cphalcon/pull/13549), [#13573](https://github.com/phalcon/cphalcon/issues/13573), [#12519](https://github.com/phalcon/cphalcon/pull/12519)
11+
- Fixed object binding and placeholder creation in `Phalcon\Db\Adapter::insert` and `Phalcon\Db\Adapter::update` [#13058](https://github.com/phalcon/cphalcon/issues/13058)
12+
- Fixed `Phalcon\Config\Adapter\Ini` not building config objects properly for numerical keys [#12725](https://github.com/phalcon/cphalcon/issues/12725), [#13604](https://github.com/phalcon/cphalcon/issues/13604)
13+
- Fixed incorrect scope of view variables
14+
[#12176](https://github.com/phalcon/cphalcon/issues/12176),
15+
[#12385](https://github.com/phalcon/cphalcon/issues/12385),
16+
[#12648](https://github.com/phalcon/cphalcon/issues/12648),
17+
[#12705](https://github.com/phalcon/cphalcon/issues/12705),
18+
[#13288](https://github.com/phalcon/cphalcon/pull/13288)
19+
- Fixed `Phalcon\Config::_merge` not merging config with numeric properties properly [#13351](https://github.com/phalcon/cphalcon/issues/13351).
20+
121
# [3.4.1](https://github.com/phalcon/cphalcon/releases/tag/v3.4.1) (2018-08-04)
222
- Changed `Phalcon\Cache\Backend\Redis` to support connection timeout parameter
323
- Fixed `Phalcon\Validaiton\Validator\Uniqueness::isUniquenessModel` to properly get value of primary key when it has different name in column map [#13398](https://github.com/phalcon/cphalcon/issues/13398)

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)