# Compatibility of agentejo/cockpit and cockpithq/cockpit and docker support

**URL:** https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853
**Category:** Cockpit v2
**Created:** [August 16, 2023, 5:21pm UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853 "2023-08-16T17:21:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tommueller](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tommueller](https://discourse.getcockpit.com/u/tommueller)
#### Post date: [August 16, 2023, 5:21pm UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853/1 "2023-08-16T17:21:41Z")

</div>

Hi,

I am wondering about our possibilities to migrate from an old 0.11.0 version running in the previously provided docker image (agentejo/cockpit).  
Now I know this version is about 3 years old and we are considering whether or not we can manage to find the resources to upgrade to v2.

However I can neither find any information on a migration guide nor does there seem to be an official docker image anymore. I found some 3 months old post here of @raffaelj working on a migration script, but not sure what the status is on this …

Am I overseeing anything? Are the version at all compatible or what are our options?

Thanks!  
Tom

---

<div class="post-metadata">

### Author: ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)
#### Post date: [August 17, 2023, 9:49am UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853/2 "2023-08-17T09:49:14Z")

</div>

> from an old 0.11.0 version

This is very outdated with security issues…

You should update at least to 0.12.2. Better update to the latest next branch and run `composer update`. Alternatively I have a fork, that should be compatible with PHP 8.1 (only tested with MongoLite).

- [GitHub - agentejo/cockpit: Add content management functionality to any site - plug & play / headless / api-first CMS](https://github.com/agentejo/cockpit)
- [raffaelj/cockpit: Fork of Cockpit CMS v1 (next branch) - cockpit - Codeberg.org](https://codeberg.org/raffaelj/cockpit)

> running in the previously provided docker image (agentejo/cockpit)

Never trust a public docker image. Build **and update** it yourself regularly.

> I found some 3 months old post here of @raffaelj working on a migration script, but not sure what the status is on this …

I’m debating myself, if I want to update to v2. I’m not happy about the new direction:

- less configurable because of fragile code pattern for spaces
- more database instead of file based configuration
- accessibility is as bad as v1, but v1 had more features and an addon ecosystem for inspiration
- this forum is broken (again)
  - most solutions in this forum are about v1
  - some discussions about v2 are here, some are in Github discussions
  - see also: [GitHub - raffaelj/cockpit-scripts: A collection of code snippets with annotations to modify Cockpit CMS](https://github.com/raffaelj/cockpit-scripts#information-about-cockpit)

That’s why I didn’t spend any more time on the migrate script. It worked for a huge part, but converting field definitions was only partially implemented. I wanted to do some cleanup before publishing it as alpha release. Maybe I should publish it anyways as unfinished prototype…

---

<div class="post-metadata">

### Author: ![tommueller](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tommueller](https://discourse.getcockpit.com/u/tommueller)
#### Post date: [October 13, 2023, 11:21am UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853/3 "2023-10-13T11:21:55Z")

</div>

Hi @raffaelj,

thanks for your continued activity and community support! Sorry for getting back on this only after such a long period. I am not working for the company that is using cockpit anymore and only support them in my free time, when I can.

Upgrading to 0.12.2 does not seem to cause any issues, however the official cockpit docker image is massively outdated and comes with a lot of security issues.

I was trying to get a container running with your fork, however I get some deprecation notifications, that seem to break the code. I can see it finds my singletons, collections and forms, when I am on the dashboard, but whenever I click any of them I just get a blank page.

The error seems to be resulting from a deprecation warning, which makes its way into a the URL of an API call. So I get a 401 for query to: `http://localhost/collections/entries/%3Cbr%20/%3E%3Cb%3EDeprecated%3C/b%3E:%20%20basename():%20Passing%20null%20to%20parameter%20#2%20($suffix)%20of%20type%20string%20is%20deprecated%20in%20%3Cb%3E/var/www/html/lib/LimeExtra/Helper/Filesystem.php%3C/b%3E%20on%20line%20%3Cb%3E295%3C/b%3E%3Cbr%20/%3E/config/tags/field-object.tag?nc=1697195112`

I am running this in the php:8.1-apache base image. Are you not seeing this issue in your running version? I am not a PHP dev by any means, the line in questions seems to be:  
`lib/LimeExtra/Helper/Filesystem.php #295`

I will sign up for codeberg and see if I can make a PR 😉

---

<div class="post-metadata">

### Author: ![tommueller](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tommueller](https://discourse.getcockpit.com/u/tommueller)
#### Post date: [October 13, 2023, 1:06pm UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853/4 "2023-10-13T13:06:44Z")

</div>

Otherwise it seems to be working just fine also with SQLLite!

---

<div class="post-metadata">

### Author: ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)
#### Post date: [October 13, 2023, 3:56pm UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853/5 "2023-10-13T15:56:28Z")

</div>

> [@tommueller](#):
>
> Are you not seeing this issue in your running version?

I think, I did the most tests only for PHP 8.0. And I switched versions with existing data of a few local test instances. So I might have missed a few things, that could break while editing…

I’ll have another look soon… (before PHP 8.0 EOL)

Thanks for the fix on Codeberg.

---

<div class="post-metadata">

### Author: ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)
#### Post date: [November 22, 2023, 11:08am UTC](https://discourse.getcockpit.com/t/compatibility-of-agentejo-cockpit-and-cockpithq-cockpit-and-docker-support/2853/6 "2023-11-22T11:08:41Z")

</div>

@tommueller Finally I was able to reproduce your issue. It turns out, that I don’t use custom tags in the `#config` folder in my test instances. Most other file system tasks use the leage flysystem library.

I reverted your change in my fork and replaced it with a correct one:

```diff
- public function getBasename(?string $suffix = null): string {
+ public function getBasename(string $suffix = ''): string {

```

See also: [PHP: SplFileInfo::getBasename - Manual](https://www.php.net/manual/en/splfileinfo.getbasename.php)  
And: [PHP: basename - Manual](https://www.php.net/basename)

This issue also appears in v2: [https://github.com/Cockpit-HQ/Cockpit/blob/develop/lib/Lime/Helper/Filesystem.php#L290](https://github.com/Cockpit-HQ/Cockpit/blob/develop/lib/Lime/Helper/Filesystem.php#L290)
