Skip to content

Add "Composer Preload" plugin #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2018
Merged

Add "Composer Preload" plugin #31

merged 1 commit into from
Nov 23, 2018

Conversation

Ayesh
Copy link
Contributor

@Ayesh Ayesh commented Nov 23, 2018

Hi Jens,
Please consider adding "Composer Preload" plugin to the list.

This is a shameless self plug, but I genuinely believe this plugin serves a useful purpose. It adds a new "composer preload" command that, when run, creates a vendor/preload.php file that can cache a configurable list PHP files to opcache, speeding up execution of the app.

This can come really handy when phone 7.4 comes with Preload RFC implemented.

Thanks,
Ayesh.

@jakoch
Copy link
Owner

jakoch commented Nov 23, 2018

Hey Ayesh,

so, the generated file contains a list of opcache_compile_file() entries.
And in the end you would set opcache.preload=vendor/preload.php or trigger this from the app itself, right? Ok, why not... it's an alternative to https://github.com/jderusse/composer-warmup (which is already in the list).

Referencing the Preload RFC: https://wiki.php.net/rfc/preload

Thanks for contributing. 👍
Regards Jens

@jakoch jakoch merged commit 6d0f14f into jakoch:master Nov 23, 2018
@Ayesh
Copy link
Contributor Author

Ayesh commented Nov 23, 2018

Thanks, the other plugin looks pretty interesting too, although it has a different approach to warm up.

Thanks for accepting the PR!

Cheers
Ayesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants