Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Relative class names are not converted to fully-qualified class names (FQCNs) #1005

Merged
merged 23 commits into from
Mar 15, 2021

Conversation

SavKS
Copy link
Contributor

@SavKS SavKS commented Aug 5, 2020

Fixes #627

@mfn

This comment has been minimized.

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SavKS there's a lot of ground to cover the feature sounds super-interesting!

We haven't heard back, are you still interested in finish the PR?

I think due to the complexity, some tests are definitely on order here, what do you think?

@SavKS
Copy link
Contributor Author

SavKS commented Sep 7, 2020

@mfn

I'm sorry, but I can't write tests. If anyone in the community has the opportunity to do so, I would be grateful for that.

@mfn mfn changed the title Fix https://github.com/barryvdh/laravel-ide-helper/issues/627 Fix Relative class names are not converted to fully-qualified class names (FQCNs) Sep 7, 2020
@mfn
Copy link
Collaborator

mfn commented Sep 7, 2020

Thanks for the update!

This changes are quite involved I'm leaning towards having tests is a must.

I don't intend to do this myself, so let's keep the PR open if someone volunteers to step up!

@SeinopSys
Copy link

SeinopSys commented Sep 25, 2020

I spent a good two hours trying to write tests for this but it seems like the GeneratorCommand class uses some special magic to detect facades which I was not able to replicate. Below is my unsuccessful attempt in case someone is able to build on it in any capacity.

patch.zip

@mfn
Copy link
Collaborator

mfn commented Sep 28, 2020

