Skip to content

Commit

Permalink
Move composer to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schindler committed Oct 27, 2022
1 parent ad31c0b commit 3c42c38
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/Backend/Libraries/vendor/
vendor/
.DS_Store
5 changes: 0 additions & 5 deletions Backend/Libraries/composer.json

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Since I'm mostly using [SvelteKit](https://github.com/sveltejs/kit) and [PocketB
This router is dependency-free. The only composer package installed is [PHPStan](https://phpstan.org), for static code analysis. Remove composer with

```zsh
rm -rf Backend/Libraries
rm .phpstan.neon
rm -rf vendor/ composer* .phpstan.neon
```

and remove the autoloader from the `index.php` file.
Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require": {
"php": "^8.1",
"phpstan/phpstan": "^1.2"
}
}
6 changes: 4 additions & 2 deletions Backend/Libraries/composer.lock → composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@

// Global varialbes
// MySQL Login data
define("DB_HOST", "localhost");
define("DB_NAME", "name");
define("DB_USER", "user");
define("DB_PASS", "pass");
const DB_HOST = "localhost";
const DB_NAME = "name";
const DB_USER = "user";
const DB_PASS = "pass";

define("TITLE", "Sample"); // Title for website
define("DOMAIN", "https://schindlerfelix.de"); // Hosted on this domain
/**
* @var string This domain variable is among other things used for security features
*/
const DOMAIN = "https://schindlerfelix.de"; // Hosted on this domain
const TITLE = "sample"; // Title of project

// Require autoloaders
require_once("./Backend/Core/ClassLoader.php"); // Load classes
// require_once("./Backend/Libraries/vendor/autoload.php"); // Composer autoloader
require_once("./Backend/Core/ClassLoader.php"); // Load classes
require_once("./vendor/autoload.php"); // Composer autoloader

// Application start
// session_start(); // Start PHP Session
Expand Down

0 comments on commit 3c42c38

Please sign in to comment.