Giter VIP home page Giter VIP logo

composer-config-reader's People

Contributors

ezzatron avatar spipu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

composer-config-reader's Issues

Implement new Composer settings

Primary settings:

  • archive
  • prefer-stable

Autoload settings:

  • psr-4

Project settings:

  • use-include-path
  • preferred-install
  • github-oauth
  • cache-dir
  • cache-files-dir
  • cache-repo-dir
  • cache-vcs-dir
  • cache-ttl
  • cache-files-ttl
  • cache-files-maxsize
  • discard-changes
  • autoloader-suffix
  • optimize-autoloader
  • prepend-autoloader
  • github-domains

Scripts:

  • pre-status-cmd
  • post-status-cmd
  • pre-autoload-dump
  • post-autoload-dump
  • post-root-package-install
  • post-create-project-cmd

Crash when preferred-install is a hash

When I use the component with the composer.json of a Symfony Flex project I got the following error :

  [Eloquent\Enumeration\Exception\UndefinedMemberException]
  No member with value equal to stdClass::__set_state(array(
     '*' => 'dist',
  )) defined in class 'Eloquent\\Composer\\Configuration\\Element\\Installati
  onMethod'.

The problem seems to come from this part of the composer.json file:

    "config": {
        "preferred-install": {
            "*": "dist"
        }
    },

Feature request: autoload-dev

It is currently not possible to read autoload-dev information with this package. It would be great if this could be added.

Reader throws exception on "packagist:false" repository

Using the 2.0.0 release:

This composer.json is valid according to Composer:

{
    "name": "foo/bar",
    "description": "Descriptive text",
    "license": "CC0-1.0",
    "authors": [
        {
            "name": "Chuck Norris",
            "email": "[email protected]"
        }
    ],
    "repositories": [
        {
            "packagist": false
        }
    ]
}

However, this code throws an exception:

$reader = new Eloquent\Composer\Configuration\ConfigurationReader;
$configuration = $reader->read($composerJson);

In ConfigurationReader line 286, this happens:

$type = $repository->get('type');

The repository that disables Packagist access does not have a type property, the access results in an exception.

The ConfigurationReader:read method fails after adding repository via composer

This is the implementation code:

$reader = new ConfigurationReader;
$composerConfiguration = $reader->read('/path/to/composer.json');

Executed composer command:

composer config repositories.drupal composer https://packagist.drupal-composer.org

The composer.json repositories section after adding repository via composer config command:

    "repositories": {
        "drupal": {
            "type": "composer",
            "url": "https://packagist.drupal-composer.org"
        }
    }

The error:

Recoverable fatal error: Argument 1 passed to Eloquent\Composer\Configuration\ConfigurationReader::createRepositories() must be of the type array, object given, called in vendor/eloquent/composer-config-reader/src/ConfigurationReader.php on line 146 and defined in vendor/eloquent/composer-config-reader/src/ConfigurationReader.php on line 279

Recoverable fatal error: Argument 1 passed to Eloquent\Composer\Configuration\ConfigurationReader::createRepositories() must be of the type array, object given, called in vendor/eloquent/composer-config-reader/src/ConfigurationReader.php on line 146 and defined in Eloquent\Composer\Configuration\ConfigurationReader->createRepositories() (line 279 of vendor/eloquent/composer-config-reader/src/ConfigurationReader.php).

The offending line:
src/ConfigurationReader.php#L146

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.