Skip to content

ChessCom/composer-warmup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

OpCode Warmer (composer plugin)

Optimize your application by warming up OpCode.

Requirements

  • PHP >=7.0
  • Zend Opcache
  • composer >=1.0.0

Install

$ composer global require "jderusse/composer-warmup"

Configure

; /etc/php/7.0/cli/conf.d/10-opcache.ini
zend_extension=opcache.so
opcache.enable_cli=1
opcache.file_cache='/tmp/opcache'

; recommended
opcache.file_update_protection=0

Usage

$ cd my-project
$ composer warmup-opcode

How does it work?

Since PHP 7.0, the OpCache extension is able to store the compiled OpCode into files.

This plugin add the warmup-opcode command to composer which triggers the compilation for every PHP file discovered in the project.

When you start the application for the first time, PHP doesn't need to compile the files which improve performances, as you can see in this blackfire comparison.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%