Commit Graph

151 Commits

Author SHA1 Message Date
Alex Palaistras 9d111e7342
Merge pull request #58 from thekid/fix/incompatible-pointer-types
Fix "warning: initialization from incompatible pointer type"
2018-10-01 21:58:57 +01:00
Timm Friebe f7137ab328 Use old signature for engine_log_message w/ PHP < 7.1
See https://github.com/deuill/go-php/pull/58#issuecomment-426009629
2018-10-01 20:19:14 +02:00
Timm Friebe 129846f6ee Fix "warning: initialization from incompatible pointer type" 2018-10-01 20:09:50 +02:00
Alex Palaistras dbea71e0cf
Merge pull request #55 from deuill/feature/build-static-php
Update PHP versions, allow building static version of PHP in Docker
2018-06-17 21:59:58 +01:00
Alex Palaistras 3fd7b8c18d Fix static compilation for Docker environment
It's unfortunate that Debian packages do not contain symbolic links for base libraries to their
versioned counterparts, and we need to install the `-dev` packages for that. All required packages
are now included in the Docker image's runtime dependencies, and the `static` build tag is made to
include the correct ones.
2018-06-04 10:42:52 +01:00
Alex Palaistras 683aaf765c Makefile: Remove extraneous PACKAGE_FORMAT argument 2018-06-04 10:39:10 +01:00
Alex Palaistras d92b760c17 Update PHP versions, allow building static version of PHP in Docker
This allows for building binaries against `go-php` without needing an accompanying version of the
PHP library. To build a static version of `go-php`, simply set `STATIC=true` as a Make flag, e.g.:

    make docker-build STATIC=true

