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 Jan 11, 2025
1 parent 9e4f7c8 commit 470377b
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 183 deletions.
8 changes: 7 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ insert_final_newline = true
indent_style = space
indent_size = 4

[{*.yaml,*yml,*.neon}]
[{*.yaml,*.yml,*.neon,*.json}]
indent_size = 2

[*.md]
max_line_length = 100

[{Dockerfile,Makefile}]
indent_style = tab
6 changes: 3 additions & 3 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:

jobs:
phpcs:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.1"
php-version: "8.4"
ini-values: memory_limit=-1
tools: phpcs, cs2pr
- name: Run PHP Code Sniffer
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:
jobs:
phpstan:
name: phpstan
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: "8.4"
ini-values: memory_limit=-1
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.composer/cache
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ on:
jobs:
phpunit:
name: phpunit
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.4"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -24,7 +23,7 @@ jobs:
ini-values: memory_limit=-1
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.composer/cache
Expand All @@ -39,7 +38,7 @@ jobs:
run: make test-coveralls

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

## v7.x

### New Requirements

PHP 8.4+

### New features

None

### Backward Incompatible Changes

None

### Deprecated Features

None

### Other Changes

None



## v6.x

### New Requirements

PHP 8.2+

### New features

None

### Backward Incompatible Changes

None

### Deprecated Features

None

### Other Changes

None
50 changes: 29 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
ARG PHP_VERSION
FROM php:${PHP_VERSION}-cli-buster
ARG PHP_VERSION=8.4
FROM php:${PHP_VERSION}-cli-bookworm

RUN apt-get update && \
apt-get install -y autoconf pkg-config && \
pecl channel-update pecl.php.net && \
pecl install xdebug && \
RUN <<-EOF
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 echo '\
xdebug.client_host=host.docker.internal\n\
xdebug.mode=develop\n\
xdebug.start_with_request=yes\n\
' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN <<-EOF
cat <<-SHELL >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
xdebug.client_host=host.docker.internal
xdebug.mode=develop
xdebug.start_with_request=yes
SHELL

RUN echo '\
display_errors=On\n\
error_reporting=E_ALL\n\
date.timezone=UTC\n\
' >> /usr/local/etc/php/conf.d/php.ini
cat <<-SHELL >> /usr/local/etc/php/conf.d/php.ini
display_errors=On
error_reporting=E_ALL
date.timezone=UTC
SHELL
EOF

ENV COMPOSER_ALLOW_SUPERUSER 1

RUN apt-get update && \
apt-get install unzip && \
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet && \
mv composer.phar /usr/local/bin/composer && \
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"\n' >> /root/.bashrc
RUN <<-EOF
apt-get update
apt-get install unzip
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet
mv composer.phar /usr/local/bin/composer
cat <<-SHELL >> /root/.bashrc
export PATH="$HOME/.composer/vendor/bin:$PATH"
SHELL
EOF

RUN composer global require squizlabs/php_codesniffer
23 changes: 0 additions & 23 deletions MIGRATION.md

This file was deleted.

23 changes: 7 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# customization

PACKAGE_NAME = icanboogie/bind-view
PHPUNIT = vendor/bin/phpunit

# do not edit the following lines

.PHONY: usage
usage:
@echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files."

vendor:
@composer install

# testing

.PHONY: test-dependencies
test-dependencies: vendor

.PHONY: test
test: test-dependencies
@$(PHPUNIT)
@$(PHPUNIT) $(ARGS)

.PHONY: test-coverage
test-coverage: test-dependencies
Expand All @@ -31,17 +27,12 @@ test-coveralls: test-dependencies
@XDEBUG_MODE=coverage $(PHPUNIT) --coverage-clover ../build/logs/clover.xml

.PHONY: test-container
test-container: test-container-81

.PHONY: test-container-81
test-container-81:
@-docker-compose run --rm app81 bash
@docker-compose down -v
test-container: test-container-84

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

.PHONY: lint
lint:
Expand Down
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# bind-view

[![Release](https://img.shields.io/packagist/v/icanboogie/bind-view.svg)](https://packagist.org/packages/icanboogie/bind-view)
[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/bind-view.svg)](https://scrutinizer-ci.com/g/ICanBoogie/bind-view)
[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/bind-view.svg)](https://coveralls.io/r/ICanBoogie/bind-view)
[![Code Coverage](https://coveralls.io/repos/github/ICanBoogie/bind-view/badge.svg?branch=7.0)](https://coveralls.io/r/ICanBoogie/bind-view?branch=7.0)
[![Downloads](https://img.shields.io/packagist/dt/icanboogie/bind-view.svg)](https://packagist.org/packages/icanboogie/bind-view)

The **icanboogie/bind-view** package binds [icanboogie/view][] to [ICanBoogie][], using its
autoconfig feature. It add getters to controllers and views, making it easy to invoke views from
controller actions or obtain template engines and resolve templates from views, using features
autoconfig feature. It adds getters to controllers and views, making it easy to invoke views from
controller actions or get template engines and resolve templates from views, using features
of [icanboogie/render][].



#### Installation

```bash
```shell
composer require icanboogie/bind-view
```

Expand Down Expand Up @@ -66,28 +65,22 @@ For more information continue to the [View documentation](https://github.com/ICa

The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie/bind-view/actions).

[![Tests](https://github.com/ICanBoogie/bind-view/workflows/test/badge.svg?branch=master)](https://github.com/ICanBoogie/bind-view/actions?query=workflow%3Atest)
[![Static Analysis](https://github.com/ICanBoogie/bind-view/workflows/static-analysis/badge.svg?branch=master)](https://github.com/ICanBoogie/bind-view/actions?query=workflow%3Astatic-analysis)
[![Code Style](https://github.com/ICanBoogie/bind-view/workflows/code-style/badge.svg?branch=master)](https://github.com/ICanBoogie/bind-view/actions?query=workflow%3Acode-style)
[![Tests](https://github.com/ICanBoogie/bind-view/actions/workflows/test.yml/badge.svg?branch=7.0)](https://github.com/ICanBoogie/bind-view/actions/workflows/test.yml)
[![Static Analysis](https://github.com/ICanBoogie/bind-view/actions/workflows/static-analysis.yml/badge.svg?branch=7.0)](https://github.com/ICanBoogie/bind-view/actions/workflows/static-analysis.yml)
[![Code Style](https://github.com/ICanBoogie/bind-view/actions/workflows/code-style.yml/badge.svg?branch=7.0)](https://github.com/ICanBoogie/bind-view/actions/workflows/code-style.yml)



## Code of Conduct

This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in
this project and its community, you are expected to uphold this code.
this project and its community, you're expected to uphold this code.



## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.



## License

**icanboogie/bind-view** is released under the [BSD-3-Clause](LICENSE).
See [CONTRIBUTING](CONTRIBUTING.md) for details.



Expand Down
Loading

0 comments on commit 470377b

Please sign in to comment.