Skip to content

fix: various reflection issues with Model and Entity #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: 1.x
Choose a base branch
from
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
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
*.php text eol=lf

.github/ export-ignore
bin/ export-ignore
tests/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php-cs-fixer.dist.php export-ignore
src/ComposerJsonRewriter.php export-ignore
src/ComposerScripts.php export-ignore
phpunit.dist.xml export-ignore
phpstan.neon.dist export-ignore
phpstan-baseline.php export-ignore
rector-downgrade.php export-ignore
77 changes: 0 additions & 77 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ on:
tags:
- '**'

env:
COMPOSER_ROOT_VERSION: '1.x-dev'
DEFAULT_BRANCH: '1.x'
TARGET_PHP_VERSION: '7.4'
TARGET_PHP_VERSION_ID: 70400

jobs:
build:
name: Create a release
Expand All @@ -26,74 +20,3 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
draft: true
prerelease: false

build_downgraded_release:
name: Build release for lower PHP version
runs-on: ubuntu-latest
needs: build
timeout-minutes: 10

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }}

- name: Get branch name
id: branch_name
run: echo "BRANCH=build-downgrade-to-${{ env.TARGET_PHP_VERSION_ID }}" >> $GITHUB_OUTPUT

- name: Install dependencies
run: composer update --ansi

- name: Downgrade src
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}

- name: Run lint on src
run: vendor/bin/parallel-lint src --colors --show-deprecated

- name: Get tag for downgraded release
id: tag-downgraded
run: echo "${{ format('DOWNGRADED_TAG={0}.{1}', github.ref_name, env.TARGET_PHP_VERSION_ID) }}" >> $GITHUB_OUTPUT

- name: Import GPG signing information
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true

- name: Commit and tag
uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
commit_message: 'Release PHPStan CodeIgniter to target PHP ${{ env.TARGET_PHP_VERSION }}'
branch: ${{ steps.branch_name.outputs.BRANCH }}
tagging_message: ${{ steps.tag-downgraded.outputs.DOWNGRADED_TAG }}
commit_options: '--gpg-sign'
commit_user_name: paulbalandan
commit_user_email: [email protected]
add_options: '-u'
create_branch: true

- name: Delete local and remote branches
run: |
git switch ${{ env.DEFAULT_BRANCH }}
git branch -D ${{ steps.branch_name.outputs.BRANCH }}
git push origin -d ${{ steps.branch_name.outputs.BRANCH }}
git branch -a
12 changes: 1 addition & 11 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ on:
- 'composer.json'
- 'phpunit.dist.xml'

env:
TARGET_PHP_VERSION: '7.4'
TARGET_PHP_VERSION_ID: 70400

jobs:
extension-tests:
name: PHPUnit Extension Tests [PHP ${{ matrix.php-version }}]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand Down Expand Up @@ -66,11 +62,5 @@ jobs:
- name: Install dependencies
run: composer update --ansi

- name: Downgrade src
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }}

- name: Run lint on src
run: vendor/bin/parallel-lint src --colors --show-deprecated

- name: Run Extension Tests
run: vendor/bin/phpunit --no-coverage
3 changes: 0 additions & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
$finder = Finder::create()
->files()
->in([
__DIR__ . '/bin',
__DIR__ . '/src',
__DIR__ . '/tests',
])
->append([
__FILE__,
__DIR__ . '/bin/parse-php-version',
__DIR__ . '/bin/transform-source',
]);

$overrides = [
Expand Down
48 changes: 0 additions & 48 deletions bin/rector-downgrade.php

This file was deleted.

26 changes: 0 additions & 26 deletions bin/transform-source

This file was deleted.

9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@
},
"require": {
"php": "^8.1",
"codeigniter4/framework": "^4.4",
"codeigniter4/framework": "^4.5",
"phpstan/phpstan": "^2.0"
},
"require-dev": {
"codeigniter/coding-standard": "^1.7",
"codeigniter4/shield": "^1.0",
"friendsofphp/php-cs-fixer": "^3.20",
"nexusphp/cs-config": "^3.12",
"php-parallel-lint/php-parallel-lint": "^1.3",
"friendsofphp/php-cs-fixer": "^3.49",
"nexusphp/cs-config": "^3.21",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^10.2 || ^11.4",
"phpunit/phpunit": "^10.5 || ^11.4",
"rector/rector": "^2.0"
},
"conflict": {
Expand Down
3 changes: 1 addition & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon

parameters:
level: 9
level: 10
paths:
- src
- tests
excludePaths:
analyseAndScan:
- src/ComposerJsonRewriter.php
- src/ComposerScripts.php
- tests/*/data/*
tmpDir: build/phpstan
Expand Down
49 changes: 0 additions & 49 deletions src/ComposerJsonRewriter.php

This file was deleted.