The resulting `go-php` library will be placed in `.build/env/GOPATH/pkg/...` by default, and can be
used directly, but using the Docker image as a build environment will also work.
2018-06-01 14:22:40 +01:00
Alex Palaistras 5a1392a71f
Merge pull request #49 from deuill/feature/update-docker-php-versions
Update PHP versions for Travis, move Dockerfile to 'golang' image
2018-01-10 21:28:50 +00:00
Alex Palaistras d0ac95b7ca Update PHP versions for Travis, move Dockerfile to 'golang' image
This adds PHP  7.2.1 as a new target, and updates existing PHP versions to their latest numbers. Be
aware that PHP 7.2.x is as-of-yet untested -- and expected to be buggy.
2018-01-07 17:07:36 +00:00
Alex Palaistras 46f61a6114 Merge pull request #47 from deuill/feature/unify-dockerfile
Unify Dockerfiles for easier testing across PHP versions
2017-10-07 11:45:26 +01:00
Alex Palaistras 134daabdc8 Test all supported PHP versions for Travis, fix Docker image reference 2017-10-07 11:39:30 +01:00
Alex Palaistras 8383b4bc81 Pull Docker images before building, allow running any command in Docker
Docker images will still need to be pushed manually.
2017-10-06 15:49:22 +01:00
Alex Palaistras 55fe974713 travis.yml: Don't pull/build image before install
The Make target for executing tests will pull or build the Docker image if necessary, there's no
need to do it twice.
2017-10-06 15:48:07 +01:00
Alex Palaistras cd1c76d08e Unify Dockerfiles for easier testing across PHP versions
All PHP builds in Docker are now made against a single-unified Dockerfile, which accepts the PHP
version to target in the `PHP_VERSION` argument. Source files are currently not verified (other than
being downloaded from a secure location, as we will eventually move to using the official `php`
Docker images as a base, as soon as these catch up to latest versions of Debian.
2017-10-06 14:52:58 +01:00
Alex Palaistras a6232d9fa8 Add basic Travis CI integration
This adds a '.travis.yml' file, for testing against known PHP versions.
2017-10-06 13:56:57 +01:00
Alex Palaistras 8572d57eb3 Merge pull request #43 from deuill/feature/add-docker-tests
Add Dockerfiles, Makefile for testing against isolated environment
2017-10-06 12:45:37 +01:00
Alex Palaistras 549d883bbc Add Dockerfiles, Makefile for testing against isolated environment
This commit adds a Dockerfile for PHP 5.6.x and PHP 7.1.x versions, allowing for tests, package
builds etc. to run against an isolated, controlled environment. PHP is currently built as a shared
library, in the future we may build as a static library to allow bundling with Go applications.

Also included is a Makefile, containing targets for common operations, such as testing, building
packages etc. Two undocumented targets related to Docker are included, `docker-image` and
`docker-test`. Moving these as documented targets is a future task.
2017-10-06 12:39:05 +01:00
Alex Palaistras 0232656e7d Fix build tags for PHP5 target
The PHP5 target was broken, since PHP7 builds were not excluded for PHP5-scoped tags.
2017-10-06 12:36:47 +01:00
Alex Palaistras dcdb07961f Rename base package from `engine` to `php` 2017-01-28 20:57:39 +00:00
Alex Palaistras 7320fffdf5 Bump year to 2017 2017-01-28 17:06:12 +00:00
Alex Palaistras 2b9857b73a Move workspace from "engine" directory to repository root
The initial rationale behind pushing all files into a subdirectory was keeping
the repository root clean, however there's probably better, and move meaningful
ways of doing so (splitting `engine`, `context`, and `value` to separate
packages, moving all `.c` files into the `src` directory etc.
2017-01-28 17:01:05 +00:00
Alex Palaistras 7087ecbd63 Add support for static builds, switch to PHP 7.x by default 2017-01-28 16:58:59 +00:00
Alex Palaistras 89c9c5b7bd README: Move 'Caveats' subsection under 'Status' section 2016-11-02 21:53:15 +00:00
Alex Palaistras 8ad73e9fed README: Fix 'Caveats' section, add 'Roadmap' section 2016-11-02 21:51:44 +00:00
Alex Palaistras 7d837a1fe4 Add copyright headers for build-tags files 2016-09-24 00:06:06 -07:00
Alex Palaistras 1208619fe2 Merge pull request #29 from deuill/feature/26_fix-debian-build-issues
php7: Fix additional issues with `php7.debian` tag
2016-09-23 09:42:16 -07:00
Alex Palaistras a461818d72 Merge pull request #28 from randlem/feature/26_fix-debian-build-issues
Getting this to build on Ubuntu 16.04
2016-09-23 09:39:22 -07:00
Mark Randles 5a97ca63cc Updating for notes attached to PR 2016-09-23 10:17:02 -04:00
Alex Palaistras 4d03d4c334 Merge pull request #27 from deuill/feature/26_fix-debian-build-issues
php7: Allow for additional `php7.debian` build tag
2016-09-22 20:43:36 -07:00
Mark Randles 26dcbc36ff Getting this to build on Ubuntu 16.04 2016-09-22 15:39:44 -04:00
Alex Palaistras 7dc4aeac6c php7: Allow for additional `php7.debian` build tag
The additional `php7.debian` build tag allows Go-PHP to be built against
PHP7 on Debian (and Debian-derived, such as Ubuntu) distributions. This
additional build tag is required due to the non-standard include and
library file locations.

Relates-To: #26
2016-09-21 20:19:00 -07:00
Alex Palaistras daf6987b14 Merge pull request #23 from deuill/feature/c-preprocessor-cleanup
Clean up C pre-processor mess
2016-05-09 13:31:59 +01:00
Alex Palaistras e414904c5b Fix C pre-processor bindings for values, PHP5 bugs 2016-05-09 13:22:10 +01:00
Alex Palaistras ca3030252f Rename version-specific override functions for consistency 2016-05-05 22:37:40 +01:00
Alex Palaistras 3d31c927e3 Clean up receiver pre-processor binding 2016-05-05 22:21:57 +01:00
Alex Palaistras deb519497d Clean up context pre-processor bindings 2016-05-03 18:36:00 +01:00
Alex Palaistras d64dade5fe Rename `context_bind_zval` to `context_bind_proxy` for consistency 2016-05-03 18:05:19 +01:00
Alex Palaistras 6c0669dd67 Clean up pre-processor mess for context bindings 2016-05-03 18:00:03 +01:00
Alex Palaistras 4688362c1b Clean up C pre-processor mess
Currently, large parts of the C source use pre-processor tricks for
maintaining compatibility between versions 5 and 7 of PHP. This contains
work for cleaning the dependencies up by introducing an extra level of C
source, tailored to each supported version of PHP.
2016-05-03 17:45:27 +01:00
Alex Palaistras a6fe19a1be Merge pull request #21 from elwinar/patch-php5
Fix the Zend inclusion path for PHP5
2016-04-13 13:29:36 +01:00
Romain Baugue 2077d48e0d Fix the Zend inclusion path for PHP5 2016-04-13 10:11:10 +02:00
Alex Palaistras 0882169cff Add necessary include directives for PHP 5 path
Certain distributions, such as Debian, ship include files for version 5
of PHP in the `/usr/include/php5` directory. This commit adds directives
necessary for building go-php against packages provided by such distros.
2016-04-12 21:12:06 +01:00
Alex Palaistras 99962f2bdf Fix minor issues raised by `golint` and `go vet` 2016-03-19 14:19:43 +00:00
Alex Palaistras 1c1e106d6e Fix 'const qualifier' warning for PHP 5 2016-02-27 22:39:28 +00:00
Alex Palaistras d9b0735a69 Merge pull request #19 from deuill/feature/go16-compatibility
Compatibility fixes for Go 1.6
2016-02-27 22:36:34 +00:00
Alex Palaistras 50c36f8a31 Fix Receiver bindings for Go 1.6
Several API-breaking changes:

  * Define method and related functionality moved back to Engine package
  * Exported functions for receivers moved to the engine package
  * Receiver API cleaned up and made public

Receivers no longer store Go pointers in C contexts, and instead use the
C engine_receiver pointer as reference in the Go context (similar to what
we do for Contexts). Some changes have been made to the C code to accomodate
the above.
2016-02-27 22:26:25 +00:00
Alex Palaistras 2a1e45785b engine.go: Simplify write, header calls for context pointers 2016-02-27 15:16:48 +00:00
Alex Palaistras 886afb7ac9 Make relationship between stored Contexts and C context explicit 2016-02-26 17:58:33 +00:00
Alex Palaistras 7d563c7fe6 Fetch `Context` reference from calling `Engine`, not a stored pointer
This fixes compatibility with Go 1.6, which specifies stricter rules for
passing Go pointers to C and vice versa. Exported methods now use the
C context's pointer hexadecimal representation to find the parent Go
Context.
2016-02-21 19:11:50 +00:00
Alex Palaistras 3eaec657a3 Merge pull request #18 from deuill/feature/dependency-cleanup
Clean up method receiver constructors
2016-02-19 21:59:00 +00:00