Compare commits

..
3 changed files with 2 additions and 20 deletions
-8
View File
@@ -1,13 +1,5 @@
# 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
+1 -7
View File
@@ -403,15 +403,9 @@ 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(
$method,
$this->getMacroFunction($macro_func),
$this->alias,
$reflection,
$macro_name,
+1 -5
View File
@@ -819,14 +819,10 @@ class ModelsCommand extends Command
$relation === 'morphTo'
)
) {
$matches = [];
$returnType = $this->getReturnTypeFromDocBlock($reflection);
preg_match('/MorphTo<(.+?)(?:,|>)/i', $returnType, $matches);
// Model isn't specified because relation is polymorphic
$this->setProperty(
$method,
$matches[1] ?? $this->getClassNameInDestinationFile($model, Model::class) . '|\Eloquent',
$this->getClassNameInDestinationFile($model, Model::class) . '|\Eloquent',
true,
null,
$comment,