Integrate with NuGet


Would be nice to see Phalanger as a NuGet package to get an installation-free Phalanger (no GAC, no machine.config, preconfigured web.config) like detailed in this article: http://www.php-compiler.net/blog/2011/installation-free-phalanger-web.
Other dependencies, like the mng-Files or the PhpNetMySql could then be added as supplemental packages.
I think that would increase the interest on this wonderful project massively, because to get in touch with Phalanger you have to pass some hurdles to get it running.
Keep up the good work!

file attachments


tobias wrote Apr 24, 2012 at 2:55 PM

I have written a very simple nuget package called Phalanger.Core

  • php4ts.dll
  • php5ts.dll
  • PhpNetCore.dll
  • PhpNetClassLibrary.dll
  • web.config.transform (merges with an existing web.config) file with some default settings for Phalanger
  • install.ps1 and uninstall.ps1 (scripts to create/delete the necessary Bin, Bin\Extensions and Dynamic folders: the necessary modify permissions need to be set manually if using IIS; IIS-Express runs without modifications)
This is only a sample for a nuget package, but you get the idea. The package isn't published to nuget.org but you can install it from the local drive:
  • Create a new "Web Site" or "Web Application Project"
  • Open the Package Manager Console
  • Install-Package Phalanger.Core -Source "<folder_to_nupkg_file>"

wrote Apr 24, 2012 at 2:56 PM

tobias wrote Apr 24, 2012 at 2:56 PM

And here is a sample package called Phalanger.Sample

miloslavbeno wrote Apr 25, 2012 at 1:06 PM

Hi Tobias,

This is very good idea. I'll give it a try.

Thank you very much

wrote Apr 25, 2012 at 5:29 PM

tobias wrote Apr 25, 2012 at 5:29 PM

uploaded a slightly more elegant solution (cleaner web.config), by defining the phalanger configuration in a separate "phalanger.config" file.

miloslavbeno wrote May 11, 2012 at 6:57 PM

Hi Tobias,

I had little time to check this out...It looks good, Nuget package is certainly must for Phalanger. I think we should make core packages like this:
  • Phalanger.Core just without php4ts and php5ts, because that would also work well on Mono and we don't have to have configuration filled with native extensions config stuff here
  • Phalanger.NativeExtensions that would include php4ts and php5ts together with the native extensions and config This would package would work only on Windows
  • Phalanager.MySql - unfortunatelly connector from Oracle is GPL so we have to keep it separatly from the main package
  • Phalanger.Sample
Btw. Nuget didn't transform my web.config file well. I mean it only added assemblies to <system.web><compilation debug="false" targetFramework="4.0"> <assemblies> and nothing else... I didn't check the web.config.transform file yet. and also I don't see the dlls in the bin folder, but I can see them in the package... I'll take a deeper look

tobias wrote May 18, 2012 at 9:20 AM

That would be really cool!

Don't know why the web.config didnt' got transformed. Worked for me, but I've testet it only in very simple scenarios. That the dll don't get copied in the bin folder could be caused by the fact that they are installed to the GAC by the Phalanger installer (I'm not completely shure).

That the Phalanger Dlls have the same Version Number ( since the first release of 3.0 and they get installed to the GAC don't play very well with Bin Deployment. This could be addressed by changing to a semantic versioning aproach.

There's a good reading about NuGet and Bin Deploy from the WCF Data Services Team: http://blogs.msdn.com/b/astoriateam/archive/2012/05/17/nuget-and-bin-deploy.aspx
And also the semantic versioning is tackled by the team: http://blogs.msdn.com/b/astoriateam/archive/2012/05/07/wcf-data-services-now-with-more-releases.aspx
Maybe Phalanger should also follow this way in the future?

wrote Jun 12, 2012 at 4:06 PM

wrote Nov 2, 2012 at 2:20 PM

wrote Jan 18, 2013 at 7:50 PM

wrote Feb 22, 2013 at 12:41 AM

wrote Aug 15, 2013 at 9:17 PM