Compare commits

...
Author SHA1 Message Date
laravel-ide-helper 4c2f68f14a composer fix-style 2025-01-08 10:00:25 +00:00
Barry vd. Heuvel a11dd14ee5 Check if macro is valid 2025-01-08 10:59:45 +01:00
barryvdh 088968c3fc Update CHANGELOG 2025-01-06 15:42:30 +00:00
Barry vd. Heuvel 655e057626 Fix empty closure 2025-01-06 16:29:58 +01:00
barryvdh c8d85a0d34 Update CHANGELOG 2025-01-06 14:09:45 +00:00
Barry vd. Heuvel 4c656cc71d Remove duplicate config, fix ->can() (#1650) 2025-01-06 15:08:47 +01:00
barryvdh 0fe9774dfb Update CHANGELOG 2025-01-06 13:53:52 +00:00
4 changed files with 50 additions and 8 deletions
+39
View File
@@ -1,5 +1,44 @@
# Changelog
## v3.5.2 - 2025-01-06
### Fixes
Fix empty/anonymous closure in meta command.
**Full Changelog**: https://github.com/barryvdh/laravel-ide-helper/compare/v3.5.1...v3.5.2
## v3.5.1 - 2025-01-06
### What's Changed
* Remove duplicate config, fix ->can() by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1650
**Full Changelog**: https://github.com/barryvdh/laravel-ide-helper/compare/v3.5.0...v3.5.1
## v3.5.0 - 2025-01-06
### What's Changed
* Add phpstorm meta argument hints by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1640
* Add meta override for user return types by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1642
* Use forked ContextFactory by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1643
* Remove php parser by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1644
* Also add eloquent template tags from base class by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1645
* Add more metadata by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1646
* Fixed generating PHPDoc for methods with class templates by @chack1172 in https://github.com/barryvdh/laravel-ide-helper/pull/1647
* Feat guess macro types by @barryvdh in https://github.com/barryvdh/laravel-ide-helper/pull/1648
* Allow adding custom Macroable classes. by @mathieutu in https://github.com/barryvdh/laravel-ide-helper/pull/1629
* Add special `dev` to composer keywords by @jnoordsij in https://github.com/barryvdh/laravel-ide-helper/pull/1649
### New Contributors
* @chack1172 made their first contribution in https://github.com/barryvdh/laravel-ide-helper/pull/1647
* @mathieutu made their first contribution in https://github.com/barryvdh/laravel-ide-helper/pull/1629
* @jnoordsij made their first contribution in https://github.com/barryvdh/laravel-ide-helper/pull/1649
**Full Changelog**: https://github.com/barryvdh/laravel-ide-helper/compare/v3.4.0...v3.5.0
## v3.4.0 - 2024-12-29
### What's Changed
+2 -1
View File
@@ -6,7 +6,8 @@ return collect(Illuminate\Support\Facades\Gate::abilities())
$policyClass = null;
if (get_class($reflection->getClosureThis()) === Illuminate\Auth\Access\Gate::class) {
$closureThis = $reflection->getClosureThis();
if ($closureThis && get_class($closureThis) === Illuminate\Auth\Access\Gate::class) {
$vars = $reflection->getClosureUsedVariables();
if (isset($vars['callback'])) {
+7 -1
View File
@@ -403,9 +403,15 @@ class Alias
$macros = isset($properties['macros']) ? $properties['macros'] : [];
foreach ($macros as $macro_name => $macro_func) {
if (!in_array($macro_name, $this->usedMethods)) {
try {
$method = $this->getMacroFunction($macro_func);
} catch (Throwable $e) {
// Invalid method, skip
continue;
}
// Add macros
$this->methods[] = new Macro(
$this->getMacroFunction($macro_func),
$method,
$this->alias,
$reflection,
$macro_name,
+2 -6
View File
@@ -232,18 +232,14 @@ class MetaCommand extends Command
'argumentSet' => 'auth',
],
[
'class' => ['\Illuminate\Support\Facades\Route', '\Illuminate\Support\Facades\Auth'],
'class' => ['\Illuminate\Support\Facades\Route', '\Illuminate\Support\Facades\Auth', 'Illuminate\Foundation\Auth\Access\Authorizable'],
'method' => ['can', 'cannot'],
'argumentSet' => 'auth',
],
[
'method' => 'config',
'argumentSet' => 'configs',
],
[
'class' => ['\Illuminate\Config\Repository', '\Illuminate\Support\Facades\Config'],
'method' => [
'get',
// 'get', // config() and Config::Get() are added with return type hints already
'getMany',
'set',
'string',