Task #52280

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

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

Status:Under Review Start date:2013-09-26
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
Sprint: Has patch:Yes
PHP Version: 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);
}

patch_1.diff Magnifier (927 Bytes) Michael Gerdemann, 2013-09-26 07:46

patch_1.diff Magnifier (1 kB) Michael Gerdemann, 2013-09-26 08:01


Related issues

related to TYPO3.Flow - Bug #43541: Incomplete classes path detection for PSR-0 New 2012-12-03

History

#1 Updated by Michael Gerdemann almost 2 years ago

#2 Updated by Gerrit Code Review almost 2 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 2 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 2 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 2 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