Skip to content
New issue

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

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

Already on GitHub? # to your account

Support generating helper files for real-time facades #1455

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

filipac
Copy link
Contributor

@filipac filipac commented Jul 27, 2023

Summary

This PR generates helper files for real-time facades. It uses the @mixin docblock to copy methods from the real class the facades points to.

For example, adding for an real-time facade of the class App\TestClass it would generate the following code in the final helper file:

namespace Facades\App {
    /**
     * @mixin \App\TestClass     */
    class TestClass extends \App\TestClass {}
}

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • New tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

Add changelog entry for real-time facades support

Mention real-time facades support in readme

Fix code style

Import
@filipac filipac force-pushed the support-real-time-facades branch from 9e87b0e to e6e9134 Compare July 27, 2023 14:55
@barryvdh
Copy link
Owner

Thanks! Tests seem to be failing though..

@filipac
Copy link
Contributor Author

filipac commented Jul 27, 2023

oh will take a look

// edit

@barryvdh removed the failing assertion as it was not actually helpful, anything else can be in the final helper file, we care about the things the test generates only.

We cannot 100% control the output file has only the real-time facades, anything else can be in the final output
@barryvdh barryvdh closed this Feb 7, 2024
@barryvdh barryvdh reopened this Feb 7, 2024
@barryvdh barryvdh merged commit 04c1a8d into barryvdh:master Feb 7, 2024
33 checks passed
d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
* Support generating helper files for real-time facades

Add changelog entry for real-time facades support

Mention real-time facades support in readme

Fix code style

Import

* Remove useless assertions

We cannot 100% control the output file has only the real-time facades, anything else can be in the final output
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants