Task #52280

Throw Exception if there is an array in PSR-0 autoload

Added by Michael Gerdemann almost 8 years ago. Updated almost 8 years ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-09-26
Due date:
% Done:

0%

Estimated time:
Sprint:
PHP Version:
Has patch:
Yes
Complexity:

Description

It would be nice if TYPO3 Flow throws an Exception if there is an array in PSR-0 autoload in composer.json.

Example:

"autoload": { "psr-0":{ "placeholder": ["src/", "src2/"] } },

Patch:

if (is_array($this->getComposerManifest()->autoload->{'psr-0'}->{$this->getNamespace()})) {
    throw new \TYPO3\Flow\Package\Exception\InvalidPackageManifestException(sprintf('The autoload for package "%s" is an array. Please change it to string at "%scomposer.json".', $packageKey, $this->packagePath.$manifestPath), 1380172921);
}


Files

patch_1.diff (927 Bytes) patch_1.diff Michael Gerdemann, 2013-09-26 07:46
patch_1.diff (1.05 KB) patch_1.diff Michael Gerdemann, 2013-09-26 08:01

Related issues

Related to TYPO3.Flow - Bug #43541: Incomplete classes path detection for PSR-0New2012-12-03

Actions
#2

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24252

#3

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24252

#4

Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24252

#5

Updated by Gerrit Code Review almost 8 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24252

Also available in: Atom PDF