com web/bugs: Add Composer: .gitignore README.md composer.json composer.lock include/prepend.php
| From: | Peter Kokot | Date: | Mon, 03 Dec 2018 00:02:16 +0000 |
| Subject: | com web/bugs: Add Composer: .gitignore README.md composer.json composer.lock include/prepend.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-27475@lists.php.net to get a copy of this message | ||
Commit: 83d6860af9a4554a234177d1d38f37907fcb4b4f
Author: Niklas Keller <me@kelunik.com> Mon, 3 Dec 2018 01:02:16 +0100
Committer: Peter Kokot <peterkokot@gmail.com> Mon, 3 Dec 2018 01:02:16 +0100
Parents: 32466d710928c42d841e519a61cd8743c26cfea4
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=83d6860af9a4554a234177d1d38f37907fcb4b4f
Log:
Add Composer
This patch adds initial Composer files and prepares the project for
using Composer in development environment.
Patch has been initially started via pull request at
https://github.com/php/web-bugs/pull/27
Changed paths:
M .gitignore
M README.md
A composer.json
A composer.lock
M include/prepend.php
Diff:
diff --git a/.gitignore b/.gitignore
index e10d401..56b323f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,6 @@
# Configuration file
/local_config.php
+
+# Generated by Composer
+/vendor/
diff --git a/README.md b/README.md
index 555a497..5170796 100644
--- a/README.md
+++ b/README.md
@@ -3,17 +3,6 @@
This is a unified bug tracking system for PHP hosted online at
[bugs.php.net](https://bugs.php.net).
-## Requirements
-
-- PHP 7..2+
-- ext/pdo
-- ext/pdo_mysql
-- ext/openssl (for https:// fopen wrapper)
-- PEAR packages:
- - Text_CAPTCHA_Numeral
- - Text_Diff
- - HTTP_Upload (1.0.0b4 or later)
-
## Local installation
* Copy configuration and modify it accordingly for your local system:
@@ -22,6 +11,12 @@ This is a unified bug tracking system for PHP hosted online at
cp local_config.php.sample local_config.php
```
+* Install development dependencies with Composer:
+
+```bash
+composer install
+```
+
* Install required dependencies using PEAR:
```bash
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..3063851
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,31 @@
+{
+ "name": "php/web-bugs",
+ "description": "The PHP Bugtracking System",
+ "type": "project",
+ "keywords": ["bugs", "php", "website"],
+ "homepage": "https://bugs.php.net",
+ "readme": "README.md",
+ "license": "PHP license",
+ "authors": [
+ {
+ "name": "PHP contributors"
+ }
+ ],
+ "support": {
+ "email": "php-webmaster@lists.php.net",
+ "issues": "https://bugs.php.net/",
+ "wiki": "https://wiki.php.net/",
+ "irc": "irc://irc.efnet.org/php.pecl",
+ "source": "https://git.php.net/?p=web/bugs.git",
+ "docs": "https://php.net/manual",
+ "rss": "https://bugs.php.net/rss"
+ },
+ "require": {
+ "php": "^7.2",
+ "ext-json": "*",
+ "ext-openssl": "*",
+ "ext-pdo": "*",
+ "ext-pdo_mysql": "*",
+ "ext-session": "*"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..4405657
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,24 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "ec56b1b2037ec16e6e8fd80f4c1b8f1a",
+ "packages": [],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": {
+ "php": "^7.2",
+ "ext-json": "*",
+ "ext-openssl": "*",
+ "ext-pdo": "*",
+ "ext-pdo_mysql": "*",
+ "ext-session": "*"
+ },
+ "platform-dev": []
+}
diff --git a/include/prepend.php b/include/prepend.php
index 367510f..8417607 100644
--- a/include/prepend.php
+++ b/include/prepend.php
@@ -1,5 +1,9 @@
<?php
+if (file_exists(__DIR__.'/../vendor/autoload.php')) {
+ require_once __DIR__.'/../vendor/autoload.php';
+}
+
ini_set('display_errors', 0);
$site = 'php';