PHAR File Exporter

The Opens the PHAR export wizard Phar Export wizard allows you to create a PHAR file.

PHAR package specification

PHAR Specification Options:

Option

Description

Select the resources to export

In the list, check or clear the boxes to specify exactly the files that you want to export to the PHAR file. This list is initialized by the workbench selection.

Export generated class files and resources

If enabled, then generated class files and resources are included in the PHAR.

Export all output folders for checked projects

If enabled, then all output folders are included in the PHAR.

Export PHP source files and resources

If enabled, then PHP source files and resources are included in the PHAR.

Export refactorings for checked projects

If enabled, then refactoring scripts for the selected projects are included in the PHAR. This allows clients to migrate to the new PHAR by executing all the stored refactorings in the PHAR.

Select the export destination

Enter an external file system path and name for a PHAR file (either new or existing). Either type a valid file path in the field or click Browse to select a file via a dialog.

Options

You can select any of the following options:

  • Compress the contents of the PHAR file : to create a compressed PHAR file
  • Add directory entries: adds an entry for each directory to the PHAR file, even if the directory does only contain subdirectories.
  • Overwrite existing files without warning : if an existing file might be overwritten, you are prompted for confirmation. This option is applied to the PHAR file, the PHAR description, and the manifest file.

PHAR packaging options

PHAR Options:

Option

Description

Select options for handling problems

Choose whether to export classes with certain problems:

  • Export class files with compile errors
  • Export class files with compile warnings
Create source folder structure Selected this option if you want the source folder structure to be rebuilt in the PHAR. This option is only enabled when source files but no class files are exported. 
Build projects if not build automatically Select this option to force a rebuild before exporting. It is recommended to build be before exporting so the exported class files are up to date.

Save the description of this PHAR in the workspace

If you select this option, you can create a file in the workbench describing the PHAR file you are creating. Either type and/or browse to select a path and name for this new file.

PHAR manifest specification

PHAR Manifest Specification Options (Available when class file are exported):

Option

Description

Specify the manifest

Choose the source of the manifest file for this PHAR file:

  • Generate the manifest file (you can also choose either to save or reuse and save the new manifest file)
  • Use existing manifest from workspace

Seal contents

Choose which packages in the PHAR file must be sealed:

  • Seal the PHAR to seal the entire PHAR file; click Details to exclude selectively
  • Seal some packages click Details to choose selectively
Note: This option is only available if the manifest is generated.

Select the class of the application entry point 

Type or click Browse to select the main class for the PHAR file, if desired.

Note: This option is only available if the manifest is generated.

Related tasks

Creating PHAR files

Related reference