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
2 changed files with 15 additions and 1 deletions
+8
View File
@@ -1,5 +1,13 @@
# 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
+7 -1
View File
@@ -403,9 +403,15 @@ 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(
$this->getMacroFunction($macro_func), $method,
$this->alias, $this->alias,
$reflection, $reflection,
$macro_name, $macro_name,