gtkforphp / cairo

PHP extension for Cairo Graphics Library
Other
27 stars 19 forks source link

Current PHP7 status #20

Open auroraeosrose opened 9 years ago

auroraeosrose commented 9 years ago

New features added

  1. Matrices have their properties exposed and can be manipulated
  2. Mesh and raster pattern support ( not yet complete)
  3. Rectangles

Changes

  1. Namespaced
  2. License change
  3. Has extension dep
  4. Real enums

Odds and ends

Jan-E commented 7 years ago

I get 300+ skiped tests and some fails

300+ skipped tests might indicate that the eos_datastructures extension is not loaded when running the tests. Try adding that extension in a ini-file that is read during make test.

Jan-E commented 7 years ago

I got the tests running in Appveyor for the Windows builds of PHP 7.1.8 (x64 nts). I am now loading php_eos_datastructures.dll and php_cairo.dll in a minimal php.ini:

[PHP] 
extension_dir = "ext" 
extension=php_eos_datastructures.dll 
extension=php_cairo.dll 

Because the phpt-files also try to load the eos_datastructures extension (but failed), I had to remove this from the phpt-files. I am doing this at build time with a perl regex replacement. With some Windows speak:

for /R %%f in (*.phpt) do perl -pi.bak -e "undef $/; s/--EXTENSIONS--\neos_datastructures\n//gi" %%f
del *.phpt.bak /s > nul

Test results: a lot of FAIL's. See https://ci.appveyor.com/project/Jan-E/cairo/build/php7.20#L7874

Jan-E commented 7 years ago

@auroraeosrose Please merge https://github.com/gtkforphp/cairo/pull/32 to use Appveyor for running the tests on Windows.

mhertsch commented 7 years ago

I tried my hand at fixing the enum issue. You might want to take a look at https://github.com/eosforphp/structures/pull/3 and test it out. It should help with most of the issues in #29. Well at least, a1-image-sample.php and bitmap-font.php are working as well as my own code.

adamdyson commented 7 years ago

@auroraeosrose Are you able to merge that pull request eosforphp/structures#3? I can then update issue #29 and remove any tests which are no longer throwing errors.

@mhertsch Nice work.