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

Mail view gets dumped in console when running import command [BUG] #115

Open
denitsa-md opened this issue Apr 28, 2020 · 1 comment
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@denitsa-md
Copy link

Describe the bug

When running php artisan scout:import I'm seeing my mail templates get dumped in the console.

To Reproduce

I have this mail view:

app\Domain\Reports\Mail\views\report-generated.blade.php

@component('mail::message')
# Your report is ready

Find it attached in this email.

Best Regards,<br>
{{ config('app.name') }}
@endcomponent

The directory for that view is registered in AppServiceProvider like:

View::addNamespace('report_views', app_path('Domain/Reports/Mail/views'));

This happens when I run php artisan scout:import. Notice how the view gets dumped at the start of the command.

php artisan scout:import
@component('mail::message')
# Your report is ready

Find it attached in this email.

Best Regards,<br>
{{ config('app.name') }}
@endcomponent
Importing [App\Domain\Products\Models\Product]
Switching to the new index
5/5 [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬] 100%


 [OK] All [App\Domain\Products\Models\Product] records have been imported.


Importing [App\Domain\VendorsAndPublishers\Models\Publisher]
Switching to the new index
5/5 [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬] 100%


 [OK] All [App\Domain\VendorsAndPublishers\Models\Publisher] records have been imported.


Importing [App\Domain\VendorsAndPublishers\Models\Vendor]
Switching to the new index
5/5 [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬] 100%


 [OK] All [App\Domain\VendorsAndPublishers\Models\Vendor] records have been imported.

I haven't experienced this with other commands so I wonder what might be causing this.

@denitsa-md denitsa-md added the bug Something isn't working label Apr 28, 2020
@matchish matchish added the help wanted Extra attention is needed label Apr 29, 2020
@matchish
Copy link
Owner

matchish commented May 1, 2020

For someone who wants to help.
First of all we need fail test.
We have to upload the mail view to test application
https://github.com/matchish/laravel-scout-elasticsearch/tree/master/tests/laravel/app
Then we have to register the namespace in new service provider and add it here


If we are lucky enough it will break some tests) If no then testing framework doesn't cover this issue and we have to debug it in a real laravel application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants