Skip to content

Commit

Permalink
update composer settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Feb 16, 2022
1 parent 488014e commit c04ed01
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib"]
path = lib
url = ../fatfree-core.git
url = https://github.com/bcosca/fatfree-core.git
12 changes: 2 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
"name": "bcosca/fatfree",
"description": "A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!",
"homepage": "http://fatfreeframework.com/",
"type": "project",
"license": "GPL-3.0",
"require": {
"php": ">=5.4"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/bcosca/fatfree"
}
],
"autoload": {
"files": ["lib/base.php"]
"bcosca/fatfree-core": "^3.8"
}
}
13 changes: 11 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
<?php

// Kickstart the framework
$f3=require('lib/base.php');
if (file_exists('vendor/autoload.php')) {
// load via composer
require_once('vendor/autoload.php');
$f3 = \Base::instance();
} elseif (!file_exists('lib/base.php')) {
die('fatfree-core not found. Run `git submodule init` and `git submodule update` or install via composer with `composer install`.');
} else {
// load via submodule
/** @var Base $f3 */
$f3=require('lib/base.php');
}

$f3->set('DEBUG',1);
if ((float)PCRE_VERSION<8.0)
Expand Down

0 comments on commit c04ed01

Please sign in to comment.