Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  8 Oct 2012 23:26:30 +0800 (CST)
From:      Gasol Wu <gasol.wu@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172491: [NEW PORT] devel/pecl-test_helpers: An extension to ease testing of PHP code
Message-ID:  <20121008152630.0A6F6747052@goingmarry.kkbox.com>
Resent-Message-ID: <201210081540.q98FeCKc068476@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172491
>Category:       ports
>Synopsis:       [NEW PORT] devel/pecl-test_helpers: An extension to ease testing of PHP code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 15:40:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Gasol Wu
>Release:        FreeBSD 9.1-RC1 amd64
>Organization:
>Environment:
System: FreeBSD goingmarry 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 UTC 2012
>Description:

- patch based on https://github.com/sebastianbergmann/php-test-helpers/pull/16
- Add notes for combination with other extensions

test_helpers is an extension for the PHP Interpreter to ease testing of
PHP code.

WWW: https://github.com/sebastianbergmann/php-test-helpers

Generated with FreeBSD Port Tools 0.99_6 (mode: new)
>How-To-Repeat:
>Fix:

--- .shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pecl-test_helpers
#	pecl-test_helpers/pkg-descr
#	pecl-test_helpers/Makefile
#	pecl-test_helpers/distinfo
#	pecl-test_helpers/files
#	pecl-test_helpers/files/pkg-message.in
#	pecl-test_helpers/files/patch-test_helpers.c
#
echo c - pecl-test_helpers
mkdir -p pecl-test_helpers > /dev/null 2>&1
echo x - pecl-test_helpers/pkg-descr
sed 's/^X//' >pecl-test_helpers/pkg-descr << '71ae18bc0471a94e4ff9aca960196657'
Xtest_helpers is an extension for the PHP Interpreter to ease testing of
XPHP code.
X
XWWW: https://github.com/sebastianbergmann/php-test-helpers
71ae18bc0471a94e4ff9aca960196657
echo x - pecl-test_helpers/Makefile
sed 's/^X//' >pecl-test_helpers/Makefile << '7b587f09c9aa5f15c8bc5d12732959ae'
X# Created by: Gasol Wu <gasol.wu@gmail.com>
X# $FreeBSD$
X
XPORTNAME=	test_helpers
XPORTVERSION=	1.1.0
XCATEGORIES=	devel pear
XMASTER_SITES=	http://pear.phpunit.de/get/
XPKGNAMEPREFIX=	pecl-
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	gasol.wu@gmail.com
XCOMMENT=	An extension to ease testing of PHP code
X
XCONFIGURE_ARGS=	--enable-test-helpers
XUSE_PHP=	yes
XUSE_PHPEXT=	yes
XUSE_PHPIZE=	yes
XSUB_FILES=	pkg-message
X
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
7b587f09c9aa5f15c8bc5d12732959ae
echo x - pecl-test_helpers/distinfo
sed 's/^X//' >pecl-test_helpers/distinfo << '24dbb8f2a60c1115986ede3bef64b383'
XSHA256 (test_helpers-1.1.0.tgz) = 4fc53f6b8b7881dc3fbcfdaa08428dab59caf2e22c8df588eb5182055d095c6d
XSIZE (test_helpers-1.1.0.tgz) = 10370
24dbb8f2a60c1115986ede3bef64b383
echo c - pecl-test_helpers/files
mkdir -p pecl-test_helpers/files > /dev/null 2>&1
echo x - pecl-test_helpers/files/pkg-message.in
sed 's/^X//' >pecl-test_helpers/files/pkg-message.in << '3f0facb48a3f80c4de2dce10caf4455b'
X*****************************************************************************
XThe php extension 'test_helpers' has been installed successful.
XAdd a line containing
X
X	extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/test_helpers.so
X
Xor
X
X	zend_extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/test_helpers.so
X
XIf this extension is used in combination with other extensions, such as Xdebug,
Xwhich are also overloading the `ZEND_NEW` opcode you have to load it as 
X`zend_extension` after loading the conflicting extension. This can be done in 
Xyour `php.ini` like this:
X
X    zend_extension=xdebug.so
X    zend_extension=test-helpers.so
X
XPlease refer to `phpinfo()` to verify whether a conflict was detected and 
Xwhether the work-around was enabled.
X
X*****************************************************************************
3f0facb48a3f80c4de2dce10caf4455b
echo x - pecl-test_helpers/files/patch-test_helpers.c
sed 's/^X//' >pecl-test_helpers/files/patch-test_helpers.c << 'e1b322f2cdc0072bdff3769ce48dc39d'
X--- ./test_helpers.c.orig	2010-10-25 15:05:08.000000000 +0800
X+++ ./test_helpers.c	2012-10-08 17:41:40.355030000 +0800
X@@ -102,14 +102,30 @@
X 	case IS_CONST:
X 		return &(node->u.constant);
X 	case IS_VAR:
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+		return EX_T(node->u.op.var).var.ptr;
X+#else
X 		return EX_T(node->u.var).var.ptr;
X+#endif
X 	case IS_TMP_VAR:
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+		return (*freeval = &EX_T(node->u.op.var).tmp_var);
X+#else
X 		return (*freeval = &EX_T(node->u.var).tmp_var);
X+#endif
X 	case IS_CV:
X 		{
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+		zval ***ret = &execute_data->CVs[node->u.op.var];
X+#else
X 		zval ***ret = &execute_data->CVs[node->u.var];
X+#endif
X 		if (!*ret) {
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+				zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.op.var];
X+#else
X 				zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.var];
X+#endif
X 				if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void**)ret)==FAILURE) {
X 					zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
X 					return &EG(uninitialized_zval);
X@@ -165,7 +181,11 @@
X 		}
X 	}
X 
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+	old_ce = EX_T(opline->op1.var).class_entry;
X+#else
X 	old_ce = EX_T(opline->op1.u.var).class_entry;
X+#endif
X 
X 	MAKE_STD_ZVAL(arg);
X 	ZVAL_STRINGL(arg, old_ce->name, old_ce->name_length, 1);
X@@ -189,7 +209,11 @@
X 	zval_ptr_dtor(&retval);
X 
X 
X+#if ZEND_EXTENSION_API_NO >= 220100525
X+	EX_T(opline->op1.var).class_entry = *new_ce;
X+#else
X 	EX_T(opline->op1.u.var).class_entry = *new_ce;
X+#endif
X 
X 	if (old_new_handler) {
X 		return old_new_handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
e1b322f2cdc0072bdff3769ce48dc39d
exit
--- .shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121008152630.0A6F6747052>