helhum / typo3-no-symlink-install

2 stars 0 forks source link

Fatal error when installing. #1

Open dwenzel opened 6 years ago

dwenzel commented 6 years ago

When installing or updating I get the following message:

Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files

  [Symfony\Component\Debug\Exception\FatalThrowableError]                                                                                                                                                                                                                                                                               
  Type error: Argument 1 passed to Composer\Installer\InstallationManager::getInstallPath() must implement interface Composer\Package\PackageInterface, null given, called in /Users/foo/bar/vendor/helhum/typo3-composer-setup/src/Composer/InstallerScript/RootDirectory.php on line 98                                                                                                                                                                                                                                                   

The installation seems incomplete.

composer.json:

{
  "type": "project",
  "require": {
    "helhum/typo3-no-symlink-install": "^0.2.0",
    "typo3/cms-backend": "^8.7",
    "typo3/cms-core": "^8.7",
    "typo3/cms-extbase": "^8.7",
    "typo3/cms-extensionmanager": "^8.7",
    "typo3/cms-filelist": "^8.7",
    "typo3/cms-fluid": "^8.7",
    "typo3/cms-frontend": "^8.7",
    "typo3/cms-install": "^8.7",
    "typo3/cms-lang": "^8.7",
    "typo3/cms-recordlist": "^8.7",
    "typo3/cms-saltedpasswords": "^8.7"
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://composer.typo3.org/"
    }
  ],
  "config": {
    "vendor-dir": "app/vendor",
    "web-dir": "app/web"
  },
  "extra": {
    "typo3/class-alias-loader": {
      "always-add-alias-loader": true
    },
    "autoload-case-sensitivity": false,
    "typo3/cms": {
      "cms-package-dir": "{$vendor-dir}/typo3/cms",
      "web-dir": "app/web"
    },
    "helhum/typo3-console": {
      "install-extension-dummy": false
    },
    "installer-types": [
      "legacy-webroot-library"
    ],
    "installer-paths": {
      "app/web/{$name}/": [
        "type:legacy-webroot-library"
      ]
    }
  }
}

PHP

$ php --version
PHP 7.1.12 (cli) (built: Dec 20 2017 12:33:48) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
dwenzel commented 6 years ago

The root composer.json must require "typo3/cms" before "helhum/typo3-no-symlink-install"

{
  "require": {
    "typo3/cms": "^8.7",
    "helhum/typo3-no-symlink-install": "^0.2.0",
    "typo3/cms-backend": "^8.7",
    "typo3/cms-core": "^8.7",
    "typo3/cms-extbase": "^8.7",
    "typo3/cms-extensionmanager": "^8.7",
    "typo3/cms-filelist": "^8.7",
    "typo3/cms-fluid": "^8.7",
    "typo3/cms-frontend": "^8.7",
    "typo3/cms-install": "^8.7",
    "typo3/cms-lang": "^8.7",
    "typo3/cms-recordlist": "^8.7",
    "typo3/cms-saltedpasswords": "^8.7"
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://composer.typo3.org/"
    }
  ],
  "config": {
    "vendor-dir": "app/vendor",
    "web-dir": "app/web"
  },
  "extra": {
    "typo3/class-alias-loader": {
      "always-add-alias-loader": true
    },
    "autoload-case-sensitivity": false,
    "typo3/cms": {
      "cms-package-dir": "{$vendor-dir}/typo3/cms",
      "web-dir": "app/web"
    }
  }
}
helhum commented 6 years ago

There is no point in requiring this package for a typo3 8.7.11 install, as the default currently will already produce what you need. no symlinks are created.

I think I could add a conflict with typo3 8.7 within this package.

dwenzel commented 6 years ago

Hi @helhum I'm not sure whether I get you right: Do you mean a default install of typo3/cms:8.7 would be produced without symlinks? This is not right. When I remove helhum/typo3-no-symlink-install a normal installation with symlinks is created:

.
├── app
│   ├── vendor
│   │   ├── autoload.php
│   │   ├── bin
│   │   ├── cogpowered
│   │   ├── composer
│   │   ├── doctrine
│   │   ├── guzzlehttp
│   │   ├── helhum
│   │   ├── mso
│   │   ├── psr
│   │   ├── swiftmailer
│   │   ├── symfony
│   │   ├── typo3
│   │   └── typo3fluid
│   └── web
│       ├── fileadmin
│       ├── index.php -> ../vendor/typo3/cms/index.php
│       ├── typo3 -> ../vendor/typo3/cms/typo3
│       ├── typo3conf
│       ├── typo3temp
│       └── uploads
├── composer.json
└── composer.lock
helhum commented 6 years ago

don’t require this package and don’t require typo3/cms, but only the individual packages. from your root composer.json, remove the first two dependencies

dwenzel commented 6 years ago

Thanks, I'll check this.