odan / slim4-skeleton

A Slim 4 Skeleton
https://odan.github.io/slim4-skeleton/
MIT License
448 stars 80 forks source link

Install troubleshooting #104

Closed fbarretto closed 2 years ago

fbarretto commented 2 years ago

Hi,

I'm trying to install your slim4-skeleton, following the instructions provided at https://odan.github.io/slim4-skeleton/installation.html, but I'm having a series of issues that seems related do unmet dependencies.

composer create-project odan/slim4-skeleton my-app

Creating a "odan/slim4-skeleton" project at "./my-app"
Installing odan/slim4-skeleton (0.24.0)
  - Installing odan/slim4-skeleton (0.24.0): Extracting archive
Created project in /home/barretto/my-app
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires squizlabs/php_codesniffer ^3 -> satisfiable by squizlabs/php_codesniffer[3.0.0, ..., 3.7.1].
    - squizlabs/php_codesniffer[3.0.0, ..., 3.7.1] require ext-xmlwriter * -> it is missing from your system. Install or enable PHP's xmlwriter extension.
  Problem 2
    - phpunit/phpunit[9.0.0, ..., 9.2.6] require php ^7.3 -> your php version (8.1.10) does not satisfy that requirement.
    - phpunit/phpunit[8.5.12, ..., 8.5.29, 9.3.0, ..., 9.5.24] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
    - phpunit/phpunit[8.0.0, ..., 8.5.11] require php ^7.2 -> your php version (8.1.10) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ^8 || ^9 -> satisfiable by phpunit/phpunit[8.0.0, ..., 8.5.29, 9.0.0, ..., 9.5.24].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/8.1/cli/php.ini
    - /etc/php/8.1/cli/conf.d/10-opcache.ini
    - /etc/php/8.1/cli/conf.d/10-pdo.ini
    - /etc/php/8.1/cli/conf.d/20-calendar.ini
    - /etc/php/8.1/cli/conf.d/20-ctype.ini
    - /etc/php/8.1/cli/conf.d/20-curl.ini
    - /etc/php/8.1/cli/conf.d/20-exif.ini
    - /etc/php/8.1/cli/conf.d/20-ffi.ini
    - /etc/php/8.1/cli/conf.d/20-fileinfo.ini
    - /etc/php/8.1/cli/conf.d/20-ftp.ini
    - /etc/php/8.1/cli/conf.d/20-gettext.ini
    - /etc/php/8.1/cli/conf.d/20-iconv.ini
    - /etc/php/8.1/cli/conf.d/20-phar.ini
    - /etc/php/8.1/cli/conf.d/20-posix.ini
    - /etc/php/8.1/cli/conf.d/20-readline.ini
    - /etc/php/8.1/cli/conf.d/20-shmop.ini
    - /etc/php/8.1/cli/conf.d/20-sockets.ini
    - /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
    - /etc/php/8.1/cli/conf.d/20-sysvsem.ini
    - /etc/php/8.1/cli/conf.d/20-sysvshm.ini
    - /etc/php/8.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-xmlwriter --ignore-platform-req=ext-dom` to temporarily ignore these required extensions.

Im running php 8.1 on Ubuntu 20.04 and composer 2.4.2

PHP 8.1.10 (cli) (built: Sep 18 2022 10:25:43) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.10, Copyright (c), by Zend Technologie
Composer version 2.4.2 2022-09-14 16:11:15

Any help is much appreciated.

fbarretto commented 2 years ago

Installing phpunit solved the issue. I'm sorry I've missed that.

odan commented 2 years ago

According to the error message, the ext-xmlwriter and the ext-dom PHP extension were missing.