Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 #18

Merged
merged 9 commits into from Oct 30, 2015
Merged

1.0 #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@

composer.lock
vendor/*
build/*
.DS_Store
9 changes: 8 additions & 1 deletion .travis.yml
Expand Up @@ -4,4 +4,11 @@ php:
- 5.4
- 5.5
- 5.6
script: phpunit -c ./build/phpunit.xml --coverage-text
- 7.0
- hhvm
before_script:
- composer install --dev
script:
- ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml
after_script:
- php ./vendor/bin/coveralls -v
6 changes: 4 additions & 2 deletions README.md
@@ -1,12 +1,14 @@
# minPHP #

[![Build Status](https://travis-ci.org/phillipsdata/minphp.svg)](https://travis-ci.org/phillipsdata/minphp)
[![Build Status](https://travis-ci.org/phillipsdata/minphp.svg?branch=1.0)](https://travis-ci.org/phillipsdata/minphp)

minPHP is an extremely lightweight MVC framework for PHP application development.

**Caution:** This repository is for minPHP 1.0, see [minPHP 0.x](https://github.com/phillipsdata/minphp/tree/0.x) for the previous version.

## Requirements ##

* PHP 5.1.3 or greater
* PHP 5.3.0 or greater

## Getting Started ##

Expand Down
39 changes: 39 additions & 0 deletions composer.json
@@ -0,0 +1,39 @@
{
"name": "minphp/minphp",
"description": "An extremely lightweight MVC framework",
"homepage": "http://github.com/phillipsdata/minphp",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Cody Phillips",
"email": "therealclphillips@gmail.com"
}
],
"require": {
"php": ">=5.3.0",
"minphp/cache": "dev-master",
"minphp/configure": "dev-master",
"minphp/container": "dev-master",
"minphp/date": "dev-master",
"minphp/form": "dev-master",
"minphp/html": "dev-master",
"minphp/input": "dev-master",
"minphp/language": "dev-master",
"minphp/pagination": "dev-master",
"minphp/xml": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2.2",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"classmap": [
"src/app",
"src/components",
"src/helpers",
"src/lib"
]
}
}
28 changes: 28 additions & 0 deletions phpunit.xml.dist
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
verbose="true">

<testsuites>
<testsuite name="minPHP">
<directory>tests</directory>
</testsuite>
</testsuites>

<logging>
<log type="coverage-html" target="build/coverage" title="minPHP"
charset="UTF-8" yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="junit" target="build/logs/junit.xml"
logIncompleteSkipped="false"/>
</logging>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
1 change: 0 additions & 1 deletion src/app/app_controller.php
Expand Up @@ -12,4 +12,3 @@ class AppController extends Controller {
# (e.g. $this->loadLang("langfile", "en_us"))
#
}
?>
1 change: 0 additions & 1 deletion src/app/app_model.php
Expand Up @@ -10,4 +10,3 @@ class AppModel extends Model {
# models that extend this class.
#
}
?>
2 changes: 0 additions & 2 deletions src/app/controllers/404.php
Expand Up @@ -9,5 +9,3 @@
class _404 extends AppController {

}

?>
1 change: 0 additions & 1 deletion src/app/controllers/main.php
Expand Up @@ -7,4 +7,3 @@ class Main extends AppController {


}
?>
1 change: 0 additions & 1 deletion src/components/acl/acl.php
Expand Up @@ -278,4 +278,3 @@ private function addAcl($aro_id, $aco_id, $action, $permission) {
set("action", $action)->set("permission", $permission)->insert("acl_acl");
}
}
?>
1 change: 0 additions & 1 deletion src/components/input/input.php
Expand Up @@ -589,4 +589,3 @@ private static function clearLeaves(&$data) {
$data = null;
}
}
?>
1 change: 0 additions & 1 deletion src/components/record/record.php
Expand Up @@ -1436,4 +1436,3 @@ public function quoteIdentifier($identifier) {
return implode(".", $parts);
}
}
?>
1 change: 0 additions & 1 deletion src/components/session/session.php
Expand Up @@ -292,4 +292,3 @@ private function sessionGarbageCollect($lifetime) {
return $this->Record->affectedRows();
}
}
?>
4 changes: 0 additions & 4 deletions src/config/core.php
@@ -1,8 +1,6 @@
<?php
/**
* Sets all core configuration settings used throughout the application
*
* @package minPHP
*/


Expand Down Expand Up @@ -57,5 +55,3 @@
// Set to true to allow keys with no definition to be output, set to false to
// output nothing if the key is not found.
Configure::set("Language.allow_pass_through", false);

?>
1 change: 0 additions & 1 deletion src/config/database.php
Expand Up @@ -44,4 +44,3 @@

unset($default);
unset($server);
?>
1 change: 0 additions & 1 deletion src/config/routes.php
Expand Up @@ -18,4 +18,3 @@
* example: $1, $2, ... $n.
*/

?>
1 change: 0 additions & 1 deletion src/config/session.php
Expand Up @@ -20,4 +20,3 @@
Configure::set("Session.session_name", "sid");
// Whether or not enable HTTP only session cookies
Configure::set("Session.session_httponly", true);
?>
1 change: 0 additions & 1 deletion src/helpers/date/date.php
Expand Up @@ -390,4 +390,3 @@ private function mergeArrays(array $arr1, array $arr2) {
return $arr1;
}
}
?>
1 change: 0 additions & 1 deletion src/helpers/form/form.php
Expand Up @@ -625,4 +625,3 @@ private function inArray($needle, array $haystack, $strict=false) {
return false;
}
}
?>
2 changes: 0 additions & 2 deletions src/helpers/html/html.php
Expand Up @@ -203,5 +203,3 @@ public function hyperlink($content) {
return preg_replace($pattern, $replacement, $content);
}
}

?>
1 change: 0 additions & 1 deletion src/helpers/javascript/javascript.php
Expand Up @@ -127,4 +127,3 @@ public function unsetInline() {
return $this;
}
}
?>
1 change: 0 additions & 1 deletion src/helpers/pagination/pagination.php
Expand Up @@ -444,4 +444,3 @@ private function output($html) {
echo $html;
}
}
?>
1 change: 0 additions & 1 deletion src/helpers/xml/xml.php
Expand Up @@ -119,4 +119,3 @@ private function buildXmlSegment($value, $root_node="result", $tab_count=-1) {
return $xml;
}
}
?>
1 change: 0 additions & 1 deletion src/index.php
Expand Up @@ -43,4 +43,3 @@
// Display rendering time if benchmarking is enabled
if (Configure::get("System.benchmark"))
echo "execution time: " . ($end-$start) . " seconds";
?>
1 change: 1 addition & 0 deletions src/lib/autoload.php
@@ -1,2 +1,3 @@
<?php
include_once VENDORDIR . "autoload.php";
spl_autoload_register(array('Loader', 'autoload'), true, true);
1 change: 0 additions & 1 deletion src/lib/cache.php
Expand Up @@ -88,4 +88,3 @@ private static final function cacheName($name, $path=null) {
return CACHEDIR . $path . md5(strtolower($name)) . Configure::get("Caching.ext");
}
}
?>
1 change: 0 additions & 1 deletion src/lib/configure.php
Expand Up @@ -100,4 +100,3 @@ public static function errorReporting($level) {
error_reporting($level);
}
}
?>
1 change: 0 additions & 1 deletion src/lib/controller.php
Expand Up @@ -322,4 +322,3 @@ protected final function setDefaultViewPath($path) {
$this->structure->setDefaultView($path);
}
}
?>
1 change: 0 additions & 1 deletion src/lib/dispatcher.php
Expand Up @@ -193,4 +193,3 @@ private static function cleanGlobals() {
}
}
}
?>
14 changes: 7 additions & 7 deletions src/lib/init.php
Expand Up @@ -18,9 +18,11 @@
error_reporting(-1);

/**
* Sets the version of minPHP in use. [Major].[Minor].[Revision].[Build.RC]
* Sets the version of minPHP in use. [Major].[Minor].[Revision]
*
* @deprecated since 1.0.0
*/
define("MINPHP_VERSION", "0.11.3.20131004");
define("MINPHP_VERSION", "1.0.0");

/**
* Sets the directory separator used throughout the application. DO NOT use this
Expand Down Expand Up @@ -110,13 +112,11 @@
/**
* Absolute path to the vendors directory, where vendor libraries are stored.
*/
define("VENDORDIR", ROOTWEBDIR . "vendors" . DS);
define("VENDORDIR", dirname(dirname(__DIR__)) . DS . "vendor" . DS);


// Include core libraries
include_once LIBDIR . "loader.php";
include_once LIBDIR . "autoload.php";
include_once LIBDIR . "stdlib.php";
// Include core configuration
include_once CONFIGDIR . "core.php";
?>
// Load core configuration
Configure::load("core");