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

Allow plugin to run under Craft 5 #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

julianschelker
Copy link

The plugin seems to work just fine with Craft 5 in one of our applications.

Currently we have it installed as File with the following changes in our project composer.json:

"repositories": [
  ...
  {
      "type": "package",
      "package": {
        "name": "codemonauts/craft-readonly-field",
        "version": "2.1.0",
        "dist": {
          "url": "/opt/libraries/php/codemonauts-craft-readonly-field-2.1.0.tar",
          "type": "tar"
        },
        "type": "craft-plugin",
        "autoload": {
          "psr-4": {
            "codemonauts\\readonly\\": "src/"
          }
        },
        "extra": {
          "name": "Read-only Field",
          "handle": "readonly",
          "class": "codemonauts\\readonly\\ReadonlyPlugin"
        }
      }
    },
]

To allow php to find it we store the archived plugin in artifacts folder and map it into our docker container. docker-compose.yml:

   ...
    volumes:
      - ./artifacts:/opt/libraries/php

@julianschelker julianschelker mentioned this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant