PHP 5.3 and Yii
#1
Posted 30 June 2009 - 10:28 AM
Yii framework should be compatible with PHP 5.3. If you find any problem, please let us know. Thanks.
We are not going to exploit these new PHP 5.3 features in the near future in the core framework code for the following reasons:
1. Using the new features may introduce significant backward compatibility problem.
2. Using the new features would mean raising the basic requirements of using Yii to PHP 5.3. We expect that PHP 5.3 needs several minor releases before getting stable enough.
3. While namespace is cool, the strategy of prefixing all Yii core classes with letter 'C' works very well. It may be treated as a different form of namespace.
4. Late static binding would allow us to use Post::findAll() instead of Post::model()->findAll(). It is true that the former is more pretty; however, the latter also has its own benefits because Post::model() is an object instance and can be stored in a variable.
While the Yii core code does not use 5.3 elements, application code built on top of Yii has full freedom to exploit them.
We may consider rewriting Yii 2.0 on top of PHP 5.3, but this won't happen in the near future.
Please let us know if you have any comments on our decisions above. Thank you.
#2
Posted 30 June 2009 - 11:14 AM
I like the idea of namepaces but i prefer having a prefix like we do now.
But hey, i'm not conservative, i wouldn't mind using them either
#3
Posted 01 July 2009 - 05:00 AM
Most of the shared hosting environments won't have 5.3 for at least a couple of months, I think it is a sane choice to have the core stay backward compatible.
#4
Posted 01 July 2009 - 12:03 PM
For upgrading to PHP 5.3, this is just what I thought this afternoon. As PHP 5.3 is newer and may be better than 5.2, but it really needs time to prove this. Yii is a very strong and effient framwork for developing, so it must confirm that it can run on most of servers, which is for PHP 5.2.
And for PHP 5.3, I think it's great to support this on Yii 2.0. At that time, maybe 5.3 is everywhere, so we won't worry about the server problem.
That's my little advice for Yii developing, and I really hope Yii will get better and better in the future.
At last, I really appreciate for what you did. I can see you answered almost every questions in Chinese board. You're really my hero!
#5
Posted 01 July 2009 - 02:17 PM
Speaking of future plans - how many releases are planning to make in the 1.0.x branch, Qiang?
#6
Posted 01 July 2009 - 02:55 PM
#7
Posted 02 July 2009 - 03:02 PM
In my humble opinion, I still wish Yii to keep ahead of other frameworks in exploiting the newest and greatest features/performances from PHP (like native MySQL driver, for performance). I'm doing ASP.NET C# for enterprise apps and I'm cheering for PHP as a programming language to get up to speed.
But, I do agree Yii should wait for sane number of months until one-third of shared hosting environments support PHP 5.3 (e.g. DreamHost) and few more future maintenance updates to stabilize PHP 5.3. I don't mind Yii breaking changes to support PHP 5.3, if we have a upgrade guide.
More performance from PHP 5.3 language itself:
http://schlueters.de...rmance-win.html
More performance using Native MySQL Driver:
http://dev.mysql.com...or/php-mysqlnd/
#8
Posted 02 July 2009 - 04:02 PM
#9
Posted 02 July 2009 - 10:47 PM
I think qiang is doing the right thing to ensure backward compatibility. It is very important for wide adoption.
#10
Posted 04 July 2009 - 08:56 AM
I agree, 5.3 will take a long time to be adopted, so it'd be smart to avoid using the new features.
#11
Posted 04 July 2009 - 11:29 AM
#12
Posted 06 July 2009 - 04:21 PM
All POSIX Regex function will be deprecated in PHP 5.3. This will cause notice when E_STRICT is on :
Function split() is deprecated in aaa.php on line xxx
To resolve this you can replace split by explode(). You should take this into account on your old or new code!! (also take into account that ereg functions will not exist in PHP 6!!!!!!)
Also, some extensions don't compile on 5.3.0, so far tested: adodb and perl
#13
Posted 16 July 2009 - 08:25 PM
from 1.0 to 1.2, keep 1.x stable
i think 2.0 is important milestone.
I believe that yii is the best
#14
Posted 20 July 2009 - 02:32 PM
#15
Posted 22 July 2009 - 08:30 PM
Article on PHP 5.3 and CakePHP 3.0:
http://debuggable.co...ee-6d284834cda3
Source Code: Development already started on PHP 5.3 called CakePHP 3.0
http://code.cakephp.org/cake3
#16
Posted 03 August 2009 - 02:55 AM
i just updated my php from 5.2 to 5.3 in windows using apache server with 27Jul09 browscap.ini. but has met with problem occurred by either CHttpRequest::browser or get_browser or browscap.ini. none of my browsers can be detected by get_browser function. it stated:
stdClass Object
(
[browser_name_regex] => �^.*$�
[browser_name_pattern] => *
[browser] => Default Browser
[version] => 0
[majorver] => 0
[minorver] => 0
[platform] => unknown
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] =>
[tables] => 1
[cookies] =>
[backgroundsounds] =>
[cdf] =>
[vbscript] =>
[javaapplets] =>
[javascript] =>
[activexcontrols] =>
[isbanned] =>
[ismobiledevice] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 0
[supportscss] =>
[aol] =>
[aolversion] => 0
)
did anyone experience the same problem?
thanks.
#17
Posted 26 August 2009 - 09:55 PM
resplendent, on 03 August 2009 - 02:55 AM, said:
i just updated my php from 5.2 to 5.3 in windows using apache server with 27Jul09 browscap.ini. but has met with problem occurred by either CHttpRequest::browser or get_browser or browscap.ini. none of my browsers can be detected by get_browser function. it stated:
stdClass Object
(
[browser_name_regex] => �^.*$�
[browser_name_pattern] => *
[browser] => Default Browser
[version] => 0
[majorver] => 0
[minorver] => 0
[platform] => unknown
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] => 1
[iframes] =>
[tables] => 1
[cookies] =>
[backgroundsounds] =>
[cdf] =>
[vbscript] =>
[javaapplets] =>
[javascript] =>
[activexcontrols] =>
[isbanned] =>
[ismobiledevice] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 0
[supportscss] =>
[aol] =>
[aolversion] => 0
)
did anyone experience the same problem?
thanks.
Hi all,
Problem has been resolved. I have go for another way to retrieve browser header provided by PHP comments.
Cheers.
#18
Posted 18 November 2009 - 03:32 AM
resplendent, on 26 August 2009 - 09:55 PM, said:
Problem has been resolved. I have go for another way to retrieve browser header provided by PHP comments.
Cheers.
希望能够早日看到 yii 2.0~
#19
Posted 18 November 2009 - 12:20 PM
- Apache 2.2
- PHP 5.3
- Ubuntu Server 9.10
- MySQL 5.1, PostgreSQL 8.5-dev, Firebird 2.5
- Yii 1.0.11-dev
However, it is necesary to add the line below to my php.ini file:
date.timezone = America/Bogota
Obviously, Each server has his own configuration.
The above line is for not having problems with date functions.
Regards,
Ricardo
Cloud Hosting SSD de Nivel-1
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.4+, nginx 1.2, MySQL(MariaDB & PerconaDB), PostgreSQL 9, Yii 1.x-dev.
Follow me: @robregonm & @obregonco & @1ServerCo.
#20
Posted 15 August 2010 - 06:39 PM
Error 500
date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead

Help

This topic is locked
















