Skip to content

Commit

Permalink
Drop PHP < 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Jul 25, 2023
1 parent 741a3f0 commit 7d0e6ce
Show file tree
Hide file tree
Showing 30 changed files with 205 additions and 580 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ jobs:
- "8.1"
- "8.0"
- "7.4"
- "7.3"
- "7.2"
- "7.1"

dependencies:
- "highest"
- "lowest"
- "latest"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 2

Expand All @@ -38,7 +35,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
coverage: "xdebug"
tools: composer:v2, cs2pr
tools: cs2pr
ini-values: "error_reporting=E_ALL, display_errors=On"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -58,10 +55,10 @@ jobs:

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Set up build cache
uses: "actions/cache@v2"
uses: "actions/cache@v3"
with:
path: |
${{ steps.composercache.outputs.dir }}
Expand All @@ -73,7 +70,7 @@ jobs:
php-${{ matrix.php-version }}-deps-${{ matrix.dependencies }}
- name: Remove PHP-CS-Fixer if not called
if: matrix.php-version != '8.0' || matrix.dependencies != 'highest'
if: matrix.php-version != '8.1' || matrix.dependencies != 'highest'
run: composer remove --dev --no-update "friendsofphp/php-cs-fixer";

- name: Fix min version for PHP8
Expand Down Expand Up @@ -110,7 +107,7 @@ jobs:
- name: PHPUnit
run: |
if [ "${{ matrix.php-version }}" = "8.0" ] && [ "${{ matrix.dependencies }}" = "highest" ]; then
if [ "${{ matrix.php-version }}" = "8.1" ] && [ "${{ matrix.dependencies }}" = "highest" ]; then
php -dmemory_limit=-1 vendor/phpunit/phpunit/phpunit --exclude-group=efficiency;
composer global require scrutinizer/ocular;
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover build/coverage-phpunit/clover.xml;
Expand All @@ -120,15 +117,15 @@ jobs:
- name: Behat
run: |
if [ "${{ matrix.php-version }}" = "8.0" ] && [ "${{ matrix.dependencies }}" = "highest" ]; then
if [ "${{ matrix.php-version }}" = "8.1" ] && [ "${{ matrix.dependencies }}" = "highest" ]; then
php -dmemory_limit=-1 vendor/behat/behat/bin/behat --strict;
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover build/coverage-behat/clover.xml;
else
php -dmemory_limit=-1 vendor/behat/behat/bin/behat --strict --no-coverage;
fi;
- name: Check code style
if: matrix.php-version == '8.0' && matrix.dependencies == 'highest'
if: matrix.php-version == '8.1' && matrix.dependencies == 'highest'
run: vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --allow-risky=yes --format=checkstyle | cs2pr


Expand All @@ -144,24 +141,20 @@ jobs:
- "8.1"
- "8.0"
- "7.4"
- "7.3"
- "7.2"
- "7.1"

dependencies:
- "highest"
- "lowest"
- "latest"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php-version }}
coverage: "none"
tools: composer:v2
ini-values: "opcache.enable=1, opcache.enable_cli=1, opcache.jit=1205, opcache.jit_buffer_size=128M, error_reporting=E_ALL, display_errors=On"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -181,10 +174,10 @@ jobs:

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Set up build cache
uses: "actions/cache@v2"
uses: "actions/cache@v3"
with:
path: |
${{ steps.composercache.outputs.dir }}
Expand Down
163 changes: 5 additions & 158 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,173 +1,20 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store

/.idea
/build
/tests/coverage
/vendor
/docs/_build
/docs/_static
node_modules

/composer.lock

Vagrantfile
.vagrant
/.php-cs-fixer.cache
/.phpunit.result.cache
30 changes: 30 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3"
nodejs: "16"
# You can also specify other tool versions:
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
builder: html

# If using Sphinx, optionally build your docs in additional formats such as PDF
# Build all formats
formats: all

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ build:
environment:
# Languages
php:
version: "7.4"
version: "8.1"
ini:
memory_limit: "-1"

dependencies:
override:
- 'composer update --no-interaction --prefer-dist --ignore-platform-reqs'
- 'composer update --no-interaction --prefer-dist'

tests:
override:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [3.x - Unreleased] - 2023-xx-xx
### Removed
- Support for PHP 7.1, 7.2 and 7.3

## [3.11.0] - 2023-02-04
### Changed
Expand Down
1 change: 1 addition & 0 deletions behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ default:

extensions:
DVDoug\Behat\CodeCoverage\Extension:
cache: build/php-code-coverage-cache
filter:
include:
directories:
Expand Down
Loading

0 comments on commit 7d0e6ce

Please sign in to comment.