Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PostFileDownloadEvent.php

function PostFileDownloadEvent::getPackage

Get the package.

If this download is of type metadata, null is returned.

Return value

\Composer\Package\PackageInterface|null The package.

Deprecated

Use getContext instead

File

vendor/composer/composer/src/Composer/Plugin/PostFileDownloadEvent.php, line 124

Class

PostFileDownloadEvent
The post file download event.

Namespace

Composer\Plugin

Code

public function getPackage() : ?PackageInterface {
    trigger_error('PostFileDownloadEvent::getPackage is deprecated since Composer 2.1, use getContext instead.', E_USER_DEPRECATED);
    $context = $this->getContext();
    return $context instanceof PackageInterface ? $context : null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal