Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add temporary files created by PHPUnit tests to gitignore file
- Loading branch information
Showing
14 changed files
with
221 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
php.ini | ||
composer.lock | ||
composer.phar | ||
.idea | ||
/src/var/log/*.log | ||
/target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Version 0.2.1 | ||
|
||
## Bugfixes | ||
|
||
* None | ||
|
||
## Features | ||
|
||
* Refactoring ANT PHPUnit execution process | ||
* Composer integration by optimizing folder structure (move bootstrap.php + phpunit.xml.dist => phpunit.xml) | ||
* Switch to new appserver-io/build build- and deployment environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,34 @@ | ||
TechDivision_WebServer | ||
====================== | ||
____________________________________________ | ||
[![Latest Stable Version](https://poser.pugx.org/techdivision/webserver/v/stable.png)](https://packagist.org/packages/techdivision/webserver) [![Total Downloads](https://poser.pugx.org/techdivision/webserver/downloads.png)](https://packagist.org/packages/techdivision/webserver) [![Latest Unstable Version](https://poser.pugx.org/techdivision/webserver/v/unstable.png)](https://packagist.org/packages/techdivision/webserver) [![License](https://poser.pugx.org/techdivision/webserver/license.png)](https://packagist.org/packages/techdivision/webserver) [![Build Status](https://travis-ci.org/techdivision/TechDivision_WebServer.png)](https://travis-ci.org/techdivision/TechDivision_WebServer) | ||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/?branch=master) | ||
[![Code Coverage](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/?branch=master) | ||
____________________________________________ | ||
# TechDivision_WebServer | ||
|
||
####Are you serious? A web server written in pure PHP for PHP? | ||
[![Latest Stable Version](https://poser.pugx.org/techdivision/webserver/v/stable.png)](https://packagist.org/packages/techdivision/webserver) [![Total Downloads](https://poser.pugx.org/techdivision/webserver/downloads.png)](https://packagist.org/packages/techdivision/webserver) [![Latest Unstable Version](https://poser.pugx.org/techdivision/webserver/v/unstable.png)](https://packagist.org/packages/techdivision/webserver) [![License](https://poser.pugx.org/techdivision/webserver/license.png)](https://packagist.org/packages/techdivision/webserver) [![Build Status](https://travis-ci.org/techdivision/TechDivision_WebServer.png)](https://travis-ci.org/techdivision/TechDivision_WebServer)[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/?branch=master)[![Code Coverage](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/techdivision/TechDivision_WebServer/?branch=master) | ||
|
||
## Introduction | ||
|
||
Are you serious? A web server written in pure PHP for PHP? Ohhhh Yes! :) This is a HTTP/1.1 compliant webserver written in php. | ||
And the best... it has a php module and it's multithreaded! | ||
|
||
Ohhhh Yes! :) This is a HTTP/1.1 compliant webserver written in php. And the best... it has a php module and it's multithreaded! | ||
We use this in the [`appserver.io`](<http://www.appserver.io>) project as a server component for the WebContainer. | ||
|
||
## Documentation | ||
Our [documentation can be found here](<https://github.com/techdivision/TechDivision_AppserverDocumentation/blob/master/docs/components/servers/webserver/>). | ||
## Installation | ||
|
||
If you want to use the web server with your application you can install it by adding | ||
|
||
```sh | ||
{ | ||
"require": { | ||
"techdivision/webserver": "dev-master" | ||
}, | ||
} | ||
``` | ||
|
||
to your ```composer.json``` and invoke ```composer update``` in your project. | ||
|
||
## Usage | ||
|
||
Coming soon! | ||
|
||
# External Links | ||
|
||
* appserver.io [combined documentation](http://docs.appserver.io) | ||
* [Getting started](https://github.com/techdivision/TechDivision_AppserverDocumentation/tree/master/docs/getting-started) | ||
* Documentation found on [GitHub](https://github.com/techdivision/TechDivision_AppserverDocumentation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,166 +1,60 @@ | ||
<?xml version="1.0"?> | ||
<project name="TechDivision_WebServer" default="deploy" basedir="."> | ||
<!DOCTYPE project> | ||
<project name="techdivision/webserver" default="composer-init" basedir="."> | ||
|
||
<!-- initialize ENV variable --> | ||
<property environment="env" /> | ||
|
||
<!-- initialize file based properties --> | ||
<property file="${basedir}/build.properties"/> | ||
<property file="${basedir}/build.default.properties"/> | ||
<property file="${basedir}/build.${os.family}.properties"/> | ||
|
||
<property environment="env" /> | ||
|
||
<property name="namespace" value="techdivision" /> | ||
<property name="module" value="webserver"/> | ||
|
||
<!-- initialize the library specific properties --> | ||
<property name="codepool" value="vendor"/> | ||
<property name="unique.name" value="${codepool}/${namespace}/${module}" /> | ||
<property name="php-src.dir" value="${basedir}/src" /> | ||
<property name="php-test.dir" value="${basedir}/tests" /> | ||
<property name="php-target.dir" value="${basedir}/target"/> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Cleans the directories with the generated source files --> | ||
<!-- ==================================================================== --> | ||
<target name="clean" description="Cleans almost everything, so use carefully."> | ||
<delete dir="${php-target.dir}" includeemptydirs="true" quiet="false" verbose="true" failonerror="true"/> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Prepares all the required directories --> | ||
<!-- ==================================================================== --> | ||
<target name="prepare" depends="clean" description="Prepares all the required directories."> | ||
<mkdir dir="${php-target.dir}" /> | ||
<mkdir dir="${php-target.dir}/reports/unit/coverage" /> | ||
</target> | ||
|
||
|
||
<!-- initialize the directory where we can find the real build files --> | ||
<property name="vendor.dir" value ="${basedir}/${codepool}" /> | ||
<property name="build.dir" value="${vendor.dir}/appserver-io/build" /> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Copies the sources to the target directory --> | ||
<!-- Import the common build configuration file --> | ||
<!-- ==================================================================== --> | ||
<target name="copy" depends="prepare" description="Copies the sources to the target directory."> | ||
<copy todir="${php-target.dir}/${unique.name}/src" preservelastmodified="true" overwrite="true"> | ||
<fileset dir="${php-src.dir}"> | ||
<include name="**/*" /> | ||
</fileset> | ||
</copy> | ||
</target> | ||
<import file="${build.dir}/common.xml" optional="true"/> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Copies the sources to the deploy directory --> | ||
<!-- Checks if composer has installed it's dependencies --> | ||
<!-- ==================================================================== --> | ||
<target name="deploy" description="Copies the sources to the deploy directory."> | ||
<antcall target="prepare"/> | ||
<antcall target="copy"/> | ||
<copy todir="${deploy.dir}" preservelastmodified="true" overwrite="true"> | ||
<fileset dir="${php-target.dir}"> | ||
<include name="**/*"/> | ||
</fileset> | ||
</copy> | ||
<target name="is-composer-installed"> | ||
<condition property="composer.present"> | ||
<available file="${build.dir}" type="dir"/> | ||
</condition> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Generates the API documentation --> | ||
<!-- Installs all dependencies defined in composer.json --> | ||
<!-- ==================================================================== --> | ||
<target name="apidoc" description="Generates the API documentation."> | ||
<exec executable="phpdoc"> | ||
<arg line="-t ${php-target.dir}/docs -d ${php-src.dir}"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the code sniffer and generates a report --> | ||
<!-- ==================================================================== --> | ||
<target name="phpcs" description="Runs the code sniffer and generates a report."> | ||
<exec executable="phpcs" failonerror="true"> | ||
<!-- call phpcs without report-file to get error message on build console --> | ||
<arg line="-n --extensions=php --standard=phpcs.xml --ignore=src/TechDivision/WebServer/Modules/FastCgiClient.php --ignore=src/TechDivision/WebServer/Modules/CommunicationException.php ./"/> | ||
<target name="composer-install" depends="is-composer-installed" unless="composer.present" description="Installs all dependencies defined in composer.json"> | ||
<exec dir="${basedir}" executable="composer"> | ||
<arg line="--no-interaction --dev install"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the copy and paste detection --> | ||
<!-- Updates composer dependencies defined in composer.json --> | ||
<!-- ==================================================================== --> | ||
<target name="phpcpd" description="Runs the copy and paste detection."> | ||
<exec executable="phpcpd"> | ||
<arg line="--log-pmd ${php-target.dir}/reports/pmd-cpd.xml ${php-src.dir}"/> | ||
<target name="composer-update" depends="is-composer-installed" if="composer.present" description="Updates composer dependencies defined in composer.json"> | ||
<exec dir="${basedir}" executable="composer"> | ||
<arg line="--no-interaction --dev update"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Generate phploc.csv --> | ||
<!-- ==================================================================== --> | ||
<target name="phploc" description="Generate phploc.csv"> | ||
<exec executable="phploc"> | ||
<arg line="--log-xml ${php-target.dir}/reports/phploc.xml ${php-src.dir}"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the PHPDepend tool and generats a graphs --> | ||
<!-- ==================================================================== --> | ||
<target name="pdepend" description="Runs the PHPDepend tool and generats a graphs."> | ||
<exec executable="pdepend"> | ||
<arg line="--summary-xml=${php-target.dir}/reports/pdepend.xml --jdepend-xml=${php-target.dir}/reports/jdepend.xml --jdepend-chart=${php-target.dir}/reports/jdepend.svg --overview-pyramid=${php-target.dir}/reports/pdepend-pyramid.svg ${php-src.dir}" /> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the PHP mess detector tool --> | ||
<!-- ==================================================================== --> | ||
<target name="phpmd" description="Runs the PHP Mess detector tool."> | ||
<exec executable="phpmd"> | ||
<arg line="${php-src.dir} xml codesize,unusedcode --reportfile ${php-target.dir}/reports/pmd.xml" /> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Copies the test sources to the target directory --> | ||
<!-- ==================================================================== --> | ||
<target name="copy-tests" depends="copy" description="Copies the test sources to the target directory."> | ||
<!-- copy the test classes to the target directory --> | ||
<copy todir="${php-target.dir}/${unique.name}/src"> | ||
<fileset dir="${php-test.dir}"> | ||
<include name="**/*" /> | ||
</fileset> | ||
<filterchain> | ||
<expandproperties/> | ||
</filterchain> | ||
</copy> | ||
<!-- copy the composer configuration file to the target directory --> | ||
<copy file="${basedir}/composer.json" todir="${php-target.dir}" /> | ||
<!-- install composer packages --> | ||
<exec dir="${php-target.dir}" executable="composer"> | ||
<env key="PATH" value="${instance.base.dir}/bin:${env.PATH}"/> | ||
<arg line="--no-interaction update"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the PHPUnit tests on Travis-CI and generates a report --> | ||
<!-- ==================================================================== --> | ||
<target name="run-tests" depends="copy-tests" description="Runs the PHPUnit tests on Travis-CI and generates a report."> | ||
<exec executable="phpunit" dir="${php-target.dir}/${unique.name}/src"> | ||
<arg line="--configuration phpunit.xml.dist" /> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the PHPUnit tests and generates a report --> | ||
<!-- ==================================================================== --> | ||
<target name="run-tests-in-runtime" depends="copy-tests" description="Runs the PHPUnit tests and generates a report."> | ||
<exec executable="${instance.base.dir}/bin/php" dir="${php-target.dir}/${unique.name}/src" failonerror="true"> | ||
<arg line="-d zend_extension=xdebug.so ${instance.base.dir}/app/code/vendor/bin/phpunit --configuration phpunit.xml.dist" /> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Runs the PHPUnit tests and generates the code metrics --> | ||
<!-- ==================================================================== --> | ||
<target name="build" description="Runs the PHPUnit tests and generates the code metrics."> | ||
<antcall target="phpcs"/> | ||
<antcall target="run-tests"/> | ||
<!-- | ||
<antcall target="apidoc"/> | ||
<antcall target="phpcpd"/> | ||
<antcall target="phploc"/> | ||
<antcall target="pdepend"/> | ||
<antcall target="phpmd"/> | ||
--> | ||
<!-- ===================================================================== --> | ||
<!-- Checks if the build- and deployment stub has already been initialized --> | ||
<!-- ===================================================================== --> | ||
<target name="composer-init"> | ||
<antcall target="composer-install"/> | ||
<antcall target="composer-update"/> | ||
</target> | ||
|
||
</project> | ||
</project> |
Oops, something went wrong.