Skip to content

Commit

Permalink
Deprecate "autoload.exclude-from-files" support
Browse files Browse the repository at this point in the history
Added:
- Warning against using "autoload.exclude-from-files" and to use "extra.exclude…" instead
  • Loading branch information
mcaskill committed Sep 25, 2020
1 parent 658b03e commit ae60699
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ExcludeFilePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ class ExcludeFilePlugin implements
*/
private $composer;

/**
* @var IOInterface
*/
private $io;

/**
* Apply plugin modifications to Composer.
*
Expand All @@ -41,6 +46,7 @@ class ExcludeFilePlugin implements
public function activate(Composer $composer, IOInterface $io)
{
$this->composer = $composer;
$this->io = $io;
}

/**
Expand Down Expand Up @@ -182,6 +188,7 @@ private function getExcludedFiles(PackageInterface $package)

// Skip misconfigured or empty packages
if (isset($autoload[$type]) && is_array($autoload[$type])) {
$this->io->writeError('<warning>Using the "'.$type.'" property from "autoload" is deprecated and will be removed in mcaskill/composer-exclude-files v2.0. Use the property from "extra" instead.</warning>');
return $autoload[$type];
}

Expand Down

0 comments on commit ae60699

Please sign in to comment.