Skip to content

Commit

Permalink
tec: Configure Flus with Composer
Browse files Browse the repository at this point in the history
  • Loading branch information
marienfressinaud committed Dec 1, 2024
1 parent 2e74491 commit 4f26fa8
Show file tree
Hide file tree
Showing 19 changed files with 236 additions and 1,892 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog of Flus

## unreleased - v1.2.0

### Breaking change

Flus now requires [Composer](https://getcomposer.org/) in production.
You must install it and install the dependencies with:

```console
$ composer install --no-dev --optimize-autoloader
```

## 2024-11-14 - v1.1.0

### New
Expand Down
33 changes: 0 additions & 33 deletions autoload.php

This file was deleted.

2 changes: 1 addition & 1 deletion cli
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (php_sapi_name() !== 'cli') {
// Setup the Minz framework
$app_path = __DIR__;

include $app_path . '/autoload.php';
include $app_path . '/vendor/autoload.php';
\Minz\Configuration::load('dotenv', $app_path);
\Minz\Configuration::$no_syslog_output = true;

Expand Down
19 changes: 18 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
{
"name": "flus/flus",
"type": "project",
"license": "AGPL-3.0",
"autoload": {
"psr-4": {
"App\\": "src/",
"SpiderBits\\": "lib/SpiderBits/src/"
},
"files": [
"src/utils/view_helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"tests\\": "tests/"
}
},
"require": {
"php": ">=8.2",
"ext-intl": "*",
"ext-gettext": "*",
"ext-pcntl": "*",
"ext-gd": "*",
"ext-pdo": "*",
"ext-pdo_pgsql": "*"
"ext-pdo_pgsql": "*",
"flus/minz": "dev-main",
"erusev/parsedown": "^1.7"
},
"require-dev": {
"phpunit/phpunit": "^11.2",
Expand Down
186 changes: 183 additions & 3 deletions composer.lock

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

2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ own setup better than me.
In both cases, you’ll need to download Flus with Git:

```console
$ git clone --recurse-submodules https://github.com/flusio/Flus.git
$ git clone https://github.com/flusio/Flus.git
$ cd Flus
```

Expand Down
16 changes: 9 additions & 7 deletions docs/production.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Installing Flus on your own server is quite simple but still requires basic
notions in sysadmin. First, make sure you match with the following
requirements:

- git, Nginx, PHP 8.2+ and PostgreSQL 13+ are installed on your server;
- git, Nginx, PHP 8.2+, [Composer](https://getcomposer.org/) and PostgreSQL 13+ are installed on your server;
- PHP requires `intl`, `gettext`, `pcntl`, `gd` (with at least WebP support), `pdo` and `pdo_pgsql` extensions;
- your PostgreSQL user must have the permission to create a database;
- Flus must be served over <abbr>HTTPS</abbr>.
Expand All @@ -23,19 +23,21 @@ as the `root` user):

```console
# cd /var/www/
# git clone --recurse-submodules https://github.com/flusio/Flus.git
# git clone https://github.com/flusio/Flus.git
# cd Flus
flus# git checkout TAG
```

You must replace the `TAG` argument with the latest version that you can find
on the [GitHub releases page](https://github.com/flusio/Flus/releases).

Contrary to development, there’re nothing more to install: all the dependencies
are already here (at least if you didn’t forget the `--recurse-submodules`
argument) and assets are bundled for you so you don’t need to install Node and
its dependencies (this is only true if you didn’t forget to checkout to a
version tag).
## Install the dependencies

Install the Composer dependencies with:

```console
flus$ composer install --no-dev --optimize-autoloader
```

## Configure the environment

Expand Down
11 changes: 10 additions & 1 deletion docs/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ Then, you can pull the new code from GitHub:

```console
flus$ git status # check that you didn't make any change in your working directory
flus$ git fetch --recurse-submodules
flus$ git fetch
flus$ git checkout TAG # to update to a specific version
flus$ # OR, in development
flus$ git pull
```

Then, install the dependencies:

```console
flus$ # In production
flus$ composer install --no-dev --optimize-autoloader
flus$ # In development
flus$ make install
```

**In production,** you should change the owner of the files:

```console
Expand Down
1 change: 0 additions & 1 deletion lib/Minz
Submodule Minz deleted from 4d73a4
20 changes: 0 additions & 20 deletions lib/Parsedown/LICENSE.txt

This file was deleted.

Loading

0 comments on commit 4f26fa8

Please sign in to comment.