Skip to content

Commit 6e808dc

Browse files
committed
update
1 parent b335484 commit 6e808dc

14 files changed

+1941
-1048
lines changed

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ trim_trailing_whitespace = true
1111
[*.md]
1212
trim_trailing_whitespace = false
1313

14-
[*.{yml,yaml}]
14+
[*.{yml,yaml,js}]
15+
indent_size = 2
16+
17+
[package.json]
1518
indent_size = 2
1619

1720
[{Makefile,**.mk}]

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "composer" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
# Check for updates to GitHub Actions every week
17+
interval: "weekly"

.github/workflows/phpci.yaml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
php-versions: ['8.3']
17+
php-versions: ['8.4']
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121

2222
- name: Set up PHP ${{ matrix.php-versions }}
2323
uses: shivammathur/setup-php@v2
2424
with:
2525
php-version: ${{ matrix.php-versions }}
2626

27-
- name: PHP Security Checker
28-
uses: StephaneBour/actions-php-security-checker@1.1
29-
3027
- name: Setup project
3128
run: make setup
3229

@@ -51,17 +48,18 @@ jobs:
5148
steps:
5249
- uses: actions/checkout@v4
5350

54-
- uses: docker/setup-buildx-action@v3
55-
56-
- uses: docker/login-action@v1
51+
- name: Log in to GitHub Container Registry
52+
uses: docker/login-action@v3
5753
with:
58-
username: ${{ secrets.DOCKER_USERNAME }}
59-
password: ${{ secrets.DOCKER_PASSWORD }}
54+
registry: ghcr.io
55+
username: ${{ github.actor }}
56+
password: ${{ secrets.GITHUB_TOKEN }}
6057

61-
- uses: docker/build-push-action@v5
58+
- name: Build and push
59+
uses: docker/build-push-action@v6
6260
with:
6361
context: .
6462
push: true
65-
cache-from: hexletcomponents/php-laravel-blog:latest
63+
cache-from: ghcr.io/${{ github.repository }}:latest
6664
cache-to: type=inline
67-
tags: hexletcomponents/php-laravel-blog:latest
65+
tags: ghcr.io/${{ github.repository }}:latest

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.2-cli
1+
FROM php:8.4-cli
22

33
RUN apt-get update && apt-get install -y \
44
libpq-dev \
@@ -10,7 +10,7 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
1010
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
1111
&& php -r "unlink('composer-setup.php');"
1212

13-
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
13+
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
1414
RUN apt-get install -y nodejs
1515

1616
WORKDIR /app

Dockerfile.production

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

Makefile

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
include ./compose.mk
2+
13
start:
24
php artisan serve --host 0.0.0.0
35

46
start-frontend:
57
npm run dev
68

9+
install: setup
10+
711
setup:
812
composer install
913
cp -n .env.example .env
@@ -42,27 +46,6 @@ lint:
4246
lint-fix:
4347
composer phpcbf
4448

45-
compose:
46-
docker-compose up
47-
48-
compose-test:
49-
docker-compose run web make test
50-
51-
compose-bash:
52-
docker-compose run web bash
53-
54-
compose-setup: compose-build
55-
docker-compose run web make setup
56-
57-
compose-build:
58-
docker-compose build
59-
60-
compose-db:
61-
docker-compose exec db psql -U postgres
62-
63-
compose-down:
64-
docker-compose down -v
65-
6649
ide-helper:
6750
php artisan ide-helper:eloquent
6851
php artisan ide-helper:gen

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ Demo: https://php-laravel-blog.hexlet.app/
77

88
## Requirements
99

10-
* PHP ^7.4 || ^8.1
10+
* PHP ^8.4, Composer
11+
* Node.js 24+ & npm
1112
* Extensions: mbstring, curl, dom, xml,zip, sqlite3
12-
* Composer
13-
* Node.js & npm
1413
* SQLite for local
1514
* [heroku cli](https://devcenter.heroku.com/articles/heroku-cli#download-and-install)
1615

compose.mk

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
compose:
3+
docker-compose up
4+
5+
compose-test:
6+
docker-compose run --rm web make test
7+
8+
compose-bash:
9+
docker-compose run --rm web bash
10+
11+
compose-setup: compose-build
12+
docker-compose run --rm web make setup
13+
14+
compose-build:
15+
docker-compose build
16+
17+
compose-db:
18+
docker-compose exec db psql -U postgres
19+
20+
compose-down:
21+
docker-compose down -v --remove-orphans

composer.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
{
2-
"name": "laravel/laravel",
2+
"name": "hexlet-components/php-laravel-blog",
33
"type": "project",
4-
"description": "The Laravel Framework.",
5-
"keywords": [
6-
"framework",
7-
"laravel"
8-
],
9-
"license": "MIT",
104
"require": {
11-
"php": ">=8",
12-
"guzzlehttp/guzzle": "^7.0.1",
5+
"php": ">=8.4",
6+
"guzzlehttp/guzzle": "^7.9",
137
"laravel/framework": "^12.0",
148
"laravel/tinker": "^2.7",
159
"spatie/laravel-html": "^3.5"
1610
},
1711
"require-dev": {
18-
"barryvdh/laravel-ide-helper": "^3.0",
12+
"barryvdh/laravel-ide-helper": "^3.6",
1913
"fakerphp/faker": "^1.9.1",
2014
"mockery/mockery": "^1.4.4",
2115
"nunomaduro/collision": "^8.1",
22-
"phpunit/phpunit": "^11.0",
16+
"phpunit/phpunit": "^12.0",
2317
"spatie/laravel-ignition": "^2.7",
2418
"squizlabs/php_codesniffer": "*"
2519
},

0 commit comments

Comments
 (0)