Skip to content

Commit 13b4a07

Browse files
committed
Remove downgrade hacks
1 parent 19ba680 commit 13b4a07

8 files changed

+4
-221
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
*.php text eol=lf
22

33
.github/ export-ignore
4-
bin/ export-ignore
54
tests/ export-ignore
65
.editorconfig export-ignore
76
.gitattributes export-ignore
87
.gitignore export-ignore
98
.php-cs-fixer.dist.php export-ignore
10-
src/ComposerJsonRewriter.php export-ignore
119
src/ComposerScripts.php export-ignore
1210
phpunit.dist.xml export-ignore
1311
phpstan.neon.dist export-ignore

.github/workflows/release.yml

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ on:
55
tags:
66
- '**'
77

8-
env:
9-
COMPOSER_ROOT_VERSION: '1.x-dev'
10-
DEFAULT_BRANCH: '1.x'
11-
TARGET_PHP_VERSION: '7.4'
12-
TARGET_PHP_VERSION_ID: 70400
13-
148
jobs:
159
build:
1610
name: Create a release
@@ -26,74 +20,3 @@ jobs:
2620
token: ${{ secrets.RELEASE_TOKEN }}
2721
draft: true
2822
prerelease: false
29-
30-
build_downgraded_release:
31-
name: Build release for lower PHP version
32-
runs-on: ubuntu-latest
33-
needs: build
34-
timeout-minutes: 10
35-
36-
permissions:
37-
# Give the default GITHUB_TOKEN write permission to commit and push the
38-
# added or changed files to the repository.
39-
contents: write
40-
41-
steps:
42-
- name: Checkout code
43-
uses: actions/checkout@v4
44-
45-
- name: Setup PHP 8.1
46-
uses: shivammathur/setup-php@v2
47-
with:
48-
php-version: '8.1'
49-
coverage: none
50-
env:
51-
COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }}
52-
53-
- name: Get branch name
54-
id: branch_name
55-
run: echo "BRANCH=build-downgrade-to-${{ env.TARGET_PHP_VERSION_ID }}" >> $GITHUB_OUTPUT
56-
57-
- name: Install dependencies
58-
run: composer update --ansi
59-
60-
- name: Downgrade src
61-
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}
62-
63-
- name: Run lint on src
64-
run: vendor/bin/parallel-lint src --colors --show-deprecated
65-
66-
- name: Get tag for downgraded release
67-
id: tag-downgraded
68-
run: echo "${{ format('DOWNGRADED_TAG={0}.{1}', github.ref_name, env.TARGET_PHP_VERSION_ID) }}" >> $GITHUB_OUTPUT
69-
70-
- name: Import GPG signing information
71-
uses: crazy-max/ghaction-import-gpg@v6
72-
with:
73-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
74-
passphrase: ${{ secrets.PASSPHRASE }}
75-
git_config_global: true
76-
git_user_signingkey: true
77-
git_commit_gpgsign: true
78-
git_tag_gpgsign: true
79-
80-
- name: Commit and tag
81-
uses: stefanzweifel/git-auto-commit-action@v5
82-
env:
83-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
84-
with:
85-
commit_message: 'Release PHPStan CodeIgniter to target PHP ${{ env.TARGET_PHP_VERSION }}'
86-
branch: ${{ steps.branch_name.outputs.BRANCH }}
87-
tagging_message: ${{ steps.tag-downgraded.outputs.DOWNGRADED_TAG }}
88-
commit_options: '--gpg-sign'
89-
commit_user_name: paulbalandan
90-
commit_user_email: paulbalandan@gmail.com
91-
add_options: '-u'
92-
create_branch: true
93-
94-
- name: Delete local and remote branches
95-
run: |
96-
git switch ${{ env.DEFAULT_BRANCH }}
97-
git branch -D ${{ steps.branch_name.outputs.BRANCH }}
98-
git push origin -d ${{ steps.branch_name.outputs.BRANCH }}
99-
git branch -a

.github/workflows/test-phpunit.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ on:
2020
- 'composer.json'
2121
- 'phpunit.dist.xml'
2222

23-
env:
24-
TARGET_PHP_VERSION: '7.4'
25-
TARGET_PHP_VERSION_ID: 70400
26-
2723
jobs:
2824
extension-tests:
2925
name: PHPUnit Extension Tests [PHP ${{ matrix.php-version }}]
30-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-latest
3127

3228
strategy:
3329
fail-fast: false
@@ -66,11 +62,5 @@ jobs:
6662
- name: Install dependencies
6763
run: composer update --ansi
6864

69-
- name: Downgrade src
70-
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}
71-
72-
- name: Run lint on src
73-
run: vendor/bin/parallel-lint src --colors --show-deprecated
74-
7565
- name: Run Extension Tests
7666
run: vendor/bin/phpunit --no-coverage

.php-cs-fixer.dist.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@
2020
$finder = Finder::create()
2121
->files()
2222
->in([
23-
__DIR__ . '/bin',
2423
__DIR__ . '/src',
2524
__DIR__ . '/tests',
2625
])
2726
->append([
2827
__FILE__,
29-
__DIR__ . '/bin/parse-php-version',
30-
__DIR__ . '/bin/transform-source',
3128
]);
3229

3330
$overrides = [

bin/rector-downgrade.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

bin/transform-source

Lines changed: 0 additions & 26 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@
3030
"require-dev": {
3131
"codeigniter/coding-standard": "^1.7",
3232
"codeigniter4/shield": "^1.0",
33-
"friendsofphp/php-cs-fixer": "^3.20",
34-
"nexusphp/cs-config": "^3.12",
35-
"php-parallel-lint/php-parallel-lint": "^1.3",
33+
"friendsofphp/php-cs-fixer": "^3.49",
34+
"nexusphp/cs-config": "^3.21",
3635
"phpstan/extension-installer": "^1.3",
3736
"phpstan/phpstan-deprecation-rules": "^1.1",
3837
"phpstan/phpstan-phpunit": "^1.3",
3938
"phpstan/phpstan-strict-rules": "^1.5",
40-
"phpunit/phpunit": "^10.2",
41-
"rector/rector": "^1.0.0"
39+
"phpunit/phpunit": "^10.5"
4240
},
4341
"repositories": [
4442
{

src/ComposerJsonRewriter.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)