mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 10:33:11 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4434dfc550 | ||
|
|
8fed0af7b1 | ||
|
|
800e2347a6 | ||
|
|
7549f58a30 |
@@ -0,0 +1,41 @@
|
|||||||
|
name: Release Drafter
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# branches to consider in the event; optional, defaults to all
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
# pull_request event is required only for autolabeler
|
||||||
|
pull_request:
|
||||||
|
# Only following types are handled by the action, but one can default to all as well
|
||||||
|
types: [opened, reopened, synchronize]
|
||||||
|
# pull_request_target event is required for autolabeler to support PRs from forks
|
||||||
|
# pull_request_target:
|
||||||
|
# types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_release_draft:
|
||||||
|
permissions:
|
||||||
|
# write permission is required to create a github release
|
||||||
|
contents: write
|
||||||
|
# write permission is required for autolabeler
|
||||||
|
# otherwise, read permission is required at least
|
||||||
|
pull-requests: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
||||||
|
#- name: Set GHE_HOST
|
||||||
|
# run: |
|
||||||
|
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||||
|
- uses: release-drafter/release-drafter@v6
|
||||||
|
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||||
|
# with:
|
||||||
|
# config-name: my-config.yml
|
||||||
|
# disable-autolabeler: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
name: "Update Changelog"
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||||
|
# updated CHANGELOG back to the repository.
|
||||||
|
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.release.target_commitish }}
|
||||||
|
|
||||||
|
- name: Update Changelog
|
||||||
|
uses: stefanzweifel/changelog-updater-action@v1
|
||||||
|
with:
|
||||||
|
latest-version: ${{ github.event.release.tag_name }}
|
||||||
|
release-notes: ${{ github.event.release.body }}
|
||||||
|
|
||||||
|
- name: Commit updated CHANGELOG
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
with:
|
||||||
|
branch: ${{ github.event.release.target_commitish }}
|
||||||
|
commit_message: Update CHANGELOG
|
||||||
|
file_pattern: CHANGELOG.md
|
||||||
+4
-1
@@ -6,7 +6,10 @@ All notable changes to this project will be documented in this file.
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
Add support for multiple pivot types when using the same accessor.
|
- Add support for multiple pivot types when using the same accessor.
|
||||||
|
- Smarter reset, keep tags that IDE helper doesn't use
|
||||||
|
- Use `numeric` type on fields with `decimal` casts
|
||||||
|
|
||||||
|
|
||||||
2024-10-18, 3.2.0
|
2024-10-18, 3.2.0
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -381,6 +381,8 @@ class ModelsCommand extends Command
|
|||||||
$realType = 'bool';
|
$realType = 'bool';
|
||||||
break;
|
break;
|
||||||
case 'decimal':
|
case 'decimal':
|
||||||
|
$realType = 'numeric';
|
||||||
|
break;
|
||||||
case 'string':
|
case 'string':
|
||||||
case 'hashed':
|
case 'hashed':
|
||||||
$realType = 'string';
|
$realType = 'string';
|
||||||
@@ -945,13 +947,19 @@ class ModelsCommand extends Command
|
|||||||
$reflection->getParentClass()->getInterfaceNames()
|
$reflection->getParentClass()->getInterfaceNames()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$phpdoc = new DocBlock($reflection, new Context($namespace));
|
||||||
if ($this->reset) {
|
if ($this->reset) {
|
||||||
$phpdoc = new DocBlock('', new Context($namespace));
|
|
||||||
$phpdoc->setText(
|
$phpdoc->setText(
|
||||||
(new DocBlock($reflection, new Context($namespace)))->getText()
|
(new DocBlock($reflection, new Context($namespace)))->getText()
|
||||||
);
|
);
|
||||||
} else {
|
foreach ($phpdoc->getTags() as $tag) {
|
||||||
$phpdoc = new DocBlock($reflection, new Context($namespace));
|
if (
|
||||||
|
in_array($tag->getName(), ['property', 'property-read', 'property-write', 'method', 'mixin'])
|
||||||
|
|| ($tag->getName() === 'noinspection' && in_array($tag->getContent(), ['PhpUnnecessaryFullyQualifiedNameInspection', 'PhpFullyQualifiedNameUsageInspection']))
|
||||||
|
) {
|
||||||
|
$phpdoc->deleteTag($tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$properties = [];
|
$properties = [];
|
||||||
|
|||||||
@@ -9,7 +9,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
/**
|
/**
|
||||||
* Text of existing phpdoc
|
* Text of existing phpdoc
|
||||||
*
|
*
|
||||||
|
* @implements \ArrayAccess
|
||||||
|
* @noinspection PhpUnreachableStatementInspection
|
||||||
|
* @noinspection PhpUnnecessaryFullyQualifiedNameInspection
|
||||||
* @property string $foo
|
* @property string $foo
|
||||||
|
* @property-read string $bar
|
||||||
|
* @method fooBar()
|
||||||
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Simple extends Model
|
class Simple extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,12 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
/**
|
/**
|
||||||
* Text of existing phpdoc
|
* Text of existing phpdoc
|
||||||
*
|
*
|
||||||
|
* @implements \ArrayAccess
|
||||||
|
* @noinspection PhpUnreachableStatementInspection
|
||||||
|
* @noinspection PhpUnnecessaryFullyQualifiedNameInspection
|
||||||
* @property string $foo
|
* @property string $foo
|
||||||
|
* @property-read string $bar
|
||||||
|
* @method fooBar()
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
/**
|
/**
|
||||||
* Text of existing phpdoc
|
* Text of existing phpdoc
|
||||||
*
|
*
|
||||||
|
* @implements \ArrayAccess
|
||||||
|
* @noinspection PhpUnreachableStatementInspection
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @property float $cast_to_real
|
* @property float $cast_to_real
|
||||||
* @property float $cast_to_float
|
* @property float $cast_to_float
|
||||||
* @property float $cast_to_double
|
* @property float $cast_to_double
|
||||||
* @property string $cast_to_decimal
|
* @property numeric $cast_to_decimal
|
||||||
* @property string $cast_to_string
|
* @property string $cast_to_string
|
||||||
* @property bool $cast_to_bool
|
* @property bool $cast_to_bool
|
||||||
* @property bool $cast_to_boolean
|
* @property bool $cast_to_boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user