Skip to content

Commit 4da2bef

Browse files
committed
Bumps minimum PHP version to 8.2
- Updates composer dependencies to be compatible with the currently supported PHP versions - Removes PHP 8.0 from CI build - Bumps Yii version to 2.0.50 - Removes codeception/specify package and dependent code - Improves README with better instructions for setting up a database for unit tests - Migrates email sender from swiftmailer -> symphonymailer as swiftmailer is deprecated - Downgrades bootstrap-sass due to a change in syntax. Asset packaging was failing due to a bad commit - fixes broken /blog page by updating to a more recent version of yii2-markdown-files
1 parent 40d99bd commit 4da2bef

37 files changed

+2925
-3305
lines changed

.github/workflows/actions.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ jobs:
1111
os:
1212
- ubuntu-latest
1313
php:
14-
- "7.3"
15-
- "7.4"
16-
#- "8.0"
14+
- "8.2"
15+
- "8.3"
1716
runs-on: ubuntu-latest
1817

1918
services:
@@ -85,7 +84,7 @@ jobs:
8584
run: composer test-coverage
8685

8786
- name: Upload to Codecov.io
88-
if: matrix.php == '7.4'
87+
if: matrix.php == '8.3'
8988
uses: codecov/codecov-action@v4
9089
env:
9190
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

PRODUCTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The Faster Scale App -- A Production Deployment
22

33
### Pre-requisites
4-
* PHP >= 7.3
4+
* PHP >= 8.2
55
* Composer
66
* Additional PHP modules: php-pgsql, php-gd, php-mbstring
77
* NodeJS >= 12 & npm >= 6

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
These instructions will help you get a local installation set up for development and testing purposes. See the deployment instructions for how to deploy this to a live system.
99

1010
### Pre-requisites
11-
* PHP >= 7.3
11+
* PHP >= 8.2
1212
* Composer
1313
* Additional PHP modules: php-pgsql, php-gd, php-mbstring, php-curl
1414
* NodeJS >= 12 & npm >= 6
@@ -38,12 +38,22 @@ That should result the browser downloading published asset bundles instead of ea
3838

3939
## Testing
4040
Testing is provided by Codeception unit tests. The necessary libraries should have already been installed by Composer. First, the test database and user must be created:
41-
* Create a PostgreSQL database and user for tests via the following commands:
41+
* Create a PostgreSQL database and user for tests via the following SQL:
4242
```sql
4343
CREATE DATABASE fsatest;
4444
CREATE USER fsatest WITH SUPERUSER PASSWORD 'test123';
4545
GRANT ALL PRIVILEGES ON DATABASE "fsatest" TO fsatest;
4646
```
47+
or not via SQL
48+
```bash
49+
createuser -s -W fsatest # enter password 'test123' when prompted
50+
createdb -O fsatest fsatest
51+
```
52+
53+
Then run migrations within the test database to create the tables
54+
```bash
55+
./yii_test migrate
56+
```
4757

4858
If you choose to modify the name of db or user or the password, be sure to also modify the corresponding value in `common/config/tests-local.php`.
4959

codeception.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include:
33
- site
44
- console
55
paths:
6-
log: console/runtime/logs
6+
output: console/runtime/logs
77
bootstrap: _bootstrap.php
88
settings:
99
colors: true

common/codeception.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ actor: Tester
33
bootstrap: _bootstrap.php
44
paths:
55
tests: tests
6-
log: tests/_log
6+
output: tests/_log
77
data: tests/_data
88
helpers: tests/_support
99
settings:

common/config/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'class'=> yii\caching\DummyCache::class,
4040
],
4141
'mailer' => [
42-
'class' => yii\swiftmailer\Mailer::class,
42+
'class' => \yii\symphonymailer\Mailer::class,
4343
'viewPath' => '@common/mail',
4444
'useFileTransport' => true,
4545
],

common/models/Behavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function attributeLabels()
179179
*
180180
* @returns Array
181181
*/
182-
public function getCategories()
182+
public static function getCategories()
183183
{
184184
$bhvrs_by_cat = AH::index(self::$behaviors, null, 'category_id');
185185
$cats = AH::index(\common\models\Category::$categories, "id");

common/tests/unit.suite.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# suite for unit (internal) tests.
44
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
55

6-
class_name: UnitTester
6+
suite_namespace: common\tests\unit
7+
actor: UnitTester
78
modules:
89
enabled:
910
- Asserts

common/tests/unit/components/ControllerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
class ControllerTest extends \Codeception\Test\Unit
1313
{
14-
use \Codeception\Specify;
15-
1614
public function testActions()
1715
{
1816
$controller = new Controller('test', 'common');

common/tests/unit/components/GraphTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
class GraphTest extends \Codeception\Test\Unit
1313
{
14-
use \Codeception\Specify;
15-
1614
private $user;
1715
private $filepath = __DIR__.'/../../_output/test_graph.png';
1816
private $filepath_extra = __DIR__.'/../../_output/charts/test_graph.png';

0 commit comments

Comments
 (0)