:-(

I made a note to take a look sometime later, thanks!

@mfn
Copy link
Collaborator

mfn commented Dec 2, 2020

I made a note to take a look sometime later, thanks!

I did make a note but coming back to this, I don't feel like having the energy going through this without any test coverage.

I'm happy to assist anyone else taking a stab a this tough, just create a new PR with this commit and hack away and ping me. It's easier to talk about this in PRs with actual code then with sharing ZIPs.

@mfn
Copy link
Collaborator

mfn commented Dec 5, 2020

It looks like with the recent update to this PR something went wrong with a merge? I should not see so many unrelated changes here.

Please fix this and update with master and resolve the merge conflicts, thank you

@barryvdh barryvdh requested a review from mfn December 21, 2020 08:42
barryvdh
barryvdh previously approved these changes Dec 21, 2020
Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I still don't feel confident merging this with 0 tests

@barryvdh barryvdh dismissed their stale review December 21, 2020 09:11

Tests requested

@SavKS
Copy link
Contributor Author

SavKS commented Feb 17, 2021

Tests were added with the help of @tarik02.

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach LGTM and tested it also on a real life project 🎉

Some technical nitpicks, please see feedback inline

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

If you could add a README entry, I think we've good to go!

@mfn mfn requested a review from barryvdh March 14, 2021 19:10
@barryvdh barryvdh merged commit c5e18be into barryvdh:master Mar 15, 2021
mfn added a commit that referenced this pull request Mar 15, 2021
@mfn mfn mentioned this pull request Mar 15, 2021
9 tasks
@mfn
Copy link
Collaborator

mfn commented Mar 15, 2021

If you could add a README entry, I think we've good to go!

PS: I meant changelog of course -> already made a PR #1176

mfn added a commit that referenced this pull request Mar 15, 2021
barryvdh pushed a commit that referenced this pull request Mar 15, 2021
* chore: mention the fix from #1005

* chore: mention #1163
kodiakhq bot referenced this pull request in WesleyKlop/vote-system Mar 16, 2021
Bumps [barryvdh/laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper) from 2.9.0 to 2.9.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/barryvdh/laravel-ide-helper/releases">barryvdh/laravel-ide-helper's releases</a>.</em></p>
<blockquote>
<h2>v2.9.1</h2>
<h3>Added</h3>
<ul>
<li>Generate PHPDoc for Laravel 8.x factories <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1074">#1074 / ahmed-aliraqi</a></li>
<li>Add a comment to a property like table columns <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1168">#1168 / biiiiiigmonster</a></li>
<li>Added <code>post_migrate</code> hook to run commands after a migration <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1163">#1163 / netpol</a></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Error when generating helper for invokable classes <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1124">#1124 / standaniels</a></li>
<li>Fix broken ReflectionUnionTypes <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1132">#1132 / def-studio</a></li>
<li>Relative class names are not converted to fully-qualified class names <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1005">#1005 / SavKS</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/barryvdh/laravel-ide-helper/blob/master/CHANGELOG.md">barryvdh/laravel-ide-helper's changelog</a>.</em></p>
<blockquote>
<h2>2021-03-15, 2.9.1</h2>
<h3>Added</h3>
<ul>
<li>Generate PHPDoc for Laravel 8.x factories <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1074">#1074 / ahmed-aliraqi</a></li>
<li>Add a comment to a property like table columns <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1168">#1168 / biiiiiigmonster</a></li>
<li>Added <code>post_migrate</code> hook to run commands after a migration <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1163">#1163 / netpol</a></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Error when generating helper for invokable classes <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1124">#1124 / standaniels</a></li>
<li>Fix broken ReflectionUnionTypes <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1132">#1132 / def-studio</a></li>
<li>Relative class names are not converted to fully-qualified class names <a href="https://github.com/barryvdh/laravel-ide-helper/pull/1005">#1005 / SavKS</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/8d8302ff6adb55f8b844c798b8b1ffdee142f7e5"><code>8d8302f</code></a> chore: add missing changelog entries (<a href="https://github.com/barryvdh/laravel-ide-helper/issues/1176">#1176</a>)</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/202395b50f31325911fd045993c2b4d2851b8bf6"><code>202395b</code></a> Auto generate models (<a href="https://github.com/barryvdh/laravel-ide-helper/issues/1163">#1163</a>)</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/c5c9b2b9517696e1d17ce64790be42b8bb76a4d2"><code>c5c9b2b</code></a> Add comments like table columns. (<a href="https://github.com/barryvdh/laravel-ide-helper/issues/1168">#1168</a>)</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/c5e18beff1a2933913f86d56281581566e5c8705"><code>c5e18be</code></a> Fix Relative class names are not converted to fully-qualified class names (FQ...</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/6c4dcd9049e7e9aabc78673de7d1b9d428f3dc10"><code>6c4dcd9</code></a> Merge pull request <a href="https://github.com/barryvdh/laravel-ide-helper/issues/1164">#1164</a> from wilsenhc/readme-fix</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/aaade4eab932efe3841306ad7faf9ef1a8cef391"><code>aaade4e</code></a> Fix typo in README</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/b21324b20e24a3c36bedc184b4cf273bfa0a2d32"><code>b21324b</code></a> Merge pull request <a href="https://github.com/barryvdh/laravel-ide-helper/issues/1156">#1156</a> from ZaidBarghouthi/fix-zb-extra-quote</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/db83fb8b6ba38ea0b1d28197e898b4ff0d9581d0"><code>db83fb8</code></a> Remove extra single quote</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/4f42af1fa1f6265174ef97c36e0ae7beb2596c29"><code>4f42af1</code></a> Apply &quot;<a href="https://github.com/PSR12"><code>@​PSR12</code></a>&quot; in php-cs-fixer (<a href="https://github.com/barryvdh/laravel-ide-helper/issues/1150">#1150</a>)</li>
<li><a href="https://github.com/barryvdh/laravel-ide-helper/commit/f0959c1184c6f8f9e50afa6d9b6c1eb7691ae3ae"><code>f0959c1</code></a> Update changelog and also automagically apply style fix (<a href="https://github.com/barryvdh/laravel-ide-helper/issues/1140">#1140</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/barryvdh/laravel-ide-helper/compare/v2.9.0...v2.9.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=barryvdh/laravel-ide-helper&package-manager=composer&previous-version=2.9.0&new-version=2.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
fatihdirikman added a commit to fatihdirikman/Laravel-IDE-Helper that referenced this pull request Jan 7, 2022
renaforsberg824 added a commit to renaforsberg824/ide-helper-laravel-developer that referenced this pull request Oct 5, 2022
lisadeloach63 added a commit to lisadeloach63/ide-helper-reso-laravel that referenced this pull request Oct 7, 2022
sadafrangian3 pushed a commit to sadafrangian3/ide-helper-laravel that referenced this pull request Oct 18, 2022
smile1130 added a commit to smile1130/laravel-IDE that referenced this pull request Jun 16, 2023
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.

Relative class names are not converted to fully-qualified class names (FQCNs)
4 participants