Skip to content

Commit 6a8465e

Browse files
committed
Merge remote-tracking branch 'origin/chapter-1' into chapter-1
2 parents c198d8a + a9cd0f1 commit 6a8465e

File tree

10 files changed

+114
-357
lines changed

10 files changed

+114
-357
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
tags:
8+
9+
jobs:
10+
ci:
11+
uses: laminas/workflow-continuous-integration/.github/workflows/[email protected]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
- push
3+
4+
name: Run PHPStan checks
5+
6+
jobs:
7+
mutation:
8+
name: PHPStan ${{ matrix.php }}-${{ matrix.os }}
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- "8.2"
19+
- "8.3"
20+
- "8.4"
21+
- "8.5"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: "${{ matrix.php }}"
31+
coverage: pcov
32+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
33+
tools: composer:v2, cs2pr
34+
35+
- name: Determine composer cache directory
36+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
37+
38+
- name: Cache dependencies installed with composer
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ env.COMPOSER_CACHE_DIR }}
42+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
43+
restore-keys: |
44+
php${{ matrix.php }}-composer-
45+
46+
- name: Install dependencies with composer
47+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
48+
49+
- name: Run static analysis with PHPStan
50+
run: vendor/bin/phpstan analyse

bin/doctrine.php renamed to bin/doctrine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
$entityManager = $container->get(EntityManager::class);
1515
$entityManager->getEventManager();
1616

17-
ConsoleRunner::run(new SingleManagerProvider($entityManager));
17+
ConsoleRunner::run(new SingleManagerProvider($entityManager));

bin/doctrine-migrations

Lines changed: 0 additions & 8 deletions
This file was deleted.

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
},
2828
"require": {
2929
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
30+
"dotkernel/dot-cache": "^4.0",
31+
"ramsey/uuid": "^4.5.0",
32+
"ramsey/uuid-doctrine": "^2.1.0",
33+
"roave/psr-container-doctrine": "^5.2.2 || ^6.0.0",
3034
"dotkernel/dot-errorhandler": "^4.4.0",
3135
"laminas/laminas-component-installer": "^3.5.0",
3236
"laminas/laminas-config-aggregator": "^1.17.0",
3337
"mezzio/mezzio": "^3.24.0",
3438
"mezzio/mezzio-fastroute": "^3.13.0",
35-
"mezzio/mezzio-twigrenderer": "^2.17.0",
36-
"dotkernel/dot-cache": "^4.0",
37-
"ramsey/uuid": "^4.5.0",
38-
"ramsey/uuid-doctrine": "^2.1.0",
39-
"roave/psr-container-doctrine": "^5.2.2"
39+
"mezzio/mezzio-twigrenderer": "^2.17.0"
4040
},
4141
"require-dev": {
4242
"filp/whoops": "^2.17.0",
@@ -47,8 +47,7 @@
4747
"phpunit/phpunit": "^10.5.45",
4848
"roave/security-advisories": "dev-master",
4949
"symfony/var-dumper": "^7.2.3",
50-
"vincentlanglet/twig-cs-fixer": "^3.5.1",
51-
"phpstan/phpstan-doctrine": "^2.0.3"
50+
"vincentlanglet/twig-cs-fixer": "^3.5.1"
5251
},
5352
"autoload": {
5453
"psr-4": {

config/autoload/local.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
/**
4+
* Local configuration.
5+
*
6+
* Duplicate this file as `local.php` and change its settings as required.
7+
* `local.php` is ignored by git and safe to use for local and sensitive data like usernames and passwords.
8+
*/
9+
10+
declare(strict_types=1);
11+
12+
$baseUrl = 'http://light.dotkernel.localhost';
13+
14+
$databases = [
15+
'default' => [
16+
'host' => 'localhost',
17+
'dbname' => 'light',
18+
'user' => 'root',
19+
'password' => '123',
20+
'port' => 3306,
21+
'driver' => 'pdo_mysql',
22+
'charset' => 'utf8mb4',
23+
'collate' => 'utf8mb4_general_ci',
24+
],
25+
// you can add more database connections into this array
26+
];
27+
28+
return [
29+
'databases' => $databases,
30+
'doctrine' => [
31+
'connection' => [
32+
'orm_default' => [
33+
'params' => $databases['default'],
34+
],
35+
],
36+
],
37+
'application' => [
38+
'url' => $baseUrl,
39+
],
40+
'routes' => [
41+
'page' => [
42+
'about' => 'about',
43+
'who-we-are' => 'who-we-are',
44+
],
45+
],
46+
];

config/cli-config.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)