bnomei / kirby3-janitor

Kirby Plugin for running commands like cleaning the cache from within the Panel, PHP code, CLI or a cronjob
https://forum.getkirby.com/t/kirby3-janitor-plugin/23573
MIT License
89 stars 8 forks source link

Installation trough composer doesn’t install the actual repo #24

Closed jesuismaxime closed 2 years ago

jesuismaxime commented 4 years ago

The title says it all; I was getting multiple 404 errors from API calls while testing some of the plugin functions; search for backupzip classes and didn’t find anything ’bout it in the plugin directory.. because there’s anything about it.

bnomei commented 4 years ago

not sure what you mean. please try again to explain what files are missing or what did not work when you tried what.

the repo comes with a php file for the backupzip job class and it registers it with composer autoloading. that plugin vendor folder will be merged with your root vendor folder as intended by kirbys composer installer.

https://github.com/bnomei/kirby3-janitor/blob/master/classes/BackupZipJob.php https://github.com/bnomei/kirby3-janitor/blob/master/vendor/composer/autoload_classmap.php#L9

bnomei commented 4 years ago

if you used janitor in you plugin before also make sure its v2. you might need to remove the dependencies, remove the composer.lock file or force installation using composer require bnomei/kirby3-janitor:^2.5

jesuismaxime commented 4 years ago

When using, as written in the doc, the composer require bnomei/kirby3-janitor command add that line in the composer.json file : "bnomei/kirby3-janitor": "^1.4" so there`s a lot of new file/features (I guess) that goes missing. That’s why i said that the "Installation trough composer doesn’t install the [actual] repo".

Once force to 2.5, everything works fine

bnomei commented 4 years ago

thanks @jesuismaxime for providing more information. i understand your issue now but i can not find any wrong configuration on my end. everything on packagist seems fine to me.

the composer require will check an existing composer.lock file and if that has a version of janitor less than 2.0.0 it will not upgrade but use 1.4.2. but that is my only guess how it might happen.