Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F726900
D29.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 2:51 AM
Size
8 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 2:51 AM (3 d, 1 h ago)
Engine
blob
Format
Raw Data
Handle
536730
Attached To
D29: INP-1394 - Enable Composer Support
D29.diff
View Options
Index: branches/5.2.x/composer.json
===================================================================
--- branches/5.2.x/composer.json
+++ branches/5.2.x/composer.json
@@ -0,0 +1,5 @@
+{
+ "require-dev": {
+ "aik099/coding-standard": "dev-in-portal"
+ }
+}
Index: branches/5.2.x/composer.lock
===================================================================
--- branches/5.2.x/composer.lock
+++ branches/5.2.x/composer.lock
@@ -0,0 +1,59 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
+ ],
+ "hash": "4c8225aabf36f626240d5615afd5c66b",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "aik099/coding-standard",
+ "version": "dev-in-portal",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/aik099/CodingStandard.git",
+ "reference": "e389596b9b1fc8f67f1cca34a1c8bdd9d85104d0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/aik099/CodingStandard/zipball/e389596b9b1fc8f67f1cca34a1c8bdd9d85104d0",
+ "reference": "e389596b9b1fc8f67f1cca34a1c8bdd9d85104d0",
+ "shasum": ""
+ },
+ "require-dev": {
+ "squizlabs/php_codesniffer": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Alexander Obuhovich",
+ "email": "aik.bold@gmail.com"
+ }
+ ],
+ "description": "The PHP_CodeSniffer coding standard I'm using on all of my projects.",
+ "keywords": [
+ "PHP_CodeSniffer",
+ "codesniffer"
+ ],
+ "time": "2014-12-29 12:08:25"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": {
+ "aik099/coding-standard": 20
+ },
+ "prefer-stable": false,
+ "platform": [],
+ "platform-dev": []
+}
Index: branches/5.2.x/core/install.php
===================================================================
--- branches/5.2.x/core/install.php
+++ branches/5.2.x/core/install.php
@@ -288,7 +288,7 @@
switch ($this->currentStep) {
case 'sys_requirements':
$required_checks = Array (
- 'php_version', 'curl', 'simplexml', 'freetype', 'gd_version',
+ 'php_version', 'composer', 'curl', 'simplexml', 'freetype', 'gd_version',
'jpeg', 'mysql', 'json', 'date.timezone', 'output_buffering',
);
Index: branches/5.2.x/core/install/incs/style.css
===================================================================
--- branches/5.2.x/core/install/incs/style.css
+++ branches/5.2.x/core/install/incs/style.css
@@ -35,6 +35,10 @@
font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif;
}
+ol li {
+ font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif;
+}
+
.head_version {
padding-right: 5px;
font-weight: normal;
@@ -223,4 +227,4 @@
#core-tb-prev.disabled { background-position: -64px -704px; }
#core-tb-next { background-position: -0px -640px; }
#core-tb-next.hover { background-position: -32px -640px; }
-#core-tb-next.disabled { background-position: -64px -640px; }
\ No newline at end of file
+#core-tb-next.disabled { background-position: -64px -640px; }
Index: branches/5.2.x/core/install/prerequisites.php
===================================================================
--- branches/5.2.x/core/install/prerequisites.php
+++ branches/5.2.x/core/install/prerequisites.php
@@ -117,7 +117,7 @@
function CheckSystemRequirements()
{
$ret = Array ();
- $ret['php_version'] = version_compare(PHP_VERSION, '5.2.0', '>=');
+ $ret['php_version'] = version_compare(PHP_VERSION, '5.3.2', '>=');
if ( function_exists('apache_get_modules') ) {
$mod_rewrite = in_array('mod_rewrite', apache_get_modules());
@@ -148,6 +148,8 @@
$output = shell_exec('java -version 2>&1');
$ret['java'] = stripos($output, 'java version') !== false;
+ $ret['composer'] = file_exists(FULL_PATH . '/vendor/autoload.php');
+
$ret['memory_limit'] = $this->isPhpSettingChangeable('memory_limit', '33M');
$ret['display_errors'] = $this->isPhpSettingChangeable('display_errors', '1');
$ret['error_reporting'] = $this->canChangeErrorReporting();
@@ -238,4 +240,4 @@
return $ret;
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/core/install/step_templates/sys_requirements.tpl
===================================================================
--- branches/5.2.x/core/install/step_templates/sys_requirements.tpl
+++ branches/5.2.x/core/install/step_templates/sys_requirements.tpl
@@ -11,9 +11,10 @@
</tr>';
$check_titles = Array (
- 'php_version' => 'PHP version 5.2.0 or above<span class="error">*</span>',
+ 'php_version' => 'PHP version 5.3.2 or above<span class="error">*</span>',
'url_rewriting' => 'URL rewriting support',
'java' => 'Java template compression',
+ 'composer' => 'Dependencies via Composer<span class="error">*</span>',
'sep1' => '<strong>PHP extensions:</strong>',
'memcache' => '- Memory caching support',
'curl' => '- Accessing remote resources (via cURL)<span class="error">*</span>',
@@ -36,13 +37,6 @@
$output = sprintf($heading_tpl, '<strong>Server-side requirements</strong>');
$check_results = $this->toolkit->CallPrerequisitesMethod('core/', 'CheckSystemRequirements');
- /*$required_checks = Array (
- 'php_version', 'simplexml', 'curl', 'freetype', 'gd_version',
- 'jpeg', 'mysql', 'date.timezone', 'output_buffering',
- );
-
- $required_checks = array_diff($required_checks, array_keys( array_filter($check_results) ));*/
-
foreach ($check_titles AS $key => $title) {
if ( substr($key, 0, 3) == 'sep' ) {
$check_result = '';
Index: branches/5.2.x/core/install/steps_db.xml
===================================================================
--- branches/5.2.x/core/install/steps_db.xml
+++ branches/5.2.x/core/install/steps_db.xml
@@ -222,7 +222,7 @@
<![CDATA[
<p>The <i>System Requirements Check</i> option should be used to ensure proper system behavior in the current environment.</p>
<p>
- <b>PHP version 5.2.0 or above<span class="error">*</span></b><br/>
+ <b>PHP version 5.3.2 or above<span class="error">*</span></b><br/>
Use this PHP version or better to ensure normal website operation on every day basis.
</p>
<p>
@@ -235,6 +235,15 @@
to minify HTML, CSS and JavaScript output of website. This allows to make websites, which opens even faster, then before.
</p>
<p>
+ <b>Dependencies via Composer</b><br/>
+ In-Portal uses <a href="https://getcomposer.org/" target="_blank">Composer</a> to install required 3rd-party libraries.
+ Please ensure, that:<br/>
+ <ol>
+ <li>Composer is installed (<a href="https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx" target="_blank">instructions</a>)</li>
+ <li>Dependencies are installed (<a href="https://getcomposer.org/doc/00-intro.md#using-composer" target="_blank">instructions</a>)</li>
+ </ol>
+ </p>
+ <p>
<b>Memory caching support</b><br/>
When available use <a href="http://memcached.org/" target="_blank">Memcached</a> memory object caching system for data caching.
Will severely improve website performance under heavy load and page loading speed in general.
@@ -327,4 +336,4 @@
</p>
]]>
</step>
-</steps>
\ No newline at end of file
+</steps>
Index: branches/5.2.x/core/kernel/startup.php
===================================================================
--- branches/5.2.x/core/kernel/startup.php
+++ branches/5.2.x/core/kernel/startup.php
@@ -68,6 +68,12 @@
exit;
}
+ if ( !file_exists(FULL_PATH . '/vendor/autoload.php') ) {
+ echo 'Cannot find an "/vendor/autoload.php" file, have you executed "composer install" command?<br/>';
+ flush();
+ exit;
+ }
+
// variable WebsitePath is auto-detected once during installation/upgrade
define('BASE_PATH', $vars['WebsitePath']);
@@ -185,6 +191,7 @@
KERNEL_PATH . "/db/dbitem.php",
KERNEL_PATH . "/event_handler.php",
KERNEL_PATH . '/db/db_event_handler.php',
+ FULL_PATH . '/vendor/autoload.php',
);
foreach ($includes as $a_file) {
@@ -201,4 +208,4 @@
// system users
define('USER_ROOT', -1);
- define('USER_GUEST', -2);
\ No newline at end of file
+ define('USER_GUEST', -2);
Event Timeline
Log In to Comment