lando / php

The Official Lando PHP plugin.
https://docs.lando.dev/php
GNU General Public License v3.0
16 stars 16 forks source link

Error during download of composer when building WordPress recipe #95

Closed socrates77 closed 9 months ago

socrates77 commented 9 months ago

Given the following .lando.yml

name: project_name
recipe: wordpress
config:
  webroot: 'www/htdocs'
  php: '8.2'
services:
  memcached:
    type: memcached

During project start i get the following error when starting appserver container:

PHP Parse error:  syntax error, unexpected token "::", expecting variable in /tmp/composer-setup.php on line 1341

Parse error: syntax error, unexpected token "::", expecting variable in /tmp/composer-setup.php on line 1341
ERROR ==>  

I found the following error at the row 1341 of the file composer-setup.php inside the class HttpClient

[...]
class HttpClient {

    /** @var null|string */
    private static self::$caPath; // maybe it has to be: private static $caPath;
[...]

I get the same error if i start with php: '8.1'

socrates77 commented 9 months ago

Dropping the image and pulling it again fixed for devwithlando/php:7.4-apache-4 and devwithlando/php:8.1-apache-4