Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### User-specific stuff:
/.git*
/.idea/workspace.xml
.DS_Store
.vscode/
/.idea/
.dockerignore

###> composer dependencies ###
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ trim_trailing_whitespace = false
[*.yml]
indent_size = 2

[{composer.json,Makefile}]
[Makefile]
indent_style = tab
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ COMPOSE_PROJECT_NAME=phpcpd
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
XDEBUG_CONFIG=main
# Sometimes we need to use different xdebug versions, list of versions can be found here - https://pecl.php.net/package/xdebug
XDEBUG_VERSION=3.5.0
XDEBUG_VERSION=3.5.3
###< XDebug docker configuration ###
13 changes: 10 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
* text=auto
/.github export-ignore

### Enforce LF for infrastructure (CRITICAL for Docker on Windows)
Makefile text eol=lf
Dockerfile text eol=lf
docker/** text eol=lf
*.sh text eol=lf

### Hide generated files in PRs but prevent text auto-merging
/.phive export-ignore
/build export-ignore
tools/**/composer.lock binary
composer.lock binary
tools/**/composer.lock linguist-generated=true -merge
composer.lock linguist-generated=true -merge
phpab binary
*.php diff=php
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:

tests:
runs-on: ${{ matrix.operating-system }}
permissions:
security-events: write
actions: read
contents: read
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
Expand All @@ -58,4 +62,10 @@ jobs:
- name: Check php version
run: php -v
- name: Test latest PHPCPD release
run: php ./releases/phpcpd-latest.phar src
run: php ./releases/phpcpd-9.1.0.phar --log-sarif=reports/phpcpd/phpcpd-report.sarif src tests
- name: Upload SARIF report to GitHub
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: reports/phpcpd/phpcpd-report.sarif
category: phpcpd-${{ matrix.php-versions }}
29 changes: 28 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
### User-specific stuff & OS ###
.DS_Store
npm-debug.log
yarn-error.log

### PhpStorm / IntelliJ IDEA Shared Configs ###
# 1. Personal editor state (changes frequently, causes merge conflicts)
.idea/workspace.xml
.idea/tasks.xml
.idea/shelf/
.idea/usage.statistics.xml
.idea/caches/
# 2. Local history (may contain session cookies and tokens from REST Client)
.idea/httpRequests/
# 3. Databases (MUST be ignored to prevent leaking passwords and local ports)
.idea/dataSources/
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqldialects.xml
.idea/queries/
# 4. Local dictionaries (to avoid sharing personal typos with the team)
.idea/dictionaries/

### Docker local overrides ###
compose.override.yaml
docker-compose.override.yaml

reports/*
!reports/.gitkeep
!reports/phpcpd/.gitkeep

/.env.local
/build/phar
/build/*.phar*
/vendor
/vendor/
/tools/**/vendor

###> phpunit ###
Expand Down
4 changes: 4 additions & 0 deletions .idea/htdocs.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/php-inspections-ea-ultimate.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/phpspec.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG INSIDE_DOCKER_CONTAINER=1
ENV INSIDE_DOCKER_CONTAINER=$INSIDE_DOCKER_CONTAINER
ARG XDEBUG_CONFIG=main
ENV XDEBUG_CONFIG=$XDEBUG_CONFIG
ARG XDEBUG_VERSION=3.5.0
ARG XDEBUG_VERSION=3.5.3
ENV XDEBUG_VERSION=$XDEBUG_VERSION

# check environment
Expand Down Expand Up @@ -46,10 +46,8 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
zip \
&& apt-get install --no-install-recommends -y \
$(debsecan --suite bookworm --format packages --only-fixed) \
&& rm -rf /tmp/* \
&& rm -rf /var/list/apt/* \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Pull the PHP extension installer from the official image
COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/local/bin/
Expand Down
Loading
Loading