Skip to content

Commit

Permalink
Require PHP 8.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Nov 29, 2024
1 parent 8505183 commit a62c4c5
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.2"
php-version: "8.4"
ini-values: memory_limit=-1
tools: phpcs, cs2pr
- name: Run PHP Code Sniffer
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
php-version: "8.4"
ini-values: memory_limit=-1
tools: composer:v2
- name: Cache dependencies
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
strategy:
matrix:
php-version:
- "8.2"
- "8.4"
steps:
- name: Checkout
Expand Down Expand Up @@ -39,7 +38,7 @@ jobs:
run: make test-coveralls

- name: Upload code coverage
if: ${{ matrix.php-version == '8.2' }}
if: ${{ matrix.php-version == '8.4' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# CHANGELOG

## v7.0

### New Requirements

PHP 8.4+

### New features

None

### Deprecated Features

None

### Backward Incompatible Changes

None

### Other changes

None



## v5.x to v6.0

### New Requirements
Expand Down
16 changes: 6 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
ARG PHP_VERSION=8.2
ARG PHP_VERSION=8.4
FROM php:${PHP_VERSION}-cli-bookworm

RUN <<-EOF
docker-php-ext-enable opcache

if [ "$PHP_VERSION" \< "8.4" ]; then
apt-get update
apt-get install -y autoconf pkg-config
pecl channel-update pecl.php.net
pecl install xdebug
docker-php-ext-enable xdebug
fi
apt-get update
apt-get install -y autoconf pkg-config
pecl channel-update pecl.php.net
pecl install xdebug
docker-php-ext-enable opcache xdebug
EOF

RUN <<-EOF
Expand Down
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ test-coveralls: test-dependencies
@XDEBUG_MODE=coverage $(PHPUNIT) --coverage-clover build/logs/clover.xml

.PHONY: test-container
test-container: test-container-82

.PHONY: test-container-82
test-container-82:
@-docker-compose run --rm app82 bash
@docker-compose down -v
test-container: test-container-84

.PHONY: test-container-84
test-container-84:
Expand All @@ -41,5 +36,5 @@ test-container-84:

.PHONY: lint
lint:
@XDEBUG_MODE=off phpcs -s
# @XDEBUG_MODE=off phpcs -s
@XDEBUG_MODE=off vendor/bin/phpstan
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.4",
"ext-json": "*",
"icanboogie/event": "^6.0",
"icanboogie/render": "^6.0",
"icanboogie/routing": "^6.0"
"icanboogie/event": "^7.0",
"icanboogie/render": "^7.0",
"icanboogie/routing": "^7.0"
},
"require-dev": {
"phpstan/phpstan": "^2.0",
Expand Down
13 changes: 1 addition & 12 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
---
services:
app82:
build:
context: .
args:
PHP_VERSION: "8.2"
environment:
PHP_IDE_CONFIG: 'serverName=icanboogie-view'
volumes:
- .:/app:delegated
- ~/.composer:/root/.composer:delegated
working_dir: /app
app84:
build:
context: .
args:
PHP_VERSION: "8.4.0RC4"
PHP_VERSION: "8.4"
environment:
PHP_IDE_CONFIG: 'serverName=icanboogie-view'
volumes:
Expand Down
12 changes: 6 additions & 6 deletions lib/LayoutResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

interface LayoutResolver
{
public const HOME_PATH = '/';
public const HOME_LAYOUT = 'home';
public const PAGE_LAYOUT = 'page';
public const ADMIN_LAYOUT = 'admin';
public const ADMIN_ACTION_PREFIX = 'admin:';
public const DEFAULT_LAYOUT = 'default';
public const string HOME_PATH = '/';
public const string HOME_LAYOUT = 'home';
public const string PAGE_LAYOUT = 'page';
public const string ADMIN_LAYOUT = 'admin';
public const string ADMIN_ACTION_PREFIX = 'admin:';
public const string DEFAULT_LAYOUT = 'default';

/**
* Resolves the layout template for the view.
Expand Down
4 changes: 2 additions & 2 deletions lib/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
*/
class View implements ArrayAccess, JsonSerializable, Stringable
{
public const LOCAL_CONTENT = 'content';
public const LOCAL_VIEW = 'view';
public const string LOCAL_CONTENT = 'content';
public const string LOCAL_VIEW = 'view';

/**
* The content to render.
Expand Down

0 comments on commit a62c4c5

Please sign in to comment.