Browse Source

Merge pull request #1325 from LadyMozzarella/remove-silica

Remove Php's Silica Framework
Mike Smith 10 years ago
parent
commit
7edd665053

+ 0 - 1
.travis.yml

@@ -106,7 +106,6 @@ env:
     - "TESTDIR=PHP/php-pimf"
     - "TESTDIR=PHP/php-silex"
     - "TESTDIR=PHP/php-silex-orm"
-    - "TESTDIR=PHP/php-silica"
     - "TESTDIR=PHP/php-slim"
     - "TESTDIR=PHP/symfony2"
     - "TESTDIR=PHP/symfony2-stripped"

+ 0 - 9
frameworks/PHP/php-silica/.gitignore

@@ -1,9 +0,0 @@
-/app/cache
-/app/logs
-/bin
-/vendors
-/build
-/dist
-.DS_Store
-/tags
-.idea

+ 0 - 36
frameworks/PHP/php-silica/README.md

@@ -1,36 +0,0 @@
-# Silica Benchmarking Test
-
-This is the Silica PHP portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
-
-### JSON Encoding Test
-Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php).
-
-* [JSON test controller](web/index.php)
-
-
-### Data-Store/Database Mapping Test
-Uses the Doctrine DBAL functionality.
-
-* [DB test controller](web/index.php)
-
-
-## Infrastructure Software Versions
-The tests were run with:
-
-* [Silica dev-master](https://github.com/changloong/Silica)
-* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
-* [nginx 1.4.0](http://nginx.org/)
-* [MySQL 5.5.29](https://dev.mysql.com/)
-
-## Test URLs
-### JSON Encoding Test
-
-http://localhost/json
-
-### Data-Store/Database Mapping Test
-
-http://localhost/db
-
-### Variable Query Test
-    
-http://localhost/db?queries=2

+ 0 - 9
frameworks/PHP/php-silica/bash_profile.sh

@@ -1,9 +0,0 @@
-#!/bin/bash
-
-export PHP_HOME=${IROOT}/php-5.5.17
-
-export PHP_FPM=$PHP_HOME/sbin/php-fpm
-
-export COMPOSER_HOME=${IROOT}/php-composer
-
-export NGINX_HOME=${IROOT}/nginx

+ 0 - 24
frameworks/PHP/php-silica/benchmark_config

@@ -1,24 +0,0 @@
-{
-  "framework": "silica",
-  "tests": [{
-    "raw": {
-      "setup_file": "setup",
-      "db_url": "/db",
-      "query_url": "/db?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Micro",
-      "database": "MySQL",
-      "framework": "silica",
-      "language": "PHP",
-      "orm": "Raw",
-      "platform": "PHP-FPM",
-      "webserver": "nginx",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "silica",
-      "notes": "",
-      "versus": "php"
-    }
-  }]
-}

+ 0 - 6
frameworks/PHP/php-silica/composer.json

@@ -1,6 +0,0 @@
-{
-    "require": {
-        "silica/silica": "dev-master"
-    }
-}
-

+ 0 - 136
frameworks/PHP/php-silica/deploy/nginx.conf

@@ -1,136 +0,0 @@
-#user  nobody;
-worker_processes  8;
-
-#error_log  logs/error.log;
-#error_log  logs/error.log  notice;
-#error_log  logs/error.log  info;
-error_log stderr error;
-
-#pid        logs/nginx.pid;
-
-
-events {
-    worker_connections  1024;
-}
-
-
-http {
-    include       /usr/local/nginx/conf/mime.types;
-    default_type  application/octet-stream;
-
-    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-    #                  '$status $body_bytes_sent "$http_referer" '
-    #                  '"$http_user_agent" "$http_x_forwarded_for"';
-
-    #access_log  logs/access.log  main;
-    access_log off;
-
-    sendfile        on;
-    #tcp_nopush     on;
-
-    #keepalive_timeout  0;
-    keepalive_timeout  65;
-
-    #gzip  on;
-
-    upstream fastcgi_backend {
-        server 127.0.0.1:9001;
-        keepalive 32;
-    }
-
-    server {
-        listen       8080;
-        server_name  localhost;
-
-        #charset koi8-r;
-
-        #access_log  logs/host.access.log  main;
-
-        #location / {
-        #    root   html;
-        #    index  index.html index.htm;
-        #}
-
-        #error_page  404              /404.html;
-
-        # redirect server error pages to the static page /50x.html
-        #
-        #error_page   500 502 503 504  /50x.html;
-        #location = /50x.html {
-        #    root   html;
-        #}
-
-        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-        #
-        #location ~ \.php$ {
-        #    proxy_pass   http://127.0.0.1;
-        #}
-
-        root /home/ubuntu/FrameworkBenchmarks/php-silica/web/;
-        index  index.php;
-
-        location / {
-            try_files $uri @rewriteapp;
-        }
-		
-        location @rewriteapp {
-                rewrite ^(.*)$ /app.php/$1 last;
-        }
-
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
-        location ~ \.php$ {
-            fastcgi_pass   fastcgi_backend;
-            fastcgi_keep_conn on;
-            fastcgi_index  index.php;
-#            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
-            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-            include        /usr/local/nginx/conf/fastcgi_params;
-        }
-
-        # deny access to .htaccess files, if Apache's document root
-        # concurs with nginx's one
-        #
-        #location ~ /\.ht {
-        #    deny  all;
-        #}
-    }
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-}

+ 0 - 9
frameworks/PHP/php-silica/deploy/php-silica

@@ -1,9 +0,0 @@
-<VirtualHost *:8080>
-  Alias /php-silex/ "/home/ubuntu/FrameworkBenchmarks/php-silica/web/"
-  <Directory /home/ubuntu/FrameworkBenchmarks/php-silica/web/>
-          Options Indexes FollowSymLinks MultiViews
-          #AllowOverride None
-          Order allow,deny
-          allow from all
-  </Directory>
-</VirtualHost>

+ 0 - 3
frameworks/PHP/php-silica/install.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-
-fw_depends php composer nginx

+ 0 - 13
frameworks/PHP/php-silica/setup.sh

@@ -1,13 +0,0 @@
-#!/bin/bash
-
-sed -i 's|192.168.100.102|'"${DBHOST}"'|g' web/app.php
-sed -i 's|"./FrameworkBenchmarks/php-silica|"'"${TROOT}"'|g' deploy/php-silica
-sed -i 's|Directory .*/FrameworkBenchmarks/php-silica|Directory '"${TROOT}"'|g' deploy/php-silica
-sed -i 's|root .*/FrameworkBenchmarks/php-silica|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
-
-composer.phar install
-$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 0 - 4
frameworks/PHP/php-silica/source_code

@@ -1,4 +0,0 @@
-./php-silica/web
-./php-silica/web/.htaccess
-./php-silica/web/app.php
-./php-silica/deploy/php-silica

+ 0 - 8
frameworks/PHP/php-silica/web/.htaccess

@@ -1,8 +0,0 @@
-# /web/.htaccess
-<IfModule mod_rewrite.c>
-    Options -MultiViews
-
-    RewriteEngine On
-    RewriteCond %{REQUEST_FILENAME} !-f
-    RewriteRule ^ index.php [L]
-</IfModule>

+ 0 - 51
frameworks/PHP/php-silica/web/app.php

@@ -1,51 +0,0 @@
-<?php
-
-error_reporting(-1);
-
-require_once __DIR__ . '/../vendor/silica/silica/src/Silica/Application.php' ;
-
-$app = new Silica\Application();
-
-$app
-->share('pdo', function($app) {
-    $pdo    = new PDO('mysql::host=192.168.100.102;dbname=hello_world', 'benchmarkdbuser', 'benchmarkdbpass', array(
-				PDO::ATTR_PERSISTENT => true ,
-           ) ) ;
-    return $pdo ;
-})
->get('/json', function() {
-	echo json_encode(array("message" => "Hello World!"));
-}) 
->get('/db', function() use ($app) {
-	
-	$query_count = 1;
-	if (TRUE === isset($_GET['queries'])) {
-	  $query_count = $_GET['queries'];
-	}
-
-	// Create an array with the response string.
-	$arr = array();
-	$id = mt_rand(1, 10000);
-
-	// Define query
-	$statement = $app['pdo']->prepare('SELECT randomNumber FROM World WHERE id = :id');
-	$statement->bindParam(':id', $id, PDO::PARAM_INT);
-
-	// For each query, store the result set values in the response array
-	while (0 < $query_count--) {
-	  $statement->execute();
-  
-	  // Store result in array.
-	  $arr[] = array('id' => $id, 'randomNumber' => $statement->fetchColumn());
-	  $id = mt_rand(1, 10000);
-	}
-
-	// Use the PHP standard JSON encoder.
-	// http://www.php.net/manual/en/function.json-encode.php
-	echo json_encode($arr);
-})
->run() ;
-
-
-
-