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

[Idea] Remove all paths from search input #6

Closed
osbre opened this issue May 30, 2020 · 5 comments
Closed

[Idea] Remove all paths from search input #6

osbre opened this issue May 30, 2020 · 5 comments

Comments

@osbre
Copy link

osbre commented May 30, 2020

Is your feature request related to a problem? Please describe.
Without a path we will get more results, i think

Describe the solution you'd like
Match all paths and remove them.

Describe alternatives you've considered
Just leave it as is 👀

Additional context
Add any other context or screenshots about the feature request here.

@osbre osbre added the feature label May 30, 2020
@Gummibeer
Copy link
Member

Hey,

that's the code that generates the API search URL.

protected function getUrl(Throwable $throwable): string
{
$query = $throwable->getMessage();
if (empty($query)) {
$query = get_class($throwable);
}
$query = http_build_query([
'page' => 1,
'pagesize' => 5,
'order' => 'desc',
'sort' => 'relevance',
'site' => 'stackoverflow',
'accepted' => 'True',
'filter' => '!9YdnSJ*_T',
'q' => urlencode($query),
]);
return 'https://api.stackexchange.com/2.2/search/advanced?'.urldecode($query);
}

What do you want to change? My primary question is: what do you mean with "path"? 🤔
Do you mean the FQCN of the exception of the exception has no message?

@Gummibeer Gummibeer self-assigned this May 30, 2020
@osbre
Copy link
Author

osbre commented May 30, 2020

Error example:

syntax error, unexpected 's' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) (View: /home/ostap/Sites/crm/vendor/orchid/platform/resources/views/layouts/base.blade.php)

In my way, path is /home/ostap/Sites/crm/vendor/orchid/platform/resources/views/layouts/base.blade.php

We can strip it to leave only this part:

vendor/orchid/platform/resources/views/layouts/base.blade.php/

@Gummibeer
Copy link
Member

Ah, now I see what you mean.
With base_path() helper function it should be easy to replace it by an empty string.
Do you want to provide a PR including test?

@github-actions
Copy link

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days

@Gummibeer
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants