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

Support for Laravel 8 #17

Closed
bjorkgard opened this issue Sep 14, 2020 · 12 comments
Closed

Support for Laravel 8 #17

bjorkgard opened this issue Sep 14, 2020 · 12 comments

Comments

@bjorkgard
Copy link

Is it possible to get support for Laravel 8?

@MichaelHoste
Copy link
Member

We just released the version 1.11 that should be compatible with Laravel 8.

Could you please confirm that it works smoothly?

Thanks for the heads up!

@bjorkgard
Copy link
Author

A fresh installation of Laravel 8 require Guzzle v7

tio/laravel v1.11 requires guzzlehttp/guzzle ^6.3 -> found guzzlehttp/guzzle[6.3.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0.1).

@MichaelHoste
Copy link
Member

Sorry about that!

We relaxed the Guzzle dependency and made sure that was not an issue anymore in Version 1.12

@bjorkgard
Copy link
Author

Thanks.
Works on a clean install of Laravel 8.

But if you install Laravel Jetstream, neither init nor sync works.

Error Message: InvalidArgumentException Unable to locate a class or view for component [jet -....].
None of the jetstream components need to be searched.

@MichaelHoste
Copy link
Member

Works on a clean install of Laravel 8.

Great! Thank you for your useful feedback 😄

Error Message: InvalidArgumentException Unable to locate a class or view for component [jet -....].

It seems that the component called is not present in its correct directory (see here).

Are you sure that this error is related to this package? Does the app works correctly without triggering the same error?

None of the jetstream components need to be searched.

By default, the whole app and resources folders are searched for GetText strings: https://github.com/translation/laravel/blob/master/config/translation.php#L28

You can override this configuration to only allow some of your directories, but it should not trigger any error anyway.

@bjorkgard
Copy link
Author

Yes, the app works as intended.
It is a new laravel installation with the extension for jetstream. (laravel new [name] --jet).

@MichaelHoste
Copy link
Member

I reopened this issue and we'll investigate on what went wrong. Thanks again for your useful feedback.

I'll keep you in touch soon.

@MichaelHoste MichaelHoste reopened this Sep 14, 2020
@MichaelHoste
Copy link
Member

MichaelHoste commented Sep 15, 2020

We located the error and created a pull request to fix it: php-gettext/Gettext#261

I hope that it will make sense and be merged soon.

In the meantime, you can fix this by updating the gettext_parse_paths to avoid blade files with jet components.

Thanks for your help!

@thanosalexander
Copy link

Works on a clean install of Laravel 8.

Great! Thank you for your useful feedback 😄

Error Message: InvalidArgumentException Unable to locate a class or view for component [jet -....].

It seems that the component called is not present in its correct directory (see here).

Are you sure that this error is related to this package? Does the app works correctly without triggering the same error?

None of the jetstream components need to be searched.

By default, the whole app and resources folders are searched for GetText strings: https://github.com/translation/laravel/blob/master/config/translation.php#L28

You can override this configuration to only allow some of your directories, but it should not trigger any error anyway.

I noticed that when i use components namespaces https://laravel.com/docs/8.x/blade#manually-registering-package-components

like here <x-client::page.title /> it gives me this error Unable to locate a class or view for component

@MichaelHoste
Copy link
Member

This seems to be the same issue that we fixed in this pull request: php-gettext/Gettext#261

I hope it will be merged soon.

@thanosalexander
Copy link

Cool.. i'll watch it Michaël . Thanks!

@MichaelHoste
Copy link
Member

php-gettext/Gettext#261 was merged and released.

I already bumped this package to force the new version. So if you update it, it should finally work without parsing errors for Component Tags 🎉

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

No branches or pull requests

3 participants