Skip to content

Commit

Permalink
update PHP requirements and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rosasurfer committed Jul 31, 2024
1 parent cfac20a commit da70a9a
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 45 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ vendor/
config.*properties
!config.dist.properties

/etc/httpd/cgi-bin/php.ini
/php-error.log
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
MiniStruts
----------
Java Struts inspired MVC micro framework for PHP
MVC micro framework for PHP inspired by Java Struts

[![Build Status](https://scrutinizer-ci.com/g/rosasurfer/ministruts/badges/build.png?b=master)](https://scrutinizer-ci.com/g/rosasurfer/ministruts/build-status/master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rosasurfer/ministruts/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rosasurfer/ministruts/?branch=master)
[![PHPStan Code Quality](https://img.shields.io/badge/PHPStan-level_7-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/89ae4863ef60444ab2054db45a217268)](https://www.codacy.com/app/rosasurfer/ministruts)
[![Build Status](https://scrutinizer-ci.com/g/rosasurfer/ministruts/badges/build.png?b=0.8)](https://scrutinizer-ci.com/g/rosasurfer/ministruts/build-status/0.8)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rosasurfer/ministruts/badges/quality-score.png?b=0.8)](https://scrutinizer-ci.com/g/rosasurfer/ministruts/?branch=0.8)
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"name": "rosasurfer/ministruts",
"description": "Java Struts inspired MVC micro framework for PHP",
"description": "MVC micro framework inspired by Java Struts",
"type": "library",
"license": "WTFPL",
"authors": [{
"name": "Peter Walther",
"email": "[email protected]"
}],
"config": {
"platform": {
"php": "5.6.40"
},
"optimize-autoloader": true
},
"require": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
Deny from all
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Order allow,deny
Allow from all

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
Order deny,allow
Deny from all
Allow from 127.0.0.1
Expand All @@ -47,7 +47,7 @@
<Files "*.php">
Options +ExecCGI
SetHandler fcgid-script
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/templates/cgi-bin/php56-wrapper" .php
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/cgi-bin/php56-wrapper" .php
</Files>
<IfModule mod_suexec.c>
# With mod_suexec FcgidWrapper must point to a permitted executable (see suexec -V).
Expand Down Expand Up @@ -78,11 +78,11 @@
Deny from all
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Order allow,deny
Allow from all

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
Order deny,allow
Deny from all
Allow from 127.0.0.1
Expand All @@ -106,7 +106,7 @@
<Files "*.php">
Options +ExecCGI
SetHandler fcgid-script
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/templates/cgi-bin/php56-wrapper" .php
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/cgi-bin/php56-wrapper" .php
</Files>
<IfModule mod_suexec.c>
# With mod_suexec FcgidWrapper must point to a permitted executable (see suexec -V).
Expand All @@ -116,7 +116,7 @@
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.key"
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.key"
</VirtualHost>
</IfModule>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
Deny from all
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Order allow,deny
Allow from all

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
Order deny,allow
Deny from all
Allow from 127.0.0.1
Expand Down Expand Up @@ -62,11 +62,11 @@
Deny from all
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Order allow,deny
Allow from all

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
Order deny,allow
Deny from all
Allow from 127.0.0.1
Expand All @@ -84,7 +84,7 @@
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.key"
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.key"
</VirtualHost>
</IfModule>
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
Require all denied
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Require all granted

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
AllowOverride All
Require local
</Directory>
Expand All @@ -42,7 +42,7 @@
<Files "*.php">
Options +ExecCGI
SetHandler fcgid-script
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/templates/cgi-bin/php56-wrapper" .php
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/cgi-bin/php56-wrapper" .php
</Files>
<IfModule mod_suexec.c>
# With mod_suexec FcgidWrapper must point to a permitted executable (see suexec -V).
Expand Down Expand Up @@ -72,10 +72,10 @@
Require all denied
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Require all granted

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
AllowOverride All
Require local
</Directory>
Expand All @@ -96,7 +96,7 @@
<Files "*.php">
Options +ExecCGI
SetHandler fcgid-script
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/templates/cgi-bin/php56-wrapper" .php
FcgidWrapper "${SITES}/example.ministruts.com/etc/httpd/cgi-bin/php56-wrapper" .php
</Files>
<IfModule mod_suexec.c>
# With mod_suexec FcgidWrapper must point to a permitted executable (see suexec -V).
Expand All @@ -106,7 +106,7 @@
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.key"
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.key"
</VirtualHost>
</IfModule>
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
Require all denied
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Require all granted

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
AllowOverride All
Require local
</Directory>
Expand Down Expand Up @@ -56,10 +56,10 @@
Require all denied
</Directory>
<Directory "${SITES}/example.ministruts.com/web">
# (1) public access, .htaccess disabled or...
# public access, .htaccess disabled or...
Require all granted

# (2) ...restricted access, .htaccess enabled
# ...restricted access, .htaccess enabled
AllowOverride All
Require local
</Directory>
Expand All @@ -74,7 +74,7 @@
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/templates/ssl/example.ministruts.com.key"
SSLCertificateFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.crt"
SSLCertificateKeyFile "${SITES}/example.ministruts.com/etc/httpd/ssl/example.ministruts.com.key"
</VirtualHost>
</IfModule>
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion etc/httpd/templates/cgi-bin/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion etc/httpd/templates/ssl/.gitignore

This file was deleted.

23 changes: 18 additions & 5 deletions etc/js/rosasurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


/**
* Polyfills and objects extensions.
* Polyfills
*/
if (!Array.from) { Array.from = (function() {
var toStr = Object.prototype.toString;
Expand Down Expand Up @@ -160,7 +160,7 @@ var rosasurfer = {
*
* @param string url [optional] - URL to get query parameters from (default: the current page location)
*
* @return array - {key1: value1, key2: value2, ..., keyN: valueN}
* @return object - {key1: value1, key2: value2, ..., keyN: valueN}
*/
getQueryParameters: function getQueryParameters(url) {
var pos, query;
Expand Down Expand Up @@ -285,16 +285,29 @@ var rosasurfer = {
else if (arg.constructor) type = arg.constructor.name || arg.constructor.toString();
else type = ''+ arg;

if (type.startsWith('[object ')) { // [object HTMLAnchorElement]
if (type.startsWith('[object ')) { // [object HTMLAnchorElement]
type = type.slice(8, -1);
}
else if (type.startsWith('function ')) { // function HTMLAnchorElement() { [native code] }
type = type.slice(9, type.indexOf('('));
else if (type.startsWith('function')) { // function HTMLAnchorElement() { [native code] }
var name = type.slice(8, type.indexOf('(')).trim(); // function( param1, param2... ) { <custom code> }
type = name.length ? name : 'function';
}
}
return type;
},


/**
* Whether a variable is defined.
*
* @param mixed arg
*
* @return bool
*/
isDefined: function isDefined(arg) {
return (typeof(arg) != 'undefined');
},


/**
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message Digest Algorithm, as defined in RFC 1321.
Expand Down
2 changes: 1 addition & 1 deletion etc/phpstan/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

parameters:
autoload_files:
- etc/phpstan/api-stubs.php # stubs for PHP extensions and procedural code
- etc/phpstan/stubs.php # stubs for PHP extensions and procedural code

excludes_analyse:
- doc/
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit da70a9a

Please sign in to comment.