mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 18:43:12 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5b03baccb | ||
|
|
efae815281 | ||
|
|
c5adc05af3 | ||
|
|
bf52f9e121 |
@@ -1,13 +1,5 @@
|
|||||||
# Changelog
|
# 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
|
## v3.5.1 - 2025-01-06
|
||||||
|
|
||||||
### What's Changed
|
### What's Changed
|
||||||
|
|||||||
+1
-7
@@ -403,15 +403,9 @@ class Alias
|
|||||||
$macros = isset($properties['macros']) ? $properties['macros'] : [];
|
$macros = isset($properties['macros']) ? $properties['macros'] : [];
|
||||||
foreach ($macros as $macro_name => $macro_func) {
|
foreach ($macros as $macro_name => $macro_func) {
|
||||||
if (!in_array($macro_name, $this->usedMethods)) {
|
if (!in_array($macro_name, $this->usedMethods)) {
|
||||||
try {
|
|
||||||
$method = $this->getMacroFunction($macro_func);
|
|
||||||
} catch (Throwable $e) {
|
|
||||||
// Invalid method, skip
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// Add macros
|
// Add macros
|
||||||
$this->methods[] = new Macro(
|
$this->methods[] = new Macro(
|
||||||
$method,
|
$this->getMacroFunction($macro_func),
|
||||||
$this->alias,
|
$this->alias,
|
||||||
$reflection,
|
$reflection,
|
||||||
$macro_name,
|
$macro_name,
|
||||||
|
|||||||
@@ -819,14 +819,10 @@ class ModelsCommand extends Command
|
|||||||
$relation === 'morphTo'
|
$relation === 'morphTo'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$matches = [];
|
|
||||||
$returnType = $this->getReturnTypeFromDocBlock($reflection);
|
|
||||||
preg_match('/MorphTo<(.+?)(?:,|>)/i', $returnType, $matches);
|
|
||||||
|
|
||||||
// Model isn't specified because relation is polymorphic
|
// Model isn't specified because relation is polymorphic
|
||||||
$this->setProperty(
|
$this->setProperty(
|
||||||
$method,
|
$method,
|
||||||
$matches[1] ?? $this->getClassNameInDestinationFile($model, Model::class) . '|\Eloquent',
|
$this->getClassNameInDestinationFile($model, Model::class) . '|\Eloquent',
|
||||||
true,
|
true,
|
||||||
null,
|
null,
|
||||||
$comment,
|
$comment,
|
||||||
|
|||||||
Reference in New Issue
Block a user