picoauth / picoauth

PicoAuth is a plugin for Pico CMS 2.0 providing various means of authentication and authorization to pages.
https://picoauth.github.io/
MIT License
8 stars 1 forks source link

Updating for Pico 3 Alpha release #8

Open notakoder opened 1 year ago

notakoder commented 1 year ago

The current release of Pico Auth cannot be installed using composer on the Pico3 alpha release. It complains about

 Problem 1
    - picoauth/picoauth v1.0.0 requires picocms/pico ^2.0 -> found picocms/pico[v2.0.0-beta.1, ..., v2.1.4] but it conflicts with your root composer.json require (^3.0).
    - picoauth/picoauth v1.0.1 requires picocms/pico ~2.0 -> found picocms/pico[v2.0.0-beta.1, ..., v2.1.4] but it conflicts with your root composer.json require (^3.0).
    - Root composer.json requires picoauth/picoauth ^1.0 -> satisfiable by picoauth/picoauth[v1.0.0, v1.0.1].

Changing the version in composer.json does not help either.

When an existing Pico 2x installation with Pico Auth installed and working is upgraded to Pico 3.xalpha release, this is error showed in the website.

PicoAuth is neither installed as a pico-composer plugin nor it has its own vendor/autoload.php.

Is a compatible release be expected in any foreseeable future or is there a way to make the existing PicoAuth installation work with alpha release?

dkyme commented 6 months ago

Have a look at my PR. If you just want to make it work with Pico 3 alpha you got to change in composer.json: "picocms/pico": "~3.0" and "symfony/yaml" to the according version of Pico, otherwise composer will complain. Due to breaking changes in Twig, in src/PicoAuthPlugin.php you have to change lines 321 & 330: new \Twig_SimpleFunction( -> new \Twig\TwigFunction(

Hope it helps

notakoder commented 5 months ago

Thanks for the reply. picocms/pico is already set to 3.0 in composer.json in the Pico alpha release.

"picocms/pico": "^3.0",

I cannot find "symfony/yaml" in composer.json. Should I add it or did you mean something else?

The changes in src/PicoAuthPlugin.php can only be made once the plug in is installed.