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

How to use this in my plugin of OctoberCMS #595

Closed
jacksun101 opened this issue Sep 19, 2019 · 4 comments
Closed

How to use this in my plugin of OctoberCMS #595

jacksun101 opened this issue Sep 19, 2019 · 4 comments
Labels

Comments

@jacksun101
Copy link

Sorry for the issue of such particular integration with OctoberCMS. I've followed your installation instruction of ActivityLog v2. And I got the following error when I made an activity()->log() call.

Type error: Argument 1 passed to Spatie\Activitylog\ActivityLogStatus::__construct() must be an instance of Illuminate\Config\Repository, instance of October\Rain\Config\Repository given

And then I modified to use October\Rain\Config\Repository in ActivityLogStatus, another error showed up.

Target [October\Rain\Config\LoaderInterface] is not instantiable while building [Spatie\Activitylog\ActivityLogStatus, October\Rain\Config\Repository, Spatie\Activitylog\ActivityLogStatus, October\Rain\Config\Repository].

I think maybe I need to create something like a wrapper to make ActivityLog work in OctoberCMS. Can you give me some suggestion or direction? Thanks for such a great library.

@Gummibeer
Copy link
Collaborator

Could you upgrade to the latest version? We've fixed the config problem in #505 and released it as v3.4.0
This should solve your issue.

@jacksun101
Copy link
Author

jacksun101 commented Sep 20, 2019

Thanks. But I could not use v3. If I composer require v3.4.0, composer update will cause issue.

Problem 1
- Installation request for spatie/laravel-activitylog 3.4.* -> satisfiable by spatie/laravel-activitylog[3.4.0].
- spatie/laravel-activitylog 3.4.0 requires php ^7.2 -> your PHP version (7.3.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.

And "composer install --ignore-platform-reqs" causes more lines of issue.

Problem 1
- Conclusion: remove laravel/framework v5.5.48
- Conclusion: don't install laravel/framework v5.5.48
- Conclusion: don't install laravel/framework v5.5.47
- Conclusion: don't install laravel/framework v5.5.46
....

If I just apply the #505 fix, then there is another error shows up.

Unresolvable dependency resolving [Parameter #0 [ $app ]] in class Illuminate\Auth\AuthManager

Is there any way that can solve this? My OctoberCMS project is using laravel/framework 5.5.48.

@Gummibeer
Copy link
Collaborator

How have you made Laravel 5.5 run on PHP 7.0? 😲
My recommendation is to upgrade to PHP 7.2 or even better 7.3 and Laravel 5.8 or even better 6.0.
Some links about it:
https://www.php.net/supported-versions.php
https://laravel.com/docs/6.x/releases#support-policy
https://connortumbleson.com/2019/01/28/lts-is-a-lie/

If this is not possible for you: the main problem, that got solved in the PR, is that we required the Laravel config class instead of it's interface.

@spatie-bot
Copy link

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

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

No branches or pull requests

3 participants