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

could you please release a Laravel 7 compatible version #154

Open
vesper8 opened this issue Mar 5, 2020 · 32 comments
Open

could you please release a Laravel 7 compatible version #154

vesper8 opened this issue Mar 5, 2020 · 32 comments

Comments

@vesper8
Copy link
Contributor

vesper8 commented Mar 5, 2020

@vsch pretty please : )

this is one of the only dependencies holding me back from upgrading right now

many thanks!

@cvaize
Copy link

cvaize commented Mar 22, 2020

+1

@cvaize
Copy link

cvaize commented Mar 22, 2020

Зависимости phpunit/phpunit и phpspec/phpspec конфликтуют из-за зависимости sebastian/exporter. Пакет phpspec/phpspec использует устаревшую версию зависимости sebastian/exporter (3.1.2).
image
image

@cvaize
Copy link

cvaize commented Mar 22, 2020

"phpunit/phpunit": "8.5.2" установилась
image

@cvaize
Copy link

cvaize commented Mar 22, 2020

@vesper8 Если вам срочно нужно использовать этот пакет с Laravel 7 используйте форк composer require cvaize/laravel-translation-manager:6.0.4 версия должна быть 6.0.4, это важно.

@cvaize
Copy link

cvaize commented Mar 22, 2020

image
image

@vesper8
Copy link
Contributor Author

vesper8 commented Mar 23, 2020

@cvaize could you submit a PR please?

@cvaize
Copy link

cvaize commented Mar 24, 2020

@vesper8 I am frontend developer =) Используйте версии подобранные мною в composer.json и замените все функции str_* на \Str::* по типу. Я только заставил работать пакет на Laravel 7, я не проверял его полностью и не запускал тесты =)

@alqabali
Copy link

@cvaize your fork doesn't works its give me :
Target [Vsch\TranslationManager\Repositories\Interfaces\ITranslatorRepository] is not instantiable while building [Vsch\TranslationManager\Manager].

@cvaize
Copy link

cvaize commented Mar 31, 2020

Вы подключили провайдеры в app.php ?
image

@cvaize
Copy link

cvaize commented Mar 31, 2020

@alqabali Send a screenshot of the error.

@vesper8
Copy link
Contributor Author

vesper8 commented Apr 6, 2020

@cvaize why did you replace the str_ helpers with \Str ?

str_contains and str_starts_with are still valid helpers in Laravel 7. And if I try your fork I just get the error Class 'Str' not found and no idea how to use \Str inside a blade file.

These helpers str_ are still available in so why replace this?

https://github.com/laravel/helpers/blob/25d8562f42ce5bb922f6714e5747094378e9592b/src/helpers.php#L402

https://github.com/laravel/helpers/blob/25d8562f42ce5bb922f6714e5747094378e9592b/src/helpers.php#L360

@AndreFabris
Copy link

Has anyone resolved this? Seems like last update was long time ago?

@cvaize
Copy link

cvaize commented Jun 13, 2020

@AndreFabris
Copy link

Thanks Dmitry

@UzielSilva
Copy link

@cvaize I'm also getting Target [Vsch\TranslationManager\Repositories\Interfaces\ITranslatorRepository] is not instantiable while building [Vsch\TranslationManager\Manager], and I have this in my config/app.php:
image
Do I need additional service providers?

@cvaize
Copy link

cvaize commented Jun 26, 2020

image

@cvaize
Copy link

cvaize commented Jun 26, 2020

image
@UzielSilva

@cvaize
Copy link

cvaize commented Jun 26, 2020

Everything is there. Show the composer.json image

@UzielSilva
Copy link

@cvaize I got the problem, it was because the Laravel TranslationServiceProvider is deferred, so, the extended class is deferred also. this package tries to set it as non-deferred, but that is not connected with the $defer variable anymore, instead of that, it now depends on an interface you must implement called DeferredProvider. I'm working on a fix for this.

@cvaize
Copy link

cvaize commented Jun 27, 2020

image
Required 1, 2.

@cvaize
Copy link

cvaize commented Jun 27, 2020

@UzielSilva

@cvaize
Copy link

cvaize commented Jun 27, 2020

@UzielSilva
image

@sergeymirakyan
Copy link

@cvaize @vsch i am upgrading to Laravel 7. Followed all the steps you mentioned here but i am getting this error Class 'Str' not found

@vesper8
Copy link
Contributor Author

vesper8 commented Nov 18, 2020

@sergeymirakyan if you install https://github.com/laravel/helpers then it will fix that problem

composer require laravel/helpers

@sergeymirakyan
Copy link

sergeymirakyan commented Nov 18, 2020 via email

@sergeymirakyan
Copy link

@vesper8 thanks i solved that, but another issue when i use getPublish function i get Class 'Vsch\TranslationManager\Classes\PathTemplateResolver' not found this error, it used to work in old version

@vesper8
Copy link
Contributor Author

vesper8 commented Nov 18, 2020

@sergeymirakyan I don't use getPublish as part of my workflow so I can't help you there

@sergeymirakyan
Copy link

@vsch when i use getPublish function i get Class 'Vsch\TranslationManager\Classes\PathTemplateResolver' not found it used to work in old version

@sergeymirakyan
Copy link

@cvaize on your fork there is one issue on Manager.php line 16 you use Vsch\TranslationManager\Classes\PathTemplateResolver
class but the correct namespace is Cvaize\TranslationManager\Classes\PathTemplateResolver, could you please make a commit and fix it? because of that i cannot access getPublish method on version 6.0.4 and above

@vesper8
Copy link
Contributor Author

vesper8 commented Nov 19, 2020

@sergeymirakyan You can try my fork too, or better yet fork it yourself.

The only thing I changed in my fork is changed the composer.json to make it compatible with Laravel 7.. nothing else is different. I personally am not a fan of forks that change the namespace everywhere.. very messy and useless.. maybe these people just don't know how to fork

@sergeymirakyan
Copy link

@vesper8 seems your fork is fine, how can i try that?

@vesper8
Copy link
Contributor Author

vesper8 commented Nov 19, 2020

@sergeymirakyan In your composer.json add

"vsch/laravel-translation-manager": "^7.0"

Then lower, in your repositories add

        "vesper8/laravel-translation-manager": {
            "type": "vcs",
            "url": "https://github.com/vesper8/laravel-translation-manager"
        }

So if you don't currently have any custom repositories then you would add

    "repositories": {
        "vesper8/laravel-translation-manager": {
            "type": "vcs",
            "url": "https://github.com/vesper8/laravel-translation-manager"
        }
    },

You should also read https://snippets.khromov.se/composer-use-your-own-fork-for-a-package/

But this is not always true, what I just showed you above will work for my fork and it will work on Laravel 7, but not on Laravel 8

BUT, you should fork it yourself. You can fork the main repository and add your own changes, or you can fork my fork. But depending on another user's fork is a bad idea because I can delete it / change it at any time and it would break your project

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

6 participants