Fast php framework written in c, built in php extension

Overview

Yaf - Yet Another Framework

Build Status Build status Build Status

PHP framework written in c and built as a PHP extension.

Requirement

Install

Install Yaf

Yaf is a PECL extension, thus you can simply install it by:

$pecl install yaf

Compile Yaf in Linux

$/path/to/phpize
$./configure --with-php-config=/path/to/php-config
$make && make install

Document

Yaf manual could be found at: http://www.php.net/manual/en/book.yaf.php

IRC

efnet.org #php.yaf

For IDE

You could find a documented prototype script here: https://github.com/elad-yosifon/php-yaf-doc

Tutorial

layout

A classic application directory layout:

- .htaccess // Rewrite rules
+ public
  | - index.php // Application entry
  | + css
  | + js
  | + img
+ conf
  | - application.ini // Configure 
- application/
  - Bootstrap.php   // Bootstrap
  + controllers
     - Index.php // Default controller
  + views    
     |+ index   
        - index.phtml // View template for default controller
  + library // libraries
  + models  // Models
  + plugins // Plugins

DocumentRoot

You should set DocumentRoot to application/public, thus only the public folder can be accessed by user

index.php

index.php in the public directory is the only way in of the application, you should rewrite all request to it(you can use .htaccess in Apache+php mod)

<?php
define("APPLICATION_PATH",  dirname(dirname(__FILE__)));

$app  = new Yaf_Application(APPLICATION_PATH . "/conf/application.ini");
$app->bootstrap() //call bootstrap methods defined in Bootstrap.php
    ->run();

Rewrite rules

Apache

#.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php

Nginx

server {
  listen ****;
  server_name  domain.com;
  root   document_root;
  index  index.php index.html index.htm;
 
  if (!-e $request_filename) {
    rewrite ^/(.*)  /index.php/$1 last;
  }
}

Lighttpd

$HTTP["host"] =~ "(www.)?domain.com$" {
  url.rewrite = (
     "^/(.+)/?$"  => "/index.php/$1",
  )
}

application.ini

application.ini is the application config file

[product]
;CONSTANTS is supported
application.directory = APPLICATION_PATH "/application/" 

Alternatively, you can use a PHP array instead:

<?php
$config = array(
   "application" => array(
       "directory" => application_path . "/application/",
    ),
);

$app  = new yaf_application($config);
....
  

default controller

In Yaf, the default controller is named IndexController:

<?php
class IndexController extends Yaf_Controller_Abstract {
   // default action name
   public function indexAction() {  
        $this->getView()->content = "Hello World";
   }
}
?>

view script

The view script for default controller and default action is in the application/views/index/index.phtml, Yaf provides a simple view engine called "Yaf_View_Simple", which support the view template written in PHP.

<html>
 <head>
   <title>Hello World</title>
 </head>
 <body>
   <?php echo $content; ?>
 </body>
</html>

Run the Application

http://www.yourhostname.com/

Alternative

You can generate the example above by using Yaf Code Generator: https://github.com/laruence/php-yaf/tree/master/tools/cg

./yaf_cg -d output_directory [-a application_name] [--namespace]

More

More info could be found at Yaf Manual: http://www.php.net/manual/en/book.yaf.php

Comments
  • Yaf_Action_Abstract子类的execute方法中 new 非基类对象会导致sigsegv错误

    Yaf_Action_Abstract子类的execute方法中 new 非基类对象会导致sigsegv错误

    macos 11.2 php 8.0.2 yaf 3.3.1-dev

    测试代码如下

    controller文件 image

    actions/test/TestSeprate.php image

    PayService定义 image 当X类定义在单独的文件中会出现fpm进程sigsegv错误,X类和PayService类定义在一个文件就没问题

    Feedback 
    opened by devforma 19
  • php8.0好像不支持

    php8.0好像不支持

    加上扩展就报警告 PHP Warning: Missing arginfo for Yaf_Dispatcher::__construct() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Request_Http::__construct() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Request_Simple::__construct() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Request_Simple::isXmlHttpRequest() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Response_Abstract::__toString() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Action_Abstract::execute() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Action_Abstract::getController() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Action_Abstract::getControllerName() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Router::addRoute() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Router::addConfig() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Router::route() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Registry::__construct() in Unknown on line 0 PHP Warning: Missing arginfo for Yaf_Session::__construct() in Unknown on line 0

    opened by cqzhangyunhua 16
  • how to create urls in yaf ?

    how to create urls in yaf ?

    需要在应用的各个地方,比如功能简单到只返回301/302跳转url的控制器、比如视图中要输出url渲染为页面链接……生成和路由协议匹配的url

    看文档,发现好像需要调用 _.get_Path 然后手工添加余下部分(比如user params)。

    通常场景下,这很直接方便,毕竟一个项目通常开始就确定了路由协议的, 但是我这里路由协议经常是随着项目变化而不同的, 手工添加余下部分在前一个项目是用querystring格式, 而后一个若是rewrite的话就代码完全无法复用……

    所以请问鸟哥是否有官方的方法能生成随着路由协议不同而结果不同的url?

    方法只依赖架构,举个拙例:

    function createUrl( params=array() , action_name="." , controller_name='.' , action_name="." , module_name='../parent_module_name' ) { }

    这个函数的结果随着路由协议不同而生成不同url(querystring或者rewrite形式……)。

    P.S

    url的显示是业务依赖的(经常不受开发人员控制,比如中小网站有个职位叫seo manager, 直接掌握任何页面的url形式,不容商量),

    而代码逻辑是架构依赖(控制器、动作,这个是完全在开发人员手中, 甚至控制器、动作名可用rewrite来实现别名而摆脱URL形式对架构的染指)的, 这个createUrl的初衷将业务和架构彼此分开,并考虑到默认情况(比如默认为当前action,用“.”来标识, 控制器、模块类似……)。

    ../parent_module_name 这个是多层模块的情况(复杂或者繁琐,这里只是举例)下, 在子模块中返回父模块url的情况(不关心当前路由链的绝对路径的场景,类似shell的 cd .. 命令)……

    当然我说的场景都是繁杂的情况,可能不符合yaf的哲学,献丑了。

    opened by openalmeida 15
  • addRoute 导致502

    addRoute 导致502

    开发环境: OS:MAC 10.13.6 PHP:集成环境 MAMP ,php7.4.2 Yaf:3.3.1

    bug:当在Bootstrap加入自定义路由,则影响部份控制器无法访问

    test: $router->addRoute加入自定义路由, 则/role,/main 都不可以访问,直接502;但/tests 可以访问,去掉addRoute 则都可以访问

    demo: https://github.com/Sgenmi/yaf-debug

    注:1. V3.0.9 之后大部份版本存在这个问题,现在一直停在3.0.9 2. Centos环境下运行正常,无此bug, 此bug暂只发现在mac下

    Feedback 
    opened by Sgenmi 14
  • PHP7 64 位 + Yaf 3.0.0 出现 php-cgi.exe 崩溃!

    PHP7 64 位 + Yaf 3.0.0 出现 php-cgi.exe 崩溃!

    php_yaf.dll 能正常加载,但是一访问 yaf 应用,php-cgi.exe 马上崩溃掉,求排错的方法~ nginx 留下的错误信息无从下手,php 和 yaf 全部都是从 php 网站下载的也一样直接崩溃!

    [error] 2900#2948: *39 WSARecv() failed (10054: An existing connection was forcibly closed by the remote host) while reading response header from upstream

    opened by logig 13
  • windows下编译php7 nts x64版的时候报错请问如何处理- -

    windows下编译php7 nts x64版的时候报错请问如何处理- -

    f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_application.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_controller.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_action.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_config.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_exception.c) ..\pecl\yaf-php7\yaf_exception.c(42): warning C4267: “=”: 从“size_t”转换到“uint”,可能丢失数据 f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_dispatcher.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_bootstrap.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf.c) ..\pecl\yaf-php7\yaf_application.c(324): error C2059: 语法错误:“(” ..\pecl\yaf-php7\yaf_application.c(324): error C2275: “zval”: 将此类型用作表达式非法 f:\php-sdk\phpdev\vc14\x64\php-source-directory\zend\zend_types.h(84): note: 参见“zval”的声明 ..\pecl\yaf-php7\yaf_application.c(324): error C2275: “zend_string”: 将此类型用作表达式非法 f:\php-sdk\phpdev\vc14\x64\php-source-directory\zend\zend_types.h(87): note: 参见“zend_string”的声明 ..\pecl\yaf-php7\yaf_application.c(324): error C2100: 非法的间接寻址 ..\pecl\yaf-php7\yaf.c(77): error C2059: 语法错误:“(” ..\pecl\yaf-php7\yaf_application.c(324): error C2224: “.value”的左侧必须具有结构/联合类型 ..\pecl\yaf-php7\yaf.c(78): error C2059: 语法错误:“,” ..\pecl\yaf-php7\yaf_application.c(324): error C2065: “__s”: 未声明的标识符 ..\pecl\yaf-php7\yaf_dispatcher.c(450): warning C4267: “=”: 从“size_t”转换到“uint”,可能丢失数据 ..\pecl\yaf-php7\yaf.c(79): error C2059: 语法错误:“}” ..\pecl\yaf-php7\yaf_application.c(324): error C2065: “__z”: 未声明的标识符 ..\pecl\yaf-php7\yaf.c(84): error C2143: 语法错误: 缺少“)”(在“”的前面) ..\pecl\yaf-php7\yaf_dispatcher.c(452): warning C4267: “=”: 从“size_t”转换到“uint”,可能丢失数据 ..\pecl\yaf-php7\yaf.c(84): error C2143: 语法错误: 缺少“{”(在“”的前面) ..\pecl\yaf-php7\yaf_application.c(324): error C2224: “.u1”的左侧必须具有结构/联合类型 ..\pecl\yaf-php7\yaf.c(84): error C2059: 语法错误:“)” ..\pecl\yaf-php7\yaf.c(85): error C2373: “yaf_globals”: 重定义;不同的类型修饰符 ..\pecl\yaf-php7\yaf.c(46): note: 参见“yaf_globals”的声明..\pecl\yaf-php7\yaf_application.c(385): error C2059: 语法错 误:“(”

    ..\pecl\yaf-php7\yaf.c(85): error C2054: 在“yaf_globals”之后应输入“(” yaf_loader.c yaf_plugin.c ..\pecl\yaf-php7\yaf.c(99): error C2059: 语法错误:“(” ..\pecl\yaf-php7\yaf.c(114): error C2059: 语法错误:“(” ..\pecl\yaf-php7\yaf_controller.c(476): warning C4267: “函数”: 从“size_t”转换到“int”,可能丢失数据 ..\pecl\yaf-php7\yaf_controller.c(492): warning C4267: “函数”: 从“size_t”转换到“int”,可能丢失数据 ..\pecl\yaf-php7\yaf.c(294): error C2065: “zm_globals_ctor_yaf”: 未声明的标识符 ..\pecl\yaf-php7\yaf_controller.c(512): warning C4267: “函数”: 从“size_t”转换到“int”,可能丢失数据 ..\pecl\yaf-php7\yaf.c(294): warning C4312: “类型转换”: 从“int”转换到更大的“void (__cdecl *)(void *)” ..\pecl\yaf-php7\yaf.c(298): error C2099: 初始值设定项不是常量 ..\pecl\yaf-php7\yaf.c(298): warning C4047: “初始化”:“unsigned char”与“void *”的间接级别不同 ..\pecl\yaf-php7\yaf.c(298): warning C4047: “初始化”:“int”与“char [21]”的间接级别不同 ..\pecl\yaf-php7\yaf_application.c(686): error C2059: 语法错误:“(” yaf_registry.c yaf_request.c yaf_response.c yaf_router.c yaf_session.c yaf_view.c f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_loader.c) ..\pecl\yaf-php7\yaf_loader.c(119): warning C4267: “初始化”: 从“size_t”转换到“uint”,可能丢失数据 f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_registry.c) ..\pecl\yaf-php7\yaf_loader.c(155): warning C4244: “=”: 从“__int64”转换到“uint”,可能丢失数据 ..\pecl\yaf-php7\yaf_loader.c(161): warning C4244: “=”: 从“__int64”转换到“uint”,可能丢失数据 ..\pecl\yaf-php7\yaf_loader.c(332): warning C4267: “函数”: 从“size_t”转换到“int”,可能丢失数据 ..\pecl\yaf-php7\yaf_loader.c(505): warning C4267: “函数”: 从“size_t”转换到“int”,可能丢失数据 f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_plugin.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_request.c) ..\pecl\yaf-php7\yaf_request.c(334): warning C4244: “=”: 从“__int64”转换到“uint”,可能丢失数据 ..\pecl\yaf-php7\yaf_request.c(340): warning C4267: “=”: 从“size_t”转换到“uint”,可能丢失数据 f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_response.c) ..\pecl\yaf-php7\yaf_request.c(328): warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据 f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_router.c) f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_session.c) ..\pecl\yaf-php7\yaf_response.c(336): warning C4267: “函数”: 从“size_t”转换到“int”,可能丢失数据 ..\pecl\yaf-php7\yaf_router.c(86): warning C4244: “=”: 从“zend_ulong”转换到“ulong”,可能丢失数据 ..\pecl\yaf-php7\yaf_router.c(122): warning C4244: “=”: 从“zend_ulong”转换到“ulong”,可能丢失数据 ..\pecl\yaf-php7\yaf_router.c(160): warning C4267: “=”: 从“size_t”转换到“uint”,可能丢失数据 ..\pecl\yaf-php7\yaf_session.c(293): warning C4133: “函数”: 从“ulong *”到“zend_ulong *”的类型不兼容 f:\php-sdk\phpdev\vc14\x64\pecl\yaf-php7\php_yaf.h(84): error C2032: “__p__environ”: 函数不能是 struct“_zend_yaf_globals” 的成员 (编译源文件 ..\pecl\yaf-php7\yaf_view.c) NMAKE : fatal error U1077: “"E:\Program Files\VS2015\VC\BIN\amd64\cl.exe"”: 返回代码“0x2” Stop.

    opened by magicdragoon 13
  • Update yaf_controller.c

    Update yaf_controller.c

    比对了一下display 和 render ,让这哥俩更像一点

    ---------------------------以下只是问一下,没有改动-----------------------------

    没学过c, 不是很明白那个

    zend_read_property(yaf_controller_ce, instance, ZEND_STRL(YAF_CONTROLLER_PROPERTY_NAME_VIEW), 1 TSRMLS_CC);

    参数 1和0 的区别

    opened by lilj 13
  • URL arguments will not work if there is less than 2.

    URL arguments will not work if there is less than 2.

    I'm not sure if this is a bug, or by design. If it is by design, would you mind a quick explanation why it is designed that way? Thanks!

    If you want to create a route that uses the first argument as the action, you must also have a second argument.

    This will work: $config = array( "name" => array( "type" => "rewrite",
    "match" => "/user-list/:a/:id", //match only /user-list/* "route" => array( 'controller' => "user", //route to user controller, 'action' => ":a", //route to :a action ), ), );

    However, This will result in "no :aAction found" error.

    $config = array( "name" => array( "type" => "rewrite",
    "match" => "/user-list/:a", //match only /user-list/* "route" => array( 'controller' => "user", //route to user controller, 'action' => ":a", //route to :a action ), ), );

    Why is the second ":id" argument required? Or is this a bug?

    p.s. I emailed quickly with Laruence about this. but it's probably better to discuss it here...

    opened by undeadindustries 13
  • Segmentation fault情况

    Segmentation fault情况

    在服务器dmesg中查到大量报错如下:

    [8465402.373110] php5-fpm[2329]: segfault at 10181592f ip 00007f0f0f6709c6 sp 00007fff16283638 error 4 in libc-2.15.so[7f0f0f527000+1b5000] [8465404.455885] php5-fpm[2367]: segfault at 2ca1000 ip 00007fe3d2e638c4 sp 00007fff96861268 error 6 in libc-2.15.so[7fe3d2d1a000+1b5000] [8465405.006887] php5-fpm[2083]: segfault at 101870f87 ip 00007f1765c5e9c6 sp 00007fffd6a33498 error 4 in libc-2.15.so[7f1765b15000+1b5000] [8465409.078165] php5-fpm[2423]: segfault at 5823000 ip 00007f98690618d3 sp 00007fff8191eb68 error 6 in libc-2.15.so[7f9868f18000+1b5000] [8465420.685318] php5-fpm[2365]: segfault at 1027d5a7f ip 00007fe3d2e639c6 sp 00007fff96861268 error 4 in libc-2.15.so[7fe3d2d1a000+1b5000] [8465425.057961] php5-fpm[2501]: segfault at 101a61a8f ip 00007f1765c5e9c6 sp 00007fffd6a33498 error 4 in libc-2.15.so[7f1765b15000+1b5000] [8465425.703124] php5-fpm[2402]: segfault at 1dbe000 ip 00007f98690618d8 sp 00007fff8191eb68 error 6 in libc-2.15.so[7f9868f18000+1b5000] [8465445.054118] php5-fpm[2050]: segfault at 585b000 ip 00007f98690618d8 sp 00007fff8191eb68 error 6 in libc-2.15.so[7f9868f18000+1b5000] [8465470.522951] php5-fpm[2328]: segfault at 1024d6fff ip 00007fe3d2e639c6 sp 00007fff96861268 error 4 in libc-2.15.so[7fe3d2d1a000+1b5000] [8465486.467350] php5-fpm[1897]: segfault at 1017a896f ip 00007f0f0f6709c6 sp 00007fff16283638 error 4 in libc-2.15.so[7f0f0f527000+1b5000]

    获取core后跟踪到以下信息:

    warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `php-fpm: pool www-9006 '. Program terminated with signal 11, Segmentation fault. #0 0x00007f44602fe8dd in ?? () from /lib/x86_64-linux-gnu/libc.so.6

    (gdb) bt #0 0x00007f44602fe8dd in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x000000000067c2e6 in _estrndup () #2 0x00007f4455900235 in yaf_application_parse_option (options=) at /tmp/pear/temp/yaf/yaf_application.c:143 #3 zim_yaf_application___construct (ht=, return_value=0x1f3e930, return_value_ptr=, this_ptr=0x1f3b578, return_value_used=)

    at /tmp/pear/temp/yaf/yaf_application.c:358
    

    #4 0x000000000070f05d in ?? () #5 0x00000000006bfbcb in execute () #6 0x000000000069b130 in zend_execute_scripts () #7 0x00000000006477a3 in php_execute_script () #8 0x000000000042b895 in ?? () #9 0x00007f44601d676d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #10 0x000000000042c0f5 in _start ()

    我自己本地没重现到这个Segmentation fault,不知道是什么原因,求助 =。=

    yaf版本是 2.2.9

    opened by skaic 13
  • Error in pecl upgrade to get the newest stable yaf (2.3.4)

    Error in pecl upgrade to get the newest stable yaf (2.3.4)

    on OSX 10.9.2, when running: sudo pecl upgrade I get this error: config.status: creating config.h running: make /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf.c -o yaf.lo mkdir .libs cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf.c -fno-common -DPIC -o .libs/yaf.o /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_application.c -o yaf_application.lo cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_application.c -fno-common -DPIC -o .libs/yaf_application.o /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_bootstrap.c -o yaf_bootstrap.lo cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_bootstrap.c -fno-common -DPIC -o .libs/yaf_bootstrap.o /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_dispatcher.c -o yaf_dispatcher.lo cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_dispatcher.c -fno-common -DPIC -o .libs/yaf_dispatcher.o /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_exception.c -o yaf_exception.lo cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_exception.c -fno-common -DPIC -o .libs/yaf_exception.o /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_config.c -o yaf_config.lo cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/yaf_config.c -fno-common -DPIC -o .libs/yaf_config.o /bin/sh /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/yaf -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/include -I/private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/main -I/private/tmp/pear/temp/yaf -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/yaf/configs/yaf_config_ini.c -o configs/yaf_config_ini.lo /private/tmp/pear/temp/pear-build-rootjind1l/yaf-2.3.4/libtool: line 1280: configs/yaf_config_ini.loT: No such file or directory mkdir configs/.libs mkdir: configs: No such file or directory make: *** [configs/yaf_config_ini.lo] Error 1 ERROR: `make' failed

    bug question 
    opened by undeadindustries 12
  • yaf下module层路由失败的问题

    yaf下module层路由失败的问题

    yaf_Application不释放的情况下,第一次请求访问"域名/module/controller/action"可以正常返回,第二次访问请求访问"域名/controller/action"的时候还是返回第一次请求的"域名/module/controller/action"的结果,前后两次请求的controller和action一致,使用Dispatcher的dispatch()函数重新分发请求,第二次虽然dispatcher内的属性变了,但是请求返回的结果依旧是第一次请求的结果,请问这是什么原因导致的?是我哪个地方使用的不对吗?

    opened by vvvva110 11
  • PHP8.2下 安装yaf-3.3.5报错

    PHP8.2下 安装yaf-3.3.5报错

    libtool: compile: cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/responses/yaf_response_cli.c -MMD -MF responses/yaf_response_cli.dep -MT responses/yaf_response_cli.lo -fPIC -DPIC -o responses/.libs/yaf_response_cli.o /bin/bash /tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/yaf_view.c -o yaf_view.lo -MMD -MF yaf_view.dep -MT yaf_view.lo libtool: compile: cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/yaf_view.c -MMD -MF yaf_view.dep -MT yaf_view.lo -fPIC -DPIC -o .libs/yaf_view.o /bin/bash /tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/views/yaf_view_interface.c -o views/yaf_view_interface.lo -MMD -MF views/yaf_view_interface.dep -MT views/yaf_view_interface.lo libtool: compile: cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/views/yaf_view_interface.c -MMD -MF views/yaf_view_interface.dep -MT views/yaf_view_interface.lo -fPIC -DPIC -o views/.libs/yaf_view_interface.o /bin/bash /tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/views/yaf_view_simple.c -o views/yaf_view_simple.lo -MMD -MF views/yaf_view_simple.dep -MT views/yaf_view_simple.lo libtool: compile: cc -I. -I/tmp/pear/temp/yaf -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/include -I/tmp/pear/temp/pear-build-defaultuser9Kt7Qo/yaf-3.3.5/main -I/tmp/pear/temp/yaf -I/usr/include/php/20220829 -I/usr/include/php/20220829/main -I/usr/include/php/20220829/TSRM -I/usr/include/php/20220829/Zend -I/usr/include/php/20220829/ext -I/usr/include/php/20220829/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/yaf/views/yaf_view_simple.c -MMD -MF views/yaf_view_simple.dep -MT views/yaf_view_simple.lo -fPIC -DPIC -o views/.libs/yaf_view_simple.o /tmp/pear/temp/yaf/views/yaf_view_simple.c: In function 'yaf_view_simple_eval': /tmp/pear/temp/yaf/views/yaf_view_simple.c:392:20: error: too few arguments to function 'zend_compile_string' 392 | op_array = zend_compile_string(Z_STR(phtml), eval_desc); | ^~~~~~~~~~~~~~~~~~~ make: *** [Makefile:257: views/yaf_view_simple.lo] Error 1 ERROR:make' failed `

    opened by letwang 0
  • Fix PHP 8.2 compatibility

    Fix PHP 8.2 compatibility

    This proposal allow dynamic properties on some classes, as used in test suite

    Perhaps this is needed for some other classes Perhaps you will prefer to not allow them, so fix tests, of explicitly declare used properties.

    Test suite passes:

    =====================================================================
    PHP         : /opt/remi/php82/root/usr/bin/php 
    PHP_SAPI    : cli
    PHP_VERSION : 8.2.0RC2
    ZEND_VERSION: 4.2.0RC2
    PHP_OS      : Linux - Linux builder.remirepo.net 5.19.8-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 8 19:23:03 UTC 2022 x86_64
    INI actual  : /work/GIT/pecl-and-ext/yaf/tmp-php.ini
    More .INIs  :  
    ---------------------------------------------------------------------
    PHP         : /opt/remi/php82/root/usr/bin/php-cgi 
    PHP_SAPI    : cgi-fcgi
    PHP_VERSION : 8.2.0RC2
    ZEND_VERSION: 4.2.0RC2
    PHP_OS      : Linux - Linux builder.remirepo.net 5.19.8-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 8 19:23:03 UTC 2022 x86_64
    INI actual  : /work/GIT/pecl-and-ext/yaf/tmp-php.ini
    More .INIs  : 
    --------------------------------------------------------------------- 
    CWD         : /work/GIT/pecl-and-ext/yaf
    Extra dirs  : 
    VALGRIND    : Not used
    =====================================================================
    TIME START 2022-09-19 09:46:53
    =====================================================================
    PASS Check for yaf presence [tests/001.phpt] 
    PASS Check for Yaf_Request_Simple [tests/002.phpt] 
    PASS Check for Yaf_Loader local names [tests/003.phpt] 
    PASS Check for Yaf_Registry APIs [tests/004.phpt] 
    PASS Check for Yaf_Response_Cli APIs [tests/005.phpt] 
    PASS Check for Yaf_Route_Static routing [tests/006.phpt] 
    PASS Check for Yaf_Config_Simple APIs [tests/007.phpt] 
    PASS Check for Yaf_Router basic usages [tests/008.phpt] 
    PASS Check for Yaf_View_Simple basic usages [tests/009.phpt] 
    PASS Check for Yaf_Config_Ini basic usages [tests/010.phpt] 
    PASS Check for Yaf_Route_Rewrite routing [tests/011.phpt] 
    PASS Check for Yaf_Route_Regex [tests/012.phpt] 
    PASS Check for Yaf_Router and Config Routes [tests/013.phpt] 
    PASS Check for Yaf_Application [tests/014.phpt] 
    PASS Check for Yaf_Exception [tests/015.phpt] 
    PASS Check for Yaf_Session [tests/016.phpt] 
    PASS Bug (mem leak and crash in Yaf_Config_Ini) [tests/017.phpt] 
    PASS Bug Yaf_Config_Ini crash due to inaccurate refcount [tests/018.phpt] 
    PASS Yaf_Router::getCurrent with number key [tests/019.phpt] 
    PASS Check for Yaf_Application errors variables [tests/020.phpt] 
    PASS Check for Yaf_Application error handler [tests/021.phpt] 
    PASS Check for Yaf_Application::get/setAppDirectory [tests/022.phpt] 
    PASS Check for Yaf_Loader::set/get(library_path) [tests/023.phpt] 
    PASS Check for Yaf_Loader::getInstace() paramters [tests/024.phpt] 
    PASS Check for Yaf_Loader with namespace configuration [tests/025.phpt] 
    PASS Check for Yaf_Response::setBody/prependBody/appendBody [tests/026.phpt] 
    PASS Check for Yaf autoload controller [tests/027.phpt] 
    SKIP Bug segfault while call exit in a view template [tests/028.phpt] 
    PASS Check for Yaf_View_Simple::get and clear [tests/029.phpt] 
    PASS Check for Yaf_Config_Ini::__construct with section [tests/030.phpt] 
    PASS Check for application.dispatcher.defaultRoute [tests/031.phpt] 
    PASS Check for Yaf_Config_Ini with env [tests/032.phpt] 
    PASS Check for Yaf_View_Simple with predefined template dir [tests/033.phpt] 
    PASS Check for Yaf_View_Simple::eval [tests/034.phpt] 
    SKIP Check for Yaf_View_Simple with short_tag_open [tests/035.phpt] reason: PHP 5.4 remove short_open_tag
    PASS Check for Yaf_Route_Static with arbitrary urls [tests/036.phpt] 
    PASS Check for Yaf_Loader and open_basedir [tests/037.phpt] 
    PASS Check for Yaf_View_Simple error message outputing [tests/038.phpt] 
    PASS Check for Yaf_View_Simple recursive render error message outputing [tests/039.phpt] 
    PASS Fixed bug that segv in Yaf_View_Simple::render if the tpl is not a string [tests/040.phpt] 
    PASS Check for controller return false preventing auto-renderring [tests/041.phpt] 
    PASS Check for throw exception in Yaf_Controller::init [tests/042.phpt] 
    PASS Check for yaf.system settings [tests/043.phpt] 
    PASS Memleaks in Yaf_Dispatcher::getInstance() [tests/044.phpt] 
    PASS Check for segfault while use closure as error handler [tests/045.phpt] 
    PASS Check for Yaf_Loader with single class [tests/046.phpt] 
    PASS Check for Yaf_Loader with spl_autoload [tests/047.phpt] 
    PASS Check for Sample application [tests/048.phpt] 
    PASS Check for Sample application with exception [tests/049.phpt] 
    PASS Check for Sample application with return response [tests/050.phpt] 
    SKIP Fixed bug that segfault while a abnormal object set to Yaf_Route*::route [tests/051.phpt] 
    PASS Check for Yaf_Request APis [tests/052.phpt] 
    PASS Check for Custom view engine [tests/053.phpt] 
    PASS check for Various segfault [tests/054.phpt] 
    PASS check for Yaf_Dispatcher::autoRender [tests/055.phpt] 
    PASS check for Yaf_Dispatcher::throwException [tests/056.phpt] 
    PASS check for Yaf_Dispatcher::catchException [tests/057.phpt] 
    PASS check for Yaf_Dispatcher::flushInstantly [tests/058.phpt] 
    PASS Check nesting view render [tests/059.phpt] 
    PASS Check for working with other autoloaders [tests/060.phpt] 
    PASS Bug empty template file interrupts forward chain [tests/061.phpt] 
    PASS Check for Yaf_View_Simple and application's template directory [tests/062.phpt] 
    PASS Check for Yaf_Route_Rewrite with dynamic mvc [tests/063.phpt] 
    PASS Check for Yaf_Route_Regex with dynamic mvc [tests/064.phpt] 
    PASS Yaf_Route_Regex map is optional [tests/065.phpt] 
    PASS Check for Yaf_Route_Regex with abnormal map [tests/066.phpt] 
    PASS Check actions map with defined action class [tests/067.phpt] 
    PASS Check for multi inheritance of section [tests/068.phpt] 
    PASS Fixed bug that alter_response is not binary safe [tests/069.phpt] 
    PASS Fixed misleading error message when providing a string in Yaf_Application construction [tests/070.phpt] 
    PASS return type in Yaf_Simple_Config::valid() should be boolean [tests/071.phpt] 
    PASS check for Yaf_Response_Http headers function; [tests/072.phpt] 
    PASS Check for Yaf_Route_Rewrite::assemble [tests/073.phpt] 
    PASS Check for Yaf_Route_Simple::assemble [tests/074.phpt] 
    PASS Check for Yaf_Route_Regex::assemble [tests/075.phpt] 
    PASS Check for Yaf_Route_Supervar::assemble [tests/076.phpt] 
    PASS Check for Yaf_Route_Static::assemble [tests/077.phpt] 
    PASS Check for Yaf_Route_Map::assemble [tests/078.phpt] 
    PASS Autoloading the classes under library [tests/079.phpt] 
    PASS PHP7 didn't display Error. [tests/080.phpt] 
    PASS PHP7 Yaf_Response leak memory [tests/081.phpt] 
    PASS Check for variables out of scope [tests/082.phpt] 
    PASS Check for ReturnResponse in cli [tests/083.phpt] 
    PASS Check request methods [tests/084.phpt] 
    PASS Check Yaf_Request_Http::getRaw [tests/085.phpt] 
    PASS Check for Yaf_Response_HTTP::setRedirect in CLI [tests/086.phpt] 
    PASS Check for Yaf_Route_Map with arbitrary urls [tests/087.phpt] 
    PASS Check for Yaf_Route_Rwrite with arbitrary urls [tests/088.phpt] 
    PASS Check for Yaf_Config_Ini gets [tests/089.phpt] 
    PASS Check for view path generating [tests/090.phpt] 
    PASS Check for Yaf_Request_getXXX [tests/091.phpt] 
    PASS Check for base uri detecting [tests/092.phpt] 
    PASS Check for numeric keys in view assign [tests/093.phpt] 
    PASS Check for Yaf_Request read/write property [tests/094.phpt] 
    PASS Check for Yaf_Request read/write property [tests/095.phpt] 
    PASS Check for Custom route [tests/096.phpt] 
    PASS Check for Yaf_Route_Supervar with arbitrary urls [tests/097.phpt] 
    PASS Check for Yaf_Bootstrap protected method [tests/098.phpt] 
    PASS Check for Multiple exception in plugins [tests/099.phpt] 
    PASS Check for error conditions of Yaf_Application::constructor [tests/100.phpt] 
    PASS Check for various  cycle references [tests/101.phpt] 
    PASS Check for yaf.forward_limit [tests/102.phpt] 
    PASS Check for Yaf_Request::set*Name 's second argument [tests/103.phpt] 
    PASS Check for Yaf_Dispatcher::dispatch() of errors while loading executor [tests/104.phpt] 
    PASS Check for Yaf_Application::bootstrap errors [tests/105.phpt] 
    PASS Check for PSR-4 autoloading [tests/106.phpt] 
    PASS Check for Yaf_Dispatcher::setRespone [tests/107.phpt] 
    PASS Check for auto response with ErrorController [tests/108.phpt] 
    PASS Check for SIMD build_camel_name [tests/109.phpt] 
    PASS Bug #61493 (Can't remove item when using unset() with a Yaf_Config_Simple instance) [tests/bug61493.phpt] 
    PASS FR #62702 (Make baseuri case-insensitive) [tests/bug62702.phpt] 
    PASS Bug #63381 ($_SERVER['SCRIPT_NAME'] changed by yaf) [tests/bug63381.phpt] 
    PASS Bug #63438 (Strange behavior with nested rendering) [tests/bug63438.phpt] 
    PASS Bug #63900 (Segfault if separated action executes failed) [tests/bug63900.phpt] 
    PASS Bug #70913 (Segfault while new Yaf_Controller) [tests/bug70913.phpt] 
    PASS Bug #76213 (Memory leaks with yaf_dispatcher_exception_handler) [tests/bug76213.phpt] 
    PASS Bug #76217 (Memory leaks with Yaf_Dispatcher::setDefault*) [tests/bug76217.phpt] 
    PASS ISSUE #134 (Segfault while calling assemble) [tests/issue134.phpt] 
    PASS Issue #163 (forward from init controller) [tests/issue163.phpt] 
    PASS ISSUE #231 (php-fpm worker core dump BUG) [tests/issue231.phpt] 
    PASS ISSUE #232 (Segfault with Yaf_Route_Simple) [tests/issue232.phpt] 
    PASS ISSUE #297 (Yaf_Loader fail to load namespace class name) [tests/issue297.phpt] 
    PASS ISSUE #303 (local variable is overrided by view renderring) [tests/issue303.phpt] 
    PASS ISSUE #311 (Yaf_application::environ should respect $environ) [tests/issue311.phpt] 
    PASS Issue #415 ($actions changed to be reference) [tests/issue415.phpt] 
    PASS Issue #420 (bug in yaf_dispatcher_get_call_parameters) [tests/issue420.phpt] 
    PASS ISSUE #468 Check for same name variables assignment [tests/issue468.phpt] 
    PASS Issue #469 (treat autocontroller as Contorller mistakenly) [tests/issue469.phpt] 
    PASS Check for Custom MVC name [tests/issue513.phpt] 
    PASS Check for Yaf_Response_HTTP::setRedirect in CGI [tests/issue518.phpt] 
    PASS Segfault while exiting in action [tests/issue530.phpt] 
    PASS ISSUE #535 (Segsev while throw exception in action) [tests/issue535.phpt] 
    =====================================================================
    TIME END 2022-09-19 09:46:55
    
    =====================================================================
    TEST RESULT SUMMARY
    ---------------------------------------------------------------------
    Exts skipped    :    0
    Exts tested     :   17
    ---------------------------------------------------------------------
    
    Number of tests :  132               129
    Tests skipped   :    3 (  2.3%) --------
    Tests warned    :    0 (  0.0%) (  0.0%)
    Tests failed    :    0 (  0.0%) (  0.0%)
    Tests passed    :  129 ( 97.7%) (100.0%)
    ---------------------------------------------------------------------
    Time taken      :    2 seconds
    =====================================================================
    
    
    opened by remicollet 0
  • yaf routing with namespace is on option

    yaf routing with namespace is on option

    I have a yaf project in the docker. I setup php with `RUN mv $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini

    RUN echo 'extension=yaf.so' >> $PHP_INI_DIR/php.ini

    RUN echo 'yaf.use_spl_autoload = 1' >> $PHP_INI_DIR/php.ini

    RUN echo 'yaf.use_namespace = 1' >> $PHP_INI_DIR/php.ini

    RUN echo 'yaf.name_suffix = 1' >> $PHP_INI_DIR/php.ini

    RUN echo 'yaf.name_separator = ' >> $PHP_INI_DIR/php.ini

    RUN echo 'yaf.library = /library' >> $PHP_INI_DIR/php.ini`

    Then I made template with yaf_cg with --namespaced option. But I had an error of class not fount for ErrorController and actualy for default controller IndexController which was made by yaf_cg utility. So, I eventualy, get right code for controller wich look like this image

    I thought it make's me happy but now I can't setup routing in the way it works.

    I tried setups like this `project.type="rewrite"

    project.match="/product"

    project.route.module=

    project.route.controller=Yaf\Index

    project.route.action=info`

    I tired project.route.controller=Index too, and another too, but I get only default route.

    So, why yaf_cg makes wronge template and how really make routing with that namspacing which I have?

    opened by i-luka 3
  • 偶发性问题Uncaught Error: Call to a member function run() on bool in ....../public/index.php

    偶发性问题Uncaught Error: Call to a member function run() on bool in ....../public/index.php

    自从升级到3.3.4+以后好像这个问题就出现了, 这不是必然发现的问题,偶尔会出现这个问题, 重新请求 一次又好了,但是时不时又冒出这个问题来 :

    Uncaught Error: Call to a member function run() on bool in ....../public/index.php 对应的代码是 $application = new Yaf\Application(APPLICATION_PATH . "/application.ini", 'product'); $application->bootstrap()->run();

    意思是$application->bootstrap()返回了一个布尔值??

    对了,php环境是8.0+, LNMP ; 以前用7.4没有这个问题,就是大一点的请求直接502错误!


    同样出现的偶发问题是: 找不到文件vendor/autoload.php 这个错误没得截图 , 因为也是偶发性的 , 重新请求一次又好了; 这种现象有段时间特别频繁 , 完全不知道问题出现在哪里,重启服务器就好点了 , 感觉是个不定时炸弹

    opened by xrayffa 1
  • macbookair2020款使用MAMP,按照网上的教程成功安装yaf扩展,但不生效,有mac用户可以指点迷津吗?

    macbookair2020款使用MAMP,按照网上的教程成功安装yaf扩展,但不生效,有mac用户可以指点迷津吗?

    php启动时有报错: [20-Nov-2021 18:26:33 Asia/Shanghai] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' - dlopen(/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so, 0x0009): tried: '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/yaf.so' (no such file) in Unknown on line 0

    opened by WaihoLeung919 0
Owner
Xinchen Hui
PHP Stylite
Xinchen Hui
Framework X is a simple and fast micro framework based on PHP

Framework X is a simple and fast micro framework based on PHP. I've created a simple CRUD application to understand how it works. I used twig and I created a custom middleware to handle PUT, DELETE methods.

Mahmut Bayri 6 Oct 14, 2022
Sunhill Framework is a simple, fast, and powerful PHP App Development Framework

Sunhill Framework is a simple, fast, and powerful PHP App Development Framework that enables you to develop more modern applications by using MVC (Model - View - Controller) pattern.

Mehmet Selcuk Batal 3 Dec 29, 2022
Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

Framework X Framework X – the simple and fast micro framework for building reactive web applications that run anywhere. Quickstart Documentation Tests

Christian Lück 620 Jan 7, 2023
Yii 2: The Fast, Secure and Professional PHP Framework

Yii 2 is a modern framework designed to be a solid foundation for your PHP application. It is fast, secure and efficient and works right out of the bo

Yii Software 14k Dec 31, 2022
Fast and easy PHP framework

Español | English Fácil, rápido y en español (Or should I say fast and easy?) Bienvenidos a KumbiaPHP Framework Versión 1 Manual en construcción de la

KumbiaPHP Framework 281 Jan 2, 2023
A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast! Condensed in a single ~65KB file

Bong Cosca 2.6k Dec 30, 2022
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.

Woski is a simple fast PHP framework for the Realm The Project Installation Clone the repository $ composer create-project clintonnzedimma/woski myApp

Clinton Nzedimma 19 Aug 15, 2022
Fast PHP framework made with very loose optional components.

Nimble is a super fast mini-framework for PHP built on top of optional loose components. Installation Clone the repository $ git clone [email protected]:

Neo 53 Dec 22, 2022
Flare is a PHP full-stack web framework that is light, fast, flexible, and secure.

Flare framework is a PHP full-stack web framework that is simple ,powerful , fast , flexible, and secure with long-term support.

Flare framework 3 Oct 24, 2022
Simple, fast and secure PHP Framework with easy integration.

simple-php-framework Simple, fast and secure PHP Framework with easy integration.

winact 2 Nov 23, 2021
Lite & fast micro PHP framework that is **easy to learn**.

Utopia Framework is a PHP MVC based framework with minimal must-have features for professional, simple, advanced and secure web development.

utopia 139 Dec 30, 2022
li₃ is the fast, flexible and most RAD development framework for PHP

li₃ You asked for a better framework. Here it is. li₃ is the fast, flexible and the most RAD development framework for PHP. A framework of firsts li₃

Union of RAD 1.2k Dec 23, 2022
Fast and easy PHP framework

Español | English Fácil, rápido y en español (Or should I say fast and easy?) Bienvenidos a KumbiaPHP Framework Versión 1 Manual en construcción de la

KumbiaPHP Framework 280 Dec 26, 2022
CodeIgniter - a PHP full-stack web framework that is light, fast, flexible and secure

CodeIgniter 4 Development What is CodeIgniter? CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. More informatio

CodeIgniter 4 web framework 4.5k Jan 4, 2023
A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own...

PHPMVC A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own... How to Start Clone this repo - git clone https:/

Maniruzzaman Akash 9 Dec 11, 2022
Easy to use, fast extendable small PHP Framework, like the one you ever missed. The skeleton-APP

About Tufu-Framework Easy to use, fast extendable PHP Framework, like the one you ever missed. Features included such as: Twig and extensions. Fast ro

Giacomo Barbalinardo 0 Jul 2, 2022
💫 Vega is a CLI mode HTTP web framework written in PHP support Swoole, WorkerMan / Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、WorkerMan

Mix Vega 中文 | English Vega is a CLI mode HTTP web framework written in PHP support Swoole, WorkerMan Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、Work

Mix PHP 46 Apr 28, 2022
High performance, full-stack PHP framework delivered as a C extension.

Phalcon Framework Phalcon is an open source web framework delivered as a C extension for the PHP language providing high performance and lower resourc

The Phalcon PHP Framework 10.7k Jan 8, 2023
Extension for creating and sending emails for the Yii PHP framework.

yii-emailer Extension for creating and sending emails for the Yii PHP framework. Usage Migrate the email_message database table by this command: yiic

Digia 12 Mar 30, 2022