Skip to content

chore(style): fix mago formatting issues#2051

Closed
laylatichy wants to merge 1 commit into
tempestphp:3.xfrom
laylatichy:chore-fix-mago-formatting-issues
Closed

chore(style): fix mago formatting issues#2051
laylatichy wants to merge 1 commit into
tempestphp:3.xfrom
laylatichy:chore-fix-mago-formatting-issues

Conversation

@laylatichy

Copy link
Copy Markdown
Contributor

not sure if related to changes in config or mago version as I dont use it on daily basis, to unlock #2050

@github-actions

github-actions Bot commented Mar 18, 2026

Copy link
Copy Markdown

Benchmark Results

Comparison of chore-fix-mago-formatting-issues against 3.x (7d2a43376a031ae2659311c99c4a46653ec114a2).

Open to see the benchmark results
Benchmark Set Mem. Peak Time Variability
DiscoveryScanBench(benchFullDiscoveryScan) - 23.508mb +0.00% 16.139ms +6.91% ±1.13% +68.61%
DiscoveryScanBench(benchSinglePackageScan) console (large) 23.509mb +0.00% 1.625ms +6.43% ±0.48% -6.65%

Generated by phpbench against commit c9a96d7

@laylatichy laylatichy force-pushed the chore-fix-mago-formatting-issues branch 3 times, most recently from 72bae63 to 59e401d Compare March 18, 2026 12:21
@laylatichy laylatichy force-pushed the chore-fix-mago-formatting-issues branch from 59e401d to c9a96d7 Compare March 18, 2026 12:22
@brendt

brendt commented Mar 18, 2026

Copy link
Copy Markdown
Member

TBH

            $this->years
            * 365
            * 24
            * 60
            * 60
            + $this->months
            * 30
            * 24
            * 60
            * 60
            + $this->weeks
            * 7
            * 24
            * 60
            * 60
            + $this->days
            * 60
            * 60
            * 24
            + $this->hours
            * 60
            * 60
            + $this->minutes * 60

Looks pretty weird :p @azjezz could you point me to which rule I have to disable? :p

@laylatichy

laylatichy commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

@brendt its coming from no-redundant-parentheses but that as well is responsible for () around (new X)
edit: even with that rule its formatting it that way
edit2: mago 1.14.0 is fine, 1.15.0 introduced it carthage-software/mago#1407

@xHeaven

xHeaven commented Mar 18, 2026

Copy link
Copy Markdown
Member

@brendt its coming from no-redundant-parentheses but that as well is responsible for () around (new X) edit: even with that rule its formatting it that way edit2: mago 1.14.0 is fine, 1.15.0 introduced it carthage-software/mago#1407

Whoops! 👀 That's actually on me, I'll look into it!

@azjezz

azjezz commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

@brendt @xHeaven broke it 🤣 but we will get it fixed

@brendt

brendt commented Mar 19, 2026

Copy link
Copy Markdown
Member

Ok then we can close this one @laylatichy :)

@brendt brendt closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants