Invalid composer format after install or update

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 4.x

After I run a composer install or update, the composer.json file is left in an invalid format. Specifically config.platform is set to an empty array instead of an empty object.

This used to be irritating but now I’m a good boy and not deploying SS through version control and using composer on my remotes it’s a royal pain in the a…

Do I just delete the platform entry or?

Hi @LanceH, I hadn’t heard of that platform property before but since it’s for faking platform packages it doesn’t look like something that should be present on a production environment. I checked a few of my Silverstripe projects and they all only have this for the config section (locally and deployed):

    "config": {
        "process-timeout": 600
    }, 

Could it be that Composer on your remote is an old/buggy version? I wouldn’t have thought that Silverstripe itself would be responsible for a problem like this.

Edit: if you currently have an empty config.platform entry in your composer.json file then I would say yeah, go ahead and delete it!

1 Like

Cheers for that @JonoM bizarre, IDK where that came from then. Doesn’t appear in any of the GitHub repo’s. I don’t think I added it, don’t know what it does… Deleted it and seems fine. Ran an update and it didn’t get re-added.

1 Like