eloquent / composer-config-reader Goto Github PK
View Code? Open in Web Editor NEWA light-weight component for reading Composer configuration files.
License: MIT License
A light-weight component for reading Composer configuration files.
License: MIT License
Primary settings:
Autoload settings:
Project settings:
Scripts:
It appears that this library relies on another:
https://github.com/justinrainbow/json-schema
After upgrading to PHP 7.4 the errro listed as the title is consistently reported, and disruptsnthe JSON responses for API's.
I realise the error is not a direct result of code in this library, but this is a heads-up that a library that is relied upon is causing issues.
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"
}
},
It is currently not possible to read autoload-dev
information with this package. It would be great if this could be added.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.