Skip to content

Commit

Permalink
Add php 7.4 and nightly to travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
L3o-pold committed Nov 23, 2020
1 parent c672464 commit ca365b3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
27 changes: 18 additions & 9 deletions .travis.yml
@@ -1,18 +1,27 @@
sudo: false
language: php

dist: bionic
php:
- 7.1
- 7.2
- 7.3

- 7.4
- nightly
sudo: false
matrix:
fast_finish: true
env:
- REPORT_EXIT_STATUS=1 NO_INTERACTION=1
addons:
apt:
packages:
- libmcrypt-dev
update: true

before_script:
- phpize && ./configure && make

script:
- make test REPORT_EXIT_STATUS=1 NO_INTERACTION=1 TESTS="--show-all"
install:
- phpize
- ./configure
- make
script: TEST_PHP_EXECUTABLE=$(which php) php -n
-d open_basedir= -d output_buffering=0 -d memory_limit=-1
run-tests.php -n
-d extension_dir=modules -d extension=mcrypt.so --show-diff
tests
20 changes: 10 additions & 10 deletions mcrypt.c
Expand Up @@ -629,7 +629,7 @@ PHP_FUNCTION(mcrypt_generic)

if (data_len == 0) {
php_error_docref(NULL, E_WARNING, "An empty string was passed");
RETURN_FALSE
RETURN_FALSE;
}

if (data_len > INT_MAX) {
Expand Down Expand Up @@ -683,7 +683,7 @@ PHP_FUNCTION(mdecrypt_generic)

if (data_len == 0) {
php_error_docref(NULL, E_WARNING, "An empty string was passed");
RETURN_FALSE
RETURN_FALSE;
}

/* Check blocksize */
Expand Down Expand Up @@ -762,10 +762,10 @@ PHP_FUNCTION(mcrypt_generic_deinit)

if (mcrypt_generic_deinit(pm->td) < 0) {
php_error_docref(NULL, E_WARNING, "Could not terminate encryption specifier");
RETURN_FALSE
RETURN_FALSE;
}
pm->init = 0;
RETURN_TRUE
RETURN_TRUE;
}
/* }}} */

Expand All @@ -776,9 +776,9 @@ PHP_FUNCTION(mcrypt_enc_is_block_algorithm_mode)
MCRYPT_GET_TD_ARG

if (mcrypt_enc_is_block_algorithm_mode(pm->td) == 1) {
RETURN_TRUE
RETURN_TRUE;
} else {
RETURN_FALSE
RETURN_FALSE;
}
}
/* }}} */
Expand All @@ -790,9 +790,9 @@ PHP_FUNCTION(mcrypt_enc_is_block_algorithm)
MCRYPT_GET_TD_ARG

if (mcrypt_enc_is_block_algorithm(pm->td) == 1) {
RETURN_TRUE
RETURN_TRUE;
} else {
RETURN_FALSE
RETURN_FALSE;
}
}
/* }}} */
Expand All @@ -804,9 +804,9 @@ PHP_FUNCTION(mcrypt_enc_is_block_mode)
MCRYPT_GET_TD_ARG

if (mcrypt_enc_is_block_mode(pm->td) == 1) {
RETURN_TRUE
RETURN_TRUE;
} else {
RETURN_FALSE
RETURN_FALSE;
}
}
/* }}} */
Expand Down

0 comments on commit ca365b3

Please sign in to comment.