Skip to content

Commit

Permalink
Merge pull request #14 from michielgerritsen/feature/php-8.3
Browse files Browse the repository at this point in the history
Feature: Add support for PHP 8.3
  • Loading branch information
Quetzacoalt91 authored Jun 6, 2024
2 parents f4bd7c8 + 21e1127 commit 447db59
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.2-rc
FROM php:8.2

LABEL "com.github.actions.name"="PHP Syntax check"
LABEL "com.github.actions.description"="Run the native PHP linter"
Expand Down
13 changes: 13 additions & 0 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM php:8.3

LABEL "com.github.actions.name"="PHP Syntax check"
LABEL "com.github.actions.description"="Run the native PHP linter"
LABEL "com.github.actions.icon"="check"
LABEL "com.github.actions.color"="blue"

LABEL "repository"="http://github.com/PrestaShop/github-action-php-lint"
LABEL "homepage"="http://github.com/actions"
LABEL "maintainer"="PrestaShop <[email protected]>"

ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
18 changes: 18 additions & 0 deletions 8.3/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# action.yml
name: "Prestashop PHP 8.3 Linter"
description: "PHP linter for 8.3"
inputs:
folder-to-exclude:
description: "Folder to exclude"
required: false
default: '! -path "./vendor/*"'
working-directory:
description: "Working directory"
required: false
default: "./"
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.working-directory }}
- ${{ inputs.folder-to-exclude }}
5 changes: 5 additions & 0 deletions 8.3/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -l

cd $1

sh -c "! (find . -type f -name \"*.php\" $2 -exec php -l -n {} \; | grep -v \"No syntax errors detected\")"

0 comments on commit 447db59

Please sign in to comment.