-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Smarty to framework test system #2763
Comments
I had a look at the frameworks.yaml file with a view to fixing this ticket, and it seems that in order to add an entry it needs to be hosted on Github. Smarty is not currently hosted on Github, but on Googlecode, as an SVN repository. I have left a message on the Smarty forums in an existing thread that was discussing a possible Git migration. It would be worth keeping an eye on how that thread develops: http://www.smarty.net/forums/viewtopic.php?p=87250#87250 If they don't migrate the whole project, there is also the option of using an SVN clone and an auto-sync to Github, as is being done here: https://github.com/opensolutions/smarty. However, that particular repository only contains the main Smarty distribution and does not include the unit tests which we would need in order to add it to the HHVM framework tests. |
I also logged a ticket with the existing clone at https://github.com/opensolutions/smarty to see if it would be possible to sync the whole trunk: opensolutions/smarty#4 This would include the unit tests and therefore be one possible solution to allow this ticket to be implemented. |
The complete distribution including unit test can be found at It's now maintened by the Smarty developers. |
That's great news - I wonder why it didn't turn up in my searches, and why it isn't mentioned on the Smarty website!? Thanks for the pointer. |
Oops - closed by mistake! |
I don't see any unit tests in that repository - could you point me in the right direction? |
Hmmm... as far as I can tell (and I may be wrong) the repository referred to above has been moved here: https://github.com/smarty-php/smarty-old, with a new repository being located at the original address. The new repository doesn't contain the tests, but the old one does (https://github.com/smarty-php/smarty-old/tree/master/development/PHPunit). I'm sure the tests are still maintained somewhere, but you may need to contact @uwetews to find out which is the correct repo to link to. |
We are right now in the process of moving completely to github and restructuring things a bit. I keep you informed when everything is on github Uwe |
Thanks @uwetews - that sounds great! |
I want to give you a status update. 3.1.22 will become a major release with a lot of improvements. So it takes some more time. Mit meanwhile I have done some testing with Smarty under HHVM. The hackificator tool was able to convert most of the Smarty code automatically. The compiled template and cache PHP files are currently not compatible. But some brief tests have been successfull that we could generate these files directly as <?hh files if Smarty detects that it is running under HHVM. My goal is to have HHVM support included in the 3.1.22 release. I will keep you informed. Uwe |
You don't need to hackify the code (don't know what the tool does) nor use |
What sort of work will need to be done locally to update smarty? |
To close this task, it needs a phpunit test framework that's reliably included in the main repository. If the current PHP code does not work, we will almost certainly consider it a bug in HHVM; no changes to smarty should be required for HHVM. Converting to Hack could provide some developer-efficiency benefits, but that's really separate to this issue. |
Hi there Fred, PhpUNIT test Framework? - You mean this is already included? Apologies HHVM is very new to me and most i discuss it with, so just to confirm. We can add HHVM on to the current SmartyPHP version without any issues and it will run without any issues? Converting to Hack -... apologies what is this in ref to? I say this as we are on tenterhooks we have a site nearing completion which is the only way to explain it 22m lines of code with thousands of functions.. And having it all corrupt and having to remove then replace will take us a very very long time, something we are trying to avoid. PS we are running CPanel 11.38 + CentOS 6.4 Encase this information also has any effect Also i am hoping our Smarty is not v2.1 - @author Uwe Tews - @author Rodney Rehm - @Package Smarty - @Version 3.1-DEV |
Given we don't currently use Smarty ourselves, and the unit tests aren't currently available, I can't comment on if it will work or not. |
You can install the 3.1 releases with no problems under HHVM. If you run the hackificator (see http://docs.hhvm.com/manual/en/install.hack.conversion.php) The upcomming release 3.1.22 of Smarty will include optimizations for HHVM. The goal is that the hackificator can convert the complete Smarty distribution to <?hh. 3.1.22 will include also many other improvements resulting also under PHP in some higher speed and less memory usage. I'm currently preparing a package including Smarty PHPUnit tests ready to run under HHVM. I will drop here a note when this work is completed. |
Q: Is this for finnished projects or can be used in test/dev framework also? |
Here is a status update. Smarty itself currently is affected when caching mode CACHING_LIFETIME_SAVED is used. The current working copies can be required by composer with Run the test with |
Hi there, Just to confirm is this pre-release issue likely to be resolved with the 3.22 release only im waiting on its release to update the entire site from 3.12 to 3.22 then add HHVM set up after through testing. |
The goal is to get this resolved with the 3.1.22 release. |
Isn't the point of this ticket just to get the Smarty unit tests into a public Git repo and add a submodule or whatever so they are included in the HHVM framework tests? I don't think it really matters whether the tests pass or whether Smarty actually supports HHVM, does it? The point is that the Smarty unit tests are being run under HHVM so that we get some transparency about compatibility (which, as has been said, is really a matter for the HHVM team to deal with, rather than the Smarty developer(s)). Is there no public repo for Smarty that includes the unit tests? There certainly used to be! |
Yep, we're happy to start running the tests even if they don't all pass, once there is a canonical place for us to get them and the source from. |
The Smarty source and PHPUnit test can be installed via composer or are available at https://github.com/smarty-php/smarty and https://github.com/smarty-php/smarty-phpunit. See my comment 3 days ago. |
Cool; we need a unified repository - would it be possible for smarty-phpunit to require smarty via composer? |
I will add that. As it's already late night here in Germany I would update the smarty-phpunit tomorrow and let you know, |
@fredemmott , @uwetews have we got an update on this yet and a possible lead time as to whether 3.22 will be launching 100% HM compat? or will 3.22 be launching with its generic updates and % compat ? Thank you. |
I second ^ @fredemmott @uwetews |
Quote @uwetews I want to give you a status update. 3.1.22 will become a major release with a lot of improvements. So it takes some more time. Mit meanwhile I have done some testing with Smarty under HHVM. The hackificator tool was able to convert most of the Smarty code automatically. The compiled template and cache PHP files are currently not compatible. But some brief tests have been successfull that we could generate these files directly as <?hh files if Smarty detects that it is running under HHVM. My goal is to have HHVM support included in the 3.1.22 release. I will keep you informed. Uwe //// Have we got any update on this? |
.......... any update chaps |
Sorry, the work on the 3.1.22 release takes longer as previously estimated. Also the PHPUnit test will be reworked to run under hhvm. I now estimate another 1 - 2 weeks. |
^ Looking forward to and happily awaiting... |
@uwetews Hi, any update on this release ? coming up to 3 weeks. |
Am I missing something? All this ticket needs is a URL to the Git repository containing the unit tests. We don't need to wait for a release for this, do we? Even if 100% of tests fail under HHVM, that would be enough to satisfy this ticket! |
@mark we are awaiting Smarty 3.2 release and its 100% compatibility with HHVM |
@NotApplicableBeech - I am aware of that, and am looking forward to it with great anticipation! However, that is not a requirement of this ticket. This ticket is about linking the Smarty unit tests into the HHVM unit-testing framework, so we can get an idea of how well HHVM supports Smarty. This will allow the HHVM developers to fix any bugs/edge-cases in HHVM that might cause Smarty to not work correctly. There is no requirement for Smarty devs to make any change to Smarty in order for this to be possible, and given that there have been PHPUnit tests in Smarty since at least v2, this ticket should have been an easy fix. The only thing holding it up is having a URL to the Github repository that contains the tests. |
Fred Sorry for the delay in this matter. I had for personal reason just little time to work on Smarty. Also I had to make sure that our PHPUnit tests will fail on HHVM just because incompatibilities when executing Smarty, but not because of the test code. You can now use composer “smarty/smarty-dev” : “~3.1” to get the latest stable Smarty version and its corresponding PHPUnit tests. Smarty-dev contains just a wrapper composer.json t load the versions from “smarty/smarty” and “smarty/smarty-phpunit”. I hope this does work for you. The failures you will get when running the unit test should all be caused by the reported issue #4797 (comment) Besides that have not experience other problems. The failure will not be a hard one in applications. It will delay the visibility of a modified template source or an updated template cache by one page call. Let me know if you need more information. Uwe Von: Fred Emmott [mailto:notifications@github.com] Cool; we need a unified repository - would it be possible for smarty-phpunit to require smarty via composer? — |
There is an internal diff to add framework test runner support for Smarty. |
I'm glad to see that Smarty is now part of your frameworks tests. Currently a lot of development is under way at Smarty. So the PHPUnit tests will be extended regularly so I assume you might see no real failures. Anyway I was able to implement a workaround for the existing HHVM issue #4797 (comment) The dev-master version of Smarty is now passing all PHPUnit tests under HHVM. I did set up at Travis CI for Smarty also a hhvm test run. See https://travis-ci.org/smarty-php/smarty So every commit to the Smarty repository will now be automatically tested for hhvm compatibility. Thanks for your good work. Uwe |
Hi there,
It would be great if you could add the Smarty templating engine (http://www.smarty.net/) to the list of frameworks that you test against (http://hhvm.com/frameworks/).
The text was updated successfully, but these errors were encountered: