Skip to content

Commit bd40482

Browse files
committed
Merge pull request #27 from gggeek/php53
Move branch php53 into master
2 parents 31d3ced + 5e0dcb0 commit bd40482

121 files changed

Lines changed: 16477 additions & 18543 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/.idea
22
composer.phar
3-
3+
composer.lock
4+
/vendor/*
5+
/tests/coverage/*
6+
/build/*

.travis.yml

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,53 @@
11
language: php
22

33
php:
4-
- 5.2
54
- 5.3
65
- 5.4
76
- 5.5
87
- 5.6
8+
- 7.0
99
- hhvm
1010

11+
matrix:
12+
# current versions of hhvm do fail one test... see https://github.com/facebook/hhvm/issues/4837
13+
allow_failures:
14+
- php: hhvm
15+
16+
before_install:
17+
# This is mandatory or the 'apt-get install' calls following will fail
18+
- sudo apt-get update -qq
19+
- sudo apt-get install -y apache2 libapache2-mod-fastcgi
20+
- sudo apt-get install -y privoxy
21+
1122
install:
12-
# NB: the lib does not declare dependencies for now. Also, composer will not run on php 5.2
13-
- if [ $TRAVIS_PHP_VERSION != "5.2" ]; then composer self-update && composer install; fi
23+
- composer self-update && composer install
1424

1525
before_script:
16-
# Disable xdebug. NB: this should NOT be done for hhvm...
17-
- if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
26+
# Disable xdebug for speed.
27+
# NB: this should NOT be done for hhvm and php 7.0.
28+
# Also we use the php 5.6 run to generate code coverage reports, and we need xdebug for that
29+
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "7.0" -a "$TRAVIS_PHP_VERSION" != "5.6" ]; then phpenv config-rm xdebug.ini; fi
1830

19-
# TODO: we should set up an Apache instance inside the Travis VM and test it.
20-
# But it looks a bit complex, esp. as it seems that php has to be set up differently (cgi vs fpm) depending on version
21-
# So for now we just take an easy way out using a known remote server.
22-
# See: https://gist.github.com/roderik/3123962
23-
# See: http://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
31+
# Set up Apache and Privoxy instances inside the Travis VM and use them for testing against
32+
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_php_fpm.sh; ./tests/ci/travis/setup_apache.sh; fi
33+
- if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_hhvm.sh; ./tests/ci/travis/setup_apache_hhvm.sh; fi
34+
- ./tests/ci/travis/setup_privoxy.sh
2435

2536
script:
26-
php -d "include_path=.:./lib:./test" test/testsuite.php LOCALSERVER=gggeek.altervista.org URI=/sw/xmlrpc/demo/server/server.php HTTPSSERVER=gggeek.ssl.altervista.org HTTPSURI=/sw/xmlrpc/demo/server/server.php NOPROXY=1
37+
# Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
38+
# to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below
39+
vendor/bin/phpunit --coverage-clover=coverage.clover tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0 HTTPSIGNOREPEER=1 SSLVERSION=3 DEBUG=1
40+
41+
after_failure:
42+
# Save as much info as we can to help developers
43+
- cat apache_error.log
44+
- cat apache_access.log
45+
#- cat /var/log/hhvm/error.log
46+
#- if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then php -i; fi
47+
48+
after_script:
49+
# Upload code-coverage to Scrutinizer
50+
- if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
51+
- if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
52+
# Upload code-coverage CodeClimate
53+
- if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then CODECLIMATE_REPO_TOKEN=7fa6ee01e345090e059e5e42f3bfbcc8692feb8340396382dd76390a3019ac13 ./vendor/bin/test-reporter --coverage-report=coverage.clover; fi

ChangeLog

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,21 @@ NB: All recent commits are available online.
22
This file will not be updated further.
33
See https://github.com/gggeek/phpxmlrpc/commits/master
44

5+
2014-05-26 - G. Giunta (giunta.gaetano@gmail.com)
56

6-
2014-02-3 - G. Giunta (giunta.gaetano@gmail.com)
7+
* removed bundled phpunit
8+
* converted all tabs to spaces in php files and removed closing tags
9+
10+
2014-05-12 - Samu Voutilainen (smar@smar.fi)
11+
12+
* removed obsolete xml.so open; dl() is deprecated and removed from 5.3.0
13+
* removed deprecated xmlEntities
14+
* removed deprecated xmlrpc_backslash
15+
* converted $GLOBALS to internal class. This makes testing much easier and should be more flexible regarding other projects
16+
* changed verifyhost from 1 to 2. This makes modern php versions work properly.
17+
* split off each class in its own file
18+
19+
2014-02-03 - G. Giunta (giunta.gaetano@gmail.com)
720

821
* bumped up requirements to php 5.1.0
922

INSTALL

Lines changed: 0 additions & 38 deletions
This file was deleted.

INSTALL.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
XMLRPC for PHP
2+
==============
3+
4+
Requirements
5+
------------
6+
7+
The following requirements should be met prior to using 'XMLRPC for PHP':
8+
9+
* PHP 5.3.0 or later
10+
11+
* the php "curl" extension is needed if you wish to use SSL or HTTP 1.1 to
12+
communicate with remote servers
13+
14+
The php "xmlrpc" native extension is not required, but if it is installed,
15+
there will be no interference with the operation of this library.
16+
17+
18+
Installation instructions
19+
-------------------------
20+
21+
Installation of the library is quite easy:
22+
23+
1. Via Composer (highly recommended):
24+
25+
1. Install composer if you don't have it already present on your system.
26+
Depending on how you install, you may end up with a composer.phar file in your directory.
27+
In that case, no worries! Just substitute 'php composer.phar' for 'composer' in the commands below.
28+
29+
2. If you're creating a new project, create a new empty directory for it.
30+
31+
3. Open a terminal and use Composer to grab the library.
32+
33+
$ composer require phpxmlrpc/phpxmlrpc:4.0
34+
35+
4. Write your code.
36+
Once Composer has downloaded the component(s), all you need to do is include the vendor/autoload.php file that
37+
was generated by Composer. This file takes care of autoloading all of the libraries so that you can use them
38+
immediately, including phpxmlrpc:
39+
40+
// File example: src/script.php
41+
42+
// update this to the path to the "vendor/" directory, relative to this file
43+
require_once __DIR__.'/../vendor/autoload.php';
44+
45+
use PhpXmlRpc\Value;
46+
use PhpXmlRpc\Request;
47+
use PhpXmlRpc\Client;
48+
49+
$client = new Client('http://some/server');
50+
$response = $client->send(new Request('method', array(new Value('parameter'))));
51+
52+
5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
53+
as leaving it open to access means that any visitor can trigger execution of php code such as
54+
the built-in debugger.
55+
56+
57+
2. Via manual download and autoload configuration
58+
59+
1. copy the contents of the src/ folder to any location required by your
60+
application (it can be inside the web server root or not).
61+
62+
2. configure your app autoloading mechanism so that all classes in the PhpXmlRpc namespace are loaded
63+
from that location: any PSR-4 compliant autoloader can do that, if you don't have any there is one
64+
available in src/Autoloader.php
65+
66+
3. Write your code.
67+
68+
// File example: script.php
69+
70+
require_once __DIR__.'my_autoloader.php';
71+
72+
use PhpXmlRpc\Value;
73+
use PhpXmlRpc\Request;
74+
use PhpXmlRpc\Client;
75+
76+
$client = new Client('http://some/server');
77+
$response = $client->send(new Request('method', array(new Value('parameter'))));
78+
79+
5. IMPORTANT! Make sure that the vendor/phpxmlrpc directory is not directly accessible from the internet,
80+
as leaving it open to access means that any visitor can trigger execution of php code such as
81+
the built-in debugger.
82+
83+
Tips
84+
----
85+
86+
Please note that usage of the 'pake' command is not required for installation of the library.
87+
At this moment it is only useful to build the html and pdf versions of the documentation, and the tarballs
88+
for distribution of the library.

Makefile

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)