Skip to content

Commit

Permalink
Use composer for dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
splittingred committed Mar 3, 2020
1 parent 8fe32a3 commit a20cde7
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ variants/*/cache/
variants/KnownWorld_901/
ghostRatingData.*
gr.php
adminInfo.php
adminInfo.php
vendor/
8 changes: 8 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ Edit config.sample.php to work with your setup, being very careful to read the w
about security issues. The salts/secrets, errorlog/orderlog directories, can all
leave your server wide open if you don't set them right. Rename to config.php when ready.

=> Composer

Install Composer via https://getcomposer.org/. Then run:

composer install

This will install all external dependencies that webDiplomacy uses.

=> Log-on
Once you've set config.php up you can use the random gameMasterSecret you entered
to authenticate as the admin. First create a user via the registration page, then
Expand Down
18 changes: 18 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "kestasjk/web-diplomacy",
"description": "webDiplomacy",
"keywords": ["diplomacy"],
"type": "project",
"repositories": [],
"require": {
"php": "^7.0"
},
"require-dev": {},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
19 changes: 19 additions & 0 deletions composer.lock

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

1 change: 1 addition & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function setExpires($expires) {
if( !defined('IN_CODE') )
define('IN_CODE', 1); // A flag to tell scripts they aren't being executed by themselves

require_once 'vendor/autoload.php';
require_once('config.php');

require_once('global/definitions.php');
Expand Down

0 comments on commit a20cde7

Please sign in to comment.