From 6c4dfb25689ff2d61403203add6b872eb3ab2475 Mon Sep 17 00:00:00 2001 From: Daniel Jakob Date: Tue, 1 Sep 2015 12:18:20 +0200 Subject: [PATCH 1/3] Update readme + composer requirements; move license file and drop build.xml --- .gitignore | 4 + COPYING => LICENSE | 0 Makefile | 10 +- README.md | 73 +++++++-------- build.xml | 218 -------------------------------------------- composer.json | 4 +- tests/run-tests.php | 63 ------------- 7 files changed, 42 insertions(+), 330 deletions(-) rename COPYING => LICENSE (100%) delete mode 100644 build.xml delete mode 100644 tests/run-tests.php diff --git a/.gitignore b/.gitignore index 154553d2..627f0f4e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ build /doc/temp/ /docs/ /tools/phpunit +/tools/jsonlint +/tools/phpdoc +/tools/phpdoc.php +/tools/validate-json diff --git a/COPYING b/LICENSE similarity index 100% rename from COPYING rename to LICENSE diff --git a/Makefile b/Makefile index af8fa2c0..5f9393ff 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,12 @@ .PHONY: all -all:: - phing +all::test docs doc test:: - phing test - -tar:: - phing tar + tools/phpunit docs:: - phing doc + tools/phpdoc -d classes -t docs -p doc:: $(MAKE) $(MFLAGS) -C doc diff --git a/README.md b/README.md index 9a5f0c29..4abb94da 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,55 @@ # PHPTAL - Template Attribute Language for PHP -Master: [![Build Status](https://secure.travis-ci.org/pornel/PHPTAL.png?branch=master)](http://travis-ci.org/pornel/PHPTAL) +[![Monthly Downloads](https://poser.pugx.org/phptal/phptal/d/monthly)](https://packagist.org/packages/phptal/phptal) +[![License](https://poser.pugx.org/phptal/phptal/license)](LICENSE) +[![Build Status](https://secure.travis-ci.org/pornel/PHPTAL.png?branch=master)](http://travis-ci.org/pornel/PHPTAL) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/phptal/PHPTAL/badges/quality-score.png)](https://scrutinizer-ci.com/g/phptal/PHPTAL/) -Usage requirements -================== +Requirements +============ To use PHPTAL in your projects, you will only require PHP 5.1.2 or later. -If you want to use the builtin internationalisation system (I18N) the gettext extension must be compiled into PHP (`--with-gettext`). +If you want to use the builtin internationalisation system (I18N), the php-gettext extension must be installed or compiled into PHP (`--with-gettext`). + +Composer install (recommended) +============================== +You can install this package by using [Composer](http://getcomposer.org). +Link to Packagist: https://packagist.org/packages/phptal/phptal -Non-PEAR install -================ +``` +{ + "require": { + "phptal/phptal": "~1.3" + } +} +``` -To run you only need PHPTAL.php and files in PHPTAL directory. Other files are for unit tests and PEAR installer. +Manual install +============== -Get the latest PHPTAL package from http://phptal.org. +Get the latest PHPTAL tarball from https://github.com/phptal/PHPTAL/releases tar zxvf PHPTAL-X.X.X.tar.gz mv PHPTAL-X.X.X/PHPTAL* /path/to/your/php/include/path/ +Changelog +========= -PEAR Install -============ - -Get the latest PHPTAL package from http://phptal.org. - -Then run: - - pear install PHPTAL-X.X.X.tar.gz - - +[Please see the projects releases page](https://github.com/phptal/PHPTAL/releases) Getting the latest development version ====================================== -You can checkout the latest development version using: - - svn co https://svn.motion-twin.com/phptal/trunk phptal - - - -PHPTAL development requirements -=============================== - -If you want to hack PHPTAL (don't forget to send me patches), you will require: - - - The PHPTAL development package - - PEAR (to easily install other tools) - http://pear.php.net - - - Phing to run maintainance tasks +You can find the latest development version on github: - pear channel-discover pear.phing.info - pear install phing/phing + https://github.com/phptal/PHPTAL - - PHPUnit 3.4 to run tests +Addition development requirements (optional) +============================================ - pear channel-discover pear.phpunit.de - pear channel-discover pear.symfony-project.com - pear channel-discover components.ez.no - pear install phpunit/PHPUnit +If you would like to generate the offical html/text handbook by calling +`make doc`, you will need to install the `xmlto` package. Please use +your operating systems package manager to install it. diff --git a/build.xml b/build.xml deleted file mode 100644 index 097625b9..00000000 --- a/build.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/composer.json b/composer.json index 61e2f45f..ceaee61a 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,9 @@ "php": ">=5.1.2" }, "require-dev": { - "phpunit/phpunit": "~3.7.0" + "php": ">=5.3.3", + "phpunit/phpunit": "~4.8", + "phpdocumentor/phpdocumentor": "~2.8" }, "autoload": { "psr-0": { diff --git a/tests/run-tests.php b/tests/run-tests.php deleted file mode 100644 index 3207a211..00000000 --- a/tests/run-tests.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @author Kornel Lesiński - * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License - * @version SVN: $Id$ - * @link http://phptal.org/ - */ - -require_once 'PHPUnit/Autoload.php'; - -chdir(dirname(__FILE__)); - -require_once "./config.php"; - -if (isset($argv) && count($argv) >= 2) { - array_shift($argv); - foreach ($argv as $entry) { - echo "-> running standalone test units $entry\n"; - try - { - $suite = createTestSuiteForFile($entry); - $runner = new PHPUnit_TextUI_TestRunner(); - $runner->doRun($suite); - } - catch(Exception $e) - { - echo "Exception during execution of $entry: ".$e->getMessage()."\n\n"; - } - - } - exit(0); -} - -$alltests = new PHPUnit_Framework_TestSuite(); -foreach (new DirectoryIterator( dirname(__FILE__) ) as $f) { - if ($f->isDot() || !$f->isFile()) continue; - - if (preg_match('/(.*?Test).php$/', $f->getFileName())) { - $alltests->addTestSuite(createTestSuiteForFile($f->getPathName())); - } -} - - -$runner = new PHPUnit_TextUI_TestRunner(); -$runner->doRun($alltests); - -function createTestSuiteForFile($path) -{ - require_once $path; - $classname = basename($path, '.php'); - if (version_compare(PHP_VERSION, '5.3', '>=') && __NAMESPACE__) { - $classname = __NAMESPACE__ . '\\' . $classname; - } - return new PHPUnit_Framework_TestSuite($classname); -} - From 65825e4cf2496c3d802f3ca7d779f64b6e29599b Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 3 Sep 2015 15:02:29 +0100 Subject: [PATCH 2/3] #41 #43 - correcting travis-ci icon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4abb94da..4b1a51a9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Monthly Downloads](https://poser.pugx.org/phptal/phptal/d/monthly)](https://packagist.org/packages/phptal/phptal) [![License](https://poser.pugx.org/phptal/phptal/license)](LICENSE) -[![Build Status](https://secure.travis-ci.org/pornel/PHPTAL.png?branch=master)](http://travis-ci.org/pornel/PHPTAL) +[![Build Status](https://travis-ci.org/phptal/PHPTAL.svg?branch=master)](https://travis-ci.org/phptal/PHPTAL) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/phptal/PHPTAL/badges/quality-score.png)](https://scrutinizer-ci.com/g/phptal/PHPTAL/) Requirements From 4c96703f95afbc60c3f4932d08b22f61291c14a2 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 3 Sep 2015 15:03:10 +0100 Subject: [PATCH 3/3] #41 #43 - installation via CLI usage of composer --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4b1a51a9..d6873796 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,8 @@ Composer install (recommended) You can install this package by using [Composer](http://getcomposer.org). Link to Packagist: https://packagist.org/packages/phptal/phptal -``` -{ - "require": { - "phptal/phptal": "~1.3" - } -} +```sh +composer require phptal/phptal ``` Manual install