Skip to content

Commit e903a89

Browse files
authored
Add PHP server syntax check worfklow (#21830)
* add php server syntax check worfklow * update * fix * trigger build failure * Revert "trigger build failure" This reverts commit cd8fa30. * add more folders * comment
1 parent ffaeca3 commit e903a89

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Samples PHP (Server) Syntax Checker
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
7+
#- samples/server/petstore/php-laravel/**
8+
- samples/server/petstore/php-flight/**
9+
- samples/server/petstore/php-mezzio-ph-modern/**
10+
- samples/server/petstore/php-mezzio-ph/**
11+
- samples/server/petstore/php-slim4/**
12+
pull_request:
13+
paths:
14+
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
15+
#- samples/server/petstore/php-laravel/**
16+
- samples/server/petstore/php-flight/**
17+
- samples/server/petstore/php-mezzio-ph-modern/**
18+
- samples/server/petstore/php-mezzio-ph/**
19+
- samples/server/petstore/php-slim4/**
20+
jobs:
21+
build:
22+
name: Build PHP projects
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
php:
28+
- "8.1"
29+
- "8.2"
30+
- "8.3"
31+
- "8.4"
32+
sample:
33+
# servers
34+
- samples/server/petstore/php-symfony/SymfonyBundle-php/
35+
#- samples/server/petstore/php-laravel/
36+
- samples/server/petstore/php-flight/
37+
- samples/server/petstore/php-mezzio-ph-modern/
38+
- samples/server/petstore/php-mezzio-ph/
39+
- samples/server/petstore/php-slim4/
40+
steps:
41+
- uses: actions/checkout@v5
42+
- name: Setup PHP with tools
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: "${{ matrix.php }}"
46+
- name: php -l
47+
working-directory: ${{ matrix.sample }}
48+
run: find . -name "*.php" -exec php -l {} +

samples/server/petstore/php-symfony/.openapi-generator-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
2424
#
25+
#

samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
#docs/*.md
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
24+
#
25+
#

0 commit comments

Comments
 (0)