Skip to content

Commit 5e7214f

Browse files
author
DKravtsov
committed
phpcpd 8.0.0 release. Made codebase refactoring. Updated requirements php 8.3, updated composer dependencies, updated tests to the PHPUnit 11. Updated dev environment to the php 8.4, Phing 3.0, added code quality tools: ecs, phpstan.
1 parent 8b092cf commit 5e7214f

File tree

119 files changed

+14553
-314901
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+14553
-314901
lines changed

.dockerignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### User-specific stuff:
2+
/.git*
3+
/.idea/workspace.xml
4+
.dockerignore
5+
6+
###> composer dependencies ###
7+
/vendor/
8+
###< composer dependencies ###
9+
10+
### Vendor bin dependencies
11+
/tools/*/vendor/
12+
.phpunit.cache
13+
.phpunit.result.cache
14+
15+
### Docker
16+
Dockerfile
17+
compose.yaml

.env

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
###> docker-compose configuration ###
22
COMPOSE_PROJECT_NAME=phpcpd
3+
###< docker-compose configuration ###
4+
5+
###> XDebug docker configuration. Can be overridden in: .env.local. ###
36
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
47
XDEBUG_CONFIG=main
5-
###< docker-compose configuration ###
8+
# Sometimes we need to use different xdebug versions, list of versions can be found here - https://pecl.php.net/package/xdebug
9+
XDEBUG_VERSION=3.4.0
10+
###< XDebug docker configuration ###

.gitattributes

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1+
* text=auto
12
/.github export-ignore
23
/.phive export-ignore
3-
/.php-cs-fixer.dist.php export-ignore
44
/build export-ignore
5-
/build.xml export-ignore
6-
/phpunit.xml export-ignore
7-
/tests export-ignore
8-
/tools export-ignore
9-
/tools/* binary
10-
5+
tools/**/composer.lock binary
6+
composer.lock binary
7+
phpab binary
118
*.php diff=php

.github/workflows/ci.yml

+32-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: PHP Copy/Paste Detector
33
on:
44
push:
55
branches:
6-
- main
6+
- master
77
- develop
88
pull_request:
99
branches:
10-
- main
10+
- master
1111
- develop
1212
release:
1313
types: [published]
@@ -18,16 +18,44 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Build the docker image
21-
run: make build-dev
21+
run: make build
2222
- name: Start the docker image
2323
run: make start
2424
- name: Check running container
2525
run: docker ps -a
2626
- name: Show php, composer, phing, phive versions
2727
run: make info
28-
- name: Cleanup build artifacts and install dependencies with composer
28+
- name: Cleanup build artifacts and install composer dependencies
2929
run: make setup
3030
- name: Run test suite
3131
run: make phpunit
32+
- name: Report code coverage
33+
env:
34+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
35+
run: make report-code-coverage
36+
- name: Run coding standard
37+
run: make ecs
38+
- name: Run codeSniffer
39+
run: make phpcs
40+
- name: Run PHPStan
41+
run: make phpstan
3242
- name: Stop and remove environment container, network
3343
run: make down
44+
45+
tests:
46+
runs-on: ${{ matrix.operating-system }}
47+
strategy:
48+
matrix:
49+
operating-system: [ 'ubuntu-latest' ]
50+
php-versions: [ '8.3', '8.4' ]
51+
steps:
52+
- name: Setup PHP
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php-versions }}
56+
extensions: mbstring
57+
- uses: actions/checkout@v4
58+
- name: Check php version
59+
run: php -v
60+
- name: Test latest PHPCPD release
61+
run: php ./releases/phpcpd-latest.phar src

.gitignore

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
reports/*
2+
!reports/.gitkeep
3+
4+
/.env.local
15
/build/phar
26
/build/*.phar*
37
/vendor
4-
/.php-cs-fixer.php
5-
/.php-cs-fixer.cache
6-
/.phpunit.cache
7-
/composer.lock
8-
reports/*
9-
!reports/.gitkeep
8+
/tools/**/vendor
9+
10+
###> phpunit ###
11+
.phpunit
12+
.phpunit.result.cache
13+
/phpunit.xml
14+
.phpunit.cache
15+
###< phpunit ###
16+
17+
###> friendsofphp/php-cs-fixer ###
18+
.php-cs-fixer.cache
19+
.php_cs
20+
.php_cs.cache
21+
###< friendsofphp/php-cs-fixer ###

.idea/PMDPlugin.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/Project.xml

+47
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeception.xml

-12
This file was deleted.

.idea/htdocs.iml

+71
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)